-
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.
-
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.
-
It worked :clap: Thank you...
Page generated in 1,718,129,032.04026 seconds with 11 queries