Soap Client.php from 0.9.1 doesn't work but Client.php from 0.8.0 does
| From: | Markus Fischer | Date: | Thu, 07 Jul 2005 07:30:33 +0000 |
| Subject: | Soap Client.php from 0.9.1 doesn't work but Client.php from 0.8.0 does | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-19890@lists.php.net to get a copy of this message | ||
Hi,
my app was running fine with 0.8.0 but had partial failures with 0.9.1
In the hunt for the bug I was at the point at using the complete 0.9.1 installation but only revert "Client.php" to the 0.8.0 version and everything did work out.
The analysis revealed that the $outgoing_payload of the HTTP transport from the NON-working Client.php looks like this:
--------------8<--------------------------
POST /sso/index.php HTTP/1.0
User-Agent: PEAR-SOAP 0.8.0RC4-devel
Host: dev
Content-Type: text/xml; charset=UTF-8
Content-Length: 956
SOAPAction: "urn:SSO_Server_SOAP#sso_server_soap#signOut"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="urn:SSO_Server_SOAP"
<SOAP-ENV:Body><ns4:signOut> <SSO_User> <userid>foobar</userid> <loginname>markus</loginname> <firstname>Markus</firstname> <lastname>Fischer</lastname> [...] --------------8<-------------------------- and from the WORKING (old) Client.php it looks like this: --------------8<-------------------------- POST /sso/index.php HTTP/1.0 User-Agent: PEAR-SOAP 0.8.0RC4-devel Host: dev Content-Type: text/xml; charset=UTF-8 Content-Length: 1482 SOAPAction: "urn:SSO_Server_SOAP#sso_server_soap#signOut" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns4="urn:SSO_Server_SOAP" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns4:signOut> <SSO_User xsi:type="ns4:SSO_User"> <userid xsi:type="xsd:string">foobar</userid> <loginname xsi:type="xsd:string">markus</loginname> <firstname xsi:type="xsd:string">Markus</firstname> <lastname xsi:type="xsd:string">Fischer</lastname> [...] --------------8<-------------------------- Also, the response from the NON-working version was: --------------8<-------------------------- HTTP/1.1 200 OK Date: Thu, 07 Jul 2005 06:31:51 GMT Server: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-15 AuthMySQL/4.3.9-2 mod_auth_pam/1.1.1 X-Powered-By: PHP/4.3.10-15 Connection: close Content-Type: text/html; charset=iso-8859-1 --------------8<-------------------------- This triggered a Soap_Fault in the Transport/HTTP.php because the mime type is text/html. message. For some reason it broken outgoing payload misses the xsi type definitions, but I've no idea why and why simply exchanging the Client.php files from the old into the new package fixes it. The changes in Client.php where quite a lot. Most of the whitespace and code shifting but it's next to undoable to identify the cause also because I don't know where to look at. Any help on this? thanks, - Markus