ID:               41745
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jasper at digiweb dot co dot nz
-Status:           Open
+Status:           Feedback
 Bug Type:         SOAP related
 Operating System: Linux
 PHP Version:      5.2.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi


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

[2007-06-20 02:40:17] jasper at digiweb dot co dot nz

Description:
------------
When null is provided for a SOAP parameter or the field of an object
passed as a SOAP parameter, PHP incorrectly encodes the parameter as
being empty (e.g. object with all null fields, or empty string) which is
different from an actual null. This breaks access to real-world web
services.

Reproduce code:
---------------
$soap = new SoapClient('/path/to/wsdl', array('trace' => true));
$soap->operation(null);

echo $soap->__getLastRequest();

Expected result:
----------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="NAMESPACE"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<SOAP-ENV:Body>
<ns1:operation>
<paramName xsi:nil="true"/>
</ns1:operation>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

== OR ==

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="NAMESPACE">
<SOAP-ENV:Body>
<ns1:operation/>
</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:ns1="NAMESPACE">
<SOAP-ENV:Body>
<ns1:operation>
<paramName/>
</ns1:operation>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


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


-- 
Edit this bug report at http://bugs.php.net/?id=41745&edit=1

Reply via email to