mirror of
https://github.com/php/php-src.git
synced 2024-12-22 08:20:23 +08:00
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
|
--TEST--
|
||
|
SOAP Classmap 2: SoapClient support for classmap
|
||
|
--SKIPIF--
|
||
|
<?php require_once('skipif.inc'); ?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class TestSoapClient extends SoapClient{
|
||
|
function __doRequest($request, $location, $action, $version) {
|
||
|
return <<<EOF
|
||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.nabek.com" 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:dotest2Response><res xsi:type="ns1:book">
|
||
|
<a xsi:type="xsd:string">Blaat</a>
|
||
|
<b xsi:type="xsd:string">aap</b>
|
||
|
</res>
|
||
|
</ns1:dotest2Response></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||
|
EOF;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class book{
|
||
|
public $a="a";
|
||
|
public $b="c";
|
||
|
|
||
|
}
|
||
|
|
||
|
$options=Array(
|
||
|
'actor' =>'http://schema.nothing.com',
|
||
|
'classmap' => array('book'=>'book', 'wsdltype2'=>'classname2')
|
||
|
);
|
||
|
|
||
|
$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options);
|
||
|
$ret = $client->dotest2("???");
|
||
|
var_dump($ret);
|
||
|
echo "ok\n";
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
object(book)#2 (2) {
|
||
|
["a"]=>
|
||
|
string(5) "Blaat"
|
||
|
["b"]=>
|
||
|
string(3) "aap"
|
||
|
}
|
||
|
ok
|