Hi all,
I am trying to use a webservice to look for specific users from my PHP application. I have used that exact same webservice in ASP.NET with success.
Basically, I do everything like the PHP doc tells me to, and I use the same methods/variables I used in ASP.NET (for the webservice itself), but I can't seem to get a result.
The function is listed in __getFunctions() and should return anyType
, which if I understand correctly is the equivalent of mixed
in PHP:
array(1) { [0]=> string(63) "anyType basicSearch(string $sharedSecret, string $searchParams)" }
When I do call basicSearch() though, it seems returns NULL.
basicSearch() is supposed to return an XML document with the information. In ASP.NET I used to simply cast the response to, I believe, and XmlDocument. Should I do that in PHP too? With which representation of an XML document (SimpleXML, DOM, etc.)?
Could it show as NULL just because PHP can't understand the format?
Am I doing something wrong in PHP? Or should I look into the webservice itself and try to debug on that side?
<?php
$client = new SoapClient($wsdl_url);
echo $client->__getFunctions();
echo "<br />\n";
echo $client->basicSearch($key, $req);
?>
Thanks.
PS: I am using the PHP 5 library. Maybe using some other library like nu-soap would help? There seems to be more doc online about it.
Update:
Using an array to pass the parameter does not work, SOAP expects separate arguments. Calling __getLastRequest() returns a string concatenating $key and $req with no other XML. Calling __getLastResponse() returns an empty string. No exception is thrown whatsoever. It seems PHP does not know what to do with the arguments I give it, even though it has parsed the WSDL file since I get the function I use listed when I call __getFunctions().
Any help would be appreciated.
Update': Still no solution working. I am baffled...