Skip to content

Commit 9023667

Browse files
committed
Fixed bug #34449 (ext/soap: XSD_ANYXML functionality not exposed)
1 parent 5682438 commit 9023667

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ PHP NEWS
2525
- Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
2626
- Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
2727
(Andrey)
28+
- Fixed bug #34449 (ext/soap: XSD_ANYXML functionality not exposed). (Dmitry)
2829
- Fixed bug #34420 (Possible crash inside curl_multi_remove_handle()). (Ilia)
2930
- Fixed bug #34331 (php crashes when variables_order is empty). (Ilia)
3031
- Fixed bug #34311 (unserialize() crashes with chars above 191 dec). (Nuno)

ext/soap/soap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ PHP_MINIT_FUNCTION(soap)
614614
REGISTER_LONG_CONSTANT("XSD_POSITIVEINTEGER", XSD_POSITIVEINTEGER, CONST_CS | CONST_PERSISTENT);
615615
REGISTER_LONG_CONSTANT("XSD_NMTOKENS", XSD_NMTOKENS, CONST_CS | CONST_PERSISTENT);
616616
REGISTER_LONG_CONSTANT("XSD_ANYTYPE", XSD_ANYTYPE, CONST_CS | CONST_PERSISTENT);
617+
REGISTER_LONG_CONSTANT("XSD_ANYXML", XSD_ANYXML, CONST_CS | CONST_PERSISTENT);
617618

618619
REGISTER_LONG_CONSTANT("SOAP_ENC_OBJECT", SOAP_ENC_OBJECT, CONST_CS | CONST_PERSISTENT);
619620
REGISTER_LONG_CONSTANT("SOAP_ENC_ARRAY", SOAP_ENC_ARRAY, CONST_CS | CONST_PERSISTENT);

ext/soap/tests/bugs/bug34449.phpt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
Bug #34449 (ext/soap: XSD_ANYXML functionality not exposed)
3+
--FILE--
4+
<?php
5+
class TestSoapClient extends SoapClient {
6+
function __doRequest($request, $location, $action, $version) {
7+
echo "$request\n";
8+
exit;
9+
}
10+
}
11+
12+
$my_xml = "<array><item/><item/><item/></array>";
13+
$client = new TestSoapClient(null, array('location' => 'test://', 'uri' => 'test://'));
14+
$client->AnyFunction(new SoapVar($my_xml, XSD_ANYXML));
15+
?>
16+
--EXPECT--
17+
<?xml version="1.0" encoding="UTF-8"?>
18+
<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>

0 commit comments

Comments
 (0)