Hello,
I have a "Hello World" web service written in C# running on a win2003 server.
From a Linux server I have PHP code which tries to execute the web service.
The problem is that when I print the results of the function I get "Object id #2" instead of "Hello World".
But if I inspect the response with _getLastResponse, the Hello World message is inside the XML.
What Am I missing?
Here is the code and the results afterwards.
<?
$client = new SoapClient("
http://10.1.11.84/h2wspublic/test.asmx?WSDL"
,array("tr
ace"=>1));
$returnStr = $client->HelloWorld();
echo "Response #1:" . $returnStr . "\n";
$returnStr = $client->__soapCall("Hello
World",arr
ay());
echo "Response #2:" . $returnStr . "\n";
print($client->HelloWorld(
)."\n");
echo $client->__getLastResponse
() . "\n";
echo "-----------------------\n
";
$client = new SoapClient("
http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl" );
print($client->getQuote("i
bm")."\n")
;
?>
Results from the code:
Response #1:Object id #2
Response #2:Object id #3
Object id #2
<?xml version="1.0" encoding="utf-8"?><soap:En
velope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"><
soap:Body>
<HelloWorl
dResponse xmlns="
http://tempuri.org/"><HelloWo
rldResult>
Hello World my friend marcelo</HelloWorldResult>
</HelloWor
ldResponse
></soap:Bo
dy></soap:
Envelope>
-----------------------
80.7
Thanks for your help
Start Free Trial