ID:               34788
 Updated by:       [EMAIL PROTECTED]
 Reported By:      marcus at synchromedia dot co dot uk
-Status:           Assigned
+Status:           Closed
 Bug Type:         SOAP related
 Operating System: *
 PHP Version:      5CVS-2005-10-08 (snap)
 Assigned To:      dmitry
 New Comment:

Fixed in CVS HEAD, PHP_5_1 and PHP_5_0.


Previous Comments:
------------------------------------------------------------------------

[2005-10-08 14:26:37] [EMAIL PROTECTED]

Assigned to the maintainer.


------------------------------------------------------------------------

[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>[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 this bug report at http://bugs.php.net/?id=34788&edit=1

Reply via email to