From: kim at datatal dot se Operating system: Windows PHP version: 5.2.10 PHP Bug Type: SOAP related Bug description: Invalid returntype of anyType.
Description: ------------ Returning from a method invoked over SOAP RPC with a datatype of anyType to a .NET client application will generate an error when the datatype in PHP is an array with values of different types. As specified in the XML Schema document there something known as anyType which is a close approximation to the urType/ur-type. Validation fails in the .NET client due to SOAP returning a datatype of ur-type and not anyType. It works when all the values in the array is of the same type, since the array will become of the type of the values instead of a generic/abstract type. Reproduce code: --------------- Create a web service with the following in the WSDL: <message name="theMethodResponse"> <part name="theMethodReturn" type="xsd:anyType"/> </message> <portType name="thePort"> <operation name="theMethod"> <output message="typens:theMethodResponse"/> </operation> </portType> In the SOAP service implementation: public function theMethod() { return array("value", 1234); } Expected result: ---------------- The expected result returned from the method in C# is a type of object[]. Actual result: -------------- An exception specifying that 'ur-type' is not defined in the XML schema in the following response: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP- ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="urn:smsservice" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">; <SOAP-ENV:Body> <ns1:theMethodResponse> <theMethodReturn SOAP-ENC:arrayType="xsd:ur-type[2]" xsi:type="SOAP- ENC:Array"> <item xsi:type="xsd:string">value</item> <item xsi:type="xsd:int">1234</item> </theMethodReturn> </ns1: theMethodResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> -- Edit bug report at http://bugs.php.net/?id=49577&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49577&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49577&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49577&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49577&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49577&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49577&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49577&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49577&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49577&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49577&r=support Expected behavior: http://bugs.php.net/fix.php?id=49577&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49577&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49577&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49577&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49577&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49577&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49577&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49577&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49577&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49577&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49577&r=mysqlcfg