Browse Source

Fixed bug #34449 (ext/soap: XSD_ANYXML functionality not exposed)

migration/RELEASE_1_0_0
Dmitry Stogov 21 years ago
parent
commit
1e32cdbb7d
  1. 1
      NEWS
  2. 1
      ext/soap/soap.c
  3. 18
      ext/soap/tests/bugs/bug34449.phpt

1
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)

1
ext/soap/soap.c

@ -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);

18
ext/soap/tests/bugs/bug34449.phpt

@ -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>
Loading…
Cancel
Save