Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 23-09-2008
Member
 
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.
Reply With Quote
  #2  
Old 23-09-2008
Member
 
Join Date: Apr 2008
Posts: 2,001
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.
Reply With Quote
  #3  
Old 23-09-2008
Member
 
Join Date: May 2008
Posts: 33
It worked Thank you...
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "PHP and SOAP"
Thread Thread Starter Forum Replies Last Post
Pet Society : No soap be Dirty Ritvikk Video Games 6 02-03-2011 10:24 AM
Flex and SOAP 1.2 Dev-Datta Windows Software 7 12-07-2010 02:19 PM
Enable SOAP to webservice Harshini Software Development 1 22-04-2009 11:53 PM
WARNING: GetConfig failure, error = 0x80244021, soap client error = 10, soap error code = 0, HTTP status code = 502 LAMONT D Server Update Service 9 10-04-2009 01:51 AM
How SOAP is better over other protocol Adit Technology & Internet 2 10-12-2008 03:19 PM


All times are GMT +5.5. The time now is 12:09 AM.