#34449 [NEW]: XSD_ANYXML functionality not exposed

From: Date: Fri, 09 Sep 2005 19:19:55 +0000
Subject: #34449 [NEW]: XSD_ANYXML functionality not exposed
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-84812@lists.php.net to get a copy of this message
From: trsnoozy at avstgroup dot com Operating system: PHP version: 5.1.0RC1 PHP Bug Type: SOAP related Bug description: XSD_ANYXML functionality not exposed Description: ------------ To the best of my knowledge, I should be able to pass a raw XML document (fragment) into the SOAP payload (i.e., XML Schema's anyXml). SoapVar -can- do this, however, the constant that activates this functionality (XSD_ANYXML) is not exported by the extension, nor is it documented in the help. Reproduce code: --------------- <?php $location = "http://www.example.org/example_service"; $uri = "http://www.example.org/schemas/example_service"; $my_xml = "<array><item/><item/><item/></array>"; $client = new SoapClient(null, array('location' => $location, 'uri' => $uri); $var = new SoapVar($my_xml, XSD_ANYXML); $param = new SoapParam($var, "XMLData"); $client->AnyFunction($param); ?> Expected result: ---------------- The SOAP call should contain the non-escaped, literal text of $my_xml. This behavior will occur if XSD_ANYXML is define()'d to 147. If you have netcat, you can set the $location value appropriately to point at a port (like http://localhost:1234) then set up netcat to listen on that port (nc -l -p 1234). This will show that the literal XML is, in fact, passed through as it should be. Actual result: -------------- The script will blow up with an warning about XSD_ANYXML being undefined, followed by an error stating that it's an invalid value for SoapVar. The problem is easily solved by registering the XSD_ANYXML #define as a PHP constant in the ext/soap/soap.c file. Naturally, adding this constant to the help files would be nice, too :). -- Edit bug report at http://bugs.php.net/?id=34449&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34449&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34449&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34449&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34449&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34449&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34449&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34449&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34449&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34449&r=support Expected behavior: http://bugs.php.net/fix.php?id=34449&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34449&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34449&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34449&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34449&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34449&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34449&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34449&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34449&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34449&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34449&r=mysqlcfg

« previous php.bugs (#84812) next »