ID: 40318 Updated by: [EMAIL PROTECTED] Reported By: bink at eezi dot net dot au -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Redhat PHP Version: 5.2.0 Assigned To: dmitry New Comment:
Pleaseprovide the WSDL file. I am not able to check your example without it. Previous Comments: ------------------------------------------------------------------------ [2007-02-06 00:45:18] bink at eezi dot net dot au I'm not able to test cvs, this is being used on our development and production servers. If there is someone else out there with a server running cvs I coule setup a trial on it to see... Just need shell access on a normal user.... ------------------------------------------------------------------------ [2007-02-05 20:38:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip ------------------------------------------------------------------------ [2007-02-02 06:31:12] bink at eezi dot net dot au The Namespaces on the Actual result are incorrect, they should match up with the Expected result.... ------------------------------------------------------------------------ [2007-02-02 06:05:27] bink at eezi dot net dot au Description: ------------ Possibly a documentation issue ===================================== When using a php object to create SOAP request headers, the SoapVAR($obj, SOAP_ENC_OBJECT....) and SoapHeader($namespace, $name, $soapvar) does not set the namespace of the object properties to the same as the object itself. Reproduce code: --------------- $client = new SOAPClient($wsdl, array('trace' => '1')); class headers { function __construct($val1, $val2){ $this->val1 = $val1; $this->val2 = $val2; } } $obj = new headers('val1','val2'); $svval=new SoapVar($obj,SOAP_ENC_OBJECT, NULL, NULL, "", "http://url.com/namespace2"); $header = new SoapHeader("http://url.com/namespace2", "SoapHeaderMsg", $svval, false); $client->__setSoapHeaders(array($header)); $client->ping(); print_r($client->__getLastRequest()); Expected result: ---------------- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://url.com/namespace1" xmlns:ns2="http://url.com/namespace2"> <SOAP-ENV:Header> <ns2:SoapHeaderMsg> <ns2:val1>val1</val1> <ns2:val2>val2</val2> </ns2:SoapHeaderMsg> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:PingRequest/> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Actual result: -------------- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ow.optus.com.au/b2b/bwsgservices/schema/version/2.0/bilpm" xmlns:ns2="http://ow.optus.com.au/b2b/xwsgservices/schema/wscommon"> <SOAP-ENV:Header> <ns2:SoapHeaderMsg> <val1>val1</val1> <val2>val2</val2> </ns2:SoapHeaderMsg> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:PingRequest/> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40318&edit=1