]> granicus.if.org Git - php/commitdiff
Fixed bug #34449 (ext/soap: XSD_ANYXML functionality not exposed)
authorDmitry Stogov <dmitry@php.net>
Mon, 12 Sep 2005 08:23:49 +0000 (08:23 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 12 Sep 2005 08:23:49 +0000 (08:23 +0000)
NEWS
ext/soap/soap.c
ext/soap/tests/bugs/bug34449.phpt [new file with mode: 0755]

diff --git a/NEWS b/NEWS
index b2beb682ab0eb03221f83ed5772ea0f8f9aaf46f..083a497761923f0503cda6fcf132ded96b3e7069 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ PHP                                                                        NEWS
   defined using reflection API. (Johannes)
 - Fixed a bug where stream_get_meta_data() did not return the "uri" element for
   files opened with tmpname(). (Derick)
+- Fixed bug #34449 (ext/soap: XSD_ANYXML functionality not exposed). (Dmitry)
 - Fixed bug #34310 (foreach($arr as $c->d => $x) crashes). (Dmitry)
 - Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9).
   (Derick)
index 304925dfca227d015f186eec85bf013a8414759a..bb50bfd54a3f4deff90768ffdbf79ab52e1ac5d2 100644 (file)
@@ -614,6 +614,7 @@ PHP_MINIT_FUNCTION(soap)
        REGISTER_LONG_CONSTANT("XSD_POSITIVEINTEGER", XSD_POSITIVEINTEGER, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("XSD_NMTOKENS", XSD_NMTOKENS, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("XSD_ANYTYPE", XSD_ANYTYPE, CONST_CS | CONST_PERSISTENT);
+       REGISTER_LONG_CONSTANT("XSD_ANYXML", XSD_ANYXML, CONST_CS | CONST_PERSISTENT);
 
        REGISTER_LONG_CONSTANT("SOAP_ENC_OBJECT", SOAP_ENC_OBJECT, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("SOAP_ENC_ARRAY", SOAP_ENC_ARRAY, CONST_CS | CONST_PERSISTENT);
diff --git a/ext/soap/tests/bugs/bug34449.phpt b/ext/soap/tests/bugs/bug34449.phpt
new file mode 100755 (executable)
index 0000000..95cd486
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Bug #34449 (ext/soap: XSD_ANYXML functionality not exposed)
+--FILE--
+<?php
+class TestSoapClient extends SoapClient {
+  function __doRequest($request, $location, $action, $version) {
+       echo "$request\n";
+       exit;
+  }
+}
+
+$my_xml = "<array><item/><item/><item/></array>";
+$client = new TestSoapClient(null, array('location' => 'test://', 'uri' => 'test://'));
+$client->AnyFunction(new SoapVar($my_xml, XSD_ANYXML));
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test://" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:AnyFunction><array><item/><item/><item/></array></ns1:AnyFunction></SOAP-ENV:Body></SOAP-ENV:Envelope>