ID:               33602
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sl at yes-co dot nl
-Status:           Open
+Status:           Feedback
 Bug Type:         SOAP related
 Operating System: Linux 2.6.8
 PHP Version:      5.0.4
 New Comment:

Please try using this CVS snapshot:

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




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

[2005-07-07 14:52:36] sl at yes-co dot nl

Description:
------------
Putting a value like this in a SOAP response:

        new SoapParam("true", XSD_BOOLEAN)

results in:

        <Foo xsi:type="xsd:boolean">0</Foo>

while it should be

        <Foo xsi:type="xsd:boolean">true</Foo>

Reproduce code:
---------------
<?php
        $server=new SoapServer(null, Array("uri" => "http://localhost/";,
"location" => "http://localhost/";));
        $server->addFunction(Foo);
        $server->handle('
                <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; >
                        <SOAP-ENV:Body>
                                <m:Foo>
                                </m:Foo>
                        </SOAP-ENV:Body>
                </SOAP-ENV:Envelope>
        ');
        
        function Foo() {
                return new SoapVar('true', XSD_BOOLEAN);
        }
?>

Expected result:
----------------
<SOAP-ENV:Envelope ...>
        <SOAP-ENV:Body>
                <ns1:FooResponse>
                        <return xsi:type="xsd:boolean">true</return>
                </ns1:FooResponse>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Actual result:
--------------
<SOAP-ENV:Envelope ...>
        <SOAP-ENV:Body>
                <ns1:FooResponse>
                        <return xsi:type="xsd:boolean">0</return>
                </ns1:FooResponse>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


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


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

Reply via email to