cvs: php-src(PHP_5_0) /ext/soap/tests classmap.wsdl classmap001.phpt classmap002.phpt /ext/soap/tests/bugs bug29236.phpt /ext/soap/tests/schema
schema074.phpt
| From: | Dmitry Stogov | Date: | Wed, 20 Apr 2005 06:35:29 +0000 |
| Subject: | cvs: php-src(PHP_5_0) /ext/soap/tests classmap.wsdl classmap001.phpt classmap002.phpt /ext/soap/tests/bugs bug29236.phpt /ext/soap/tests/schema schema074.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31495@lists.php.net to get a copy of this message | ||
dmitry Wed Apr 20 02:35:29 2005 EDT
Added files: (Branch: PHP_5_0)
/php-src/ext/soap/tests/schema schema074.phpt
Modified files:
/php-src/ext/soap/tests classmap.wsdl classmap001.phpt
classmap002.phpt
/php-src/ext/soap/tests/bugs bug29236.phpt
Log:
Some tests where fixed
http://cvs.php.net/diff.php/php-src/ext/soap/tests/classmap.wsdl?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: php-src/ext/soap/tests/classmap.wsdl diff -u php-src/ext/soap/tests/classmap.wsdl:1.1.2.2 php-src/ext/soap/tests/classmap.wsdl:1.1.2.3 --- php-src/ext/soap/tests/classmap.wsdl:1.1.2.2 Wed Nov 17 01:19:12 2004 +++ php-src/ext/soap/tests/classmap.wsdl Wed Apr 20 02:35:28 2005 @@ -1,60 +1,60 @@ -<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.nothing.com" targetNamespace="http://schemas.nothing.com"> - <wsdl:types> - <xsd:schema targetNamespace="http://schemas.nothing.com"> - <xsd:complexType name="book"> - <xsd:all> - <xsd:element name="a" type="xsd:string"/> - <xsd:element name="b" type="xsd:string"/> - </xsd:all> - </xsd:complexType> - </xsd:schema> - </wsdl:types> - <message name="dotestRequest"> - <part name="dotestReturn" type="tns:book"/> - </message> - <message name="dotestResponse"> - <part name="res" type="xsi:string"/> - </message> - <message name="dotest2Request"> - <part name="dotest2" type="xsi:string"/> - </message> - <message name="dotest2Response"> - <part name="res" type="tns:book"/> - </message> - <portType name="testPortType"> - <operation name="dotest"> - <input message="tns:dotestRequest"/> - <output message="tns:dotestResponse"/> - </operation> - <operation name="dotest2"> - <input message="tns:dotest2Request"/> - <output message="tns:dotest2Response"/> - </operation> - </portType> - <binding name="testBinding" type="tns:testPortType"> - <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> - <operation name="dotest"> - <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest" style="rpc"/> - <input> - <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> - </input> - <output> - <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> - </output> - </operation> - <operation name="dotest2"> - <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest2" style="rpc"/> - <input> - <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> - </input> - <output> - <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> - </output> - </operation> - </binding> - <service name="test"> - <port name="testPort" binding="tns:testBinding"> - <soap:address location="http://localhost:81/test/interface.php?class=test"/> - </port> - </service> -</wsdl:definitions> +<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.nothing.com" targetNamespace="http://schemas.nothing.com"> + <wsdl:types> + <xsd:schema targetNamespace="http://schemas.nothing.com"> + <xsd:complexType name="book"> + <xsd:all> + <xsd:element name="a" type="xsd:string"/> + <xsd:element name="b" type="xsd:string"/> + </xsd:all> + </xsd:complexType> + </xsd:schema> + </wsdl:types> + <message name="dotestRequest"> + <part name="dotestReturn" type="tns:book"/> + </message> + <message name="dotestResponse"> + <part name="res" type="xsi:string"/> + </message> + <message name="dotest2Request"> + <part name="dotest2" type="xsi:string"/> + </message> + <message name="dotest2Response"> + <part name="res" type="tns:book"/> + </message> + <portType name="testPortType"> + <operation name="dotest"> + <input message="tns:dotestRequest"/> + <output message="tns:dotestResponse"/> + </operation> + <operation name="dotest2"> + <input message="tns:dotest2Request"/> + <output message="tns:dotest2Response"/> + </operation> + </portType> + <binding name="testBinding" type="tns:testPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="dotest"> + <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest" style="rpc"/> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> + </output> + </operation> + <operation name="dotest2"> + <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest2" style="rpc"/> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> + </output> + </operation> + </binding> + <service name="test"> + <port name="testPort" binding="tns:testBinding"> + <soap:address location="http://localhost:81/test/interface.php?class=test"/> + </port> + </service> +</wsdl:definitions> http://cvs.php.net/diff.php/php-src/ext/soap/tests/classmap001.phpt?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: php-src/ext/soap/tests/classmap001.phpt diff -u php-src/ext/soap/tests/classmap001.phpt:1.1.2.2 php-src/ext/soap/tests/classmap001.phpt:1.1.2.3 --- php-src/ext/soap/tests/classmap001.phpt:1.1.2.2 Wed Nov 17 01:19:12 2004 +++ php-src/ext/soap/tests/classmap001.phpt Wed Apr 20 02:35:28 2005 @@ -1,50 +1,50 @@ ---TEST-- -SOAP Classmap 1: SoapServer support for classmap ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$GLOBALS['HTTP_RAW_POST_DATA']=" -<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" - xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" - xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" - xmlns:enc=\"http://schemas.xmlsoap.org/soap/encoding/\" - xmlns:ns1=\"http://schemas.nothing.com\" -> - <env:Body> - <dotest> - <book xsi:type=\"ns1:book\"> - <a xsi:type=\"xsd:string\">Blaat</a> - <b xsi:type=\"xsd:string\">aap</b> -</book> -</dotest> - </env:Body> -<env:Header/> -</env:Envelope>"; - -class test{ - function dotest(book $book){ - $classname=get_class($book); - return "Classname: ".$classname; - } -} - -class book{ - public $a="a"; - public $b="c"; - -} -$options=Array( - 'actor' =>'http://schema.nothing.com', - 'classmap' => array('book'=>'book', 'wsdltype2'=>'classname2') - ); - -$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); -$server->setClass("test"); -$server->handle(); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.nothing.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:dotestResponse><res xsi:type="xsd:string">Classname: book</res></ns1:dotestResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +SOAP Classmap 1: SoapServer support for classmap +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$GLOBALS['HTTP_RAW_POST_DATA']=" +<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" + xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" + xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" + xmlns:enc=\"http://schemas.xmlsoap.org/soap/encoding/\" + xmlns:ns1=\"http://schemas.nothing.com\" +> + <env:Body> + <dotest> + <book xsi:type=\"ns1:book\"> + <a xsi:type=\"xsd:string\">Blaat</a> + <b xsi:type=\"xsd:string\">aap</b> +</book> +</dotest> + </env:Body> +<env:Header/> +</env:Envelope>"; + +class test{ + function dotest(book $book){ + $classname=get_class($book); + return "Classname: ".$classname; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} +$options=Array( + 'actor' =>'http://schema.nothing.com', + 'classmap' => array('book'=>'book', 'wsdltype2'=>'classname2') + ); + +$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server->setClass("test"); +$server->handle(); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.nothing.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:dotestResponse><res xsi:type="xsd:string">Classname: book</res></ns1:dotestResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/diff.php/php-src/ext/soap/tests/classmap002.phpt?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: php-src/ext/soap/tests/classmap002.phpt diff -u php-src/ext/soap/tests/classmap002.phpt:1.1.2.2 php-src/ext/soap/tests/classmap002.phpt:1.1.2.3 --- php-src/ext/soap/tests/classmap002.phpt:1.1.2.2 Wed Nov 17 01:19:12 2004 +++ php-src/ext/soap/tests/classmap002.phpt Wed Apr 20 02:35:28 2005 @@ -1,44 +1,44 @@ ---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.nothing.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 +--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.nothing.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 http://cvs.php.net/diff.php/php-src/ext/soap/tests/bugs/bug29236.phpt?r1=1.1.2.1&r2=1.1.2.2&ty=u Index: php-src/ext/soap/tests/bugs/bug29236.phpt diff -u php-src/ext/soap/tests/bugs/bug29236.phpt:1.1.2.1 php-src/ext/soap/tests/bugs/bug29236.phpt:1.1.2.2 --- php-src/ext/soap/tests/bugs/bug29236.phpt:1.1.2.1 Mon Aug 9 01:50:06 2004 +++ php-src/ext/soap/tests/bugs/bug29236.phpt Wed Apr 20 02:35:29 2005 @@ -3,7 +3,7 @@ --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- -<? +<?php $client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl"); var_dump($client->__getFunctions()); ?> @@ -17,4 +17,4 @@ string(41) "LogoutResponse Logout(Logout $parameters)" [3]=> string(62) "GetSystemInfoResponse GetSystemInfo(GetSystemInfo $parameters)" -} \ No newline at end of file +} http://cvs.php.net/co.php/php-src/ext/soap/tests/schema/schema074.phpt?r=1.1&p=1 Index: php-src/ext/soap/tests/schema/schema074.phpt +++ php-src/ext/soap/tests/schema/schema074.phpt --TEST-- SOAP XML Schema 74: Structure with attributes and qualified elements --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php include "test_schema.inc"; $schema = <<<EOF <complexType name="testType"> <sequence> <element name="str" type="string"/> </sequence> <attribute name="int" type="int"/> </complexType> EOF; test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5), "rpc", "encoded", 'attributeFormDefault="qualified"'); echo "ok"; ?> --EXPECTF-- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam ns1:int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> object(stdClass)#%d (2) { ["str"]=> string(3) "str" ["int"]=> int(123) } ok
http://cvs.php.net/diff.php/php-src/ext/soap/tests/classmap.wsdl?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: php-src/ext/soap/tests/classmap.wsdl diff -u php-src/ext/soap/tests/classmap.wsdl:1.1.2.2 php-src/ext/soap/tests/classmap.wsdl:1.1.2.3 --- php-src/ext/soap/tests/classmap.wsdl:1.1.2.2 Wed Nov 17 01:19:12 2004 +++ php-src/ext/soap/tests/classmap.wsdl Wed Apr 20 02:35:28 2005 @@ -1,60 +1,60 @@ -<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.nothing.com" targetNamespace="http://schemas.nothing.com"> - <wsdl:types> - <xsd:schema targetNamespace="http://schemas.nothing.com"> - <xsd:complexType name="book"> - <xsd:all> - <xsd:element name="a" type="xsd:string"/> - <xsd:element name="b" type="xsd:string"/> - </xsd:all> - </xsd:complexType> - </xsd:schema> - </wsdl:types> - <message name="dotestRequest"> - <part name="dotestReturn" type="tns:book"/> - </message> - <message name="dotestResponse"> - <part name="res" type="xsi:string"/> - </message> - <message name="dotest2Request"> - <part name="dotest2" type="xsi:string"/> - </message> - <message name="dotest2Response"> - <part name="res" type="tns:book"/> - </message> - <portType name="testPortType"> - <operation name="dotest"> - <input message="tns:dotestRequest"/> - <output message="tns:dotestResponse"/> - </operation> - <operation name="dotest2"> - <input message="tns:dotest2Request"/> - <output message="tns:dotest2Response"/> - </operation> - </portType> - <binding name="testBinding" type="tns:testPortType"> - <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> - <operation name="dotest"> - <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest" style="rpc"/> - <input> - <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> - </input> - <output> - <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> - </output> - </operation> - <operation name="dotest2"> - <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest2" style="rpc"/> - <input> - <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> - </input> - <output> - <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> - </output> - </operation> - </binding> - <service name="test"> - <port name="testPort" binding="tns:testBinding"> - <soap:address location="http://localhost:81/test/interface.php?class=test"/> - </port> - </service> -</wsdl:definitions> +<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.nothing.com" targetNamespace="http://schemas.nothing.com"> + <wsdl:types> + <xsd:schema targetNamespace="http://schemas.nothing.com"> + <xsd:complexType name="book"> + <xsd:all> + <xsd:element name="a" type="xsd:string"/> + <xsd:element name="b" type="xsd:string"/> + </xsd:all> + </xsd:complexType> + </xsd:schema> + </wsdl:types> + <message name="dotestRequest"> + <part name="dotestReturn" type="tns:book"/> + </message> + <message name="dotestResponse"> + <part name="res" type="xsi:string"/> + </message> + <message name="dotest2Request"> + <part name="dotest2" type="xsi:string"/> + </message> + <message name="dotest2Response"> + <part name="res" type="tns:book"/> + </message> + <portType name="testPortType"> + <operation name="dotest"> + <input message="tns:dotestRequest"/> + <output message="tns:dotestResponse"/> + </operation> + <operation name="dotest2"> + <input message="tns:dotest2Request"/> + <output message="tns:dotest2Response"/> + </operation> + </portType> + <binding name="testBinding" type="tns:testPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="dotest"> + <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest" style="rpc"/> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> + </output> + </operation> + <operation name="dotest2"> + <soap:operation soapAction="http://localhost:81/test/interface.php?class=test/dotest2" style="rpc"/> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.nothing.com"/> + </output> + </operation> + </binding> + <service name="test"> + <port name="testPort" binding="tns:testBinding"> + <soap:address location="http://localhost:81/test/interface.php?class=test"/> + </port> + </service> +</wsdl:definitions> http://cvs.php.net/diff.php/php-src/ext/soap/tests/classmap001.phpt?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: php-src/ext/soap/tests/classmap001.phpt diff -u php-src/ext/soap/tests/classmap001.phpt:1.1.2.2 php-src/ext/soap/tests/classmap001.phpt:1.1.2.3 --- php-src/ext/soap/tests/classmap001.phpt:1.1.2.2 Wed Nov 17 01:19:12 2004 +++ php-src/ext/soap/tests/classmap001.phpt Wed Apr 20 02:35:28 2005 @@ -1,50 +1,50 @@ ---TEST-- -SOAP Classmap 1: SoapServer support for classmap ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$GLOBALS['HTTP_RAW_POST_DATA']=" -<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" - xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" - xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" - xmlns:enc=\"http://schemas.xmlsoap.org/soap/encoding/\" - xmlns:ns1=\"http://schemas.nothing.com\" -> - <env:Body> - <dotest> - <book xsi:type=\"ns1:book\"> - <a xsi:type=\"xsd:string\">Blaat</a> - <b xsi:type=\"xsd:string\">aap</b> -</book> -</dotest> - </env:Body> -<env:Header/> -</env:Envelope>"; - -class test{ - function dotest(book $book){ - $classname=get_class($book); - return "Classname: ".$classname; - } -} - -class book{ - public $a="a"; - public $b="c"; - -} -$options=Array( - 'actor' =>'http://schema.nothing.com', - 'classmap' => array('book'=>'book', 'wsdltype2'=>'classname2') - ); - -$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); -$server->setClass("test"); -$server->handle(); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.nothing.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:dotestResponse><res xsi:type="xsd:string">Classname: book</res></ns1:dotestResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +SOAP Classmap 1: SoapServer support for classmap +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$GLOBALS['HTTP_RAW_POST_DATA']=" +<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" + xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" + xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" + xmlns:enc=\"http://schemas.xmlsoap.org/soap/encoding/\" + xmlns:ns1=\"http://schemas.nothing.com\" +> + <env:Body> + <dotest> + <book xsi:type=\"ns1:book\"> + <a xsi:type=\"xsd:string\">Blaat</a> + <b xsi:type=\"xsd:string\">aap</b> +</book> +</dotest> + </env:Body> +<env:Header/> +</env:Envelope>"; + +class test{ + function dotest(book $book){ + $classname=get_class($book); + return "Classname: ".$classname; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} +$options=Array( + 'actor' =>'http://schema.nothing.com', + 'classmap' => array('book'=>'book', 'wsdltype2'=>'classname2') + ); + +$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server->setClass("test"); +$server->handle(); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.nothing.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:dotestResponse><res xsi:type="xsd:string">Classname: book</res></ns1:dotestResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/diff.php/php-src/ext/soap/tests/classmap002.phpt?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: php-src/ext/soap/tests/classmap002.phpt diff -u php-src/ext/soap/tests/classmap002.phpt:1.1.2.2 php-src/ext/soap/tests/classmap002.phpt:1.1.2.3 --- php-src/ext/soap/tests/classmap002.phpt:1.1.2.2 Wed Nov 17 01:19:12 2004 +++ php-src/ext/soap/tests/classmap002.phpt Wed Apr 20 02:35:28 2005 @@ -1,44 +1,44 @@ ---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.nothing.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 +--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.nothing.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 http://cvs.php.net/diff.php/php-src/ext/soap/tests/bugs/bug29236.phpt?r1=1.1.2.1&r2=1.1.2.2&ty=u Index: php-src/ext/soap/tests/bugs/bug29236.phpt diff -u php-src/ext/soap/tests/bugs/bug29236.phpt:1.1.2.1 php-src/ext/soap/tests/bugs/bug29236.phpt:1.1.2.2 --- php-src/ext/soap/tests/bugs/bug29236.phpt:1.1.2.1 Mon Aug 9 01:50:06 2004 +++ php-src/ext/soap/tests/bugs/bug29236.phpt Wed Apr 20 02:35:29 2005 @@ -3,7 +3,7 @@ --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- -<? +<?php $client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl"); var_dump($client->__getFunctions()); ?> @@ -17,4 +17,4 @@ string(41) "LogoutResponse Logout(Logout $parameters)" [3]=> string(62) "GetSystemInfoResponse GetSystemInfo(GetSystemInfo $parameters)" -} \ No newline at end of file +} http://cvs.php.net/co.php/php-src/ext/soap/tests/schema/schema074.phpt?r=1.1&p=1 Index: php-src/ext/soap/tests/schema/schema074.phpt +++ php-src/ext/soap/tests/schema/schema074.phpt --TEST-- SOAP XML Schema 74: Structure with attributes and qualified elements --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php include "test_schema.inc"; $schema = <<<EOF <complexType name="testType"> <sequence> <element name="str" type="string"/> </sequence> <attribute name="int" type="int"/> </complexType> EOF; test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5), "rpc", "encoded", 'attributeFormDefault="qualified"'); echo "ok"; ?> --EXPECTF-- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" 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:test><testParam ns1:int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> object(stdClass)#%d (2) { ["str"]=> string(3) "str" ["int"]=> int(123) } ok