SOAP service problem

liunx

Guest
I am writing a web service using PHP5's SOAP extension. I have a client and a server set up locally, and the client can connect to the server. However when I try to call one of the functions defined in the server's WSDL file, I get a SoapFault object back rather than the desired function return value. The SoapFault object has an error string:

...
public 'faultstring' => 'looks like we got no XML document' (length=33)
...

I have checked that the script containing the server runs (it does) and if the RPC function is called (it's not). Anyone have any ideas what the error means? Docs for this are a bit thin on the ground.It means that the XML is probably invalid. Is the client or server throwing the Exception? If the client throws the exception, I think it means that it got an invalid XML response. That could be caused by anything that will cause libxml2 to generate a parse error such as control characters, other invalid characters, or even an empty response (I think).It's a Client exception. I've narrowed down the problem to the message parts in the WSDL file. Currently if I send 1 parameter in the call, the server responds as expected. When I send two parameters it barfs again. The plot thickens.If you set the trace option to true, you can grab the XML that the client is sending. But I think you'll probably need some kind of sniffer to grab whatever the server response with when the exception is thrown.

But examining those may give some insight.

I recently made a PayPal Pro API using PHP 5's SOAP extension, and for me, it took a little bit to figure out how to correctly structure the array passed into the SOAP call so that the XML would be built correctly. As you said earlier, documentation is pretty thin.I've managed to fix my service and it's now callable from PHP. Unfortunately the target platform (Envox 6) can't seem to make the call. Waiting for a reply from the company.

As an aside, did you come across the following message:

Warning: SoapClient::__doRequest() [function.SoapClient---doRequest]: 37 bytes of buffered data lost during stream conversion!

It happens when I call more than one method from the client.

There is an entry on bugs.php.net with the same error so maybe it's related. Could just be a Windows thing as I've yet to test this out on a prod. server.Found this to be a Windows problem :)
 
Back
Top