]> 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:24:01 +0000 (08:24 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 12 Sep 2005 08:24:01 +0000 (08:24 +0000)
NEWS
ext/soap/soap.c
ext/soap/tests/bugs/bug34449.phpt [new file with mode: 0755]

diff --git a/NEWS b/NEWS
index ee93fc89c5afefae68cd9d5f95848e4f6d6e0d3b..34d5db8b98c41acfbe729c2b3f55773b84342ba4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ PHP                                                                        NEWS
 - Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
 - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
   (Andrey)
+- Fixed bug #34449 (ext/soap: XSD_ANYXML functionality not exposed). (Dmitry)
 - Fixed bug #34420 (Possible crash inside curl_multi_remove_handle()). (Ilia)
 - Fixed bug #34331 (php crashes when variables_order is empty). (Ilia)
 - Fixed bug #34311 (unserialize() crashes with chars above 191 dec). (Nuno)
index 1eafeff9e8ce4e1d38992c9198a7c3124f7ae273..aaec8d9f4d1160d7840fe2fd2f2d43002e5e0cc5 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>