#34788 [Opn->Asn]: SOAP Client not applying correct namespace to generated values
| From: | sniper@php.net | Date: | Sat, 08 Oct 2005 12:26:37 +0000 |
| Subject: | #34788 [Opn->Asn]: SOAP Client not applying correct namespace to generated values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86245@lists.php.net to get a copy of this message | ||
ID: 34788
Updated by: sniper@php.net
Reported By: marcus at synchromedia dot co dot uk
-Status: Open
+Status: Assigned
Bug Type: SOAP related
-Operating System: n/a
+Operating System: *
PHP Version: 5CVS-2005-10-08 (snap)
-Assigned To:
+Assigned To: dmitry
New Comment:
Assigned to the maintainer.
Previous Comments:
------------------------------------------------------------------------
[2005-10-08 08:19:20] marcus at synchromedia dot co dot uk
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>someone@example.com</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>someone@example.com</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 this bug report at http://bugs.php.net/?id=34788&edit=1