php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34788 SOAP Client not applying correct namespace to generated values
Submitted: 2005-10-08 08:19 UTC Modified: 2005-10-09 14:51 UTC
From: marcus at synchromedia dot co dot uk Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5CVS-2005-10-08 (snap) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marcus at synchromedia dot co dot uk
New email:
PHP Version: OS:

 

 [2005-10-08 08:19 UTC] 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>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-08 14:26 UTC] sniper@php.net
Assigned to the maintainer.

 [2005-10-09 14:51 UTC] dmitry@php.net
Fixed in CVS HEAD, PHP_5_1 and PHP_5_0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 13:01:30 2024 UTC