Annotation of embedaddon/php/ext/soap/tests/bugs/bug36908.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #36908 (wsdl default value overrides value in soap request)
3: --SKIPIF--
4: <?php
5: if (!extension_loaded('soap')) die('skip soap extension not available');
6: ?>
7: --INI--
8: soap.wsdl_cache_enabled=0
9: --FILE--
10: <?php
11: class PublisherService {
12: function add($publisher) {
13: return $publisher->region_id;
14: }
15: }
16: $input =
17: '<?xml version="1.0" encoding="UTF-8"?>
18: <soapenv:Envelope
19: xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
20: xmlns:xsd="http://www.w3.org/2001/XMLSchema"
21: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
22: <soapenv:Body>
23: <ns1:add xmlns:ns1="urn:PublisherService" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
24: <publisher href="#id0"/>
25: </ns1:add>
26: <multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
27: xmlns:ns3="http://soap.dev/soap/types" id="id0" soapenc:root="0"
28: soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
29: xsi:type="ns3:publisher">
30: <region_id href="#id5"/>
31: </multiRef>
32: <multiRef xmlns:ns5="http://soap.dev/soap/types"
33: xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id5"
34: soapenc:root="0"
35: soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
36: xsi:type="xsd:long">9</multiRef>
37: </soapenv:Body>
38: </soapenv:Envelope>';
39: ini_set('soap.wsdl_cache_enabled', false);
40: $server = new SoapServer(dirname(__FILE__)."/bug36908.wsdl");
41: $server->setClass("PublisherService");
42: $server->handle($input);
43: ?>
44: --EXPECT--
45: <?xml version="1.0" encoding="UTF-8"?>
46: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:PublisherService" 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:addResponse><out xsi:type="xsd:string">9</out></ns1:addResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>