Problem with getting value from SoapResponse
| From: | Dark Servant | Date: | Tue, 26 May 2009 17:24:06 +0000 |
| Subject: | Problem with getting value from SoapResponse | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-2927@lists.php.net to get a copy of this message | ||
Hi,
I've the problem that the SOAP Extension does not seem to parse the
response correctly. A small example:
I call a Webservice using a WSDL:
$objClient = new SoapClient(
"mywsdl.wsdl"
,array(
'trace'=>1
,'encoding'=>'ISO-8859-1'
,'location'=>'http://SOAPURL'
)
);
and I call a function supplying the required parameters:
$objResult = $objClient->execute(
array(
'context'=> $this->arrContext
,'input'=> $arrInput
,'output'=> $arrOutput
)
);
The XML-SOAP-Response contains a paramter:
<SESSION_TOKEN xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nil="false">819118e2f0f2f1f6f2e1</SESSION_TOKEN>
Problem: The resulting Soap-Object does NOT contain the parameter
value - the SESSION_TOKEN member is just NULL.
The previous version of the webservice returned the response in a different way:
<p828:SESSION_TOKEN>819118e2f0f2f1f6f2e1</p828:SESSION_TOKEN>
This kind of answer is parsed correctly by PHP - the Soap-Object
containts the SESSION_TOKEN member with the corresponding value.
Why is the value not parsed from the new response? Looks for me like a
PHP bug, as the response looks like a valid structure. Any hints?