logo       

Re: Problem with SOAP envelope?: msg#00093

php.nusoap.general

Subject: Re: Problem with SOAP envelope?

>>>>
When using the NuSOAP soapclient::call() method, I can't seem to
get the debug data from the server, even after trying to turn it on.
<<<<

If your client does

echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES)
. '</pre>';

it will display the contents of the response from the server, which will
include the server's debug within an XML comment at the end of the response.

>>>>
I am curious, does the server always turn the value in the SOAP env
body into an array? I looked at the code and that appears to be the
case.
<<<<

My previous e-mail gives the rationale for this and a "workaround".

>>>>
However, why is my data used as XML when I use the NuSOAP
client but used as an associative array when I send the data via HTTP
POST?
<<<<

Older versions of NuSOAP have the feature, designed to support a document-based
programming model, that if you passed a string of XML to soapclient::call as
the $params, that XML string would be serialized as-is in the SOAP Body. That
feature was broken. Now, the string gets ignored.

I presume that what you are doing is something like

$xml = '<myxml/>';
$client->call('mymethod', array('foo' => $xml));

That sets up a call with a single parameter named 'foo' that is a string. The
SOAP payload would have something like

<foo xsi:type="xsd:string">&lt;myxml/&gt;</foo>

which is not the same as literally sending

<myxml/>

On the server, it sees a single parameter that happens to be named 'foo' which
has the value '<myxml/>'.


Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id?66&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise