#51165 [NEW]: Using XSD_ANYTYPE removes method response tags in SOAP response

From: Date: Sat, 27 Feb 2010 07:29:17 +0000
Subject: #51165 [NEW]: Using XSD_ANYTYPE removes method response tags in SOAP response
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-148105@lists.php.net to get a copy of this message
From: tok at iki dot fi Operating system: Windows XP PHP version: 5.2.13 PHP Bug Type: SOAP related Bug description: Using XSD_ANYTYPE removes method response tags in SOAP response Description: ------------ function function1() { return new SoapVar("some text",XSD_STRING); } function function2() { return new SoapVar("<tag>some text</tag>",XSD_ANYXML); } $soapserver = new SoapServer("mywsdl.wsdl"); $soapserver->addFunction("function1"); $soapserver->addFunction("function2"); $soapserver->handle(); Requesting function1 will produce <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="myns"> <SOAP-ENV:Body> <ns1:function1Response>some text</ns1:function1Response> </SOAP-ENV:Body> </SOAP-ENV:Envelope> but requesting function2 will produce <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="myns"> <SOAP-ENV:Body> <tag>some text</tag> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The method name response tags are missing here. The Body-part should be <ns1:function2Response> <tag>some text</tag> </ns1:function2Response> Response-tags should come from WSDL as with function1. This behaviour is also demostrated in http://www.herongyang.com/WSDL/PHP-SOAP-XSD_ANYXML-Build-SOAP-Body-Element.html -- Edit bug report at http://bugs.php.net/?id=51165&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51165&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51165&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51165&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51165&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51165&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51165&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51165&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51165&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51165&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51165&r=support Expected behavior: http://bugs.php.net/fix.php?id=51165&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51165&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51165&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51165&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51165&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51165&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51165&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51165&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51165&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51165&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51165&r=mysqlcfg

« previous php.bugs (#148105) next »