Results 1 to 3 of 3

Thread: PHP and SOAP

  1. #1
    Join Date
    May 2008
    Posts
    33

    PHP and SOAP

    I have to create a client in PHP allowing the use of a web service done with Visual Studio (not me who does, just Visual Studio states where it has its importance).

    Brief seeking from right to left, I have to chop something, but only the format seems a little hassle to use.

    Explanation image, here is my code:
    Code:
    $client = new SoapClient('http://short.cs.abo.fi/Comollogin/Service1.asmx?WSDL'); 
    $person = array('UserName' => 'Jean', 'Pwd' => 'Robert'); 
    $result = $client->__soapCall('Login',array('parameters' => $person)); 
    echo "<pre>"; 
    print_r($result); 
    echo "</pre>";
    And here's the thing that I see it:
    Code:
    stdClass Object 
    ( 
    [LoginResult] => stdClass Object 
    ( 
    [Name] => Jean 
    [ForName] => Robert 
    [Id] => 581 
    ) 
    
    )
    I just tried to view the Name, or the ForName Id but without success, I do not know how it is structured and how I could achieve the things that I want.

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005
    Did you try $ result-> LoginResult-> Name

    $ result is an instance of a class that contains the answer made from a ton Webservice call. "loginResult" parameter is the return of WAS which is a structure with 3 cells.

    the fact of print_r ($ result) will provide entire contents of the forum $ result which is not a table.

  3. #3
    Join Date
    May 2008
    Posts
    33
    It worked Thank you...

Similar Threads

  1. Pet Society : No soap be Dirty
    By Ritvikk in forum Video Games
    Replies: 6
    Last Post: 02-03-2011, 10:24 AM
  2. Flex and SOAP 1.2
    By Dev-Datta in forum Windows Software
    Replies: 7
    Last Post: 12-07-2010, 02:19 PM
  3. Enable SOAP to webservice
    By Harshini in forum Software Development
    Replies: 1
    Last Post: 22-04-2009, 11:53 PM
  4. Replies: 9
    Last Post: 10-04-2009, 01:51 AM
  5. How SOAP is better over other protocol
    By Adit in forum Technology & Internet
    Replies: 2
    Last Post: 10-12-2008, 03:19 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,964,528.48659 seconds with 17 queries