From: marcus at synchromedia dot co dot uk Operating system: n/a PHP version: 5CVS-2005-10-08 (snap) PHP Bug Type: SOAP related Bug description: SOAP Client not applying correct namespace to generated values
Description: ------------ I'm creating a SOAP request using a WSDL. Any values I do not specify are automatically filled in by PHP with an xsi:nil value, however, PHP fails to attach the appropriate namespace to these elements. In the example given, you can see that the Email, FirstName and LastName fields are set to values that I submitted, and they have been correctly asigned the ns1 namespace, but values that I did not set (HomePhone and MailingCountry) that PHP has filled in with nil values have not been assigned this namespace This example also demonstrates bug 34787 - the xsi:nil values should be "true" not "1". Reproduce code: --------------- http://suraski.net/blog/index.php?/archives/5-PHP-5s-SOAP-extension-and-SalesForce.html Expected result: ---------------- <?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http:// schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn:sobject.enterprise.soap.sforce.com" xmlns:ns2="urn:enterprise.soap.sforce.com"> <SOAP-ENV:Header> <ns2:SessionHeader> <ns2:sessionId>4aydyZqjp2YXN2fGup36jvv7qsUBPf1EGdfOuTmEB9web rrmibaB27fvC6s7d750KvHtIWMbxsRqqcH9wSANKxhD2wYHcrlK4SNdGN37z i4=</ns2:sessionId> </ns2:SessionHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns2:create> <ns2:sObjects xsi:type="ns1:Contact"> <ns1:Email>[EMAIL PROTECTED]</ns1:Email> <ns1:FirstName>First</ns1:FirstName> <ns1:HomePhone xsi:nil="true" /> <ns1:LastName>Last</ns1:LastName> <ns1:MailingCountry xsi:nil="true" /> </ns2:sObjects> </ns2:create> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Actual result: -------------- <?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http:// schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn:sobject.enterprise.soap.sforce.com" xmlns:ns2="urn:enterprise.soap.sforce.com"> <SOAP-ENV:Header> <ns2:SessionHeader> <ns2:sessionId>4aydyZqjp2YXN2fGup36jvv7qsUBPf1EGdfOuTmEB9web rrmibaB27fvC6s7d750KvHtIWMbxsRqqcH9wSANKxhD2wYHcrlK4SNdGN37z i4=</ns2:sessionId> </ns2:SessionHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns2:create> <ns2:sObjects xsi:type="ns1:Contact"> <ns1:Email>[EMAIL PROTECTED]</ns1:Email> <ns1:FirstName>First</ns1:FirstName> <HomePhone xsi:nil="1" /> <ns1:LastName>Last</ns1:LastName> <MailingCountry xsi:nil="1" /> </ns2:sObjects> </ns2:create> </SOAP-ENV:Body> </SOAP-ENV:Envelope> -- Edit bug report at http://bugs.php.net/?id=34788&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34788&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34788&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34788&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34788&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34788&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34788&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34788&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34788&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34788&r=support Expected behavior: http://bugs.php.net/fix.php?id=34788&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34788&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34788&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34788&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34788&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34788&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34788&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34788&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34788&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34788&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34788&r=mysqlcfg
