ID: 34787 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:02] [EMAIL PROTECTED] Assigned to the maintainer. ------------------------------------------------------------------------ [2005-10-08 08:00:11] marcus at synchromedia dot co dot uk Description: ------------ This is a re-report of bug 33753 which was closed as bogus, and it's not the same problem as bug 33602. It's not bogus, it's a problem with PHP's WSDL handling. This is nothing to do with how PHP normally presents true and false values as strings, but how it deals with WSDL definitions. The WSDL is asking for xsd's representation of a boolean, not PHP's, and thus PHP's disregard for this is a bug. The line in the XMLSchema datatypes DTD is: <!ENTITY % boolean "(true|false)"> and the XMLSchema spec says: "An instance of a datatype that is defined as ·boolean· can have the following legal literals {true, false, 1, 0}." So PHP's output is not compatible with XMLSchema. You may still consider that bogus, but that's kind of academic - the upshot is that the SOAP implementation is broken in this respect as it is disobeying what the WSDL asks for. Because of this behaviour, SOAP calls generated by PHP are likely to fail (as in the original bug report) as they are generating XML that does not conform to the namespaces they reference. I can understand that it may be sensible to provide values to the SOAP client in the expected format for a given namespace (which is what Ilia suggested for bug 33753), but we don't always have that option - in the case I have, the values are being generated by PHP from the WSDL and NOT from any data that I'm submitting, so I have no control over it, so it must be fixed within PHP. Reproduce code: --------------- Examples on these pages demonstrate the bug in action (though that's not what they set out to do): http://suraski.net/blog/index.php?/archives/5-PHP-5s-SOAP-extension-and-SalesForce.html http://www.schlossnagle.org/~george/blog/index.php?/archives/235-Salesforce.com-and-PHP.html Expected result: ---------------- An unset value of type xsd:boolean in some arbitrary namespace ns1 should be rendered as: <ns1:someelement xsi:nil="true" /> Actual result: -------------- <ns1:someelement xsi:nil="1" /> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34787&edit=1