diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/soap/tests | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/soap/tests')
630 files changed, 29979 insertions, 0 deletions
diff --git a/ext/soap/tests/any.phpt b/ext/soap/tests/any.phpt new file mode 100644 index 0000000..93a0e66 --- /dev/null +++ b/ext/soap/tests/any.phpt @@ -0,0 +1,92 @@ +--TEST-- +SOAP handling of <any> +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexType { + function SOAPComplexType($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPComplexType('arg',34,325.325); + +function echoAnyElement($x) { + global $g; + + $g = $x; + $struct = $x->inputAny->any["SOAPComplexType"]; + if ($struct instanceof SOAPComplexType) { + return array("return" => array("any" => array("SOAPComplexType"=>new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPComplexType", "http://soapinterop.org/xsd", "SOAPComplexType", "http://soapinterop.org/")))); + } else { + return "?"; + } +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('echoAnyElement'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__)."/interop/Round4/GroupI/round4_groupI_xsd.wsdl", + array("trace"=>1,"exceptions"=>0, + 'classmap' => array('SOAPComplexType'=>'SOAPComplexType'))); +$ret = $client->echoAnyElement( + array( + "inputAny"=>array( + "any"=>new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPComplexType", "http://soapinterop.org/xsd", "SOAPComplexType", "http://soapinterop.org/") + ))); +var_dump($g); +var_dump($ret); +?> +--EXPECT-- +object(stdClass)#5 (1) { + ["inputAny"]=> + object(stdClass)#6 (1) { + ["any"]=> + array(1) { + ["SOAPComplexType"]=> + object(SOAPComplexType)#7 (3) { + ["varInt"]=> + int(34) + ["varString"]=> + string(3) "arg" + ["varFloat"]=> + float(325.325) + } + } + } +} +object(stdClass)#8 (1) { + ["return"]=> + object(stdClass)#9 (1) { + ["any"]=> + array(1) { + ["SOAPComplexType"]=> + object(SOAPComplexType)#10 (3) { + ["varInt"]=> + int(34) + ["varString"]=> + string(3) "arg" + ["varFloat"]=> + float(325.325) + } + } + } +} diff --git a/ext/soap/tests/bug46760.phpt b/ext/soap/tests/bug46760.phpt new file mode 100644 index 0000000..95cb588 --- /dev/null +++ b/ext/soap/tests/bug46760.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #46760 (SoapClient doRequest fails when proxy is used) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +$client = new SoapClient(null, array('proxy_host' => "localhost", + 'proxy_port' => '8080', + 'login' => "user", + 'password' => "test", + 'uri' => 'mo:http://www.w3.org/', + 'location' => 'http://some.url')); +var_dump($client->_proxy_port); + +?> +--EXPECT-- +int(8080) diff --git a/ext/soap/tests/bug48557.phpt b/ext/soap/tests/bug48557.phpt new file mode 100644 index 0000000..0724579 --- /dev/null +++ b/ext/soap/tests/bug48557.phpt @@ -0,0 +1,73 @@ +--TEST-- +Bug #48557 (Numeric string keys in Apache Hashmaps are not cast to integers) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +error_reporting(E_ALL); +ini_set('display_errors', 1); +ini_set("soap.wsdl_cache_enabled", 0); + +function test($map) { + var_dump($map, $map[1], $map[2]);die; +} + +$y = new SoapServer(dirname(__FILE__) . '/bug48557.wsdl'); +$y->addfunction("test"); +$request = <<<XML +<?xml version="1.0"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> + <SOAP-ENV:Body> + <ns1:test> + <testParam xsi:type="ns2:Map"> + <item> + <key xsi:type="xsd:int">1</key> + <value xsi:type="xsd:int">123</value> + </item> + <item> + <key xsi:type="xsd:int">-1000</key> + <value xsi:type="xsd:string">123</value> + </item> + <item> + <key xsi:type="xsd:string">2</key> + <value xsi:type="xsd:float">123.5</value> + </item> + <item> + <key xsi:type="xsd:string">-2000</key> + <value xsi:type="xsd:float">123.5</value> + </item> + <item> + <key xsi:type="xsd:string">011</key> + <value xsi:type="xsd:float">123.5</value> + </item> + <item> + <key xsi:type="xsd:int">012</key> + <value xsi:type="xsd:float">123.5</value> + </item> + </testParam> + </ns1:test> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +XML; + +$y->handle($request); + +?> +===DONE=== +--EXPECTF-- +array(6) { + [1]=> + int(123) + [-1000]=> + %string|unicode%(3) "123" + [2]=> + float(123.5) + [-2000]=> + float(123.5) + [%u|b%"011"]=> + float(123.5) + [12]=> + float(123.5) +} +int(123) +float(123.5) diff --git a/ext/soap/tests/bug48557.wsdl b/ext/soap/tests/bug48557.wsdl new file mode 100644 index 0000000..dfab543 --- /dev/null +++ b/ext/soap/tests/bug48557.wsdl @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://test-uri/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="InteropTest" targetNamespace="http://test-uri/"> + <types> + <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test-uri/"> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/> + </schema> + </types> + <message name="testMessage"> + <part xmlns:apache="http://xml.apache.org/xml-soap" name="testParam" type="apache:Map"/> + </message> + <portType name="testPortType"> + <operation name="test"> + <input message="testMessage"/> + </operation> + </portType> + <binding name="testBinding" type="testPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="test"> + <soap:operation soapAction="#test" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://test-uri/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + </operation> + </binding> + <service name="testService"> + <port name="testPort" binding="tns:testBinding"> + <soap:address location="test://"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/bugs/bug27722.phpt b/ext/soap/tests/bugs/bug27722.phpt new file mode 100644 index 0000000..d6d933b --- /dev/null +++ b/ext/soap/tests/bugs/bug27722.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #27722 (Segfault on schema without targetNamespace) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--GET-- +wsdl +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$x = new SoapClient(dirname(__FILE__)."/bug27722.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug27722.wsdl b/ext/soap/tests/bugs/bug27722.wsdl new file mode 100644 index 0000000..51f11e6 --- /dev/null +++ b/ext/soap/tests/bugs/bug27722.wsdl @@ -0,0 +1,92 @@ +<?xml version="1.0" ?>
+<definitions
+ xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+ 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/"
+ xmlns:si="http://soapinterop.org/xsd"
+ xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl">
+ <types>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ Purchase order schema for Example.com.
+ Copyright 2000 Example.com. All rights reserved.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
+
+ <xsd:element name="comment" type="xsd:string"/>
+
+ <xsd:complexType name="PurchaseOrderType">
+ <xsd:sequence>
+ <xsd:element name="shipTo" type="USAddress"/>
+ <xsd:element name="billTo" type="USAddress"/>
+ <xsd:element ref="comment" minOccurs="0"/>
+ <xsd:element name="items" type="Items"/>
+ </xsd:sequence>
+ <xsd:attribute name="orderDate" type="xsd:date"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="USAddress">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="street" type="xsd:string"/>
+ <xsd:element name="city" type="xsd:string"/>
+ <xsd:element name="state" type="xsd:string"/>
+ <xsd:element name="zip" type="xsd:decimal"/>
+ </xsd:sequence>
+ <xsd:attribute name="country" type="xsd:NMTOKEN"
+ fixed="US"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="Items">
+ <xsd:sequence>
+ <xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="productName" type="xsd:string"/>
+ <xsd:element name="quantity">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:positiveInteger">
+ <xsd:maxExclusive value="100"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="USPrice" type="xsd:decimal"/>
+ <xsd:element ref="comment" minOccurs="0"/>
+ <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="partNum" type="SKU" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- Stock Keeping Unit, a code for identifying products -->
+ <simpleType name="SKU">
+ <restriction base="xsd:string">
+ <pattern value="\d{3}-[A-Z]{2}"/>
+ </restriction>
+ </simpleType>
+
+</xsd:schema>
+</types>
+ <portType name="TestServicePortType">
+ </portType>
+
+ <binding name="TestServiceBinding" type="tns:TestServicePortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+ </binding>
+
+ <service name="TestService">
+ <port name="TestServicePort" binding="tns:TestServiceBinding">
+ <soap:address location="test://" />
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug27742.phpt b/ext/soap/tests/bugs/bug27742.phpt new file mode 100644 index 0000000..5d9636f --- /dev/null +++ b/ext/soap/tests/bugs/bug27742.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #27742 (WDSL SOAP Parsing Schema bug) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--GET-- +wsdl +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$x = new SoapClient(dirname(__FILE__)."/bug27742.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug27742.wsdl b/ext/soap/tests/bugs/bug27742.wsdl new file mode 100644 index 0000000..f38d911 --- /dev/null +++ b/ext/soap/tests/bugs/bug27742.wsdl @@ -0,0 +1,854 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Rakesh Vidyadharan (Enterprise Application Development Tribune Media Services) -->
+<wsdl:definitions name="xtvdWebService" targetNamespace="urn:TMSWebServices" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tms="urn:TMSWebServices" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <xsd:schema targetNamespace="urn:TMSWebServices" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tms="urn:TMSWebServices" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <simpleType name="duration">
+ <annotation>
+ <documentation xml:lang="en">ISO 8601 pattern used to denote program durations. Year, month and day are not relevent in our context and are omitted.</documentation>
+ </annotation>
+ <restriction base="xsd:duration">
+ <pattern value="PT[0-9][0-9]H[0-5][0-9]M"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="dateTime">
+ <annotation>
+ <documentation xml:lang="en">ISO 8601 pattern for date+time information : YYYY-MM-DDThh:mm:ssZ</documentation>
+ </annotation>
+ <restriction base="xsd:dateTime">
+ <pattern value="20[0-9]{2}\-[0-1][0-9]\-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9]Z"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="date">
+ <annotation>
+ <documentation xml:lang="en">ISO 8601 pattern for date: YYYY-MM-DD</documentation>
+ </annotation>
+ <restriction base="xsd:date">
+ <pattern value="(19|20)[0-9]{2}\-[0-1][0-9]\-[0-3][0-9]"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="time">
+ <annotation>
+ <documentation xml:lang="en">ISO 8601 pattern for time of day : hh:mm:ss</documentation>
+ </annotation>
+ <restriction base="xsd:time">
+ <pattern value="\d\d:\d\d:\d\d"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="mpaaRatings">
+ <annotation>
+ <documentation xml:lang="en">MPAA standard ratings for a movie as defined in the movie and TV database schemas.</documentation>
+ </annotation>
+ <restriction base="xsd:string">
+ <enumeration value="Adult">
+ <annotation>
+ <documentation xml:lang="en">This is the way this rating is defined in the movies database schema.</documentation>
+ </annotation>
+ </enumeration>
+ <enumeration value="AO">
+ <annotation>
+ <documentation xml:lang="en">This is the way this rating is defined in the TV database schema.</documentation>
+ </annotation>
+ </enumeration>
+ <enumeration value="G"/>
+ <enumeration value="NC-17"/>
+ <enumeration value="NONE">
+ <annotation>
+ <documentation xml:lang="en">Films in the movie database that do not have any ratings associated with them are sometimes marked with this value.</documentation>
+ </annotation>
+ </enumeration>
+ <enumeration value="NOT RATED">
+ <annotation>
+ <documentation xml:lang="en">This is the way films without any rating are defined in the movies database schema.</documentation>
+ </annotation>
+ </enumeration>
+ <enumeration value="NR">
+ <annotation>
+ <documentation xml:lang="en">This is the way films without any rating are defined in the TV database schema.</documentation>
+ </annotation>
+ </enumeration>
+ <enumeration value="PG"/>
+ <enumeration value="PG-13"/>
+ <enumeration value="R"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="starRating">
+ <annotation>
+ <documentation xml:lang="en">A Zap2it reviewer assigned rating for a given film.</documentation>
+ </annotation>
+ <restriction base="xsd:string">
+ <enumeration value="*"/>
+ <enumeration value="*+"/>
+ <enumeration value="**"/>
+ <enumeration value="**+"/>
+ <enumeration value="***"/>
+ <enumeration value="***+"/>
+ <enumeration value="****"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="movieCrewRole">
+ <annotation>
+ <documentation xml:lang="en">The roles that are currently defined for the production crew associated with a given film.</documentation>
+ </annotation>
+ <restriction base="xsd:string">
+ <enumeration value="Actor"/>
+ <enumeration value="Director"/>
+ <enumeration value="Executive Producer"/>
+ <enumeration value="Guest Star"/>
+ <enumeration value="Producer"/>
+ <enumeration value="Writer"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="movieGenres">
+ <annotation>
+ <documentation xml:lang="en">The standard genres that are used to classify films in the movies database schema.</documentation>
+ </annotation>
+ <restriction base="xsd:string">
+ <enumeration value=""/>
+ <enumeration value="Action"/>
+ <enumeration value="Adults only"/>
+ <enumeration value="Adventure"/>
+ <enumeration value="Animated musical"/>
+ <enumeration value="Biography"/>
+ <enumeration value="Children"/>
+ <enumeration value="Comedy"/>
+ <enumeration value="Comedy-drama"/>
+ <enumeration value="Crime drama"/>
+ <enumeration value="Docudrama"/>
+ <enumeration value="Documentary"/>
+ <enumeration value="Drama"/>
+ <enumeration value="Fantasy"/>
+ <enumeration value="French"/>
+ <enumeration value="Historical drama"/>
+ <enumeration value="Horror"/>
+ <enumeration value="Martial arts"/>
+ <enumeration value="Musical"/>
+ <enumeration value="Musical comedy"/>
+ <enumeration value="Musical romance"/>
+ <enumeration value="Mystery"/>
+ <enumeration value="Romance"/>
+ <enumeration value="Romance-comedy"/>
+ <enumeration value="Science fiction"/>
+ <enumeration value="Spanish"/>
+ <enumeration value="Suspense"/>
+ <enumeration value="Suspense-comedy"/>
+ <enumeration value="War"/>
+ <enumeration value="Western"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="movieAdvisories">
+ <annotation>
+ <documentation xml:lang="en">The standard advisory messages that are associated with a movie shown on TV.</documentation>
+ </annotation>
+ <restriction base="xsd:string">
+ <enumeration value="Adult Situations"/>
+ <enumeration value="Adolescentes y Adultos"/>
+ <enumeration value="Adultos"/>
+ <enumeration value="Brief Nudity"/>
+ <enumeration value="Graphic Language"/>
+ <enumeration value="Graphic Violence"/>
+ <enumeration value="Language"/>
+ <enumeration value="Mild Violence"/>
+ <enumeration value="Nudity"/>
+ <enumeration value="Publico General"/>
+ <enumeration value="Rape"/>
+ <enumeration value="Strong Sexual Content"/>
+ <enumeration value="Violence"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="tvRatings">
+ <annotation>
+ <documentation xml:lang="en">The FCC standard ratings for TV programs (http://www.fcc.gov/vchip/#guidelines)</documentation>
+ </annotation>
+ <restriction base="xsd:string">
+ <enumeration value="TVY"/>
+ <enumeration value="TVY7"/>
+ <enumeration value="TVG"/>
+ <enumeration value="TVPG"/>
+ <enumeration value="TV14"/>
+ <enumeration value="TVMA"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="tvColorCode">
+ <annotation>
+ <documentation>The standard color codes used to denote the color scheme used by a TV program (eg. Color, B & W ...).</documentation>
+ </annotation>
+ <restriction base="xsd:string">
+ <enumeration value="B & W">
+ <annotation>
+ <documentation xml:lang="en">Indicates that the program is begin telecast in Black and White.</documentation>
+ </annotation>
+ </enumeration>
+ <enumeration value="Color">
+ <annotation>
+ <documentation xml:lang="en">Indicates that the program being telecast is in color.</documentation>
+ </annotation>
+ </enumeration>
+ <enumeration value="Colorized">
+ <annotation>
+ <documentation xml:lang="en">Indicates that the program being telecast is a colorised version of the original program.</documentation>
+ </annotation>
+ </enumeration>
+ <enumeration value="Color and B & W">
+ <annotation>
+ <documentation xml:lang="en">Indicates that the program being telecast is partly in color and partly in Black and White.</documentation>
+ </annotation>
+ </enumeration>
+ </restriction>
+ </simpleType>
+ <attributeGroup name="filmDataAttributes">
+ <annotation>
+ <documentation xml:lang="en">Common attributes that are applicable to all the root elements of the XML schemas developed to represent film data.</documentation>
+ </annotation>
+ <attribute name="postalCode" type="xsd:string" use="optional">
+ <annotation>
+ <documentation xml:lang="en">The ZIP/Postal code for which the theatre list was generated.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="radius" type="xsd:float" use="optional" default="5">
+ <annotation>
+ <documentation xml:lang="en">The radius around the centroid of the ZIP/Postal code within which the films are located. A default value of 20 (miles for US customers and kilometres for non-US customers) will be used if the client making the request did not specify a radius.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="maxCount" type="xsd:int" use="optional">
+ <annotation>
+ <documentation xml:lang="en">The maximum number of film/theatre records that are included in the document. This number may be specified by the client making the request for the list of films/theatres/showtimes.</documentation>
+ </annotation>
+ </attribute>
+ </attributeGroup>
+ <complexType name="crewMember">
+ <annotation>
+ <documentation xml:lang="en">A cast or production crew member for a film or TV show.</documentation>
+ </annotation>
+ <sequence>
+ <element name="role" type="xsd:string">
+ <annotation>
+ <documentation xml:lang="en">Describes the role of the crew member. Eg. Actor, Director ...</documentation>
+ </annotation>
+ </element>
+ <element name="givenname" type="xsd:string" nillable="true">
+ <annotation>
+ <documentation xml:lang="en">The given/first name of the crew member. The element name follows LDAP naming convention. TMS does not have given/first names for all cast/crew members. Hence this element is nillable.</documentation>
+ </annotation>
+ </element>
+ <element name="surname" type="xsd:string">
+ <annotation>
+ <documentation xml:lang="en">The surname/last-name of the crew member. The element name follows LDAP naming convention.</documentation>
+ </annotation>
+ </element>
+ </sequence>
+ </complexType>
+ <complexType name="image">
+ <annotation>
+ <documentation>Complex type that contains the attributes of an image. The only attribute available at present is its URI.</documentation>
+ </annotation>
+ <sequence>
+ <element name="imageUri" type="xsd:anyURI" nillable="true">
+ <annotation>
+ <documentation>This element contains an absolute URI to an image associated with the film.</documentation>
+ </annotation>
+ </element>
+ <element name="width" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation>This element defines the width of the image associated with the film. This element is a place holder. The width attribute is not available at present.</documentation>
+ </annotation>
+ </element>
+ <element name="height" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation>This element defines the height of the image associated with the film. This element is a place holder. The height attribute is not available at present.</documentation>
+ </annotation>
+ </element>
+ </sequence>
+ </complexType>
+ <complexType name="address">
+ <annotation>
+ <documentation xml:lang="en">This complex type describes a generic address.</documentation>
+ </annotation>
+ <sequence>
+ <element name="streetAddress">
+ <annotation>
+ <documentation xml:lang="en">This element groups together the various street address parts for the entire address.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="street" type="xsd:string" maxOccurs="unbounded">
+ <annotation>
+ <documentation xml:lang="en">This field contains each entry for the street address part of the entire address.</documentation>
+ </annotation>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="city" type="xsd:string">
+ <annotation>
+ <documentation xml:lang="en">This field contains the city for the address.</documentation>
+ </annotation>
+ </element>
+ <element name="state" type="xsd:string">
+ <annotation>
+ <documentation xml:lang="en">This field contains the name/code of the state for the address.</documentation>
+ </annotation>
+ </element>
+ <element name="postalCode" type="xsd:string">
+ <annotation>
+ <documentation xml:lang="en">This field contains the ZIP/Postal code for the address.</documentation>
+ </annotation>
+ </element>
+ <element name="telephone" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">This field contains the telephone number if available for the address.</documentation>
+ </annotation>
+ </element>
+ <element name="fax" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">This field contains the fax number if available for the address.</documentation>
+ </annotation>
+ </element>
+ <element name="mobile" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">This field contains the mobile phone number if available for the address.</documentation>
+ </annotation>
+ </element>
+ <element name="email" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">This field contains the email address if available for the address.</documentation>
+ </annotation>
+ </element>
+ <element name="country" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">This field contains the country of the address.</documentation>
+ </annotation>
+ </element>
+ </sequence>
+ </complexType>
+ <element name="xtvd">
+ <annotation>
+ <documentation>Root element of the document. @IMPORTANT : All time and dates are specified in UTC !</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="tms:stations"/>
+ <element ref="tms:lineups"/>
+ <element ref="tms:schedules"/>
+ <element ref="tms:programs"/>
+ <element ref="tms:productionCrew" minOccurs="0"/>
+ <element ref="tms:genres"/>
+ </sequence>
+ <attribute name="from" type="tms:dateTime" use="required">
+ <annotation>
+ <documentation xml:lang="en">Date and time defining the start of the period covered by this XTVD document.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="to" type="tms:dateTime" use="required">
+ <annotation>
+ <documentation xml:lang="en">Date and time defining the end of the period covered by this XTVD document.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="schemaVersion" type="xsd:float" use="required" fixed="1.2">
+ <annotation>
+ <documentation xml:lang="en">Version number of the schema used to build this document.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ <key name="station_key">
+ <selector xpath="./stations/station"/>
+ <field xpath="@id"/>
+ </key>
+ <keyref name="station_keyref_schedule" refer="tms:station_key">
+ <selector xpath="./schedules/schedule"/>
+ <field xpath="@station"/>
+ </keyref>
+ <keyref name="station_keyref_map" refer="tms:station_key">
+ <selector xpath="./lineups/lineup/map"/>
+ <field xpath="@station"/>
+ </keyref>
+ <unique name="program_key">
+ <selector xpath="./programs/program"/>
+ <field xpath="@id"/>
+ </unique>
+ <keyref name="program_keyref" refer="tms:program_key">
+ <selector xpath="./schedules/schedule"/>
+ <field xpath="@program"/>
+ </keyref>
+ <keyref name="crew_keyref" refer="tms:program_key">
+ <selector xpath="./productionCrew/crew"/>
+ <field xpath="@program"/>
+ </keyref>
+ <keyref name="genre_keyref" refer="tms:program_key">
+ <selector xpath="./genres/programGenre"/>
+ <field xpath="@program"/>
+ </keyref>
+ <keyref name="advisory_keyref" refer="tms:program_key">
+ <selector xpath="./advisories/advisory"/>
+ <field xpath="@program"/>
+ </keyref>
+ </element>
+ <element name="stations">
+ <annotation>
+ <documentation>Collection of user selected station elements (across all lineups).</documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <element name="station">
+ <annotation>
+ <documentation>Defines a TV broadcast station - each station is identified with an unique ID.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="callSign">
+ <annotation>
+ <documentation>Short name of the station (eg. CNN).</documentation>
+ </annotation>
+ </element>
+ <element name="name" minOccurs="0">
+ <annotation>
+ <documentation>Long name of the station (eg. Cable News Network).</documentation>
+ </annotation>
+ </element>
+ <element name="fccChannelNumber" type="xsd:positiveInteger" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">FCC channel number of a broadcast station.</documentation>
+ </annotation>
+ </element>
+ <element name="affiliate" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">Network, cable or broadcasting group with which the station is associated.</documentation>
+ </annotation>
+ </element>
+ </sequence>
+ <attribute name="id" type="xsd:int" use="required">
+ <annotation>
+ <documentation xml:lang="en">ID string of the station.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="lineups">
+ <annotation>
+ <documentation>Collection of lineup elements selected by the user.</documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <element name="lineup">
+ <annotation>
+ <documentation>Defines all the station that were selected for the given lineup. </documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <element name="map">
+ <annotation>
+ <documentation>This element defines the mapping between one station and one channel number. As channel numbers may change over time, attributes to define a validity period for the mapping are available.</documentation>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="0" maxOccurs="unbounded">
+ <element name="onAir">
+ <annotation>
+ <documentation xml:lang="en">Specifies the time(s) of day when the given station-channel mapping is in effect.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="from" type="tms:time" use="required">
+ <annotation>
+ <documentation xml:lang="en">The time of day from which the station-channel mapping is effective.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="to" type="tms:time" use="required">
+ <annotation>
+ <documentation xml:lang="en">The time of day until which the station-channel mapping is effective.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="station" type="xsd:int" use="required">
+ <annotation>
+ <documentation xml:lang="en">Reference to a station.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="channel" type="xsd:positiveInteger" use="required">
+ <annotation>
+ <documentation xml:lang="en">Channel number associated to the station.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="channelMinor" type="xsd:positiveInteger" use="optional">
+ <annotation>
+ <documentation xml:lang="en">The major channel (the channel attribute) number is used to group all services associated with a broadcaster's NTSC brand, for example Channel 4. The minor channel number specifies a particular channel within that group. Zero (0) is reserved for the NTSC channel; all other values (1-999) are allowed for digital services. One common approach is to start with 1 and to continue numerically for different programming services.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="from" type="tms:date" use="optional">
+ <annotation>
+ <documentation xml:lang="en">Date from which the mapping is valid, according to the validity period of the whole XTVD document. @IMPORTANT : It is assumed that the change will occur at midnight.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="to" type="tms:date" use="optional">
+ <annotation>
+ <documentation xml:lang="en">Date untill which the mapping is valid, within the validity period of the whole XTVD document. @IMPORTANT : The change will occur at midnight.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="name" type="xsd:string" use="required">
+ <annotation>
+ <documentation xml:lang="en">Name given to the lineup.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="type" type="tms:lineupTypes" use="required">
+ <annotation>
+ <documentation xml:lang="en">Defines the type of the lineup (CABLE, SATELLITE, ...).</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="device" type="xsd:string" use="optional">
+ <annotation>
+ <documentation xml:lang="en">The name of the device associated with the headend.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="postalCode" type="xsd:string" use="optional">
+ <annotation>
+ <documentation xml:lang="en">The ZIP/Postal code for which the specified lineup was selected by the user.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="schedules">
+ <annotation>
+ <documentation>Contain all schedule records (across all selected lineups).</documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <annotation>
+ <documentation>Sequence of schedule records.</documentation>
+ </annotation>
+ <element name="schedule">
+ <annotation>
+ <documentation>Describes a schedule entry.</documentation>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="0">
+ <element name="part" minOccurs="0">
+ <annotation>
+ <documentation>Designates which part, when a program is split into 2 or more viewings.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="number" use="required">
+ <annotation>
+ <documentation xml:lang="en">Designates which part, when a program is split into 2 or more viewings. </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="xsd:unsignedInt">
+ <minInclusive value="1"/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="total" use="required">
+ <annotation>
+ <documentation xml:lang="en">Designates when a program is split into 2 or more parts for viewing. </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="xsd:unsignedInt">
+ <minInclusive value="2"/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="program" type="xsd:string" use="required">
+ <annotation>
+ <documentation xml:lang="en">Reference to a program ID.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="station" type="xsd:int" use="required">
+ <annotation>
+ <documentation xml:lang="en">Reference to a station ID.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="time" type="tms:dateTime" use="required">
+ <annotation>
+ <documentation xml:lang="en">Air date and time for the schedule.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="duration" type="tms:duration" use="required">
+ <annotation>
+ <documentation xml:lang="en">Duration of the schedule.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="repeat" type="xsd:boolean" use="optional">
+ <annotation>
+ <documentation xml:lang="en">Designates a program which has been aired previously.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="tvRating" type="tms:tvRatings" use="optional">
+ <annotation>
+ <documentation xml:lang="en">The FCC standard ratings applied to TV shows.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="stereo" type="xsd:boolean" use="optional">
+ <annotation>
+ <documentation xml:lang="en">Indicates whether the program has stereo sound or not.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="subtitled" type="xsd:boolean" use="optional">
+ <annotation>
+ <documentation xml:lang="en">Indicates whether the program has subtitles.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="hdtv" type="xsd:boolean" use="optional">
+ <annotation>
+ <documentation xml:lang="en">Indicates whether the program broadcast is HDTV compatible.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="closeCaptioned" type="xsd:boolean" use="optional">
+ <annotation>
+ <documentation xml:lang="en">Indicates whether the program has closed captions.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="programs">
+ <annotation>
+ <documentation>Contains all the program records that are referenced by the schedule records.</documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <element name="program" minOccurs="0">
+ <annotation>
+ <documentation>Defines a program entry.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="title" type="xsd:string">
+ <annotation>
+ <documentation>Title of the program.</documentation>
+ </annotation>
+ </element>
+ <element name="subtitle" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation>Subtitle of the program (episode title, game title, ...)</documentation>
+ </annotation>
+ </element>
+ <element name="description" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation>Word string that describes the program.</documentation>
+ </annotation>
+ </element>
+ <element name="mpaaRating" type="tms:mpaaRatings" minOccurs="0">
+ <annotation>
+ <documentation>MPAA rating of the program (applies to movies only).</documentation>
+ </annotation>
+ </element>
+ <element name="starRating" type="tms:starRating" minOccurs="0">
+ <annotation>
+ <documentation>Star rating of the program (applies to movies only).</documentation>
+ </annotation>
+ </element>
+ <element name="runTime" type="tms:duration" minOccurs="0">
+ <annotation>
+ <documentation>Actual length of the program. Not the same as schedule/@duration. Applies to movies only.</documentation>
+ </annotation>
+ </element>
+ <element name="year" type="xsd:gYear" minOccurs="0">
+ <annotation>
+ <documentation>The year in which a feature film was released; YYYY format. Applies to movies only.</documentation>
+ </annotation>
+ </element>
+ <element name="showType" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">Distinguishes how a program was originally produced and/or distributed.</documentation>
+ </annotation>
+ </element>
+ <element name="series" type="xsd:string" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">The series ID associated with episodic programs. For instance an episode with programId "EP5544720193" has a series ID "SH5544720000". The series ID may be used to group together all episodes for a given series.</documentation>
+ </annotation>
+ </element>
+ <element name="colorCode" type="tms:tvColorCode" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">Indicates whether the program is in black and white, colorized or color. Since most programs are in "Color" this element will be populated only if a program is not in "Color".</documentation>
+ </annotation>
+ </element>
+ <element name="advisories" minOccurs="0">
+ <annotation>
+ <documentation xml:lang="en">This element groups together all the advisories associated with the program. Advisories apply only to movies.</documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="6">
+ <element name="advisory" type="tms:movieAdvisories">
+ <annotation>
+ <documentation xml:lang="en">An individual advisory message associated with the movie.</documentation>
+ </annotation>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="id" type="xsd:string" use="required">
+ <annotation>
+ <documentation xml:lang="en">Unique ID of the program.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="productionCrew">
+ <annotation>
+ <documentation>Contains information about the personnel associated with each program record.</documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <element name="crew">
+ <annotation>
+ <documentation xml:lang="en">This element groups together all the crew members associated with the given program.</documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <element name="member" type="tms:crewMember">
+ <annotation>
+ <documentation xml:lang="en">This element describes an individual production crew member associated with a program.</documentation>
+ </annotation>
+ </element>
+ </sequence>
+ <attribute name="program" type="xsd:string" use="required"/>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="genres">
+ <annotation>
+ <documentation xml:lang="en">Containes genre information where available for the program records. A program may have more than one genre with different relevence factors.</documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <element name="programGenre">
+ <annotation>
+ <documentation xml:lang="en">This element groups together all the genres under which the specified program falls.</documentation>
+ </annotation>
+ <complexType>
+ <sequence maxOccurs="unbounded">
+ <element name="genre">
+ <annotation>
+ <documentation xml:lang="en">This element groups together the different elements associated with each genre with which the program is associated.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="class" type="xsd:string">
+ <annotation>
+ <documentation xml:lang="en">The genre that is associated with a specified program record.</documentation>
+ </annotation>
+ </element>
+ <element name="relevance" type="xsd:int">
+ <annotation>
+ <documentation xml:lang="en">A relevence factor that applies to the genre classification for the program. A relevence factor of 1 indicates that this is the top-level genre under which the program is classified.</documentation>
+ </annotation>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="program" type="xsd:string" use="required"/>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ <simpleType name="lineupTypes">
+ <annotation>
+ <documentation xml:lang="en">Standard lineup types.</documentation>
+ </annotation>
+ <restriction base="xsd:string">
+ <enumeration value="Cable"/>
+ <enumeration value="CableDigital"/>
+ <enumeration value="Satellite"/>
+ <enumeration value="LocalBroadcast"/>
+ </restriction>
+ </simpleType>
+ <xsd:complexType name="xtvdResponse">
+ <xsd:sequence>
+ <xsd:element name="messages">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">A collection of messages that may be sent back by the server to the client. Messages are usually used by the server to notify the user of changes to their subscription caused by automatic changes in station's that are part of their subscription. For instance, messages are passed back if a lineup selected by the user is no-longer valid, if all the stations selected by the user has been removed as they are no longer valid ... </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="message" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">An individual message that is passed back by the server.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="xtvdDocument" type="tms:xtvd"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="downloadResponse">
+ <wsdl:part name="xtvdResponse" type="tms:xtvdResponse"/>
+ </wsdl:message>
+ <wsdl:message name="downloadRequest">
+ <wsdl:part name="startTime" type="tms:dateTime"/>
+ <wsdl:part name="endTime" type="tms:dateTime"/>
+ </wsdl:message>
+ <wsdl:message name="activateRequest">
+ <wsdl:part name="deviceType" type="xsd:string"/>
+ <wsdl:part name="activationKey" type="xsd:string"/>
+ </wsdl:message>
+ <wsdl:message name="webserviceFault"/>
+ <wsdl:message name="activateResponse"/>
+ <wsdl:portType name="xtvdPortType">
+ <wsdl:operation name="activate">
+ <wsdl:input message="tms:activateRequest"/>
+ <wsdl:output message="tms:activateResponse"/>
+ <wsdl:fault message="tms:webserviceFault" name="webserviceFault"/>
+ </wsdl:operation>
+ <wsdl:operation name="download">
+ <wsdl:input message="tms:downloadRequest"/>
+ <wsdl:output message="tms:downloadResponse"/>
+ <wsdl:fault message="tms:webserviceFault" name="webserviceFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="xtvdBinding" type="tms:xtvdPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="activate">
+ <soap:operation soapAction="urn:TMSWebServices:xtvdWebService#activate"/>
+ <wsdl:input>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TMSWebServices" use="encoded"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/>
+ </wsdl:output>
+ <wsdl:fault name="webserviceFault">
+ <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="tms:webserviceFault" namespace="urn:TMSWebServices" use="encoded"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="download">
+ <soap:operation soapAction="urn:TMSWebServices:xtvdWebService#download"/>
+ <wsdl:input>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TMSWebServices" use="encoded"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"/>
+ </wsdl:output>
+ <wsdl:fault name="webserviceFault">
+ <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="tms:webserviceFault" namespace="urn:TMSWebServices" use="encoded"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="xtvdWebService">
+ <wsdl:port binding="tms:xtvdBinding" name="xtvdWebServicePort">
+ <soap:address location="http://datadirect.webservices.zap2it.com/tvlistings/xtvdService"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/ext/soap/tests/bugs/bug28751.phpt b/ext/soap/tests/bugs/bug28751.phpt new file mode 100644 index 0000000..697ebd8 --- /dev/null +++ b/ext/soap/tests/bugs/bug28751.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #28751 (SoapServer does not call _autoload()) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function __autoload($className) { + class SoapServerActions { + function test() { + return "Hello World"; + } + } +} + +$server = new SoapServer(NULL, array('uri'=>"http://testuri.org")); +$server->setClass("SoapServerActions"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/bugs/bug28969.phpt b/ext/soap/tests/bugs/bug28969.phpt new file mode 100644 index 0000000..dd8c3a1 --- /dev/null +++ b/ext/soap/tests/bugs/bug28969.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #28969 (Wrong data encoding of special characters) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test() { + return "¦è¥"; +// return utf8_encode("¦è¥"); +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$x = new LocalSoapClient(NULL,array('location'=>'test://', + 'uri'=>'http://testuri.org', + 'encoding'=>'ISO-8859-1')); +var_dump($x->test()); +echo "ok\n"; +?> +--EXPECT-- +string(3) "¦è¥" +ok diff --git a/ext/soap/tests/bugs/bug28985.phpt b/ext/soap/tests/bugs/bug28985.phpt new file mode 100644 index 0000000..59d96e2 --- /dev/null +++ b/ext/soap/tests/bugs/bug28985.phpt @@ -0,0 +1,206 @@ +--TEST-- +Bug #28985 (__getTypes() returning nothing on complex WSDL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SOAPClient(dirname(__FILE__).'/bug28985.wsdl', array('trace'=>1)); +var_dump($client->__getTypes()); +?> +--EXPECT-- +array(42) { + [0]=> + string(100) "struct LoginMGDIS { + string iUserLogin; + string iUserId; + string iUserPassword; + string iProfilId; +}" + [1]=> + string(29) "struct LoginMGDISResponse { +}" + [2]=> + string(28) "struct GetIdentification { +}" + [3]=> + string(77) "struct GetIdentificationResponse { + ArrayOfAnyType GetIdentificationResult; +}" + [4]=> + string(43) "struct ArrayOfAnyType { + anyType anyType; +}" + [5]=> + string(37) "struct RollbackCurrentTransaction { +}" + [6]=> + string(45) "struct RollbackCurrentTransactionResponse { +}" + [7]=> + string(68) "struct GetListeProfil { + string iUserLogin; + string iUserPassword; +}" + [8]=> + string(86) "struct MGCodeLibelle { + string Code; + string Libelle; + boolean Defaut; + anyType Tag; +}" + [9]=> + string(61) "struct ArrayOfMGCodeLibelle { + MGCodeLibelle MGCodeLibelle; +}" + [10]=> + string(77) "struct GetListeProfilResponse { + ArrayOfMGCodeLibelle GetListeProfilResult; +}" + [11]=> + string(41) "struct GetListeValCodif { + string Code; +}" + [12]=> + string(43) "struct ArrayOfMGCodif { + MGCodif MGCodif; +}" + [13]=> + string(18) "struct MGCodif { +}" + [14]=> + string(75) "struct GetListeValCodifResponse { + ArrayOfMGCodif GetListeValCodifResult; +}" + [15]=> + string(39) "struct TestPhpSoap { + MGCodif entree; +}" + [16]=> + string(57) "struct TestPhpSoapResponse { + string TestPhpSoapResult; +}" + [17]=> + string(50) "struct GetListeCodif { + boolean iGetListeValeur; +}" + [18]=> + string(87) "struct MGCodifGrp { + string TypeCodif; + string LibCodif; + ArrayOfMGCodif ListeCodifs; +}" + [19]=> + string(52) "struct ArrayOfMGCodifGrp { + MGCodifGrp MGCodifGrp; +}" + [20]=> + string(72) "struct GetListeCodifResponse { + ArrayOfMGCodifGrp GetListeCodifResult; +}" + [21]=> + string(57) "struct DroitCreation { + string iObjet; + string iProfil; +}" + [22]=> + string(62) "struct DroitCreationResponse { + boolean DroitCreationResult; +}" + [23]=> + string(74) "struct ListeDroitCreation { + ArrayOfString iListeObjet; + string iProfil; +}" + [24]=> + string(40) "struct ArrayOfString { + string string; +}" + [25]=> + string(79) "struct ListeDroitCreationResponse { + ArrayOfAnyType ListeDroitCreationResult; +}" + [26]=> + string(87) "struct GetDroitsObjetProtege { + string iObjet; + string iProfil; + string iUtilisateur; +}" + [27]=> + string(154) "struct MGDroitsObjetProtege { + string LbUti; + string LbProf; + string LbServ; + string LbDir; + boolean isProtected; + ArrayOfMGDroitAcces ListeDroitsAcces; +}" + [28]=> + string(58) "struct ArrayOfMGDroitAcces { + MGDroitAcces MGDroitAcces; +}" + [29]=> + string(104) "struct MGDroitAcces { + string IdProfil; + boolean Lecture; + boolean Modification; + boolean Suppression; +}" + [30]=> + string(91) "struct GetDroitsObjetProtegeResponse { + MGDroitsObjetProtege GetDroitsObjetProtegeResult; +}" + [31]=> + string(76) "struct GetPrivileges { + string iIdSupport; + int iIdForme; + string iProfil; +}" + [32]=> + string(68) "struct GetPrivilegesResponse { + ArrayOfString GetPrivilegesResult; +}" + [33]=> + string(46) "struct GetLibelleProfil { + string iIdProfil; +}" + [34]=> + string(67) "struct GetLibelleProfilResponse { + string GetLibelleProfilResult; +}" + [35]=> + string(91) "struct GetValeurRecherche { + string iChampSource; + string iTable; + string iOrderByClause; +}" + [36]=> + string(78) "struct GetValeurRechercheResponse { + ArrayOfString GetValeurRechercheResult; +}" + [37]=> + string(128) "struct GetValeurRechercheWithClauseWhere { + string iChampSource; + string iTable; + string iClauseWhere; + string iOrderByClause; +}" + [38]=> + string(108) "struct GetValeurRechercheWithClauseWhereResponse { + ArrayOfString GetValeurRechercheWithClauseWhereResult; +}" + [39]=> + string(27) "struct GetEnvironnement { +}" + [40]=> + string(106) "struct MGEnvironnement { + string RepBureautique; + string RepBureautiqueImage; + string RepBureautiqueDoc; +}" + [41]=> + string(76) "struct GetEnvironnementResponse { + MGEnvironnement GetEnvironnementResult; +}" +}
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug28985.wsdl b/ext/soap/tests/bugs/bug28985.wsdl new file mode 100644 index 0000000..ee52881 --- /dev/null +++ b/ext/soap/tests/bugs/bug28985.wsdl @@ -0,0 +1,683 @@ +<?xml version="1.0" encoding="utf-8"?>
+<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+xmlns:s="http://www.w3.org/2001/XMLSchema"
+xmlns:s0="http://tempuri.org/"
+xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
+xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+targetNamespace="http://tempuri.org/"
+xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified"
+targetNamespace="http://tempuri.org/">
+ <s:element name="LoginMGDIS">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="iUserLogin"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iUserId"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iUserPassword"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iProfilId"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="LoginMGDISResponse">
+ <s:complexType />
+ </s:element>
+ <s:element name="GetIdentification">
+ <s:complexType />
+ </s:element>
+ <s:element name="GetIdentificationResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetIdentificationResult" type="s0:ArrayOfAnyType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfAnyType">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="anyType"
+nillable="true" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="RollbackCurrentTransaction">
+ <s:complexType />
+ </s:element>
+ <s:element name="RollbackCurrentTransactionResponse">
+ <s:complexType />
+ </s:element>
+ <s:element name="GetListeProfil">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="iUserLogin"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iUserPassword"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="MGCodeLibelle">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="Code"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Libelle"
+type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="Defaut"
+type="s:boolean" />
+ <s:element minOccurs="0" maxOccurs="1" name="Tag" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="ArrayOfMGCodeLibelle">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded"
+name="MGCodeLibelle" nillable="true" type="s0:MGCodeLibelle" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="GetListeProfilResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetListeProfilResult" type="s0:ArrayOfMGCodeLibelle" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetListeValCodif">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="Code"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfMGCodif">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="MGCodif"
+nillable="true" type="s0:MGCodif" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="MGCodif">
+ <s:complexContent mixed="false">
+ <s:extension base="s0:MGCodeLibelle" />
+ </s:complexContent>
+ </s:complexType>
+ <s:element name="GetListeValCodifResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetListeValCodifResult" type="s0:ArrayOfMGCodif" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="TestPhpSoap">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="entree"
+type="s0:MGCodif" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="TestPhpSoapResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="TestPhpSoapResult" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetListeCodif">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1"
+name="iGetListeValeur" type="s:boolean" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="MGCodifGrp">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="TypeCodif"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="LibCodif"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="ListeCodifs"
+type="s0:ArrayOfMGCodif" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="ArrayOfMGCodifGrp">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded"
+name="MGCodifGrp" nillable="true" type="s0:MGCodifGrp" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="GetListeCodifResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetListeCodifResult" type="s0:ArrayOfMGCodifGrp" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="DroitCreation">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="iObjet"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iProfil"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="DroitCreationResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1"
+name="DroitCreationResult" type="s:boolean" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="ListeDroitCreation">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="iListeObjet"
+type="s0:ArrayOfString" />
+ <s:element minOccurs="0" maxOccurs="1" name="iProfil"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfString">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="string"
+nillable="true" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="ListeDroitCreationResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="ListeDroitCreationResult" type="s0:ArrayOfAnyType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetDroitsObjetProtege">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="iObjet"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iProfil"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iUtilisateur"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="MGDroitsObjetProtege">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="LbUti"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="LbProf"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="LbServ"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="LbDir"
+type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="isProtected"
+type="s:boolean" />
+ <s:element minOccurs="0" maxOccurs="1" name="ListeDroitsAcces"
+type="s0:ArrayOfMGDroitAcces" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="ArrayOfMGDroitAcces">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded"
+name="MGDroitAcces" nillable="true" type="s0:MGDroitAcces" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="MGDroitAcces">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="IdProfil"
+type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="Lecture"
+type="s:boolean" />
+ <s:element minOccurs="1" maxOccurs="1" name="Modification"
+type="s:boolean" />
+ <s:element minOccurs="1" maxOccurs="1" name="Suppression"
+type="s:boolean" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="GetDroitsObjetProtegeResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetDroitsObjetProtegeResult" type="s0:MGDroitsObjetProtege" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetPrivileges">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="iIdSupport"
+type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="iIdForme"
+type="s:int" />
+ <s:element minOccurs="0" maxOccurs="1" name="iProfil"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetPrivilegesResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetPrivilegesResult" type="s0:ArrayOfString" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetLibelleProfil">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="iIdProfil"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetLibelleProfilResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetLibelleProfilResult" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetValeurRecherche">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="iChampSource"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iTable"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iOrderByClause"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetValeurRechercheResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetValeurRechercheResult" type="s0:ArrayOfString" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetValeurRechercheWithClauseWhere">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="iChampSource"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iTable"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iClauseWhere"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="iOrderByClause"
+type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetValeurRechercheWithClauseWhereResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetValeurRechercheWithClauseWhereResult" type="s0:ArrayOfString"
+/>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetEnvironnement">
+ <s:complexType />
+ </s:element>
+ <s:complexType name="MGEnvironnement">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="RepBureautique"
+type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+name="RepBureautiqueImage" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+name="RepBureautiqueDoc" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="GetEnvironnementResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+name="GetEnvironnementResult" type="s0:MGEnvironnement" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:schema>
+ </types>
+ <message name="LoginMGDISSoapIn">
+ <part name="parameters" element="s0:LoginMGDIS" />
+ </message>
+ <message name="LoginMGDISSoapOut">
+ <part name="parameters" element="s0:LoginMGDISResponse" />
+ </message>
+ <message name="GetIdentificationSoapIn">
+ <part name="parameters" element="s0:GetIdentification" />
+ </message>
+ <message name="GetIdentificationSoapOut">
+ <part name="parameters" element="s0:GetIdentificationResponse" />
+ </message>
+ <message name="RollbackCurrentTransactionSoapIn">
+ <part name="parameters" element="s0:RollbackCurrentTransaction" />
+ </message>
+ <message name="RollbackCurrentTransactionSoapOut">
+ <part name="parameters"
+element="s0:RollbackCurrentTransactionResponse" />
+ </message>
+ <message name="GetListeProfilSoapIn">
+ <part name="parameters" element="s0:GetListeProfil" />
+ </message>
+ <message name="GetListeProfilSoapOut">
+ <part name="parameters" element="s0:GetListeProfilResponse" />
+ </message>
+ <message name="GetListeValCodifSoapIn">
+ <part name="parameters" element="s0:GetListeValCodif" />
+ </message>
+ <message name="GetListeValCodifSoapOut">
+ <part name="parameters" element="s0:GetListeValCodifResponse" />
+ </message>
+ <message name="TestPhpSoapSoapIn">
+ <part name="parameters" element="s0:TestPhpSoap" />
+ </message>
+ <message name="TestPhpSoapSoapOut">
+ <part name="parameters" element="s0:TestPhpSoapResponse" />
+ </message>
+ <message name="GetListeCodifSoapIn">
+ <part name="parameters" element="s0:GetListeCodif" />
+ </message>
+ <message name="GetListeCodifSoapOut">
+ <part name="parameters" element="s0:GetListeCodifResponse" />
+ </message>
+ <message name="DroitCreationSoapIn">
+ <part name="parameters" element="s0:DroitCreation" />
+ </message>
+ <message name="DroitCreationSoapOut">
+ <part name="parameters" element="s0:DroitCreationResponse" />
+ </message>
+ <message name="ListeDroitCreationSoapIn">
+ <part name="parameters" element="s0:ListeDroitCreation" />
+ </message>
+ <message name="ListeDroitCreationSoapOut">
+ <part name="parameters" element="s0:ListeDroitCreationResponse" />
+ </message>
+ <message name="GetDroitsObjetProtegeSoapIn">
+ <part name="parameters" element="s0:GetDroitsObjetProtege" />
+ </message>
+ <message name="GetDroitsObjetProtegeSoapOut">
+ <part name="parameters" element="s0:GetDroitsObjetProtegeResponse"
+/>
+ </message>
+ <message name="GetPrivilegesSoapIn">
+ <part name="parameters" element="s0:GetPrivileges" />
+ </message>
+ <message name="GetPrivilegesSoapOut">
+ <part name="parameters" element="s0:GetPrivilegesResponse" />
+ </message>
+ <message name="GetLibelleProfilSoapIn">
+ <part name="parameters" element="s0:GetLibelleProfil" />
+ </message>
+ <message name="GetLibelleProfilSoapOut">
+ <part name="parameters" element="s0:GetLibelleProfilResponse" />
+ </message>
+ <message name="GetValeurRechercheSoapIn">
+ <part name="parameters" element="s0:GetValeurRecherche" />
+ </message>
+ <message name="GetValeurRechercheSoapOut">
+ <part name="parameters" element="s0:GetValeurRechercheResponse" />
+ </message>
+ <message name="GetValeurRechercheWithClauseWhereSoapIn">
+ <part name="parameters"
+element="s0:GetValeurRechercheWithClauseWhere" />
+ </message>
+ <message name="GetValeurRechercheWithClauseWhereSoapOut">
+ <part name="parameters"
+element="s0:GetValeurRechercheWithClauseWhereResponse" />
+ </message>
+ <message name="GetEnvironnementSoapIn">
+ <part name="parameters" element="s0:GetEnvironnement" />
+ </message>
+ <message name="GetEnvironnementSoapOut">
+ <part name="parameters" element="s0:GetEnvironnementResponse" />
+ </message>
+ <portType name="MGServiceNoyauNETSoap">
+ <operation name="LoginMGDIS">
+ <input message="s0:LoginMGDISSoapIn" />
+ <output message="s0:LoginMGDISSoapOut" />
+ </operation>
+ <operation name="GetIdentification">
+ <input message="s0:GetIdentificationSoapIn" />
+ <output message="s0:GetIdentificationSoapOut" />
+ </operation>
+ <operation name="RollbackCurrentTransaction">
+ <input message="s0:RollbackCurrentTransactionSoapIn" />
+ <output message="s0:RollbackCurrentTransactionSoapOut" />
+ </operation>
+ <operation name="GetListeProfil">
+ <input message="s0:GetListeProfilSoapIn" />
+ <output message="s0:GetListeProfilSoapOut" />
+ </operation>
+ <operation name="GetListeValCodif">
+ <input message="s0:GetListeValCodifSoapIn" />
+ <output message="s0:GetListeValCodifSoapOut" />
+ </operation>
+ <operation name="TestPhpSoap">
+ <input message="s0:TestPhpSoapSoapIn" />
+ <output message="s0:TestPhpSoapSoapOut" />
+ </operation>
+ <operation name="GetListeCodif">
+ <input message="s0:GetListeCodifSoapIn" />
+ <output message="s0:GetListeCodifSoapOut" />
+ </operation>
+ <operation name="DroitCreation">
+ <input message="s0:DroitCreationSoapIn" />
+ <output message="s0:DroitCreationSoapOut" />
+ </operation>
+ <operation name="ListeDroitCreation">
+ <input message="s0:ListeDroitCreationSoapIn" />
+ <output message="s0:ListeDroitCreationSoapOut" />
+ </operation>
+ <operation name="GetDroitsObjetProtege">
+ <input message="s0:GetDroitsObjetProtegeSoapIn" />
+ <output message="s0:GetDroitsObjetProtegeSoapOut" />
+ </operation>
+ <operation name="GetPrivileges">
+ <input message="s0:GetPrivilegesSoapIn" />
+ <output message="s0:GetPrivilegesSoapOut" />
+ </operation>
+ <operation name="GetLibelleProfil">
+ <input message="s0:GetLibelleProfilSoapIn" />
+ <output message="s0:GetLibelleProfilSoapOut" />
+ </operation>
+ <operation name="GetValeurRecherche">
+ <input message="s0:GetValeurRechercheSoapIn" />
+ <output message="s0:GetValeurRechercheSoapOut" />
+ </operation>
+ <operation name="GetValeurRechercheWithClauseWhere">
+ <input message="s0:GetValeurRechercheWithClauseWhereSoapIn" />
+ <output message="s0:GetValeurRechercheWithClauseWhereSoapOut" />
+ </operation>
+ <operation name="GetEnvironnement">
+ <input message="s0:GetEnvironnementSoapIn" />
+ <output message="s0:GetEnvironnementSoapOut" />
+ </operation>
+ </portType>
+ <binding name="MGServiceNoyauNETSoap"
+type="s0:MGServiceNoyauNETSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+style="document" />
+ <operation name="LoginMGDIS">
+ <soap:operation soapAction="http://tempuri.org/LoginMGDIS"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetIdentification">
+ <soap:operation soapAction="http://tempuri.org/GetIdentification"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="RollbackCurrentTransaction">
+ <soap:operation
+soapAction="http://tempuri.org/RollbackCurrentTransaction"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetListeProfil">
+ <soap:operation soapAction="http://tempuri.org/GetListeProfil"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetListeValCodif">
+ <soap:operation soapAction="http://tempuri.org/GetListeValCodif"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="TestPhpSoap">
+ <soap:operation soapAction="http://tempuri.org/TestPhpSoap"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetListeCodif">
+ <soap:operation soapAction="http://tempuri.org/GetListeCodif"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="DroitCreation">
+ <soap:operation soapAction="http://tempuri.org/DroitCreation"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="ListeDroitCreation">
+ <soap:operation soapAction="http://tempuri.org/ListeDroitCreation"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetDroitsObjetProtege">
+ <soap:operation
+soapAction="http://tempuri.org/GetDroitsObjetProtege" style="document"
+/>
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetPrivileges">
+ <soap:operation soapAction="http://tempuri.org/GetPrivileges"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetLibelleProfil">
+ <soap:operation soapAction="http://tempuri.org/GetLibelleProfil"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetValeurRecherche">
+ <soap:operation soapAction="http://tempuri.org/GetValeurRecherche"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetValeurRechercheWithClauseWhere">
+ <soap:operation
+soapAction="http://tempuri.org/GetValeurRechercheWithClauseWhere"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetEnvironnement">
+ <soap:operation soapAction="http://tempuri.org/GetEnvironnement"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="MGServiceNoyauNET">
+ <port name="MGServiceNoyauNETSoap"
+binding="s0:MGServiceNoyauNETSoap">
+ <soap:address
+location="http://localhost/SoapSrvSOFI/MGServiceNoyauNET.asmx" />
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug29061.phpt b/ext/soap/tests/bugs/bug29061.phpt new file mode 100644 index 0000000..a85a7aa --- /dev/null +++ b/ext/soap/tests/bugs/bug29061.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #29061 (soap extension segfaults) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/bug29061.wsdl", array("exceptions"=>0)); +$client->getQuote("ibm"); +echo "ok\n"; +?> +--EXPECT-- +ok
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug29061.wsdl b/ext/soap/tests/bugs/bug29061.wsdl new file mode 100644 index 0000000..fb4d9aa --- /dev/null +++ b/ext/soap/tests/bugs/bug29061.wsdl @@ -0,0 +1,41 @@ +<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://
+schemas.xmlsoap.org/wsdl/http/"
+xmlns:xs="http://www.w3.org/2001/XMLSchema"
+xmlns:soapenc="http://schemas.xmlsoap.org/soap/e
+ncoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+xmlns:y="http://new.webservice.namespace" targetNamespace="http
+://new.webservice.namespace">
+<types>
+<xs:schema/>
+</types>
+<message name="getQuoteResponse">
+<part name="parameter" element="" type="xs:string"/>
+</message>
+<message name="getQuoteRequest">
+<part name="String" element="" type="xs:string"/>
+</message>
+<portType name="SOAPport">
+<operation name="getQuote">
+<input message="y:getQuoteRequest"/>
+<output message="y:getQuoteResponse"/>
+</operation>
+</portType>
+<binding name="bindingName" type="y:SOAPport">
+<soap:binding style="rpc"
+transport="http://schemas.xmlsoap.org/soap/http"/>
+<operation name="getQuote">
+<input>
+<soap:body use="literal"/>
+</input>
+<output>
+<soap:body use="literal"/>
+</output>
+</operation>
+</binding>
+<service name="myService">
+<port name="myPort" binding="y:bindingName">
+<soap:address location="test://"/>
+</port>
+</service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug29109.phpt b/ext/soap/tests/bugs/bug29109.phpt new file mode 100644 index 0000000..3b13974 --- /dev/null +++ b/ext/soap/tests/bugs/bug29109.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #29109 (Uncaught SoapFault exception: [WSDL] Out of memory) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/bug29109.wsdl"); +var_dump($client->__getFunctions()); +?> +--EXPECT-- +array(1) { + [0]=> + string(53) "HelloWorldResponse HelloWorld(HelloWorld $parameters)" +}
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug29109.wsdl b/ext/soap/tests/bugs/bug29109.wsdl new file mode 100644 index 0000000..800cd23 --- /dev/null +++ b/ext/soap/tests/bugs/bug29109.wsdl @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="windows-1257"?>
+<definitions xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+xmlns:s0="http://tempuri.org/"
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+xmlns:s="http://www.w3.org/2001/XMLSchema"
+xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
+xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" name="test"
+targetNamespace="http://tempuri.org/"
+xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xs:schema elementFormDefault="qualified"
+targetNamespace="http://tempuri.org/"
+xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="HelloWorld">
+ <xs:complexType />
+ </xs:element>
+ <xs:element name="HelloWorldResponse">
+ <xs:complexType>
+ <xs:sequence>
+
+ <xs:element minOccurs="0" maxOccurs="1"
+name="HelloWorldResult" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="string" type="xs:string" />
+ </xs:schema>
+ </types>
+ <message name="HelloWorldSoapIn">
+ <part name="parameters" element="s0:HelloWorld" />
+
+ </message>
+ <message name="HelloWorldSoapOut">
+ <part name="parameters" element="s0:HelloWorldResponse" />
+ </message>
+ <message name="HelloWorldHttpGetIn" />
+ <message name="HelloWorldHttpGetOut">
+ <part name="Body" element="s0:string" />
+ </message>
+ <message name="HelloWorldHttpPostIn" />
+
+ <message name="HelloWorldHttpPostOut">
+ <part name="Body" element="s0:string" />
+ </message>
+ <portType name="testSoap">
+ <operation name="HelloWorld">
+ <input message="s0:HelloWorldSoapIn" />
+ <output message="s0:HelloWorldSoapOut" />
+ </operation>
+ </portType>
+
+ <portType name="testHttpGet">
+ <operation name="HelloWorld">
+ <input message="s0:HelloWorldHttpGetIn" />
+ <output message="s0:HelloWorldHttpGetOut" />
+ </operation>
+ </portType>
+ <portType name="testHttpPost">
+ <operation name="HelloWorld">
+ <input message="s0:HelloWorldHttpPostIn" />
+
+ <output message="s0:HelloWorldHttpPostOut" />
+ </operation>
+ </portType>
+ <binding name="testSoap" type="s0:testSoap">
+ <soap:binding style="document"
+transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="HelloWorld">
+ <soap:operation soapAction="http://tempuri.org/HelloWorld"
+style="document" />
+ <input>
+ <soap:body use="literal" />
+
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="testHttpGet" type="s0:testHttpGet">
+ <http:binding verb="GET" />
+ <operation name="HelloWorld">
+
+ <http:operation location="/HelloWorld" />
+ <input>
+ <http:urlEncoded />
+ </input>
+ <output>
+ <mime:mimeXml part="Body" />
+ </output>
+ </operation>
+ </binding>
+
+ <binding name="testHttpPost" type="s0:testHttpPost">
+ <http:binding verb="POST" />
+ <operation name="HelloWorld">
+ <http:operation location="/HelloWorld" />
+ <input>
+ <mime:content part="" type="application/x-www-form-urlencoded"
+/>
+ </input>
+ <output>
+ <mime:mimeXml part="Body" />
+
+ </output>
+ </operation>
+ </binding>
+ <service name="test">
+ <port name="testSoap" binding="s0:testSoap">
+ <soap:address location="http://localhost:81/test.asmx" />
+ </port>
+ <port name="testHttpGet" binding="s0:testHttpGet">
+ <http:address location="http://localhost:81/test.asmx" />
+
+ </port>
+ <port name="testHttpPost" binding="s0:testHttpPost">
+ <http:address location="http://localhost:81/test.asmx" />
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug29236.phpt b/ext/soap/tests/bugs/bug29236.phpt new file mode 100644 index 0000000..7b7628d --- /dev/null +++ b/ext/soap/tests/bugs/bug29236.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #29236 (memory error when wsdl-cache is enabled) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=1 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl"); +var_dump($client->__getFunctions()); +?> +--EXPECT-- +array(4) { + [0]=> + string(59) "StartSessionResponse StartSession(StartSession $parameters)" + [1]=> + string(62) "VerifySessionResponse VerifySession(VerifySession $parameters)" + [2]=> + string(41) "LogoutResponse Logout(Logout $parameters)" + [3]=> + string(62) "GetSystemInfoResponse GetSystemInfo(GetSystemInfo $parameters)" +} diff --git a/ext/soap/tests/bugs/bug29236.wsdl b/ext/soap/tests/bugs/bug29236.wsdl new file mode 100644 index 0000000..d60a487 --- /dev/null +++ b/ext/soap/tests/bugs/bug29236.wsdl @@ -0,0 +1,287 @@ +<?xml version="1.0" encoding="utf-8"?>
+<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://isis.ais.ucla.edu/ws/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://isis.ais.ucla.edu/ws/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://isis.ais.ucla.edu/ws/">
+ <s:element name="StartSession">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="uclaId" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="userIpAddr" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="StartSessionResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="iwsResponse" nillable="true" type="s0:IwsResponse" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="IwsResponse">
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="sessionInfo" nillable="true" type="s0:IwsSession" />
+ <s:element minOccurs="1" maxOccurs="1" name="errorInfo" nillable="true" type="s0:IwsErrorCollection" />
+ </s:sequence>
+ <s:attribute name="action" type="s0:ActionEnum" />
+ <s:attribute name="hasErrors" type="s:boolean" />
+ <s:attribute name="transactionId" type="s:long" />
+ </s:complexType>
+ <s:complexType name="IwsSession">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="userAttributes" type="s0:ArrayOfIwsUserAttribute" />
+ <s:element minOccurs="0" maxOccurs="1" name="accounts" type="s0:ArrayOfIwsAccount" />
+ <s:element minOccurs="1" maxOccurs="1" name="ticket" nillable="true" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="uclaId" nillable="true" type="s:string" />
+ </s:sequence>
+ <s:attribute name="status" type="s0:SessionStatus" />
+ </s:complexType>
+ <s:complexType name="ArrayOfIwsUserAttribute">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="attribute" type="s0:IwsUserAttribute" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="IwsUserAttribute">
+ <s:attribute name="name" type="s:string" />
+ <s:attribute name="value" type="s:string" />
+ </s:complexType>
+ <s:complexType name="ArrayOfIwsAccount">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="account" type="s0:IwsAccount" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="IwsAccount">
+ <s:attribute name="loginId" type="s:string" />
+ <s:attribute name="type" type="s0:LoginType" />
+ <s:attribute name="status" type="s0:AccountStatus" />
+ </s:complexType>
+ <s:simpleType name="LoginType">
+ <s:restriction base="s:string">
+ <s:enumeration value="BruinOnline" />
+ <s:enumeration value="ACF2" />
+ <s:enumeration value="QDB" />
+ <s:enumeration value="UID" />
+ <s:enumeration value="CommonLogon" />
+ <s:enumeration value="RACF" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="AccountStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Unknown" />
+ <s:enumeration value="Active" />
+ <s:enumeration value="Authenticated" />
+ <s:enumeration value="AuthenticatedWithCachedCredential" />
+ <s:enumeration value="NotAuthenticated" />
+ <s:enumeration value="PermmanentlySuspended" />
+ <s:enumeration value="TemporarilySuspended" />
+ <s:enumeration value="PasswordResetRequired" />
+ <s:enumeration value="InvalidID" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="SessionStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Uninitialized" />
+ <s:enumeration value="Active" />
+ <s:enumeration value="ActiveWithCachedCredential" />
+ <s:enumeration value="ActiveWithMultipleCredentials" />
+ <s:enumeration value="Expired" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="IwsErrorCollection">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="errors" type="s0:ArrayOfIwsError" />
+ </s:sequence>
+ <s:attribute name="count" type="s:int" />
+ </s:complexType>
+ <s:complexType name="ArrayOfIwsError">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="error" type="s0:IwsError" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="IwsError">
+ <s:attribute name="errorCode" type="s:int" />
+ <s:attribute name="detail" type="s:string" />
+ </s:complexType>
+ <s:simpleType name="ActionEnum">
+ <s:restriction base="s:string">
+ <s:enumeration value="GetInfo" />
+ <s:enumeration value="Start" />
+ <s:enumeration value="Verify" />
+ <s:enumeration value="Logout" />
+ </s:restriction>
+ </s:simpleType>
+ <s:element name="wsConsumerCredential" type="s0:WsConsumerCredential" />
+ <s:complexType name="WsConsumerCredential">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="id" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="VerifySession">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="ticket" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="userIpAddr" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="returnExtendedAttributes" type="s:boolean" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="VerifySessionResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="iwsResponse" nillable="true" type="s0:IwsResponse" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="Logout">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="ticket" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="userIpAddr" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="LogoutResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="iwsResponse" nillable="true" type="s0:IwsResponse" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetSystemInfo">
+ <s:complexType />
+ </s:element>
+ <s:element name="GetSystemInfoResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="GetSystemInfoResult" type="s0:ArrayOfIwsAttribute" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfIwsAttribute">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="IwsAttribute" type="s0:IwsAttribute" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="IwsAttribute">
+ <s:attribute name="name" type="s:string" />
+ <s:attribute name="value" type="s:string" />
+ </s:complexType>
+ </s:schema>
+ </types>
+ <message name="StartSessionSoapIn">
+ <part name="parameters" element="s0:StartSession" />
+ </message>
+ <message name="StartSessionSoapOut">
+ <part name="parameters" element="s0:StartSessionResponse" />
+ </message>
+ <message name="StartSessionwsConsumerCredential">
+ <part name="wsConsumerCredential" element="s0:wsConsumerCredential" />
+ </message>
+ <message name="VerifySessionSoapIn">
+ <part name="parameters" element="s0:VerifySession" />
+ </message>
+ <message name="VerifySessionSoapOut">
+ <part name="parameters" element="s0:VerifySessionResponse" />
+ </message>
+ <message name="VerifySessionwsConsumerCredential">
+ <part name="wsConsumerCredential" element="s0:wsConsumerCredential" />
+ </message>
+ <message name="LogoutSoapIn">
+ <part name="parameters" element="s0:Logout" />
+ </message>
+ <message name="LogoutSoapOut">
+ <part name="parameters" element="s0:LogoutResponse" />
+ </message>
+ <message name="LogoutwsConsumerCredential">
+ <part name="wsConsumerCredential" element="s0:wsConsumerCredential" />
+ </message>
+ <message name="GetSystemInfoSoapIn">
+ <part name="parameters" element="s0:GetSystemInfo" />
+ </message>
+ <message name="GetSystemInfoSoapOut">
+ <part name="parameters" element="s0:GetSystemInfoResponse" />
+ </message>
+ <message name="GetSystemInfowsConsumerCredential">
+ <part name="wsConsumerCredential" element="s0:wsConsumerCredential" />
+ </message>
+ <portType name="IsisSoap">
+ <operation name="StartSession">
+ <input message="s0:StartSessionSoapIn" />
+ <output message="s0:StartSessionSoapOut" />
+ </operation>
+ <operation name="VerifySession">
+ <input message="s0:VerifySessionSoapIn" />
+ <output message="s0:VerifySessionSoapOut" />
+ </operation>
+ <operation name="Logout">
+ <input message="s0:LogoutSoapIn" />
+ <output message="s0:LogoutSoapOut" />
+ </operation>
+ <operation name="GetSystemInfo">
+ <input message="s0:GetSystemInfoSoapIn" />
+ <output message="s0:GetSystemInfoSoapOut" />
+ </operation>
+ </portType>
+ <portType name="IsisHttpGet" />
+ <portType name="IsisHttpPost" />
+ <binding name="IsisSoap" type="s0:IsisSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="StartSession">
+ <soap:operation soapAction="http://isis.ais.ucla.edu/ws/StartSession" style="document" />
+ <input>
+ <soap:body use="literal" />
+ <soap:header d5p1:required="true" message="s0:StartSessionwsConsumerCredential" part="wsConsumerCredential" use="literal" xmlns:d5p1="http://schemas.xmlsoap.org/wsdl/" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="VerifySession">
+ <soap:operation soapAction="http://isis.ais.ucla.edu/ws/VerifySession" style="document" />
+ <input>
+ <soap:body use="literal" />
+ <soap:header d5p1:required="true" message="s0:VerifySessionwsConsumerCredential" part="wsConsumerCredential" use="literal" xmlns:d5p1="http://schemas.xmlsoap.org/wsdl/" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="Logout">
+ <soap:operation soapAction="http://isis.ais.ucla.edu/ws/Logout" style="document" />
+ <input>
+ <soap:body use="literal" />
+ <soap:header d5p1:required="true" message="s0:LogoutwsConsumerCredential" part="wsConsumerCredential" use="literal" xmlns:d5p1="http://schemas.xmlsoap.org/wsdl/" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="GetSystemInfo">
+ <soap:operation soapAction="http://isis.ais.ucla.edu/ws/GetSystemInfo" style="document" />
+ <input>
+ <soap:body use="literal" />
+ <soap:header d5p1:required="true" message="s0:GetSystemInfowsConsumerCredential" part="wsConsumerCredential" use="literal" xmlns:d5p1="http://schemas.xmlsoap.org/wsdl/" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="IsisHttpGet" type="s0:IsisHttpGet">
+ <http:binding verb="GET" />
+ </binding>
+ <binding name="IsisHttpPost" type="s0:IsisHttpPost">
+ <http:binding verb="POST" />
+ </binding>
+ <service name="Isis">
+ <port name="IsisSoap" binding="s0:IsisSoap">
+ <soap:address location="http://isisdev1.tig.ucla.edu/iws/v4.asmx" />
+ </port>
+ <port name="IsisHttpGet" binding="s0:IsisHttpGet">
+ <http:address location="http://isisdev1.tig.ucla.edu/iws/v4.asmx" />
+ </port>
+ <port name="IsisHttpPost" binding="s0:IsisHttpPost">
+ <http:address location="http://isisdev1.tig.ucla.edu/iws/v4.asmx" />
+ </port>
+ </service>
+</definitions>
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug29795.phpt b/ext/soap/tests/bugs/bug29795.phpt new file mode 100644 index 0000000..388caa6 --- /dev/null +++ b/ext/soap/tests/bugs/bug29795.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #29795 (SegFault with Soap and Amazon's Web Services) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=1 +--FILE-- +<?php +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + return <<<EOF +<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><Price><Amount>3995</Amount><CurrencyCode>USD</CurrencyCode></Price></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); +$ar=$client->GetPrice(); +echo "o"; +$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); +$ar=$client->GetPrice(); +echo "k\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug29795.wsdl b/ext/soap/tests/bugs/bug29795.wsdl new file mode 100644 index 0000000..5a4499d --- /dev/null +++ b/ext/soap/tests/bugs/bug29795.wsdl @@ -0,0 +1,40 @@ +<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://xml.amazon.com/AWSProductData/2004-08-01" targetNamespace="http://xml.amazon.com/AWSProductData/2004-08-01">
+ <types>
+ <xs:schema targetNamespace="http://xml.amazon.com/AWSProductData/2004-08-01" elementFormDefault="qualified">
+ <xs:complexType name="Price">
+ <xs:sequence>
+ <xs:element name="Amount" type="xs:integer" minOccurs="0"/>
+ <xs:element name="CurrencyCode" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name="GetPriceRequest">
+ </message>
+ <message name="GetPriceResponse">
+ <part name="Price" type="tns:Price"/>
+ </message>
+ <portType name="AWSProductDataPortType">
+ <operation name="GetPrice">
+ <input message="tns:GetPriceRequest"/>
+ <output message="tns:GetPriceResponse"/>
+ </operation>
+ </portType>
+ <binding name="AWSProductDataBinding" type="tns:AWSProductDataPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="GetPrice">
+ <soap:operation soapAction="http://soap.amazon.com"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AWSProductData">
+ <port name="AWSProductDataPort" binding="tns:AWSProductDataBinding">
+ <soap:address location="http://aws-beta.amazon.com/onca/soap?Service=AWSProductData"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug29830.phpt b/ext/soap/tests/bugs/bug29830.phpt new file mode 100644 index 0000000..dc090f8 --- /dev/null +++ b/ext/soap/tests/bugs/bug29830.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #29844 (SoapServer::setClass() should not export non-public methods) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +class hello_world { + public function hello($to) { + return 'Hello ' . $to; + } + private function bye($to) { + return 'Bye ' . $to; + } +} + +$server = new SoapServer(NULL, array("uri"=>"test://")); +$server->setClass('hello_world'); +$functions = $server->getFunctions(); +foreach($functions as $func) { + echo $func . "\n"; +} +?> +--EXPECT-- +hello diff --git a/ext/soap/tests/bugs/bug29839.phpt b/ext/soap/tests/bugs/bug29839.phpt new file mode 100644 index 0000000..11d924e --- /dev/null +++ b/ext/soap/tests/bugs/bug29839.phpt @@ -0,0 +1,43 @@ +--TEST-- +Bug #29839 (incorrect convert (xml:lang to lang)) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php + +function EchoString($s) { + return $s; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('EchoString'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug29839.wsdl", array("trace"=>1)); +$client->EchoString(array("value"=>"hello","lang"=>"en")); +echo $client->__getLastRequest(); +echo $client->__getLastResponse(); +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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/bugs/bug29839.wsdl b/ext/soap/tests/bugs/bug29839.wsdl new file mode 100644 index 0000000..d8ccb97 --- /dev/null +++ b/ext/soap/tests/bugs/bug29839.wsdl @@ -0,0 +1,42 @@ +<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://test-uri" targetNamespace="http://test-uri">
+ <types>
+ <xs:schema targetNamespace="http://test-uri" elementFormDefault="qualified">
+ <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd" />
+ <complexType name="LocalizedString">
+ <sequence>
+ <element name="value" type="xsd:string"/>
+ </sequence>
+ <attribute ref="xml:lang" use="required"/>
+ </complexType>
+ </xs:schema>
+ </types>
+ <message name="EchoStringRequest">
+ <part name="string" type="tns:LocalizedString"/>
+ </message>
+ <message name="EchoStringResponse">
+ <part name="string" type="tns:LocalizedString"/>
+ </message>
+ <portType name="AWSProductDataPortType">
+ <operation name="EchoString">
+ <input message="tns:EchoStringRequest"/>
+ <output message="tns:EchoStringResponse"/>
+ </operation>
+ </portType>
+ <binding name="AWSProductDataBinding" type="tns:AWSProductDataPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="EchoString">
+ <soap:operation soapAction="http://test-uri"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AWSProductData">
+ <port name="AWSProductDataPort" binding="tns:AWSProductDataBinding">
+ <soap:address location="http://aws-beta.amazon.com/onca/soap?Service=AWSProductData"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug29844.phpt b/ext/soap/tests/bugs/bug29844.phpt new file mode 100644 index 0000000..efaccbc --- /dev/null +++ b/ext/soap/tests/bugs/bug29844.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #29844 (SOAP doesn't return the result of a valid SOAP request) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php + +class hello_world { + public function hello($to) { + return 'Hello ' . $to; + } +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->setClass('hello_world');; + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug29844.wsdl", array("trace"=>1)); +var_dump($client->hello('davey')); +?> +--EXPECT-- +string(11) "Hello davey" diff --git a/ext/soap/tests/bugs/bug29844.wsdl b/ext/soap/tests/bugs/bug29844.wsdl new file mode 100644 index 0000000..b45aa36 --- /dev/null +++ b/ext/soap/tests/bugs/bug29844.wsdl @@ -0,0 +1,66 @@ +<?xml version="1.0" ?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://davey.synapticmedia.net/php-mag/shafikdavey_automaticwebservices/src/Listing%201.php" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" name="Crtx_SOAP_AutoDiscover_Example" targetNamespace="http://davey.synapticmedia.net/php-mag/shafikdavey_automaticwebservices/src/Listing%201.php">
+ <portType name="Crtx_SOAP_AutoDiscover_ExamplePort">
+ <operation name="hello">
+ <input message="tns:helloRequest" />
+ <output message="tns:helloResponse" />
+ <documentation>Say Hello to Somebody</documentation>
+ </operation>
+ <operation name="goodBye">
+ <input message="tns:goodByeRequest" />
+ <output message="tns:goodByeResponse" />
+ <documentation>Say Goodbye to Somebody</documentation>
+ </operation>
+ </portType>
+ <binding name="Crtx_SOAP_AutoDiscover_ExampleBinding"
+ type="tns:Crtx_SOAP_AutoDiscover_ExamplePort">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="hello">
+ <input>
+ <soap:body use="encoded"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </input>
+ <output>
+ <soap:body use="encoded"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </output>
+ <soap:operation soapAction="http://davey.synapticmedia.net/php-mag/shafikdavey_automaticwebservices/src/Listing%201.php#hello" />
+ </operation>
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="goodBye">
+ <input>
+ <soap:body use="encoded"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </input>
+ <output>
+ <soap:body use="encoded"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </output>
+ <soap:operation soapAction="http://davey.synapticmedia.net/php-mag/shafikdavey_automaticwebservices/src/Listing%201.php#goodBye" />
+ </operation>
+ </binding>
+ <service name="Crtx_SOAP_AutoDiscover_ExampleService">
+ <port name="tns:Crtx_SOAP_AutoDiscover_ExamplePort"
+ binding="tns:Crtx_SOAP_AutoDiscover_ExampleBinding">
+ <soap:address location="http://davey.synapticmedia.net/php-mag/shafikdavey_automaticwebservices/src/Listing%201.php" />
+ </port>
+ </service>
+ <message name="helloRequest">
+ <part name="to" type="xsd:string" />
+ <documentation>Say Hello to Somebody</documentation>
+ </message>
+ <message name="helloResponse">
+ <part name="helloReturn" type="xsd:string" />
+ <documentation>The greeting</documentation>
+ </message>
+ <message name="goodByeRequest">
+ <part name="to" type="xsd:string" />
+ <documentation>Say Goodbye to Somebody</documentation>
+ </message>
+ <message name="goodByeResponse">
+ <part name="goodByeReturn" type="xsd:string" />
+ <documentation>The goodbye</documentation>
+ </message>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug30045.phpt b/ext/soap/tests/bugs/bug30045.phpt new file mode 100644 index 0000000..281f958 --- /dev/null +++ b/ext/soap/tests/bugs/bug30045.phpt @@ -0,0 +1,173 @@ +--TEST-- +Bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests) +--SKIPIF-- +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); + if (!extension_loaded('simplexml')) die('skip simplexml extension not available'); +?> +--INI-- +soap.wsdl_cache_enabled=1 +--FILE-- +<?php + +function foo($type, $num) { + return new SoapVar($num, $type); +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('foo'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + $xml = simplexml_load_string($request); + echo $xml->children("http://schemas.xmlsoap.org/soap/envelope/")->Body->children("http://test-uri")->children()->param1->asXML(),"\n"; + unset($xml); + + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + + return $response; + } + +} + +$soap = new LocalSoapClient(NULL, array("uri"=>"http://test-uri", "location"=>"test://")); + +function test($type, $num) { + global $soap; + try { + printf(" %0.0f\n ", $num); + $ret = $soap->foo($type, new SoapVar($num, $type)); + printf(" %0.0f\n", $ret); + } catch (SoapFault $ex) { + var_dump($ex); + } +} +/* +echo "byte\n"; +//test(XSD_BYTE, -129); +test(XSD_BYTE, -128); +test(XSD_BYTE, 127); +//test(XSD_BYTE, 128); + +echo "\nshort\n"; +//test(XSD_SHORT, -32769); +test(XSD_SHORT, -32768); +test(XSD_SHORT, 32767); +//test(XSD_SHORT, 32768); + +echo "\nint\n"; +//test(XSD_INT, -2147483649); +test(XSD_INT, -2147483648); +test(XSD_INT, 2147483647); +//test(XSD_INT, 2147483648); + +echo "\nlong\n"; +//test(XSD_LONG, -9223372036854775809); +test(XSD_LONG, -9223372036854775808); +test(XSD_LONG, 9223372036854775807); +//test(XSD_LONG, 9223372036854775808); + +echo "\nunsignedByte\n"; +//test(XSD_UNSIGNEDBYTE, -1); +test(XSD_UNSIGNEDBYTE, 0); +test(XSD_UNSIGNEDBYTE, 255); +//test(XSD_UNSIGNEDBYTE, 256); + +echo "\nunsignedShort\n"; +//test(XSD_UNSIGNEDSHORT, -1); +test(XSD_UNSIGNEDSHORT, 0); +test(XSD_UNSIGNEDSHORT, 65535); +//test(XSD_UNSIGNEDSHORT, 65536); + +echo "\nunsignedInt\n"; +//test(XSD_UNSIGNEDINT, -1); +test(XSD_UNSIGNEDINT, 0); +test(XSD_UNSIGNEDINT, 4294967295); +//test(XSD_UNSIGNEDINT, 4294967296); + +echo "\nunsignedLong\n"; +//test(XSD_UNSIGNEDLONG, -1); +test(XSD_UNSIGNEDLONG, 0); +test(XSD_UNSIGNEDLONG, 18446744073709551615); +//test(XSD_UNSIGNEDLONG, 18446744073709551616); + +echo "\nnegativeInteger\n"; +test(XSD_NEGATIVEINTEGER, -18446744073709551616); +test(XSD_NEGATIVEINTEGER, -1); +//test(XSD_NEGATIVEINTEGER, 0); + +echo "\nnonPositiveInteger\n"; +test(XSD_NONPOSITIVEINTEGER, -18446744073709551616); +test(XSD_NONPOSITIVEINTEGER, 0); +//test(XSD_NONPOSITIVEINTEGER, 1); + +echo "\nnonNegativeInteger\n"; +//test(XSD_NONNEGATIVEINTEGER, -1); +test(XSD_NONNEGATIVEINTEGER, 0); +test(XSD_NONNEGATIVEINTEGER, 18446744073709551616); + +echo "\nPositiveInteger\n"; +//test(XSD_POSITIVEINTEGER, 0); +test(XSD_POSITIVEINTEGER, 1); +test(XSD_POSITIVEINTEGER, 18446744073709551616); + +echo "\ninteger\n"; +test(XSD_INTEGER, -18446744073709551616); +test(XSD_INTEGER, 18446744073709551616); +*/ +echo "long\n"; +test(XSD_LONG, 2147483647); +test(XSD_LONG, 2147483648); +test(XSD_LONG, 4294967296); +test(XSD_LONG, 8589934592); +test(XSD_LONG, 17179869184); + +echo "\nunsignedLong\n"; +test(XSD_UNSIGNEDLONG, 2147483647); +test(XSD_UNSIGNEDLONG, 2147483648); +test(XSD_UNSIGNEDLONG, 4294967296); +test(XSD_UNSIGNEDLONG, 8589934592); +test(XSD_UNSIGNEDLONG, 17179869184); + +?> +--EXPECT-- +long + 2147483647 + <param1 xsi:type="xsd:long">2147483647</param1> + 2147483647 + 2147483648 + <param1 xsi:type="xsd:long">2147483648</param1> + 2147483648 + 4294967296 + <param1 xsi:type="xsd:long">4294967296</param1> + 4294967296 + 8589934592 + <param1 xsi:type="xsd:long">8589934592</param1> + 8589934592 + 17179869184 + <param1 xsi:type="xsd:long">17179869184</param1> + 17179869184 + +unsignedLong + 2147483647 + <param1 xsi:type="xsd:unsignedLong">2147483647</param1> + 2147483647 + 2147483648 + <param1 xsi:type="xsd:unsignedLong">2147483648</param1> + 2147483648 + 4294967296 + <param1 xsi:type="xsd:unsignedLong">4294967296</param1> + 4294967296 + 8589934592 + <param1 xsi:type="xsd:unsignedLong">8589934592</param1> + 8589934592 + 17179869184 + <param1 xsi:type="xsd:unsignedLong">17179869184</param1> + 17179869184 diff --git a/ext/soap/tests/bugs/bug30106.phpt b/ext/soap/tests/bugs/bug30106.phpt new file mode 100644 index 0000000..2104c6d --- /dev/null +++ b/ext/soap/tests/bugs/bug30106.phpt @@ -0,0 +1,72 @@ +--TEST-- +Bug #30106 (SOAP cannot not parse 'ref' element. Causes Uncaught SoapFault exception) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +function getContinentList() { + return array("getContinentListResult"=>array( + "schema"=>"<xsd:schema><element name=\"test\" type=\"xsd:string\"/></xsd:schema>", + "any"=>"<test>Hello World!</test><test>Bye World!</test>")); +} + +class LocalSoapClient extends SoapClient { + function __construct($wsdl, $options=array()) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("getContinentList"); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + echo $request; + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + echo $response; + return $response; + } +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug30106.wsdl"); +var_dump($client->__getFunctions()); +var_dump($client->__getTypes()); +$x = $client->getContinentList(array("AFFILIATE_ID"=>1,"PASSWORD"=>"x")); +var_dump($x); +?> +--EXPECTF-- +array(1) { + [0]=> + string(71) "getContinentListResponse getContinentList(getContinentList $parameters)" +} +array(3) { + [0]=> + string(64) "struct getContinentList { + int AFFILIATE_ID; + string PASSWORD; +}" + [1]=> + string(83) "struct getContinentListResponse { + getContinentListResult getContinentListResult; +}" + [2]=> + string(66) "struct getContinentListResult { + <anyXML> schema; + <anyXML> any; +}" +} +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/PRWebServ/getOtherInformation"><SOAP-ENV:Body><ns1:getContinentList><ns1:AFFILIATE_ID>1</ns1:AFFILIATE_ID><ns1:PASSWORD>x</ns1:PASSWORD></ns1:getContinentList></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://tempuri.org/PRWebServ/getOtherInformation"><SOAP-ENV:Body><ns1:getContinentListResponse><ns1:getContinentListResult><xsd:schema><element name="test" type="xsd:string"/></xsd:schema><test>Hello World!</test><test>Bye World!</test></ns1:getContinentListResult></ns1:getContinentListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (1) { + ["getContinentListResult"]=> + object(stdClass)#%d (2) { + ["schema"]=> + string(65) "<xsd:schema><element name="test" type="xsd:string"/></xsd:schema>" + ["any"]=> + string(48) "<test>Hello World!</test><test>Bye World!</test>" + } +} diff --git a/ext/soap/tests/bugs/bug30106.wsdl b/ext/soap/tests/bugs/bug30106.wsdl new file mode 100644 index 0000000..db1922d --- /dev/null +++ b/ext/soap/tests/bugs/bug30106.wsdl @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/PRWebServ/getOtherInformation" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/PRWebServ/getOtherInformation" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/PRWebServ/getOtherInformation">
+ <s:import namespace="http://www.w3.org/2001/XMLSchema" />
+ <s:element name="getContinentList">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="AFFILIATE_ID" type="s:int" />
+ <s:element minOccurs="0" maxOccurs="1" name="PASSWORD" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="getContinentListResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="getContinentListResult">
+ <s:complexType>
+ <s:sequence>
+ <s:element ref="s:schema" />
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:schema>
+ </wsdl:types>
+ <wsdl:message name="getContinentListSoapIn">
+ <wsdl:part name="parameters" element="tns:getContinentList" />
+ </wsdl:message>
+ <wsdl:message name="getContinentListSoapOut">
+ <wsdl:part name="parameters" element="tns:getContinentListResponse" />
+ </wsdl:message>
+ <wsdl:portType name="getOtherInformationSoap">
+ <wsdl:operation name="getContinentList">
+ <wsdl:input message="tns:getContinentListSoapIn" />
+ <wsdl:output message="tns:getContinentListSoapOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="getOtherInformationSoap" type="tns:getOtherInformationSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <wsdl:operation name="getContinentList">
+ <soap:operation soapAction="http://tempuri.org/PRWebServ/getOtherInformation/getContinentList" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="getOtherInformation">
+ <wsdl:port name="getOtherInformationSoap" binding="tns:getOtherInformationSoap">
+ <soap:address location="http://www.precisionreservations.com/PRWebServ/getOtherInformation.asmx" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug30175.phpt b/ext/soap/tests/bugs/bug30175.phpt new file mode 100644 index 0000000..8d721ea --- /dev/null +++ b/ext/soap/tests/bugs/bug30175.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug #30175 (SOAP results aren't parsed correctly) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php + +class LocalSoapClient extends SoapClient { + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + return <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope +xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:ns1="urn:qweb"> +<SOAP-ENV:Body +SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +id="_0"> +<ns1:HostInfo xsi:type="ns1:HostInfo"> +<name xsi:type="xsd:string">blah blah some name field</name> +<shortDescription xsi:type="xsd:string">This is a description. more blah blah blah</shortDescription> +<ipAddress xsi:type="xsd:string">127.0.0.1</ipAddress> +</ns1:HostInfo> +</SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug30175.wsdl"); +var_dump($client->qwebGetHostInfo()); +?> +--EXPECT-- +array(3) { + ["name"]=> + string(25) "blah blah some name field" + ["shortDescription"]=> + string(42) "This is a description. more blah blah blah" + ["ipAddress"]=> + string(9) "127.0.0.1" +} diff --git a/ext/soap/tests/bugs/bug30175.wsdl b/ext/soap/tests/bugs/bug30175.wsdl new file mode 100644 index 0000000..f4cae25 --- /dev/null +++ b/ext/soap/tests/bugs/bug30175.wsdl @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="qweb"
+ targetNamespace="http://www.newsblob.com/qweb.wsdl"
+ xmlns:tns="http://www.newsblob.com/qweb.wsdl"
+ xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="urn:qweb"
+ xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+<types>
+
+ <schema targetNamespace="urn:qweb"
+ xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="urn:qweb"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified">
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+ <complexType name="qwebGetHostInfoResponse">
+ <sequence>
+ <element name="return" type="ns1:HostInfo" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="ArrayOfHostInfo">
+ <complexContent>
+ <restriction base="SOAP-ENC:Array">
+ <sequence>
+ <element name="item" type="ns1:HostInfo" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="ns1:HostInfo[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ </schema>
+
+</types>
+
+<message name="qwebSquareRequest">
+ <part name="mynum" type="xsd:int"/>
+</message>
+
+<message name="qwebSquareResponse">
+ <part name="result" type="xsd:int"/>
+</message>
+
+<message name="qwebStrlenRequest">
+ <part name="mystr" type="xsd:string"/>
+</message>
+
+<message name="qwebStrlenResponse">
+ <part name="result" type="xsd:int"/>
+</message>
+
+<message name="qwebGetHostInfoRequest">
+</message>
+
+<message name="HostInfo">
+ <part name="name" type="xsd:string"/>
+ <part name="shortDescription" type="xsd:string"/>
+ <part name="ipAddress" type="xsd:string"/>
+</message>
+
+<portType name="qwebPortType">
+ <operation name="qwebSquare">
+ <documentation>Service definition of function ns1__qwebSquare</documentation>
+ <input message="tns:qwebSquareRequest"/>
+ <output message="tns:qwebSquareResponse"/>
+ </operation>
+ <operation name="qwebStrlen">
+ <documentation>Service definition of function ns1__qwebStrlen</documentation>
+ <input message="tns:qwebStrlenRequest"/>
+ <output message="tns:qwebStrlenResponse"/>
+ </operation>
+ <operation name="qwebGetHostInfo">
+ <documentation>Service definition of function ns1__qwebGetHostInfo</documentation>
+ <input message="tns:qwebGetHostInfoRequest"/>
+ <output message="tns:HostInfo"/>
+ </operation>
+</portType>
+
+<binding name="qweb" type="tns:qwebPortType">
+ <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="qwebSquare">
+ <SOAP:operation style="rpc" soapAction=""/>
+ <input>
+ <SOAP:body use="encoded" namespace="urn:qweb" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <SOAP:body use="encoded" namespace="urn:qweb" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="qwebStrlen">
+ <SOAP:operation style="rpc" soapAction=""/>
+ <input>
+ <SOAP:body use="encoded" namespace="urn:qweb" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <SOAP:body use="encoded" namespace="urn:qweb" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ <operation name="qwebGetHostInfo">
+ <SOAP:operation style="rpc" soapAction=""/>
+ <input>
+ <SOAP:body use="encoded" namespace="urn:qweb" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <SOAP:body use="encoded" namespace="urn:qweb" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+</binding>
+
+<service name="qweb">
+ <documentation>Demo Qweb SOAP interface</documentation>
+ <port name="qweb" binding="tns:qweb">
+ <SOAP:address location="http://www.newsblob.com:6969"/>
+ </port>
+</service>
+
+</definitions>
diff --git a/ext/soap/tests/bugs/bug30799.phpt b/ext/soap/tests/bugs/bug30799.phpt new file mode 100644 index 0000000..fe7c8ca --- /dev/null +++ b/ext/soap/tests/bugs/bug30799.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #30799 (SoapServer doesn't handle private or protected properties) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class foo { + public $a="a"; + private $b="b"; + protected $c="c"; + +} + +$x = new SoapClient(NULL,array("location"=>"test://", + "uri" => "test://", + "exceptions" => 0, + "trace" => 1 )); +$x->test(new foo()); +echo $x->__getLastRequest(); +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="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:test><param0 xsi:type="SOAP-ENC:Struct"><a xsi:type="xsd:string">a</a><b xsi:type="xsd:string">b</b><c xsi:type="xsd:string">c</c></param0></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/bugs/bug30928.phpt b/ext/soap/tests/bugs/bug30928.phpt new file mode 100644 index 0000000..0f473b3 --- /dev/null +++ b/ext/soap/tests/bugs/bug30928.phpt @@ -0,0 +1,63 @@ +--TEST-- +Bug #30928 (When Using WSDL, SoapServer doesn't handle private or protected properties) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +class foo { + public $a="a"; + private $b="b"; + protected $c="c"; +} + +function test($x) { + return $x; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", + array()); +var_dump($x->test(new foo())); + +$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", + array("classmap" => array('testType'=>'foo'))); +var_dump($x->test(new foo())); + +echo "ok\n"; +?> +--EXPECTF-- +object(stdClass)#%d (3) { + ["a"]=> + string(1) "a" + ["b"]=> + string(1) "b" + ["c"]=> + string(1) "c" +} +object(foo)#%d (3) { + ["a"]=> + string(1) "a" + ["b":"foo":private]=> + string(1) "b" + ["c":protected]=> + string(1) "c" +} +ok diff --git a/ext/soap/tests/bugs/bug30928.wsdl b/ext/soap/tests/bugs/bug30928.wsdl new file mode 100644 index 0000000..7ed34d3 --- /dev/null +++ b/ext/soap/tests/bugs/bug30928.wsdl @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?>
+<definitions name="InteropTest"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="http://test-uri/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://test-uri/">
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test-uri/">
+ <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
+ <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
+ <complexType name="testType">
+ <sequence>
+ <element name="a" type="string"/>
+ <element name="b" type="string"/>
+ </sequence>
+ <attribute name="c" type="string"/>
+ </complexType>
+ </schema>
+ </types>
+ <message name="testMessage">
+ <part name="testParam" type="tns:testType"/>
+ </message>
+ <portType name="testPortType">
+ <operation name="test">
+ <input message="testMessage"/>
+ <output message="testMessage"/>
+ </operation>
+ </portType>
+ <binding name="testBinding" type="testPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="#test" style="rpc"/>
+ <input>
+ <soap:body use="encoded" namespace="http://test-uri/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="http://test-uri/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="testService">
+ <port name="testPort" binding="tns:testBinding">
+ <soap:address location="test://" />
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug30994.phpt b/ext/soap/tests/bugs/bug30994.phpt new file mode 100644 index 0000000..28e3b92 --- /dev/null +++ b/ext/soap/tests/bugs/bug30994.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug #30994 (SOAP server unable to handle request with references) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="utf-8"?> +<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:tns="http://spock/kunta/kunta" + xmlns:types="http://spock/kunta/kunta/encodedTypes" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + +<soap:Body +soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> + <q1:bassCall xmlns:q1="http://spock/bass/types/kunta"> + <system xsi:type="xsd:string">XXX</system> + <function xsi:type="xsd:string">TASKTEST</function> + <parameter href="#id1" /> + </q1:bassCall> + + <soapenc:Array id="id1" soapenc:arrayType="tns:Item[1]"> + <Item href="#id2" /> + </soapenc:Array> + + <tns:Item id="id2" xsi:type="tns:Item"> + <key xsi:type="xsd:string">ABCabc123</key> + <val xsi:type="xsd:string">123456</val> + </tns:Item> + +</soap:Body> +</soap:Envelope> +EOF; + +function bassCall() { + return "ok"; +} + +$x = new SoapServer(NULL, array("uri"=>"http://spock/kunta/kunta")); +$x->addFunction("bassCall"); +$x->handle($HTTP_RAW_POST_DATA); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://spock/kunta/kunta" 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:bassCallResponse><return xsi:type="xsd:string">ok</return></ns1:bassCallResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug31422-win.phpt b/ext/soap/tests/bugs/bug31422-win.phpt new file mode 100644 index 0000000..ba8df07 --- /dev/null +++ b/ext/soap/tests/bugs/bug31422-win.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug #31422 (No Error-Logging on SoapServer-Side) +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) != 'WIN') { + die('skip not valid for non windows'); +} +require_once('skipif.inc'); +?> +--INI-- +log_errors=1 +--FILE-- +<?php +function Add($x,$y) { + fopen(); + user_error("Hello", E_USER_ERROR); + return $x+$y; +} + +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addfunction("Add"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Add xmlns:ns1="http://testuri.org"> + <x xsi:type="xsd:int">22</x> + <y xsi:type="xsd:int">33</y> + </ns1:Add> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECTF-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422-win.php on line %d +PHP Fatal error: Hello in %sbug31422-win.php on line %d diff --git a/ext/soap/tests/bugs/bug31422.phpt b/ext/soap/tests/bugs/bug31422.phpt new file mode 100644 index 0000000..c8ddcfe --- /dev/null +++ b/ext/soap/tests/bugs/bug31422.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #31422 (No Error-Logging on SoapServer-Side) +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip not valid for windows'); +} +require_once('skipif.inc'); +?> +--INI-- +log_errors=1 +error_log= +--FILE-- +<?php +function Add($x,$y) { + fopen(); + user_error("Hello", E_USER_ERROR); + return $x+$y; +} + +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addfunction("Add"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Add xmlns:ns1="http://testuri.org"> + <x xsi:type="xsd:int">22</x> + <y xsi:type="xsd:int">33</y> + </ns1:Add> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECTF-- +PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422.php on line %d +PHP Fatal error: Hello in %sbug31422.php on line %d +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug31695.phpt b/ext/soap/tests/bugs/bug31695.phpt new file mode 100644 index 0000000..9def103 --- /dev/null +++ b/ext/soap/tests/bugs/bug31695.phpt @@ -0,0 +1,62 @@ +--TEST-- +Bug #31695 (Cannot redefine endpoint when using WSDL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +function Test($x) { + return $x; +} + +class LocalSoapClient extends SoapClient { + function __construct($wsdl, $options=array()) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("Test"); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + echo "$location\n"; + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl"); +$client->Test("str"); +$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl", array("location"=>"test://1")); +$client->Test("str"); +$client->__soapCall("Test", + array("arg1"), + array("location"=>"test://2")); +$old = $client->__setLocation("test://3"); +echo "$old\n"; +$client->Test("str"); +$client->Test("str"); +$client->__setLocation($old); +$client->Test("str"); +$old = $client->__setLocation(); +$client->Test("str"); +$client->__setLocation($old); +$client->Test("str"); +$client->__setLocation(null); +$client->Test("str"); +var_dump($client->__setLocation()); +?> +--EXPECT-- +test://0 +test://1 +test://2 +test://1 +test://3 +test://3 +test://1 +test://0 +test://1 +test://0 +NULL diff --git a/ext/soap/tests/bugs/bug31695.wsdl b/ext/soap/tests/bugs/bug31695.wsdl new file mode 100644 index 0000000..5785cb0 --- /dev/null +++ b/ext/soap/tests/bugs/bug31695.wsdl @@ -0,0 +1,47 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + + <message name="TestRequest"> + <part name="x" type="xsd:string" /> + </message> + <message name="TestResponse"> + <part name="result" type="xsd:string" /> + </message> + + <portType name="TestServicePortType"> + <operation name="Test"> + <input message="tns:TestRequest" /> + <output message="tns:TestResponse" /> + </operation> + </portType> + + <binding name="TestServiceBinding" type="tns:TestServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> + <operation name="Test"> + <soap:operation soapAction="Test" style="rpc" /> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </output> + </operation> + </binding> + + <service name="TestService"> + <port name="TestServicePort" binding="tns:TestServiceBinding"> + <soap:address location="test://0" /> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/bugs/bug31755.phpt b/ext/soap/tests/bugs/bug31755.phpt new file mode 100644 index 0000000..1d65b3a --- /dev/null +++ b/ext/soap/tests/bugs/bug31755.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #31422 (No Error-Logging on SoapServer-Side) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client=new SOAPClient(null, array('location' => 'http://localhost', +'uri' => 'myNS', 'exceptions' => false, 'trace' => true)); + +$header = new SOAPHeader(null, 'foo', 'bar'); + +$response= $client->__call('function', array(), null, $header); + +print $client->__getLastRequest(); +?> +--EXPECTF-- +Warning: SoapHeader::SoapHeader(): Invalid namespace in %s on line %d +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="myNS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns1:function/></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug32776.phpt b/ext/soap/tests/bugs/bug32776.phpt new file mode 100644 index 0000000..6dc9466 --- /dev/null +++ b/ext/soap/tests/bugs/bug32776.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #32776 (SOAP doesn't support one-way operations) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php + +$d = null; + +function test($x) { + global $d; + $d = $x; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$x = new LocalSoapClient(dirname(__FILE__)."/bug32776.wsdl",array("trace"=>true,"exceptions"=>false)); +var_dump($x->test("Hello")); +var_dump($d); +var_dump($x->__getLastRequest()); +var_dump($x->__getLastResponse()); +echo "ok\n"; +?> +--EXPECT-- +NULL +string(5) "Hello" +string(459) "<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 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><SOAP-ENV:test><x xsi:type="xsd:string">Hello</x></SOAP-ENV:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +" +string(0) "" +ok diff --git a/ext/soap/tests/bugs/bug32776.wsdl b/ext/soap/tests/bugs/bug32776.wsdl new file mode 100644 index 0000000..7339018 --- /dev/null +++ b/ext/soap/tests/bugs/bug32776.wsdl @@ -0,0 +1,47 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + + <types> + <xsd:schema targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> + </xsd:schema> + </types> + + <message name="TestRequest"> + <part name="x" type="xsd:string" /> + </message> + + <portType name="TestServicePortType"> + <operation name="test"> + <input message="tns:TestRequest" /> + </operation> + </portType> + + <binding name="TestServiceBinding" type="tns:TestServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> + <operation name="test"> + <soap:operation soapAction="Add" style="rpc" /> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </input> + </operation> + </binding> + + <service name="TestService"> + <port name="TestServicePort" binding="tns:TestServiceBinding"> + <soap:address location="http://linuxsrv.home/~dmitry/soap/soap_server.php" /> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/bugs/bug32941.phpt b/ext/soap/tests/bugs/bug32941.phpt new file mode 100644 index 0000000..d1e3fff --- /dev/null +++ b/ext/soap/tests/bugs/bug32941.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug #32941 (Sending structured exception kills a php) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class TestSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version, $one_way = 0) { + return <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope +xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <soapenv:Body> + <soapenv:Fault> + <faultcode>soapenv:Server.userException</faultcode> + <faultstring>service.EchoServiceException</faultstring> + <detail> + <service.EchoServiceException xsi:type="ns1:EchoServiceException" xmlns:ns1="urn:service.EchoService"> + <intParameter xsi:type="xsd:int">105</intParameter> + <parameter xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">string param</parameter> + </service.EchoServiceException> + <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">steckovic</ns2:hostname> + </detail> + </soapenv:Fault> + </soapenv:Body> +</soapenv:Envelope> +EOF; + } +} + +ini_set("soap.wsdl_cache_enabled", 1); +$client = new TestSoapClient(dirname(__FILE__).'/bug32941.wsdl', array("trace" => 1, 'exceptions' => 0)); +$ahoj = $client->echoString('exception'); +$client = new TestSoapClient(dirname(__FILE__).'/bug32941.wsdl', array("trace" => 1, 'exceptions' => 0)); +$ahoj = $client->echoString('exception'); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug32941.wsdl b/ext/soap/tests/bugs/bug32941.wsdl new file mode 100755 index 0000000..61fd13d --- /dev/null +++ b/ext/soap/tests/bugs/bug32941.wsdl @@ -0,0 +1,141 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://212.24.157.117:8080/axis/services/echo" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://212.24.157.117:8080/axis/services/echo" xmlns:intf="http://212.24.157.117:8080/axis/services/echo" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="urn:service.EchoService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<!--WSDL created by Apache Axis version: 1.2RC3 +Built on Feb 28, 2005 (10:15:14 EST)-->
+ <wsdl:types>
+ <schema targetNamespace="urn:service.EchoService" xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+ <complexType name="EchoServiceException">
+ <sequence>
+ <element name="intParameter" type="xsd:int"/>
+ <element name="parameter" nillable="true" type="soapenc:string"/>
+ </sequence>
+ </complexType>
+ <complexType name="Person">
+ <sequence>
+ <element name="name" nillable="true" type="soapenc:string"/>
+ <element name="surname" nillable="true" type="soapenc:string"/>
+ </sequence>
+ </complexType>
+ </schema>
+ </wsdl:types>
+ + <wsdl:message name="echoStringResponse">
+ + <wsdl:part name="echoStringReturn" type="soapenc:string"/>
+ + </wsdl:message>
+ + <wsdl:message name="EchoServiceException">
+ + <wsdl:part name="EchoServiceException" type="tns1:EchoServiceException"/>
+ + </wsdl:message>
+ + <wsdl:message name="echoStringRequest">
+ + <wsdl:part name="e" type="xsd:string"/>
+ + </wsdl:message>
+ + <wsdl:message name="echoPersonResponse">
+ + <wsdl:part name="echoPersonReturn" type="tns1:Person"/>
+ + </wsdl:message>
+ + <wsdl:message name="echoPersonRequest">
+ + <wsdl:part name="p" type="tns1:Person"/>
+ + </wsdl:message>
+ + <wsdl:portType name="EchoService">
+ + <wsdl:operation name="echoString" parameterOrder="e">
+ + <wsdl:input message="impl:echoStringRequest" name="echoStringRequest"/>
+ + <wsdl:output message="impl:echoStringResponse" name="echoStringResponse"/>
+ + <wsdl:fault message="impl:EchoServiceException" name="EchoServiceException"/>
+ + </wsdl:operation>
+ + <wsdl:operation name="echoPerson" parameterOrder="p">
+ + <wsdl:input message="impl:echoPersonRequest" name="echoPersonRequest"/>
+ + <wsdl:output message="impl:echoPersonResponse" name="echoPersonResponse"/>
+ + <wsdl:fault message="impl:EchoServiceException" name="EchoServiceException"/>
+ + </wsdl:operation>
+ + </wsdl:portType>
+ + <wsdl:binding name="echoSoapBinding" type="impl:EchoService">
+ + <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ + <wsdl:operation name="echoString">
+ + <wsdlsoap:operation soapAction=""/>
+ + <wsdl:input name="echoStringRequest">
+ + <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:service.EchoService" use="encoded"/>
+ + </wsdl:input>
+ + <wsdl:output name="echoStringResponse">
+ + <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://212.24.157.117:8080/axis/services/echo" use="encoded"/>
+ + </wsdl:output>
+ + <wsdl:fault name="EchoServiceException">
+ + <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="EchoServiceException" namespace="urn:service.EchoService" use="encoded"/>
+ + </wsdl:fault>
+ + </wsdl:operation>
+ + <wsdl:operation name="echoPerson">
+ + <wsdlsoap:operation soapAction=""/>
+ + <wsdl:input name="echoPersonRequest">
+ + <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://service" use="encoded"/>
+ + </wsdl:input>
+ + <wsdl:output name="echoPersonResponse">
+ + <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://212.24.157.117:8080/axis/services/echo" use="encoded"/>
+ + </wsdl:output>
+ + <wsdl:fault name="EchoServiceException">
+ + <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="EchoServiceException" namespace="http://212.24.157.117:8080/axis/services/echo" use="encoded"/>
+ + </wsdl:fault>
+ + </wsdl:operation>
+ + </wsdl:binding>
+ + <wsdl:service name="EchoServiceService">
+ + <wsdl:port binding="impl:echoSoapBinding" name="echo">
+ + <wsdlsoap:address location="http://212.24.157.117:8080/axis/services/echo"/>
+ + </wsdl:port>
+ + </wsdl:service>
+ +</wsdl:definitions>
diff --git a/ext/soap/tests/bugs/bug34449.phpt b/ext/soap/tests/bugs/bug34449.phpt new file mode 100644 index 0000000..f5766e2 --- /dev/null +++ b/ext/soap/tests/bugs/bug34449.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #34449 (ext/soap: XSD_ANYXML functionality not exposed) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class TestSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version, $one_way = 0) { + 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: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> diff --git a/ext/soap/tests/bugs/bug34453.phpt b/ext/soap/tests/bugs/bug34453.phpt new file mode 100644 index 0000000..0f9543b --- /dev/null +++ b/ext/soap/tests/bugs/bug34453.phpt @@ -0,0 +1,43 @@ +--TEST-- +Bug #29839 (incorrect convert (xml:lang to lang)) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php + +function EchoString($s) { + return $s; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('EchoString'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug34453.wsdl", array("trace"=>1)); +$client->EchoString(array("value"=>"hello","lang"=>"en")); +echo $client->__getLastRequest(); +echo $client->__getLastResponse(); +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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/bugs/bug34453.wsdl b/ext/soap/tests/bugs/bug34453.wsdl new file mode 100755 index 0000000..205e1c9 --- /dev/null +++ b/ext/soap/tests/bugs/bug34453.wsdl @@ -0,0 +1,42 @@ +<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://test-uri" targetNamespace="http://test-uri">
+ <types>
+ <xs:schema targetNamespace="http://test-uri" elementFormDefault="qualified">
+ <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml2.xsd" />
+ <complexType name="LocalizedString">
+ <sequence>
+ <element name="value" type="xsd:string"/>
+ </sequence>
+ <attribute ref="xml:lang" use="required"/>
+ </complexType>
+ </xs:schema>
+ </types>
+ <message name="EchoStringRequest">
+ <part name="string" type="tns:LocalizedString"/>
+ </message>
+ <message name="EchoStringResponse">
+ <part name="string" type="tns:LocalizedString"/>
+ </message>
+ <portType name="AWSProductDataPortType">
+ <operation name="EchoString">
+ <input message="tns:EchoStringRequest"/>
+ <output message="tns:EchoStringResponse"/>
+ </operation>
+ </portType>
+ <binding name="AWSProductDataBinding" type="tns:AWSProductDataPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="EchoString">
+ <soap:operation soapAction="http://test-uri"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AWSProductData">
+ <port name="AWSProductDataPort" binding="tns:AWSProductDataBinding">
+ <soap:address location="http://aws-beta.amazon.com/onca/soap?Service=AWSProductData"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug34643.phpt b/ext/soap/tests/bugs/bug34643.phpt new file mode 100644 index 0000000..b995651 --- /dev/null +++ b/ext/soap/tests/bugs/bug34643.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #34643 (wsdl default value) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +class fp { + public function get_it($opt="zzz") { + return $opt; + } +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->setClass('fp'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$cl = new LocalSoapClient(dirname(__FILE__).'/bug34643.wsdl', array("trace"=>1)); +print_r($cl->__getFunctions()); +echo $cl->get_it("aaa")."\n"; +echo $cl->get_it()."\n"; +var_dump($cl->get_it(null)); +?> +--EXPECT-- +Array +( + [0] => string get_it(string $opt) +) +aaa +zzz +NULL diff --git a/ext/soap/tests/bugs/bug34643.wsdl b/ext/soap/tests/bugs/bug34643.wsdl new file mode 100755 index 0000000..24c3a50 --- /dev/null +++ b/ext/soap/tests/bugs/bug34643.wsdl @@ -0,0 +1,42 @@ +<?xml version='1.0' encoding='UTF-8'?>
+<definitions name="wsdl" targetNamespace="urn:wsdl"
+xmlns:typens="urn:wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wsdl">
+ <xsd:element name="opt" type="xsd:string" default="zzz" />
+ </xsd:schema>
+ </types>
+ <message name="get_it">
+ <part name="opt" element="typens:opt"/>
+ </message>
+ <message name="get_itResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+ <portType name="fpPortType">
+ <operation name="get_it">
+ <input message="typens:get_it"/>
+ <output message="typens:get_itResponse"/>
+ </operation>
+ </portType>
+ <binding name="fpBinding" type="typens:fpPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="get_it">
+ <soap:operation soapAction="urn:fpAction"/>
+ <input>
+ <soap:body namespace="urn:wsdl" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body namespace="urn:wsdl" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="wsdlService">
+ <port name="fpPort" binding="typens:fpBinding">
+ <soap:address location="**********"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug34657.phpt b/ext/soap/tests/bugs/bug34657.phpt new file mode 100644 index 0000000..d974d02 --- /dev/null +++ b/ext/soap/tests/bugs/bug34657.phpt @@ -0,0 +1,35 @@ +--TEST-- +Bug #34657 (If you get a communication problem when loading the WSDL, it fatal's) +--SKIPIF-- +<?php +require_once('skipif.inc'); +if (extension_loaded("openssl")) { + /* + when openssl loaded, tcp stream is less verbose, so some error messages are missing + so let's skip the test in this case + */ + die("skip OpenSSL extension required"); +} +?> +--FILE-- +<?php +try { + $client = new SoapClient('http://i_dont_exist.com/some.wsdl'); + echo "?\n"; +} catch (SoapFault $e) { + echo get_class($e)."\n"; + echo $e->faultstring."\n"; + echo "ok\n"; +} catch (Exception $e) { + echo get_class($e)."\n"; +} +?> +--EXPECTF-- +Warning: SoapClient::SoapClient(): %s %sbug34657.php on line 3 + +Warning: SoapClient::SoapClient(http://i_dont_exist.com/some.wsdl): failed to open stream: %sbug34657.php on line 3 + +Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://i_dont_exist.com/some.wsdl" in %sbug34657.php on line 3 +SoapFault +SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://i_dont_exist.com/some.wsdl'%S +ok diff --git a/ext/soap/tests/bugs/bug35142.phpt b/ext/soap/tests/bugs/bug35142.phpt new file mode 100644 index 0000000..94c1aa9 --- /dev/null +++ b/ext/soap/tests/bugs/bug35142.phpt @@ -0,0 +1,135 @@ +--TEST-- +Bug #35142 (SOAP Client/Server Complex Object Support) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$timestamp = "2005-11-08T11:22:07+03:00"; +$wsdl = dirname(__FILE__)."/bug35142.wsdl"; + +function PostEvents($x) { + var_dump($x); + exit(); + return $x; +} + +class TestSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('PostEvents'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + echo "$request\n"; + $this->server->handle($request); + return $response; + } + +} + +$soapClient = new TestSoapClient($wsdl, + array('trace' => 1, 'exceptions' => 0, + 'classmap' => array('logOnEvent' => 'LogOnEvent', + 'logOffEvent' => 'LogOffEvent', + 'events' => 'IVREvents'))); + +$logOnEvent = new LogOnEvent(34567, $timestamp); +$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); +$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); +$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); + +$result = $soapClient->PostEvents($ivrEvents); + +class LogOffEvent { + public $audienceMemberId; + public $timestamp; + public $smokeStatus; + public $callInitiator; + + function __construct($audienceMemberId, $timestamp, $smokeStatus) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + $this->smokeStatus = $smokeStatus; + $this->callInitiator = "IVR"; + } +} + +class LogOnEvent { + public $audienceMemberId; + public $timestamp; + + function __construct($audienceMemberId, $timestamp) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + } +} + +class IVREvents { + public $version; + public $activityId; + public $messageId; + public $source; + public $logOnEvent; + public $logOffEvent; + + function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { + $this->version = $version; + $this->activityId = $activityId; + $this->messageId = $messageId; + $this->source = $source; + $this->logOnEvent = $logOnEvent; + $this->logOffEvent = $logOffEvent; + } +} +?> +--EXPECTF-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testurl/Message"><SOAP-ENV:Body><ns1:ivrEvents version="1.0" activityId="101" messageId="12345" source="IVR"><ns1:logOffEvent audienceMemberId="34567" timestamp="2005-11-08T11:22:07+03:00" smokeStatus="Smoked" callInitiator="IVR"/><ns1:logOffEvent audienceMemberId="34568" timestamp="2005-11-08T11:22:07+03:00" smokeStatus="SmokeFree" callInitiator="IVR"/><ns1:logOnEvent audienceMemberId="34567" timestamp="2005-11-08T11:22:07+03:00"/></ns1:ivrEvents></SOAP-ENV:Body></SOAP-ENV:Envelope> + +object(IVREvents)#%d (6) { + ["version"]=> + string(3) "1.0" + ["activityId"]=> + int(101) + ["messageId"]=> + int(12345) + ["source"]=> + string(3) "IVR" + ["logOnEvent"]=> + object(LogOnEvent)#%d (2) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + } + ["logOffEvent"]=> + array(2) { + [0]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(6) "Smoked" + ["callInitiator"]=> + string(3) "IVR" + } + [1]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34568) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(9) "SmokeFree" + ["callInitiator"]=> + string(3) "IVR" + } + } +} diff --git a/ext/soap/tests/bugs/bug35142.wsdl b/ext/soap/tests/bugs/bug35142.wsdl new file mode 100755 index 0000000..2c712ec --- /dev/null +++ b/ext/soap/tests/bugs/bug35142.wsdl @@ -0,0 +1,543 @@ +<?xml version="1.0" encoding="utf-8"?>
+<definitions xmlns:s1="http://testurl/Events" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://testurl/Message" xmlns:s3="http://testurl/Smoker" xmlns:soap12enc="http://www.w3.org/2002/06/soap-envelope" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:s4="http://testurl/AudienceMember" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s2="http://testurl/Actions" xmlns:tns="http://testurl/Service" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://testurl/Service" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/Message">
+ <s:import namespace="http://testurl/Events" />
+ <s:import namespace="http://testurl/Actions" />
+ <s:element name="ivrActions" type="s0:actions" />
+ <s:complexType name="actions">
+ <s:complexContent mixed="false">
+ <s:extension base="s0:abstractMessage">
+ <s:sequence>
+ <s:choice minOccurs="0" maxOccurs="unbounded">
+ <s:element minOccurs="0" maxOccurs="1" name="pauseSmokerAction" type="s2:pauseSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="terminateSmokerAction" type="s2:terminateSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="activateSmokerAction" type="s2:activateSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="addSmokerAction" type="s2:addSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="updateSmokerAction" type="s2:updateSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="deleteSmokerAction" type="s2:deleteSmokerAction" />
+ </s:choice>
+ </s:sequence>
+ <s:attribute default="Client" name="source" type="s0:ivrMessageSource" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="abstractMessage" abstract="true">
+ <s:attribute default="1.0" name="version" type="s:string" />
+ <s:attribute name="activityId" type="s:unsignedLong" use="required" />
+ <s:attribute name="messageId" type="s:unsignedLong" use="required" />
+ </s:complexType>
+ <s:complexType name="events">
+ <s:complexContent mixed="false">
+ <s:extension base="s0:abstractMessage">
+ <s:sequence>
+ <s:choice minOccurs="0" maxOccurs="unbounded">
+ <s:element minOccurs="0" maxOccurs="1" name="authFailureEvent" type="s1:authFailureEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="logOffEvent" type="s1:logOffEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="cravingLineEvent" type="s1:cravingLineEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="terminateEvent" type="s1:terminateEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="relapseWakeSmsReplaceEvent" type="s1:relapseWakeSmsReplaceEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="confessionLineEvent" type="s1:confessionLineEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="rfqRecordedEvent" type="s1:rfqRecordedEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="logOnEvent" type="s1:logOnEvent" />
+ </s:choice>
+ </s:sequence>
+ <s:attribute default="IVR" name="source" type="s0:ivrMessageSource" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="ivrMessageSource">
+ <s:restriction base="s:string">
+ <s:enumeration value="IVR" />
+ <s:enumeration value="Client" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="actionResults">
+ <s:complexContent mixed="false">
+ <s:extension base="s0:abstractMessage">
+ <s:sequence>
+ <s:choice minOccurs="0" maxOccurs="unbounded">
+ <s:element minOccurs="0" maxOccurs="1" name="updateSmokerActionResult" type="s2:updateSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="activateSmokerActionResult" type="s2:activateSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="deleteSmokerActionResult" type="s2:deleteSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="addSmokerActionResult" type="s2:addSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="pauseSmokerActionResult" type="s2:pauseSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="terminateSmokerActionResult" type="s2:terminateSmokerActionResult" />
+ </s:choice>
+ </s:sequence>
+ <s:attribute default="IVR" name="source" type="s0:ivrMessageSource" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="eventResults">
+ <s:complexContent mixed="false">
+ <s:extension base="s0:abstractMessage">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="eventResult" type="s1:eventResult" />
+ </s:sequence>
+ <s:attribute default="IVR" name="source" type="s0:ivrMessageSource" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:element name="ivrActionResults" type="s0:actionResults" />
+ <s:element name="ivrEvents" type="s0:events" />
+ <s:element name="ivrEventResults" type="s0:eventResults" />
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/Events">
+ <s:complexType name="authFailureEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:attribute name="mobileNumber" type="s:string" />
+ <s:attribute name="line" type="s1:line" use="required" />
+ <s:attribute name="reason" type="s:string" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="abstractEvent" abstract="true">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" />
+ <s:attribute name="timestamp" type="s:dateTime" use="required" />
+ </s:complexType>
+ <s:complexType name="logOnEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent" />
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="cravingLineEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="selection" type="s1:cravingLineEventSelection" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="cravingLineEventSelection">
+ <s:attribute name="type" type="s1:cravingLineMessageType" use="required" />
+ <s:attribute name="msgNumber" type="s:positiveInteger" />
+ </s:complexType>
+ <s:simpleType name="cravingLineMessageType">
+ <s:restriction base="s:string">
+ <s:enumeration value="Motivational" />
+ <s:enumeration value="StressReval" />
+ <s:enumeration value="EffectReg" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="confessionLineEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:attribute name="smokeStatus" type="s1:smokeStatus" use="required" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="smokeStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Smoked" />
+ <s:enumeration value="SmokeFree" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="rfqRecordedEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent" />
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="terminateEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent" />
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="logOffEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:attribute name="smokeStatus" type="s1:smokeStatus" use="required" />
+ <s:attribute name="callInitiator" type="s1:callInitiator" use="required" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="callInitiator">
+ <s:restriction base="s:string">
+ <s:enumeration value="AudienceMember" />
+ <s:enumeration value="IVR" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="relapseWakeSmsReplaceEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:attribute name="relapseCount" type="s:positiveInteger" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="line">
+ <s:restriction base="s:string">
+ <s:enumeration value="LogOnOffLine" />
+ <s:enumeration value="CravingLine" />
+ <s:enumeration value="ConfessionLine" />
+ <s:enumeration value="ReasonsForQuittingLine" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="eventResult">
+ <s:attribute name="success" type="s:boolean" use="required" />
+ </s:complexType>
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/Actions">
+ <s:import namespace="http://testurl/Smoker" />
+ <s:complexType name="updateSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:updateSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="abstractActionResult">
+ <s:attribute name="resultId" type="s:unsignedLong" use="required" />
+ </s:complexType>
+ <s:complexType name="pauseSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:pauseSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="pauseSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:pauseSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:pauseSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="pauseSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Paused" />
+ <s:enumeration value="NotPaused" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="pauseSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="addSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:addSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="addSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:addSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:addSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="addSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Added" />
+ <s:enumeration value="NotAdded" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="addSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="DuplicateID" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="deleteSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:deleteSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="deleteSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:deleteSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:deleteSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="deleteSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Deleted" />
+ <s:enumeration value="NotDeleted" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="deleteSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="activateSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:activateSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="activateSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:activateSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:activateSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="activateSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Activated" />
+ <s:enumeration value="NotActivated" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="activateSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="terminateSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:terminateSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="terminateSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:terminateSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:terminateSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="terminateSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Terminated" />
+ <s:enumeration value="NotTerminated" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="terminateSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="updateSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:updateSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:updateSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="updateSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Updated" />
+ <s:enumeration value="NotUpdated" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="updateSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="pauseSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="audienceMemberID" type="s:unsignedLong" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="abstractAction" abstract="true">
+ <s:attribute name="requestId" type="s:unsignedLong" use="required" />
+ </s:complexType>
+ <s:complexType name="addSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s3:smoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="updateSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s3:smoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="terminateSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="deleteSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="audienceMemberID" type="s:unsignedLong" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="activateSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/Smoker">
+ <s:import namespace="http://testurl/AudienceMember" />
+ <s:complexType name="smoker">
+ <s:complexContent mixed="false">
+ <s:extension base="s4:ivrAudienceMember">
+ <s:attribute name="startDate" type="s:date" use="required" />
+ <s:attribute name="phase" type="s3:phase" use="required" />
+ <s:attribute name="day" type="s:positiveInteger" />
+ <s:attribute name="track" type="s3:track" use="required" />
+ <s:attribute name="status" type="s3:status" use="required" />
+ <s:attribute name="baseTime" type="s:string" />
+ <s:attribute name="sunWakeOffset" type="s:string" />
+ <s:attribute name="monWakeOffset" type="s:string" />
+ <s:attribute name="tueWakeOffset" type="s:string" />
+ <s:attribute name="wedWakeOffset" type="s:string" />
+ <s:attribute name="thuWakeOffset" type="s:string" />
+ <s:attribute name="friWakeOffset" type="s:string" />
+ <s:attribute name="satWakeOffset" type="s:string" />
+ <s:attribute name="sunSleepOffset" type="s:string" />
+ <s:attribute name="monSleepOffset" type="s:string" />
+ <s:attribute name="tueSleepOffset" type="s:string" />
+ <s:attribute name="wedSleepOffset" type="s:string" />
+ <s:attribute name="thuSleepOffset" type="s:string" />
+ <s:attribute name="friSleepOffset" type="s:string" />
+ <s:attribute name="satSleepOffset" type="s:string" />
+ <s:attribute name="sunLogOnWindowOffset" type="s:string" />
+ <s:attribute name="monLogOnWindowOffset" type="s:string" />
+ <s:attribute name="tueLogOnWindowOffset" type="s:string" />
+ <s:attribute name="wedLogOnWindowOffset" type="s:string" />
+ <s:attribute name="thuLogOnWindowOffset" type="s:string" />
+ <s:attribute name="friLogOnWindowOffset" type="s:string" />
+ <s:attribute name="satLogOnWindowOffset" type="s:string" />
+ <s:attribute name="sunLogOffWindowOffset" type="s:string" />
+ <s:attribute name="monLogOffWindowOffset" type="s:string" />
+ <s:attribute name="tueLogOffWindowOffset" type="s:string" />
+ <s:attribute name="wedLogOffWindowOffset" type="s:string" />
+ <s:attribute name="thuLogOffWindowOffset" type="s:string" />
+ <s:attribute name="friLogOffWindowOffset" type="s:string" />
+ <s:attribute name="satLogOffWindowOffset" type="s:string" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="phase">
+ <s:restriction base="s:string">
+ <s:enumeration value="Prep" />
+ <s:enumeration value="Quit" />
+ <s:enumeration value="Followup" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="track">
+ <s:restriction base="s:string">
+ <s:enumeration value="NRT" />
+ <s:enumeration value="NonNRT" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="status">
+ <s:restriction base="s:string">
+ <s:enumeration value="Pre-Start" />
+ <s:enumeration value="Completed" />
+ <s:enumeration value="Terminated" />
+ <s:enumeration value="Paused" />
+ <s:enumeration value="Active" />
+ </s:restriction>
+ </s:simpleType>
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/AudienceMember">
+ <s:import namespace="http://testurl/Smoker" />
+ <s:complexType name="ivrAudienceMember">
+ <s:attribute name="id" type="s:unsignedLong" use="required" />
+ <s:attribute name="mobileNumber" type="s:string" />
+ <s:attribute name="firstName" type="s:string" />
+ <s:attribute name="lastName" type="s:string" />
+ </s:complexType>
+ </s:schema>
+ </types>
+ <message name="PostActionsSoapIn">
+ <part name="ivrActions" element="s0:ivrActions" />
+ </message>
+ <message name="PostActionsSoapOut">
+ <part name="PostActionsResult" element="s0:ivrActionResults" />
+ </message>
+ <message name="PostEventsSoapIn">
+ <part name="ivrEvents" element="s0:ivrEvents" />
+ </message>
+ <message name="PostEventsSoapOut">
+ <part name="PostEventsResult" element="s0:ivrEventResults" />
+ </message>
+ <portType name="IVRServicePortSoap">
+ <operation name="PostActions">
+ <input message="tns:PostActionsSoapIn" />
+ <output message="tns:PostActionsSoapOut" />
+ </operation>
+ <operation name="PostEvents">
+ <input message="tns:PostEventsSoapIn" />
+ <output message="tns:PostEventsSoapOut" />
+ </operation>
+ </portType>
+ <binding name="IVRServicePortSoap" type="tns:IVRServicePortSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="PostActions">
+ <soap:operation soapAction="http://testurl/Service:postActionsIn" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="PostEvents">
+ <soap:operation soapAction="http://testurl/Service:postEventsIn" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="IVRServicePortSoap12" type="tns:IVRServicePortSoap">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="PostActions">
+ <soap12:operation soapAction="http://testurl/Service:postActionsIn" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="PostEvents">
+ <soap12:operation soapAction="http://testurl/Service:postEventsIn" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="IVRServicePort">
+ <port name="IVRServicePortSoap" binding="tns:IVRServicePortSoap">
+ <soap:address location="test://" />
+ </port>
+ <port name="IVRServicePortSoap12" binding="tns:IVRServicePortSoap12">
+ <soap12:address location="test://" />
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug35273.phpt b/ext/soap/tests/bugs/bug35273.phpt new file mode 100644 index 0000000..e22ebd7 --- /dev/null +++ b/ext/soap/tests/bugs/bug35273.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #35273 (Error in mapping soap - java types) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version, $one_way = 0) { + echo $request; + exit; + } +} + +ini_set("soap.wsdl_cache_enabled", 0); +$client = new TestSoapClient(dirname(__FILE__).'/bug32941.wsdl', array("trace" => 1, 'exceptions' => 0)); +$ahoj = $client->echoPerson(array("name"=>"Name","surname"=>"Surname")); +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://service" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:service.EchoService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoPerson><p xsi:type="ns2:Person"><name xsi:type="SOAP-ENC:string">Name</name><surname xsi:type="SOAP-ENC:string">Surname</surname></p></ns1:echoPerson></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug36226-2.phpt b/ext/soap/tests/bugs/bug36226-2.phpt new file mode 100644 index 0000000..e14832d --- /dev/null +++ b/ext/soap/tests/bugs/bug36226-2.phpt @@ -0,0 +1,123 @@ +--TEST-- +Bug #36226 (Inconsistent handling when passing nillable arrays) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$timestamp = "2005-11-08T11:22:07+03:00"; +$wsdl = dirname(__FILE__)."/bug36226-2.wsdl"; + +function PostEvents($x) { + var_dump($x); + exit(); + return $x; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('PostEvents'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + echo "$request\n"; + $this->server->handle($request); + return $response; + } +} + +$soapClient = new TestSoapClient($wsdl, + array( + 'trace' => 1, + 'exceptions' => 0, + 'classmap' => array( + 'logOnEvent' => 'LogOnEvent', + 'logOffEvent' => 'LogOffEvent', + 'events' => 'IVREvents' + ), + 'features' => SOAP_SINGLE_ELEMENT_ARRAYS + )); + +$logOnEvent = null; +//$logOnEvent = array(); +$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); +//$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); +$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); +$result = $soapClient->PostEvents($ivrEvents); + +class LogOffEvent { + public $audienceMemberId; + public $timestamp; + public $smokeStatus; + public $callInitiator; + + function __construct($audienceMemberId, $timestamp, $smokeStatus) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + $this->smokeStatus = $smokeStatus; + $this->callInitiator = "IVR"; + } +} + +class LogOnEvent { + public $audienceMemberId; + public $timestamp; + + function __construct($audienceMemberId, $timestamp) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + } +} + +class IVREvents { + public $version; + public $activityId; + public $messageId; + public $source; + public $logOnEvent; + public $logOffEvent; + + function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { + $this->version = $version; + $this->activityId = $activityId; + $this->messageId = $messageId; + $this->source = $source; + $this->logOnEvent = $logOnEvent; + $this->logOffEvent = $logOffEvent; + } + +} +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testurl/Message" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns1:ivrEvents version="1.0" activityId="101" messageId="12345" source="IVR"><ns1:logOffEvent audienceMemberId="34567" timestamp="2005-11-08T11:22:07+03:00" smokeStatus="Smoked" callInitiator="IVR"/><ns1:logOnEvent xsi:nil="true"/></ns1:ivrEvents></SOAP-ENV:Body></SOAP-ENV:Envelope> + +object(IVREvents)#5 (6) { + ["version"]=> + string(3) "1.0" + ["activityId"]=> + int(101) + ["messageId"]=> + int(12345) + ["source"]=> + string(3) "IVR" + ["logOnEvent"]=> + NULL + ["logOffEvent"]=> + array(1) { + [0]=> + object(LogOffEvent)#6 (4) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(6) "Smoked" + ["callInitiator"]=> + string(3) "IVR" + } + } +} diff --git a/ext/soap/tests/bugs/bug36226-2.wsdl b/ext/soap/tests/bugs/bug36226-2.wsdl new file mode 100755 index 0000000..18c2ce3 --- /dev/null +++ b/ext/soap/tests/bugs/bug36226-2.wsdl @@ -0,0 +1,543 @@ +<?xml version="1.0" encoding="utf-8"?>
+<definitions xmlns:s1="http://testurl/Events" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://testurl/Message" xmlns:s3="http://testurl/Smoker" xmlns:soap12enc="http://www.w3.org/2002/06/soap-envelope" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:s4="http://testurl/AudienceMember" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s2="http://testurl/Actions" xmlns:tns="http://testurl/Service" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://testurl/Service" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/Message">
+ <s:import namespace="http://testurl/Events" />
+ <s:import namespace="http://testurl/Actions" />
+ <s:element name="ivrActions" type="s0:actions" />
+ <s:complexType name="actions">
+ <s:complexContent mixed="false">
+ <s:extension base="s0:abstractMessage">
+ <s:sequence>
+ <s:choice minOccurs="0" maxOccurs="unbounded">
+ <s:element minOccurs="0" maxOccurs="1" name="pauseSmokerAction" type="s2:pauseSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="terminateSmokerAction" type="s2:terminateSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="activateSmokerAction" type="s2:activateSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="addSmokerAction" type="s2:addSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="updateSmokerAction" type="s2:updateSmokerAction" />
+ <s:element minOccurs="0" maxOccurs="1" name="deleteSmokerAction" type="s2:deleteSmokerAction" />
+ </s:choice>
+ </s:sequence>
+ <s:attribute default="Client" name="source" type="s0:ivrMessageSource" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="abstractMessage" abstract="true">
+ <s:attribute default="1.0" name="version" type="s:string" />
+ <s:attribute name="activityId" type="s:unsignedLong" use="required" />
+ <s:attribute name="messageId" type="s:unsignedLong" use="required" />
+ </s:complexType>
+ <s:complexType name="events">
+ <s:complexContent mixed="false">
+ <s:extension base="s0:abstractMessage">
+ <s:sequence>
+ <s:choice minOccurs="0" maxOccurs="unbounded">
+ <s:element minOccurs="0" maxOccurs="1" name="authFailureEvent" type="s1:authFailureEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="logOffEvent" type="s1:logOffEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="cravingLineEvent" type="s1:cravingLineEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="terminateEvent" type="s1:terminateEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="relapseWakeSmsReplaceEvent" type="s1:relapseWakeSmsReplaceEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="confessionLineEvent" type="s1:confessionLineEvent" />
+ <s:element minOccurs="0" maxOccurs="1" name="rfqRecordedEvent" type="s1:rfqRecordedEvent" />
+ <s:element nillable="true" minOccurs="0" maxOccurs="1" name="logOnEvent" type="s1:logOnEvent" />
+ </s:choice>
+ </s:sequence>
+ <s:attribute default="IVR" name="source" type="s0:ivrMessageSource" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="ivrMessageSource">
+ <s:restriction base="s:string">
+ <s:enumeration value="IVR" />
+ <s:enumeration value="Client" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="actionResults">
+ <s:complexContent mixed="false">
+ <s:extension base="s0:abstractMessage">
+ <s:sequence>
+ <s:choice minOccurs="0" maxOccurs="unbounded">
+ <s:element minOccurs="0" maxOccurs="1" name="updateSmokerActionResult" type="s2:updateSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="activateSmokerActionResult" type="s2:activateSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="deleteSmokerActionResult" type="s2:deleteSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="addSmokerActionResult" type="s2:addSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="pauseSmokerActionResult" type="s2:pauseSmokerActionResult" />
+ <s:element minOccurs="0" maxOccurs="1" name="terminateSmokerActionResult" type="s2:terminateSmokerActionResult" />
+ </s:choice>
+ </s:sequence>
+ <s:attribute default="IVR" name="source" type="s0:ivrMessageSource" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="eventResults">
+ <s:complexContent mixed="false">
+ <s:extension base="s0:abstractMessage">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="eventResult" type="s1:eventResult" />
+ </s:sequence>
+ <s:attribute default="IVR" name="source" type="s0:ivrMessageSource" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:element name="ivrActionResults" type="s0:actionResults" />
+ <s:element name="ivrEvents" type="s0:events" />
+ <s:element name="ivrEventResults" type="s0:eventResults" />
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/Events">
+ <s:complexType name="authFailureEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:attribute name="mobileNumber" type="s:string" />
+ <s:attribute name="line" type="s1:line" use="required" />
+ <s:attribute name="reason" type="s:string" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="abstractEvent" abstract="true">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" />
+ <s:attribute name="timestamp" type="s:dateTime" use="required" />
+ </s:complexType>
+ <s:complexType name="logOnEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent" />
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="cravingLineEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="selection" type="s1:cravingLineEventSelection" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="cravingLineEventSelection">
+ <s:attribute name="type" type="s1:cravingLineMessageType" use="required" />
+ <s:attribute name="msgNumber" type="s:positiveInteger" />
+ </s:complexType>
+ <s:simpleType name="cravingLineMessageType">
+ <s:restriction base="s:string">
+ <s:enumeration value="Motivational" />
+ <s:enumeration value="StressReval" />
+ <s:enumeration value="EffectReg" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="confessionLineEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:attribute name="smokeStatus" type="s1:smokeStatus" use="required" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="smokeStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Smoked" />
+ <s:enumeration value="SmokeFree" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="rfqRecordedEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent" />
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="terminateEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent" />
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="logOffEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:attribute name="smokeStatus" type="s1:smokeStatus" use="required" />
+ <s:attribute name="callInitiator" type="s1:callInitiator" use="required" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="callInitiator">
+ <s:restriction base="s:string">
+ <s:enumeration value="AudienceMember" />
+ <s:enumeration value="IVR" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="relapseWakeSmsReplaceEvent">
+ <s:complexContent mixed="false">
+ <s:extension base="s1:abstractEvent">
+ <s:attribute name="relapseCount" type="s:positiveInteger" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="line">
+ <s:restriction base="s:string">
+ <s:enumeration value="LogOnOffLine" />
+ <s:enumeration value="CravingLine" />
+ <s:enumeration value="ConfessionLine" />
+ <s:enumeration value="ReasonsForQuittingLine" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="eventResult">
+ <s:attribute name="success" type="s:boolean" use="required" />
+ </s:complexType>
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/Actions">
+ <s:import namespace="http://testurl/Smoker" />
+ <s:complexType name="updateSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:updateSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="abstractActionResult">
+ <s:attribute name="resultId" type="s:unsignedLong" use="required" />
+ </s:complexType>
+ <s:complexType name="pauseSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:pauseSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="pauseSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:pauseSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:pauseSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="pauseSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Paused" />
+ <s:enumeration value="NotPaused" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="pauseSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="addSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:addSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="addSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:addSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:addSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="addSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Added" />
+ <s:enumeration value="NotAdded" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="addSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="DuplicateID" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="deleteSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:deleteSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="deleteSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:deleteSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:deleteSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="deleteSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Deleted" />
+ <s:enumeration value="NotDeleted" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="deleteSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="activateSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:activateSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="activateSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:activateSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:activateSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="activateSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Activated" />
+ <s:enumeration value="NotActivated" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="activateSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="terminateSmokerActionResult">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractActionResult">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s2:terminateSmokerActionResultSmoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="terminateSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:terminateSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:terminateSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="terminateSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Terminated" />
+ <s:enumeration value="NotTerminated" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="terminateSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="updateSmokerActionResultSmoker">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ <s:attribute name="status" type="s2:updateSmokerActionResultSmokerStatus" use="required" />
+ <s:attribute name="exception" type="s2:updateSmokerActionResultSmokerException" />
+ </s:complexType>
+ <s:simpleType name="updateSmokerActionResultSmokerStatus">
+ <s:restriction base="s:string">
+ <s:enumeration value="Updated" />
+ <s:enumeration value="NotUpdated" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="updateSmokerActionResultSmokerException">
+ <s:restriction base="s:string">
+ <s:enumeration value="UnspecifiedError" />
+ <s:enumeration value="IDNotFound" />
+ </s:restriction>
+ </s:simpleType>
+ <s:complexType name="pauseSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="audienceMemberID" type="s:unsignedLong" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="abstractAction" abstract="true">
+ <s:attribute name="requestId" type="s:unsignedLong" use="required" />
+ </s:complexType>
+ <s:complexType name="addSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s3:smoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="updateSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="smoker" type="s3:smoker" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="terminateSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="deleteSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="audienceMemberID" type="s:unsignedLong" />
+ </s:sequence>
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:complexType name="activateSmokerAction">
+ <s:complexContent mixed="false">
+ <s:extension base="s2:abstractAction">
+ <s:attribute name="audienceMemberId" type="s:unsignedLong" use="required" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/Smoker">
+ <s:import namespace="http://testurl/AudienceMember" />
+ <s:complexType name="smoker">
+ <s:complexContent mixed="false">
+ <s:extension base="s4:ivrAudienceMember">
+ <s:attribute name="startDate" type="s:date" use="required" />
+ <s:attribute name="phase" type="s3:phase" use="required" />
+ <s:attribute name="day" type="s:positiveInteger" />
+ <s:attribute name="track" type="s3:track" use="required" />
+ <s:attribute name="status" type="s3:status" use="required" />
+ <s:attribute name="baseTime" type="s:string" />
+ <s:attribute name="sunWakeOffset" type="s:string" />
+ <s:attribute name="monWakeOffset" type="s:string" />
+ <s:attribute name="tueWakeOffset" type="s:string" />
+ <s:attribute name="wedWakeOffset" type="s:string" />
+ <s:attribute name="thuWakeOffset" type="s:string" />
+ <s:attribute name="friWakeOffset" type="s:string" />
+ <s:attribute name="satWakeOffset" type="s:string" />
+ <s:attribute name="sunSleepOffset" type="s:string" />
+ <s:attribute name="monSleepOffset" type="s:string" />
+ <s:attribute name="tueSleepOffset" type="s:string" />
+ <s:attribute name="wedSleepOffset" type="s:string" />
+ <s:attribute name="thuSleepOffset" type="s:string" />
+ <s:attribute name="friSleepOffset" type="s:string" />
+ <s:attribute name="satSleepOffset" type="s:string" />
+ <s:attribute name="sunLogOnWindowOffset" type="s:string" />
+ <s:attribute name="monLogOnWindowOffset" type="s:string" />
+ <s:attribute name="tueLogOnWindowOffset" type="s:string" />
+ <s:attribute name="wedLogOnWindowOffset" type="s:string" />
+ <s:attribute name="thuLogOnWindowOffset" type="s:string" />
+ <s:attribute name="friLogOnWindowOffset" type="s:string" />
+ <s:attribute name="satLogOnWindowOffset" type="s:string" />
+ <s:attribute name="sunLogOffWindowOffset" type="s:string" />
+ <s:attribute name="monLogOffWindowOffset" type="s:string" />
+ <s:attribute name="tueLogOffWindowOffset" type="s:string" />
+ <s:attribute name="wedLogOffWindowOffset" type="s:string" />
+ <s:attribute name="thuLogOffWindowOffset" type="s:string" />
+ <s:attribute name="friLogOffWindowOffset" type="s:string" />
+ <s:attribute name="satLogOffWindowOffset" type="s:string" />
+ </s:extension>
+ </s:complexContent>
+ </s:complexType>
+ <s:simpleType name="phase">
+ <s:restriction base="s:string">
+ <s:enumeration value="Prep" />
+ <s:enumeration value="Quit" />
+ <s:enumeration value="Followup" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="track">
+ <s:restriction base="s:string">
+ <s:enumeration value="NRT" />
+ <s:enumeration value="NonNRT" />
+ </s:restriction>
+ </s:simpleType>
+ <s:simpleType name="status">
+ <s:restriction base="s:string">
+ <s:enumeration value="Pre-Start" />
+ <s:enumeration value="Completed" />
+ <s:enumeration value="Terminated" />
+ <s:enumeration value="Paused" />
+ <s:enumeration value="Active" />
+ </s:restriction>
+ </s:simpleType>
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://testurl/AudienceMember">
+ <s:import namespace="http://testurl/Smoker" />
+ <s:complexType name="ivrAudienceMember">
+ <s:attribute name="id" type="s:unsignedLong" use="required" />
+ <s:attribute name="mobileNumber" type="s:string" />
+ <s:attribute name="firstName" type="s:string" />
+ <s:attribute name="lastName" type="s:string" />
+ </s:complexType>
+ </s:schema>
+ </types>
+ <message name="PostActionsSoapIn">
+ <part name="ivrActions" element="s0:ivrActions" />
+ </message>
+ <message name="PostActionsSoapOut">
+ <part name="PostActionsResult" element="s0:ivrActionResults" />
+ </message>
+ <message name="PostEventsSoapIn">
+ <part name="ivrEvents" element="s0:ivrEvents" />
+ </message>
+ <message name="PostEventsSoapOut">
+ <part name="PostEventsResult" element="s0:ivrEventResults" />
+ </message>
+ <portType name="IVRServicePortSoap">
+ <operation name="PostActions">
+ <input message="tns:PostActionsSoapIn" />
+ <output message="tns:PostActionsSoapOut" />
+ </operation>
+ <operation name="PostEvents">
+ <input message="tns:PostEventsSoapIn" />
+ <output message="tns:PostEventsSoapOut" />
+ </operation>
+ </portType>
+ <binding name="IVRServicePortSoap" type="tns:IVRServicePortSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="PostActions">
+ <soap:operation soapAction="http://testurl/Service:postActionsIn" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="PostEvents">
+ <soap:operation soapAction="http://testurl/Service:postEventsIn" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="IVRServicePortSoap12" type="tns:IVRServicePortSoap">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="PostActions">
+ <soap12:operation soapAction="http://testurl/Service:postActionsIn" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="PostEvents">
+ <soap12:operation soapAction="http://testurl/Service:postEventsIn" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="IVRServicePort">
+ <port name="IVRServicePortSoap" binding="tns:IVRServicePortSoap">
+ <soap:address location="test://" />
+ </port>
+ <port name="IVRServicePortSoap12" binding="tns:IVRServicePortSoap12">
+ <soap12:address location="test://" />
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug36226.phpt b/ext/soap/tests/bugs/bug36226.phpt new file mode 100644 index 0000000..8c01c5b --- /dev/null +++ b/ext/soap/tests/bugs/bug36226.phpt @@ -0,0 +1,139 @@ +--TEST-- +Bug #36226 (SOAP Inconsistent handling when passing potential arrays) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$timestamp = "2005-11-08T11:22:07+03:00"; +$wsdl = dirname(__FILE__)."/bug35142.wsdl"; + +function PostEvents($x) { + var_dump($x); + exit(); + return $x; +} + +class TestSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('PostEvents'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + echo "$request\n"; + $this->server->handle($request); + return $response; + } + +} + +$soapClient = new TestSoapClient($wsdl, + array('trace' => 1, 'exceptions' => 0, + 'classmap' => array('logOnEvent' => 'LogOnEvent', + 'logOffEvent' => 'LogOffEvent', + 'events' => 'IVREvents'), + 'features' => SOAP_SINGLE_ELEMENT_ARRAYS)); + +$logOnEvent = new LogOnEvent(34567, $timestamp); +$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); +$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); +$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); + +$result = $soapClient->PostEvents($ivrEvents); + +class LogOffEvent { + public $audienceMemberId; + public $timestamp; + public $smokeStatus; + public $callInitiator; + + function __construct($audienceMemberId, $timestamp, $smokeStatus) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + $this->smokeStatus = $smokeStatus; + $this->callInitiator = "IVR"; + } +} + +class LogOnEvent { + public $audienceMemberId; + public $timestamp; + + function __construct($audienceMemberId, $timestamp) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + } +} + +class IVREvents { + public $version; + public $activityId; + public $messageId; + public $source; + public $logOnEvent; + public $logOffEvent; + + function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { + $this->version = $version; + $this->activityId = $activityId; + $this->messageId = $messageId; + $this->source = $source; + $this->logOnEvent = $logOnEvent; + $this->logOffEvent = $logOffEvent; + } +} +?> +--EXPECTF-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testurl/Message"><SOAP-ENV:Body><ns1:ivrEvents version="1.0" activityId="101" messageId="12345" source="IVR"><ns1:logOffEvent audienceMemberId="34567" timestamp="2005-11-08T11:22:07+03:00" smokeStatus="Smoked" callInitiator="IVR"/><ns1:logOffEvent audienceMemberId="34568" timestamp="2005-11-08T11:22:07+03:00" smokeStatus="SmokeFree" callInitiator="IVR"/><ns1:logOnEvent audienceMemberId="34567" timestamp="2005-11-08T11:22:07+03:00"/></ns1:ivrEvents></SOAP-ENV:Body></SOAP-ENV:Envelope> + +object(IVREvents)#%d (6) { + ["version"]=> + string(3) "1.0" + ["activityId"]=> + int(101) + ["messageId"]=> + int(12345) + ["source"]=> + string(3) "IVR" + ["logOnEvent"]=> + array(1) { + [0]=> + object(LogOnEvent)#10 (2) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + } + } + ["logOffEvent"]=> + array(2) { + [0]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(6) "Smoked" + ["callInitiator"]=> + string(3) "IVR" + } + [1]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34568) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(9) "SmokeFree" + ["callInitiator"]=> + string(3) "IVR" + } + } +} diff --git a/ext/soap/tests/bugs/bug36575.phpt b/ext/soap/tests/bugs/bug36575.phpt new file mode 100644 index 0000000..9bf5415 --- /dev/null +++ b/ext/soap/tests/bugs/bug36575.phpt @@ -0,0 +1,52 @@ +--TEST-- +Bug #36575 (Incorrect complex type instantiation with hierarchies) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +abstract class CT_A1 { + public $var1; +} + +class CT_A2 extends CT_A1 { + public $var2; +} + +class CT_A3 extends CT_A2 { + public $var3; +} + +// returns A2 in WSDL +function test( $a1 ) { + $a3 = new CT_A3(); + $a3->var1 = $a1->var1; + $a3->var2 = "var two"; + $a3->var3 = "var three"; + return $a3; +} + +$classMap = array("A1" => "CT_A1", "A2" => "CT_A2", "A3" => "CT_A3"); + +$client = new SoapClient(dirname(__FILE__)."/bug36575.wsdl", array("trace" => 1, "exceptions" => 0, "classmap" => $classMap)); +$a2 = new CT_A2(); +$a2->var1 = "one"; +$a2->var2 = "two"; +$client->test($a2); + +$soapRequest = $client->__getLastRequest(); + +echo $soapRequest; + +$server = new SoapServer(dirname(__FILE__)."/bug36575.wsdl", array("classmap" => $classMap)); +$server->addFunction("test"); +$server->handle($soapRequest); +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="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><a1 xsi:type="ns2:A2"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">two</var2></a1></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><result xsi:type="ns2:A3"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">var two</var2><var3 xsi:type="xsd:string">var three</var3></result></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/bugs/bug36575.wsdl b/ext/soap/tests/bugs/bug36575.wsdl new file mode 100755 index 0000000..0f1899b --- /dev/null +++ b/ext/soap/tests/bugs/bug36575.wsdl @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="utf-8"?>
+<definitions name="shoppingcart"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="urn:test.soap#" targetNamespace="urn:test.soap#"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:types="urn:test.soap.types#">
+ <!-- all datatypes will be imported to namespace types: -->
+ <types>
+ <xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="urn:test.soap.types#"
+ targetNamespace="urn:test.soap.types#">
+
+ <xs:complexType name="A1">
+ <xs:all>
+ <xs:element name="var1" type="xs:string" nillable="true"/>
+ </xs:all>
+ </xs:complexType>
+
+ <xs:complexType name="A2">
+ <xs:complexContent>
+ <xs:extension base="tns:A1">
+ <xs:all>
+ <xs:element name="var2" type="xs:string" nillable="true"/>
+ </xs:all>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="A3">
+ <xs:complexContent>
+ <xs:extension base="tns:A2">
+ <xs:all>
+ <xs:element name="var3" type="xs:string" nillable="true"/>
+ </xs:all>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+
+ <message name="test-request">
+ <part name="a1" type="types:A1"/>
+ </message>
+ <message name="test-response">
+ <part name="result" type="types:A2"/>
+ </message>
+
+ <portType name="catalog-porttype">
+ <operation name="test" parameterOrder="a1">
+ <input name="test-request" message="tns:test-request"/>
+ <output name="test-response" message="tns:test-response"/>
+ </operation>
+ </portType>
+
+ <!-- @type doesn't like tns: -->
+ <binding name="catalog-binding" type="tns:catalog-porttype">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <operation name="test">
+ <soap:operation soapAction="urn:test.soap#test"/>
+ <input>
+ <soap:body use="encoded" namespace="urn:test.soap#"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="urn:test.soap#"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="catalog">
+ <!-- @binding doesn't like to be tns: -->
+ <port name="catalog-port" binding="tns:catalog-binding">
+ <soap:address location="xxxxxxxx"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/ext/soap/tests/bugs/bug36614.phpt b/ext/soap/tests/bugs/bug36614.phpt new file mode 100644 index 0000000..ba67348 --- /dev/null +++ b/ext/soap/tests/bugs/bug36614.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #36614 (Segfault when using Soap) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$lo_soap = new SoapClient(dirname(__FILE__)."/bug36614.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug36614.wsdl b/ext/soap/tests/bugs/bug36614.wsdl new file mode 100755 index 0000000..ecf1b1b --- /dev/null +++ b/ext/soap/tests/bugs/bug36614.wsdl @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<definitions name="SonicMobile Web-Services" + targetNamespace="http://soap.sonicmobile.com/sonicmobile.wsdl" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:sonic="http://soap.sonicmobile.com/sonicmobile.wsdl" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <types> + <xsd:schema xmlns="http://www.w3.org/2000/10/XMLSchema"> + <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> + <complexType name="TransportCount"> + <all> + <element name="transport" type="string" /> + <element name="count" type="integer" /> + <element name="rate" type="integer" /> + <element name="last_message" type="integer" /> + </all> + </complexType> + <complexType name="ArrayOfTransportCount"> + <complexContent> + <restriction base="soapenc:Array"> + <attribute ref="soapenc:arrayType" arrayType="TransportCount[]" /> + </restriction> + </complexContent> + </complexType> + </xsd:schema> + </types> + + <message name="userSendMessageRequest"> + <part name="sourceUser" type="xsd:int"/> + <part name="password" type="xsd:string"/> + <part name="destinationUser" type="xsd:int"/> + <part name="content" type="xsd:string"/> + <part name="sendRepliesTo" type="xsd:string"/> + <part name="reference" type="xsd:string"/> + </message> + + <message name="sendMessageRequest"> + <part name="application" type="xsd:string"/> + <part name="password" type="xsd:string"/> + <part name="destination" type="xsd:string"/> + <part name="content" type="xsd:string"/> + <part name="reference" type="xsd:string"/> + <part name="requestSource" type="xsd:string"/> + <part name="customer" type="xsd:string"/> + <part name="class" type="xsd:string"/> + </message> + + <message name="MessageResponse"> + <part name="messageid" type="xsd:int"/> + <part name="response" type="xsd:string"/> + </message> + + <message name="messageCountRequest"> + <part name="password" type="xsd:string"/> + </message> + + <message name="messageCountResponse"> + <part name="transports" type="tns:ArrayOfTransportCount"/> + </message> + + <message name="serverStatusRequest"> + <part name="password" type="xsd:string"/> + </message> + <message name="serverStatusResponse"> + <part name="status_string" type="xsd:string"/> + </message> + + <message name="flushGatewayRequest"> + <part name="password" type="xsd:string"/> + </message> + <message name="flushGatewayResponse"> + <part name="status_string" type="xsd:string"/> + </message> + + <portType name="SonicMobilePortType"> + <operation name="userSendMessage"> + <input message="sonic:userSendMessageRequest"/> + <output message="sonic:MessageResponse"/> + </operation> + + <operation name="sendMessage"> + <input message="sonic:sendMessageRequest"/> + <output message="sonic:MessageResponse"/> + </operation> + + <operation name="messageCount"> + <input message="sonic:messageCountRequest"/> + <output message="sonic:messageCountResponse"/> + </operation> + + <operation name="serverStatus"> + <input message="sonic:serverStatusRequest"/> + <output message="sonic:serverStatusResponse"/> + </operation> + + <operation name="flushGateway"> + <input message="sonic:flushGatewayRequest"/> + <output message="sonic:flushGatewayResponse"/> + </operation> + </portType> + + <binding name="SonicMobileBinding" type="sonic:SonicMobilePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> + + <operation name="userSendMessage"> + <soap:operation soapAction="http://soap.sonicmobile.com/SonicMobile/SOAP#userSendMessage"/> + + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </input> + + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </output> + </operation> + + <operation name="sendMessage"> + <soap:operation soapAction="http://soap.sonicmobile.com/SonicMobile/SOAP#sendMessage"/> + + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </input> + + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </output> + </operation> + + <operation name="messageCount"> + <soap:operation soapAction="http://soap.sonicmobile.com/SonicMobile/SOAP#messageCount"/> + + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </input> + + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </output> + </operation> + + <operation name="serverStatus"> + <soap:operation soapAction="http://soap.sonicmobile.com/SonicMobile/SOAP#serverStatus"/> + + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </input> + + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </output> + </operation> + + <operation name="flushGateway"> + <soap:operation soapAction="http://soap.sonicmobile.com/SonicMobile/SOAP#flushGateway"/> + + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soap.sonicmobile.com/SonicMobile/SOAP" + use="encoded" /> + </output> + </operation> + + </binding> + + <service name="SonicMobile"> + <port name="SonicMobilePort" binding="sonic:SonicMobileBinding"> + <soap:address location="http://soap.sonicmobile.com/"/> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/bugs/bug36629.phpt b/ext/soap/tests/bugs/bug36629.phpt new file mode 100644 index 0000000..2096da2 --- /dev/null +++ b/ext/soap/tests/bugs/bug36629.phpt @@ -0,0 +1,53 @@ +--TEST-- +Bug #36629 (SoapServer::handle() exits on SOAP faults) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test1() { + throw new SoapFault("Server", "test1"); +} +function test2() { + return new SoapFault("Server", "test2"); +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction(array("test1","test2")); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test1 xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle($HTTP_RAW_POST_DATA); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test2 xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test1</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test2</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/bugs/bug36908.phpt b/ext/soap/tests/bugs/bug36908.phpt new file mode 100644 index 0000000..cd0ea8b --- /dev/null +++ b/ext/soap/tests/bugs/bug36908.phpt @@ -0,0 +1,46 @@ +--TEST-- +Bug #36908 (wsdl default value overrides value in soap request) +--SKIPIF-- +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class PublisherService { + function add($publisher) { + return $publisher->region_id; + } +} +$input = +'<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope +xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <soapenv:Body> + <ns1:add xmlns:ns1="urn:PublisherService" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> + <publisher href="#id0"/> + </ns1:add> + <multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:ns3="http://soap.dev/soap/types" id="id0" soapenc:root="0" +soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +xsi:type="ns3:publisher"> + <region_id href="#id5"/> + </multiRef> + <multiRef xmlns:ns5="http://soap.dev/soap/types" +xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id5" +soapenc:root="0" +soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +xsi:type="xsd:long">9</multiRef> + </soapenv:Body> +</soapenv:Envelope>'; +ini_set('soap.wsdl_cache_enabled', false); +$server = new SoapServer(dirname(__FILE__)."/bug36908.wsdl"); +$server->setClass("PublisherService"); +$server->handle($input); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<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> diff --git a/ext/soap/tests/bugs/bug36908.wsdl b/ext/soap/tests/bugs/bug36908.wsdl new file mode 100755 index 0000000..f3be3f6 --- /dev/null +++ b/ext/soap/tests/bugs/bug36908.wsdl @@ -0,0 +1,51 @@ +<?xml version="1.0"?>
+<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+xmlns:api="http://soap.dev/soap/PublisherService"
+xmlns:types="http://soap.dev/soap/types"
+targetNamespace="http://soap.dev/soap/PublisherService">
+ <wsdl:types>
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+xmlns:types="http://soap.dev/soap/types"
+targetNamespace="http://soap.dev/soap/types">
+ <xsd:complexType name="publisher">
+ <xsd:all>
+ <xsd:element name="region_id" type="xsd:long" default="52"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="addInput">
+ <wsdl:part name="publisher" type="types:publisher"/>
+ </wsdl:message>
+ <wsdl:message name="addOutput">
+ <wsdl:part name="out" type="xsd:string"/>
+ </wsdl:message>
+ <wsdl:portType name="PublisherServicePortType">
+ <wsdl:operation name="add">
+ <wsdl:input message="api:addInput"/>
+ <wsdl:output message="api:addOutput"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="PublisherServiceBinding" type="api:PublisherServicePortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="add">
+ <soap:operation soapAction="urn:PublisherService#add" style="rpc"/>
+ <wsdl:input>
+ <soap:body use="encoded" namespace="urn:PublisherService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="encoded" namespace="urn:PublisherService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="PublisherService">
+ <wsdl:port name="PublisherServicePort" binding="api:PublisherServiceBinding">
+ <soap:address location="http://soap.dev/soap//publisher_test.php"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/ext/soap/tests/bugs/bug36999.phpt b/ext/soap/tests/bugs/bug36999.phpt new file mode 100644 index 0000000..9fbb032 --- /dev/null +++ b/ext/soap/tests/bugs/bug36999.phpt @@ -0,0 +1,50 @@ +--TEST-- +Bug #36999 (xsd:long values clamped to LONG_MAX instead of using double) +--SKIPIF-- +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php + +function echoLong($num) { + return $num; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl) { + parent::__construct($wsdl); + $this->server = new SoapServer($wsdl); + $this->server->addFunction('echoLong'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$soap = new LocalSoapClient(dirname(__FILE__)."/bug36999.wsdl"); + +function test($num) { + global $soap; + try { + printf("%s %0.0f\n", gettype($num), $num); + $ret = $soap->echoLong($num); + printf("%s %0.0f\n", gettype($ret), $ret); + } catch (SoapFault $ex) { + var_dump($ex); + } +} +test(3706790240); +?> +--EXPECTF-- +%s 3706790240 +%s 3706790240 diff --git a/ext/soap/tests/bugs/bug36999.wsdl b/ext/soap/tests/bugs/bug36999.wsdl new file mode 100755 index 0000000..80d20b0 --- /dev/null +++ b/ext/soap/tests/bugs/bug36999.wsdl @@ -0,0 +1,48 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + + <message name="echoLongRequest"> + <part name="x" type="xsd:long" /> + </message> + + <message name="echoLongResponse"> + <part name="x" type="xsd:long" /> + </message> + + <portType name="TestServicePortType"> + <operation name="echoLong"> + <input message="tns:echoLongRequest" /> + <output message="tns:echoLongResponse" /> + </operation> + </portType> + + <binding name="TestServiceBinding" type="tns:TestServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> + <operation name="echoLong"> + <soap:operation style="rpc" /> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </output> + </operation> + </binding> + + <service name="TestService"> + <port name="TestServicePort" binding="tns:TestServiceBinding"> + <soap:address location="test://" /> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/bugs/bug37013.phpt b/ext/soap/tests/bugs/bug37013.phpt new file mode 100644 index 0000000..45f3142 --- /dev/null +++ b/ext/soap/tests/bugs/bug37013.phpt @@ -0,0 +1,58 @@ +--TEST-- +Bug #37013 (server hangs when returning circular object references) +--SKIPIF-- +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$request = <<<REQUEST +<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope +xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + +<soapenv:Body> +<ns2:getThingWithParent + soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:ns2="urn:test.soapserver#"/> +</soapenv:Body> + +</soapenv:Envelope> +REQUEST; + + +class ThingWithParent +{ + var $parent; + var $id; + var $children; + function __construct( $id, $parent ) { + $this->id = $id; + $this->parent = $parent; + } +} + + +class MultiRefTest { + public function getThingWithParent() { + $p = new ThingWithParent( 1, null ); + $p2 = new ThingWithParent( 2, $p ); + $p3 = new ThingWithParent( 3, $p ); + + $p->children = array( $p2, $p3 ); + + return $p2; + } +} + + +$server = new SoapServer(dirname(__FILE__)."/bug37013.wsdl"); +$server->setClass( "MultiRefTest"); +$server->handle( $request ); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:test.soapserver#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getThingWithParentResponse><result id="ref1" xsi:type="SOAP-ENC:Struct"><parent id="ref2" xsi:type="SOAP-ENC:Struct"><parent xsi:nil="true"/><id xsi:type="xsd:int">1</id><children SOAP-ENC:arrayType="SOAP-ENC:Struct[2]" xsi:type="SOAP-ENC:Array"><item href="#ref1"/><item xsi:type="SOAP-ENC:Struct"><parent href="#ref2"/><id xsi:type="xsd:int">3</id><children xsi:nil="true"/></item></children></parent><id xsi:type="xsd:int">2</id><children xsi:nil="true"/></result></ns1:getThingWithParentResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug37013.wsdl b/ext/soap/tests/bugs/bug37013.wsdl new file mode 100755 index 0000000..dbd77fd --- /dev/null +++ b/ext/soap/tests/bugs/bug37013.wsdl @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?>
+<definitions name="shoppingcart"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="urn:test.soapserver#"
+targetNamespace="urn:test.soapserver#"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:types="urn:test.soapserver.types#">
+
+ <!-- all datatypes will be imported to namespace types: -->
+ <types>
+ <xs:schema targetNamespace="urn:test.soapserver.types#">
+ <xs:complexType name="ThingWithParent">
+ <xs:all>
+ <xs:element name="id" type="xs:string"/>
+ <xs:element name="parent" type="types:ThingWithParent"/>
+ <xs:element name="children" type="types:ArrayOfThingWithParent"/>
+ </xs:all>
+ </xs:complexType>
+ <xs:complexType name="ArrayOfThingWithParent">
+ <xs:complexContent>
+ <xs:restriction base="soapenc:Array">
+ <xs:attribute ref="soapenc:arrayType"
+ wsdl:arrayType="tns:ThingWithParent[]"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name="getThingWithParent-request"/>
+ <message name="getThingWithParent-response">
+ <part name="result" element="types:ThingWithParent"/>
+ </message>
+ <portType name="soapserver-porttype">
+ <operation name="getThingWithParent">
+ <input name="getThingWithParent-request" message="tns:getThingWithParent-request"/>
+ <output name="getThingWithParent-response" message="tns:getThingWithParent-response"/>
+ </operation>
+ </portType>
+ <binding name="soapserver-binding" type="tns:soapserver-porttype">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getThingWithParent">
+ <soap:operation soapAction="urn:test.soapserver.SoapServer#getThingWithParent"/>
+ <input>
+ <soap:body use="encoded"
+namespace="urn:test.soapserver#"
+encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+namespace="urn:test.soapserver#"
+encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="soapserver">
+ <!-- @binding doesn't like to be tns: -->
+ <port name="soapserver-port" binding="tns:soapserver-binding">
+ <soap:address location="xxxxxxxxxxxx"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/ext/soap/tests/bugs/bug37083.phpt b/ext/soap/tests/bugs/bug37083.phpt new file mode 100644 index 0000000..d915ec0 --- /dev/null +++ b/ext/soap/tests/bugs/bug37083.phpt @@ -0,0 +1,58 @@ +--TEST-- +Bug #37083 (Frequent crashs in SOAP extension with new WSDL caching code in multithread WS) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache=3 +--FILE-- +<?php +class TestSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version, $one_way = 0) { + return <<<EOF +<?xml version="1.0" encoding="utf-8"?> +<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<soapenv:Body> +<ns1:searchResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:java:de.pangaea.metadataportal.search.SearchService"> +<searchReturn href="#id0"/> +</ns1:searchResponse> +<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:SearchResponse" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:java:de.pangaea.metadataportal.search.SearchService"><offset xsi:type="xsd:int">0</offset><queryTime xsi:type="xsd:long">34</queryTime><results soapenc:arrayType="ns2:SearchResponseItem[10]" xsi:type="soapenc:Array"><results href="#id1"/><results href="#id2"/><results href="#id3"/><results href="#id4"/><results href="#id5"/><results href="#id6"/><results href="#id7"/><results href="#id8"/><results href="#id9"/><results href="#id10"/></results><totalCount xsi:type="xsd:int">3501</totalCount></multiRef> +<multiRef id="id9" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:SearchResponseItem" xmlns:ns3="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id11"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:5900168</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml1</xml></multiRef> +<multiRef id="id7" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:SearchResponseItem" xmlns:ns4="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id12"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:5900039</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml2</xml></multiRef> +<multiRef id="id6" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:SearchResponseItem" xmlns:ns5="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id13"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:5900040</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml3</xml></multiRef> +<multiRef id="id10" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns6:SearchResponseItem" xmlns:ns6="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id14"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:41534</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml4</xml></multiRef> +<multiRef id="id8" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns7:SearchResponseItem" xmlns:ns7="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id15"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:5900038</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml5</xml></multiRef> +<multiRef id="id4" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns8:SearchResponseItem" xmlns:ns8="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id16"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:2900229</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml6</xml></multiRef> +<multiRef id="id5" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns9:SearchResponseItem" xmlns:ns9="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id17"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:2900228</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml7</xml></multiRef> +<multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns10:SearchResponseItem" xmlns:ns10="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id18"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:2900230</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml8</xml></multiRef> +<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns11:SearchResponseItem" xmlns:ns11="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id19"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:2900235</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml9</xml></multiRef> +<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns12:SearchResponseItem" xmlns:ns12="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fields href="#id20"/><identifier xsi:type="xsd:string">oai:dlmd.ifremer.fr:5900196</identifier><score xsi:type="xsd:float">0.13684115</score><xml xsi:type="xsd:string">xml10</xml></multiRef> +<multiRef id="id15" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns13:Map" xmlns:ns13="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2004-12-01T04:58:00.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">105.539</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">112.283</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-30.024</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-34.788</value></value></item></multiRef> +<multiRef id="id20" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns14:Map" xmlns:ns14="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2004-06-07T17:41:44.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">129.882</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">133.635</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">39.529</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">36.419</value></value></item></multiRef> +<multiRef id="id18" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns15:Map" xmlns:ns15="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2004-03-10T01:40:00.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">63.121</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">80.92</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">0.158</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-3.675</value></value></item></multiRef> +<multiRef id="id14" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns16:Map" xmlns:ns16="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2003-01-12T05:15:00.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-42.88</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-20.85</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">61.41</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">43.2</value></value></item></multiRef> +<multiRef id="id13" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns17:Map" xmlns:ns17="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2004-12-01T16:50:00.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">108.962</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">114.713</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-35.262</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-42.756</value></value></item></multiRef> +<multiRef id="id17" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns18:Map" xmlns:ns18="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2003-10-10T11:52:00.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">68.14</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">95.987</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">3.97</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-1.242</value></value></item></multiRef> +<multiRef id="id16" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns19:Map" xmlns:ns19="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2004-01-10T10:35:00.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">67.71</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">77.743</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">3.546</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-1.965</value></value></item></multiRef> +<multiRef id="id19" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns20:Map" xmlns:ns20="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2004-04-09T23:00:00.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">59.116</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">69.206</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-2.274</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-4.093</value></value></item></multiRef> +<multiRef id="id11" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns21:Map" xmlns:ns21="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2002-11-09T23:10:00.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">156.013</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">160.042</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">5.648</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">4.773</value></value></item></multiRef> +<multiRef id="id12" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns22:Map" xmlns:ns22="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="soapenc:string">maxDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2038-12-31T22:59:59.000Z</value></value></item><item><key xsi:type="soapenc:string">minDateTime</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="xsd:dateTime">2004-11-01T16:58:00.000Z</value></value></item><item><key xsi:type="soapenc:string">minLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">108.11</value></value></item><item><key xsi:type="soapenc:string">maxLongitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">113.383</value></value></item><item><key xsi:type="soapenc:string">maxLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-31.666</value></value></item><item><key xsi:type="soapenc:string">minLatitude</key><value soapenc:arrayType="xsd:anyType[1]" xsi:type="soapenc:Array"><value xsi:type="soapenc:double">-35.075</value></value></item></multiRef> +</soapenv:Body></soapenv:Envelope> +EOF; + } +} +for ($i = 0; $i < 10; $i++) { + $ws=new TestSoapClient(dirname(__FILE__).'/bug37083.wsdl', + array('encoding'=>'ISO-8859-1', + 'cache_wsdl'=>WSDL_CACHE_BOTH)); + $search=new stdClass(); + $search->queryString='argo'; + $search->ranges[]=$r=new stdClass(); + $r->field='maxDateTime'; + $r->min='2003-04-01'; + $search->index='all'; + $res=$ws->search($search,0,10); +} +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug37083.wsdl b/ext/soap/tests/bugs/bug37083.wsdl new file mode 100755 index 0000000..2a3b379 --- /dev/null +++ b/ext/soap/tests/bugs/bug37083.wsdl @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:intf="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <schema targetNamespace="urn:java:de.pangaea.metadataportal.search.SearchService" xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="http://xml.apache.org/xml-soap"/>
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+ <complexType name="SearchRequestRange">
+ <sequence>
+ <element name="field" nillable="true" type="xsd:string"/>
+ <element name="max" nillable="true" type="xsd:anyType"/>
+ <element name="min" nillable="true" type="xsd:anyType"/>
+ </sequence>
+ </complexType>
+ <complexType name="ArrayOfSearchRequestRange">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SearchRequestRange[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ <complexType name="SearchRequest">
+ <sequence>
+ <element name="index" nillable="true" type="xsd:string"/>
+ <element name="queryString" nillable="true" type="xsd:string"/>
+ <element name="ranges" nillable="true" type="impl:ArrayOfSearchRequestRange"/>
+ </sequence>
+ </complexType>
+ <complexType name="SearchResponseItem">
+ <sequence>
+ <element name="fields" nillable="true" type="apachesoap:Map"/>
+ <element name="identifier" nillable="true" type="xsd:string"/>
+ <element name="score" type="xsd:float"/>
+ <element name="xml" nillable="true" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ <complexType name="ArrayOfSearchResponseItem">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SearchResponseItem[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ <complexType name="SearchResponse">
+ <sequence>
+ <element name="offset" type="xsd:int"/>
+ <element name="queryTime" type="xsd:long"/>
+ <element name="results" nillable="true" type="impl:ArrayOfSearchResponseItem"/>
+ <element name="totalCount" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ </schema>
+ <schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="urn:java:de.pangaea.metadataportal.search.SearchService"/>
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+ <complexType name="mapItem">
+ <sequence>
+ <element name="key" nillable="true" type="xsd:anyType"/>
+ <element name="value" nillable="true" type="xsd:anyType"/>
+ </sequence>
+ </complexType>
+ <complexType name="Map">
+ <sequence>
+ <element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem"/>
+ </sequence>
+ </complexType>
+ </schema>
+ </wsdl:types>
+ <wsdl:message name="searchRequest">
+ <wsdl:part name="in0" type="impl:SearchRequest"/>
+ <wsdl:part name="in1" type="xsd:int"/>
+ <wsdl:part name="in2" type="xsd:int"/>
+ </wsdl:message>
+ <wsdl:message name="searchResponse">
+ <wsdl:part name="searchReturn" type="impl:SearchResponse"/>
+ </wsdl:message>
+ <wsdl:portType name="SearchServiceAxisImpl">
+ <wsdl:operation name="search" parameterOrder="in0 in1 in2">
+ <wsdl:input message="impl:searchRequest" name="searchRequest"/>
+ <wsdl:output message="impl:searchResponse" name="searchResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SearchSoapBinding" type="impl:SearchServiceAxisImpl">
+ <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="search">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="searchRequest">
+ <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:java:de.pangaea.metadataportal.search.SearchService" use="encoded"/>
+ </wsdl:input>
+ <wsdl:output name="searchResponse">
+ <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:java:de.pangaea.metadataportal.search.SearchService" use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SearchServiceAxisImplService">
+ <wsdl:port binding="impl:SearchSoapBinding" name="Search">
+ <wsdlsoap:address location="test://"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/ext/soap/tests/bugs/bug37278.phpt b/ext/soap/tests/bugs/bug37278.phpt new file mode 100644 index 0000000..f3fd7c1 --- /dev/null +++ b/ext/soap/tests/bugs/bug37278.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #37278 (SOAP not respecting uri in __soapCall) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$options = array( + "location" => "test://", + "uri" => "http://bricolage.sourceforge.net/Bric/SOAP/Auth", + "trace" => 1); + +$client = new SoapClient(null, $options); + +$newNS = "http://bricolage.sourceforge.net/Bric/SOAP/Story"; + +try { + $client->__soapCall("list_ids", array(), array("uri" => $newNS)); +} catch (Exception $e) { + print $client->__getLastRequest(); +} +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://bricolage.sourceforge.net/Bric/SOAP/Story" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:list_ids/></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug38004.phpt b/ext/soap/tests/bugs/bug38004.phpt new file mode 100644 index 0000000..fea4f03 --- /dev/null +++ b/ext/soap/tests/bugs/bug38004.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug #38004 (Parameters in SoapServer are decoded twice) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +function Test($param) { + global $g; + $g = $param->strA."\n".$param->strB."\n"; + return $g; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl) { + parent::__construct($wsdl); + $this->server = new SoapServer($wsdl); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug38004.wsdl'); +$strA = 'test & test'; +$strB = 'test & test'; +$res = $client->Test(array('strA'=>$strA, 'strB'=>$strB)); +print_r($res); +print_r($g); +?> +--EXPECT-- +test & test +test & test +test & test +test & test diff --git a/ext/soap/tests/bugs/bug38004.wsdl b/ext/soap/tests/bugs/bug38004.wsdl new file mode 100755 index 0000000..c288135 --- /dev/null +++ b/ext/soap/tests/bugs/bug38004.wsdl @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:s0="http://test.pl"
+ targetNamespace="http://test.pl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+>
+ <types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://test.pl">
+ <s:complexType name="Test">
+ <s:attribute use="required" name="strA" type="s:string"/>
+ <s:attribute use="required" name="strB" type="s:string"/>
+ </s:complexType>
+ <s:element type="s0:Test" name="Test"/>
+ <s:element type="s:string" name="Ret"/>
+ </s:schema>
+ </types>
+
+ <message name="TestSoapIn">
+ <part name="parameters" element="s0:Test"/>
+ </message>
+ <message name="TestSoapOut">
+ <part name="parameters" element="s0:Ret"/>
+ </message>
+ <portType name="TestSoap">
+ <operation name="Test">
+ <input message="s0:TestSoapIn"/>
+ <output message="s0:TestSoapOut"/>
+ </operation>
+ </portType>
+ <binding name="TestSoap" type="s0:TestSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+style="document"/>
+ <operation name="Test">
+ <soap:operation soapAction="http:/Test/Test" style="document"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="Test">
+ <port name="TestSoapPort" binding="s0:TestSoap">
+ <soap:address location="http://localhost:8080/~dmitry/bug38004/server.php"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug38005.phpt b/ext/soap/tests/bugs/bug38005.phpt new file mode 100644 index 0000000..6a4fb25 --- /dev/null +++ b/ext/soap/tests/bugs/bug38005.phpt @@ -0,0 +1,43 @@ +--TEST-- +Bug #38005 (SoapFault faultstring doesn't follow encoding rules) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +function Test($param) { + return new SoapFault('Test', 'This is our fault: Ä'); +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl, $opt) { + parent::__construct($wsdl, $opt); + $this->server = new SoapServer($wsdl, $opt); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(NULL, array( + 'encoding' => 'ISO-8859-1', + 'uri' => "test://", + 'location' => "test://", + 'soap_version'=>SOAP_1_2, + 'trace'=>1, + 'exceptions'=>0)); +$res = $client->Test(); +echo($res->faultstring."\n"); +echo($client->__getLastResponse()); +?> +--EXPECT-- +This is our fault: Ä +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>Test</env:Value></env:Code><env:Reason><env:Text>This is our fault: Ä</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/bugs/bug38055.phpt b/ext/soap/tests/bugs/bug38055.phpt new file mode 100644 index 0000000..82b6c76 --- /dev/null +++ b/ext/soap/tests/bugs/bug38055.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug #38055 (Wrong interpretation of boolean parameters) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +function Test($param) { + global $g1, $g2; + $g1 = $param->boolA; + $g2 = $param->boolB; + return 1; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl) { + parent::__construct($wsdl); + $this->server = new SoapServer($wsdl); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug38055.wsdl'); +$boolA = 1; +$boolB = '1'; +$res = $client->Test(array('boolA'=>$boolA, 'boolB'=>$boolB)); +var_dump($g1); +var_dump($g2); +?> +--EXPECT-- +bool(true) +bool(true) diff --git a/ext/soap/tests/bugs/bug38055.wsdl b/ext/soap/tests/bugs/bug38055.wsdl new file mode 100755 index 0000000..f893547 --- /dev/null +++ b/ext/soap/tests/bugs/bug38055.wsdl @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:s0="http://test.pl"
+ targetNamespace="http://test.pl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://test.pl">
+ <s:complexType name="Test">
+ <s:attribute use="required" name="boolA" type="s:boolean"/>
+ <s:attribute use="required" name="boolB" type="s:boolean"/>
+ </s:complexType>
+ <s:element type="s0:Test" name="Test"/>
+ <s:element type="s:int" name="Ret"/>
+ </s:schema>
+ </types>
+
+ <message name="TestSoapIn">
+ <part name="parameters" element="s0:Test"/>
+ </message>
+ <message name="TestSoapOut">
+ <part name="parameters" element="s0:Ret"/>
+ </message>
+ <portType name="TestSoap">
+ <operation name="Test">
+ <input message="s0:TestSoapIn"/>
+ <output message="s0:TestSoapOut"/>
+ </operation>
+ </portType>
+ <binding name="TestSoap" type="s0:TestSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="Test">
+ <soap:operation soapAction="http:/Test/Test" style="document"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="Test">
+ <port name="TestSoapPort" binding="s0:TestSoap">
+ <soap:address location="http://localhost/server.php"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug38067.phpt b/ext/soap/tests/bugs/bug38067.phpt new file mode 100644 index 0000000..c9bf3c1 --- /dev/null +++ b/ext/soap/tests/bugs/bug38067.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug #38067 (Parameters are not decoded from utf-8 when using encoding option) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +function Test($param) { + global $g; + $g = $param->str; + return $g; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl, $opt) { + parent::__construct($wsdl, $opt); + $this->server = new SoapServer($wsdl, $opt); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug38067.wsdl', + array('encoding' => 'ISO-8859-1')); +$str = 'test: Ä'; +$res = $client->Test(array('str'=>$str)); +echo $str."\n"; +echo $res."\n"; +echo $g."\n"; +?> +--EXPECT-- +test: Ä +test: Ä +test: Ä diff --git a/ext/soap/tests/bugs/bug38067.wsdl b/ext/soap/tests/bugs/bug38067.wsdl new file mode 100755 index 0000000..beb9fc2 --- /dev/null +++ b/ext/soap/tests/bugs/bug38067.wsdl @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:s0="http://test.pl"
+ targetNamespace="http://test.pl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://test.pl">
+ <s:complexType name="Test">
+ <s:attribute use="required" name="str" type="s:string"/>
+ </s:complexType>
+ <s:element type="s0:Test" name="Test"/>
+ <s:element type="s:string" name="Ret"/>
+ </s:schema>
+ </types>
+
+ <message name="TestSoapIn">
+ <part name="parameters" element="s0:Test"/>
+ </message>
+ <message name="TestSoapOut">
+ <part name="parameters" element="s0:Ret"/>
+ </message>
+ <portType name="TestSoap">
+ <operation name="Test">
+ <input message="s0:TestSoapIn"/>
+ <output message="s0:TestSoapOut"/>
+ </operation>
+ </portType>
+ <binding name="TestSoap" type="s0:TestSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="Test">
+ <soap:operation soapAction="http:/Test/Test" style="document"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="Test">
+ <port name="TestSoapPort" binding="s0:TestSoap">
+ <soap:address location="http://localhost/server.php"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug38536.phpt b/ext/soap/tests/bugs/bug38536.phpt new file mode 100644 index 0000000..feea46e --- /dev/null +++ b/ext/soap/tests/bugs/bug38536.phpt @@ -0,0 +1,52 @@ +--TEST-- +Bug #38536 (SOAP returns an array of values instead of an object) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class LocalSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version, $one_way = 0) { + return <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ns1="http://www.grupos.com.br/ws/enturma/client"> +<SOAP-ENV:Body> +<getClientInfoFromDomainResponse SOAP-ENC:root="1"> + <xsd:Result xsi:type="ns1:ClientType"> + <id xsi:type="xsd:int">2</id> + <address href="#i2"/> + </xsd:Result> +</getClientInfoFromDomainResponse> +<xsd:address id="i2" xsi:type="ns1:ClientAddressType" SOAP-ENC:root="0"> + <idClient xsi:type="xsd:long">2</idClient> + <address href="#i3"/> +</xsd:address> +<address xsi:type="xsd:string" id="i3" SOAP-ENC:root="0">Test</address> +</SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + } +} + +ini_set("soap.wsdl_cache_enabled", 0); +$SOAPObject = new LocalSoapClient(dirname(__FILE__).'/bug38536.wsdl'); +print_r($SOAPObject->test()); +?> +--EXPECT-- +stdClass Object +( + [id] => 2 + [address] => stdClass Object + ( + [idClient] => 2 + [address] => Test + ) + +) diff --git a/ext/soap/tests/bugs/bug38536.wsdl b/ext/soap/tests/bugs/bug38536.wsdl new file mode 100755 index 0000000..0ef3fd4 --- /dev/null +++ b/ext/soap/tests/bugs/bug38536.wsdl @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:enturma="http://www.grupos.com.br/ws/enturmaServices" + xmlns:clientTypes="http://www.grupos.com.br/ws/enturma/client" + targetNamespace="http://www.grupos.com.br/ws/enturmaServices" + elementFormDefault="qualified" + attributeFormDefault="qualified"> + <types> + <schema xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" + targetNamespace="http://www.grupos.com.br/ws/enturma/client"> + <complexType name="ClientType"> + <sequence> + <element name="id" type="int"/> + <element name="address" type="clientTypes:ClientAddressType" minOccurs="0"/> + </sequence> + </complexType> + <complexType name="ClientAddressType"> + <sequence> + <element name="idClient" type="int"/> + <element name="address" type="string" minOccurs="0"/> + </sequence> + </complexType> + </schema> + </types> + <message name="testMessage" /> + <message name="testResponse"> + <part name="domain" type="clientTypes:ClientType"/> + </message> + + <portType name="SessionImpl"> + <operation name="test"> + <input message="enturma:testMessage" /> + <output message="enturma:testResponse" /> + </operation> + </portType> + <binding name="SessionBind" type="enturma:SessionImpl"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="test"> + <soap:operation soapAction="test://"/> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="test://"/> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="test://"/> + </output> + </operation> + </binding> + <service name="Session"> + <port name="SessionImpl" binding="enturma:SessionBind"> + <soap:address location="test://"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/bugs/bug39121.phpt b/ext/soap/tests/bugs/bug39121.phpt new file mode 100644 index 0000000..caa7f6c --- /dev/null +++ b/ext/soap/tests/bugs/bug39121.phpt @@ -0,0 +1,73 @@ +--TEST-- +Bug #39121 (Incorrect return array handling in non-wsdl soap client) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class LocalSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version, $one_way = 0) { + return <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> + <soap:Body> + <getDIDAreaResponse xmlns="http://didx.org/GetList"> + <soapenc:Array soapenc:arrayType="xsd:string[2]" xsi:type="soapenc:Array"> + <item xsi:type="xsd:string">StateCode</item> + <item xsi:type="xsd:string">description</item> + </soapenc:Array> + <soapenc:Array soapenc:arrayType="xsd:anyType[2]" xsi:type="soapenc:Array"> + <item xsi:type="xsd:int">241</item> + <item xsi:type="xsd:string">Carabobo</item> + </soapenc:Array> + <soapenc:Array soapenc:arrayType="xsd:anyType[2]" xsi:type="soapenc:Array"> + <item xsi:type="xsd:int">243</item> + <item xsi:type="xsd:string">Aragua and Carabobo</item> + </soapenc:Array> + <soapenc:Array soapenc:arrayType="xsd:anyType[2]" xsi:type="soapenc:Array"> + <item xsi:type="xsd:int">261</item> + <item xsi:type="xsd:string">Zulia</item> + </soapenc:Array> + </getDIDAreaResponse> + </soap:Body> +</soap:Envelope> +EOF; + } +} + +$client = new LocalSoapClient(NULL, array('location'=>'test://','uri'=>'test://')); +print_r($client->getDIDAreaResponse()); +?> +--EXPECT-- +Array +( + [Array] => Array + ( + [0] => Array + ( + [0] => StateCode + [1] => description + ) + + [1] => Array + ( + [0] => 241 + [1] => Carabobo + ) + + [2] => Array + ( + [0] => 243 + [1] => Aragua and Carabobo + ) + + [3] => Array + ( + [0] => 261 + [1] => Zulia + ) + + ) + +) diff --git a/ext/soap/tests/bugs/bug39815.phpt b/ext/soap/tests/bugs/bug39815.phpt new file mode 100644 index 0000000..1adc50a --- /dev/null +++ b/ext/soap/tests/bugs/bug39815.phpt @@ -0,0 +1,50 @@ +--TEST-- +Bug #39815 (to_zval_double() in ext/soap/php_encoding.c is not locale-independent) +--SKIPIF-- +<?php +require_once('skipif.inc'); +if (!function_exists('setlocale')) die('skip setlocale() not available'); +if (!@setlocale(LC_ALL, 'sv_SE', 'sv_SE.ISO8859-1')) die('skip sv_SE locale not available'); +if (!@setlocale(LC_ALL, 'en_US', 'en_US.ISO8859-1')) die('skip en_US locale not available'); +?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +function test(){ + return 123.456; +} +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} +$x = new LocalSoapClient(NULL,array('location'=>'test://', + 'uri'=>'http://testuri.org', + "trace"=>1)); +setlocale(LC_ALL,"sv_SE","sv_SE.ISO8859-1"); +var_dump($x->test()); +echo $x->__getLastResponse(); +setlocale(LC_ALL,"en_US","en_US.ISO8859-1"); +var_dump($x->test()); +echo $x->__getLastResponse(); +--EXPECT-- +float(123,456) +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" 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:testResponse><return xsi:type="xsd:float">123.456</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +float(123.456) +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" 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:testResponse><return xsi:type="xsd:float">123.456</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug39832.phpt b/ext/soap/tests/bugs/bug39832.phpt new file mode 100644 index 0000000..6abc2f0 --- /dev/null +++ b/ext/soap/tests/bugs/bug39832.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #39832 (SOAP Server: parameter not matching the WSDL specified type are set to 0) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test.pl"><SOAP-ENV:Body> +<SOAP-ENV:Test> +<parameters priority="high"> +<ns1:NetworkErrorCode>1</ns1:NetworkErrorCode> +</parameters> +</SOAP-ENV:Test></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + +function Test($x) { + return $x->priority; +} + +$x = new SoapServer(dirname(__FILE__)."/bug39832.wsdl"); +$x->addFunction("Test"); +$x->handle($HTTP_RAW_POST_DATA); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>SOAP-ERROR: Encoding: Violation of encoding rules</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug39832.wsdl b/ext/soap/tests/bugs/bug39832.wsdl new file mode 100755 index 0000000..a71f581 --- /dev/null +++ b/ext/soap/tests/bugs/bug39832.wsdl @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:s0="http://test.pl"
+ targetNamespace="http://test.pl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://test.pl">
+ <s:complexType name="MessageInfoType">
+ <s:sequence>
+ <s:element name="NetworkErrorCode" type="s:integer" minOccurs="0"/>
+ </s:sequence>
+ <s:attribute name="priority" type="s0:PriorityType"/>
+ </s:complexType>
+ <s:simpleType name="PriorityType">
+ <s:restriction base="s:integer">
+ <s:minInclusive value="0"/>
+ <s:maxInclusive value="3"/>
+ </s:restriction>
+ </s:simpleType>
+ </s:schema>
+ </types>
+
+ <message name="TestSoapIn">
+ <part name="parameters" type="s0:MessageInfoType" />
+ </message>
+ <message name="TestSoapOut">
+ <part name="parameters" type="s:string" />
+ </message>
+ <portType name="TestSoap">
+ <operation name="Test">
+ <input message="s0:TestSoapIn"/>
+ <output message="s0:TestSoapOut"/>
+ </operation>
+ </portType>
+ <binding name="TestSoap" type="s0:TestSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="Test">
+ <soap:operation soapAction="http:/Test/Test" style="rpc"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="Test">
+ <port name="TestSoapPort" binding="s0:TestSoap">
+ <soap:address location="http://localhost/server.php"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug40609.phpt b/ext/soap/tests/bugs/bug40609.phpt new file mode 100644 index 0000000..198afc5 --- /dev/null +++ b/ext/soap/tests/bugs/bug40609.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #40609 (Segfaults when using more than one SoapVar in a request) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +$c = new SoapClient(dirname(__FILE__)."/bug40609.wsdl", array('trace' => 1, 'exceptions' => 0)); + +$c->update(array('symbol' => new SoapVar("<symbol>MSFT</symbol>", XSD_ANYXML), + 'price' => new SoapVar("<price>1000</price>", XSD_ANYXML))); +echo $c->__getLastRequest(); +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://quickstart.samples/xsd"><SOAP-ENV:Body><ns1:update><symbol>MSFT</symbol><price>1000</price></ns1:update></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/bugs/bug40609.wsdl b/ext/soap/tests/bugs/bug40609.wsdl new file mode 100755 index 0000000..0792e90 --- /dev/null +++ b/ext/soap/tests/bugs/bug40609.wsdl @@ -0,0 +1,26 @@ +<wsdl:definitions xmlns:axis2="http://quickstart.samples/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns="http://quickstart.samples/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://quickstart.samples/"><wsdl:documentation>
+ Stock Quote Service
+ </wsdl:documentation><wsdl:types><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://quickstart.samples/xsd">
+<xs:element name="getPrice">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="symbol" nillable="true" type="xs:string" />
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="getPriceResponse">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="return" nillable="true" type="xs:double" />
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="update">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="symbol" nillable="true" type="xs:any" />
+<xs:element name="price" nillable="true" type="xs:any" />
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+</xs:schema></wsdl:types><wsdl:message name="updateMessage"><wsdl:part name="part1" element="ns:update" /></wsdl:message><wsdl:message name="getPriceMessage"><wsdl:part name="part1" element="ns:getPrice" /></wsdl:message><wsdl:message name="getPriceResponseMessage"><wsdl:part name="part1" element="ns:getPriceResponse" /></wsdl:message><wsdl:portType name="StockQuoteServicePortType"><wsdl:operation name="update"><wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:updateMessage" wsaw:Action="urn:update" /></wsdl:operation><wsdl:operation name="getPrice"><wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:getPriceMessage" wsaw:Action="urn:getPrice" /><wsdl:output xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:getPriceResponseMessage" wsaw:Action="http://quickstart.samples/StockQuoteServicePortType/getPriceResponse" /></wsdl:operation></wsdl:portType><wsdl:binding name="StockQuoteServiceSOAP11Binding" type="axis2:StockQuoteServicePortType"><soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="update"><soap:operation soapAction="urn:update" style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input></wsdl:operation><wsdl:operation name="getPrice"><soap:operation soapAction="urn:getPrice" style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="StockQuoteServiceSOAP12Binding" type="axis2:StockQuoteServicePortType"><soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="update"><soap12:operation soapAction="urn:update" style="document" /><wsdl:input><soap12:body use="literal" /></wsdl:input></wsdl:operation><wsdl:operation name="getPrice"><soap12:operation soapAction="urn:getPrice" style="document" /><wsdl:input><soap12:body use="literal" /></wsdl:input><wsdl:output><soap12:body use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="StockQuoteServiceHttpBinding" type="axis2:StockQuoteServicePortType"><http:binding verb="POST" /><wsdl:operation name="update"><http:operation location="update" /><wsdl:input><mime:content type="text/xml" /></wsdl:input></wsdl:operation><wsdl:operation name="getPrice"><http:operation location="getPrice" /><wsdl:input><mime:content type="text/xml" /></wsdl:input><wsdl:output><mime:content type="text/xml" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="StockQuoteService"><wsdl:port name="StockQuoteServiceSOAP11port_http" binding="axis2:StockQuoteServiceSOAP11Binding"><soap:address location="test://" /></wsdl:port><wsdl:port name="StockQuoteServiceSOAP12port_http" binding="axis2:StockQuoteServiceSOAP12Binding"><soap12:address location="test://" /></wsdl:port><wsdl:port name="StockQuoteServiceHttpport1" binding="axis2:StockQuoteServiceHttpBinding"><http:address location="test://" /></wsdl:port></wsdl:service></wsdl:definitions>
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug41004.phpt b/ext/soap/tests/bugs/bug41004.phpt new file mode 100644 index 0000000..992c6b7 --- /dev/null +++ b/ext/soap/tests/bugs/bug41004.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #41004 (minOccurs="0" and null class member variable) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set('soap.wsdl_cache_enabled', false); + +class EchoBean{ + public $mandatoryElement; + public $optionalElement; + +} + +class EchoRequest{ + public $in; +} + +class EchoResponse{ + public $out; +} + +$wsdl = dirname(__FILE__)."/bug41004.wsdl"; +$classmap = array('EchoBean'=>'EchoBean','echo'=>'EchoRequest','echoResponse'=>'EchoResponse'); +$client = new SoapClient($wsdl, array('location'=>'test://',"classmap" => $classmap, 'exceptions'=>0, 'trace'=>1)); +$echo=new EchoRequest(); +$in=new EchoBean(); +$in->mandatoryElement="REV"; +$in->optionalElement=NULL; +$echo->in=$in; +$client->echo($echo); +echo $client->__getLastRequest(); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Formation"><SOAP-ENV:Body><ns1:echo><in><mandatoryElement>REV</mandatoryElement></in></ns1:echo></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug41004.wsdl b/ext/soap/tests/bugs/bug41004.wsdl new file mode 100755 index 0000000..d683e5d --- /dev/null +++ b/ext/soap/tests/bugs/bug41004.wsdl @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="urn:Formation" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Formation"
+ targetNamespace="urn:Formation">
+ <wsdl:types>
+ <xsd:schema targetNamespace="urn:Formation">
+ <xsd:element name="echo">
+ <xsd:complexType>
+ <xsd:sequence>
<xsd:element name="in" type="tns:EchoBean"></xsd:element> + </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element> + <xsd:element name="echoResponse"> + <xsd:complexType> + <xsd:sequence>
+ <xsd:element name="out" type="tns:EchoBean"></xsd:element> + </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element> + <xsd:simpleType name="Product1Type">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="REV"></xsd:enumeration>
+ <xsd:enumeration value="CLA"></xsd:enumeration>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="EchoBean"> + <xsd:sequence> + <xsd:element name="mandatoryElement"
+ type="tns:Product1Type"> + </xsd:element>
+ <xsd:element name="optionalElement"
+ type="tns:Product1Type" maxOccurs="1" minOccurs="0">
+ </xsd:element> + </xsd:sequence>
+ </xsd:complexType> + </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="echoRequest">
+ <wsdl:part name="parameters" element="tns:echo"></wsdl:part>
+ </wsdl:message> + <wsdl:message name="echoResponse"> + <wsdl:part name="parameters" element="tns:echoResponse"></wsdl:part>
+ </wsdl:message> + <wsdl:portType name="Formation">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echoRequest"></wsdl:input> + <wsdl:output message="tns:echoResponse"></wsdl:output>
+ </wsdl:operation> + </wsdl:portType>
+ <wsdl:binding name="FormationServiceV1" type="tns:Formation">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="echo">
+ <soap:operation soapAction="urn:Formation/echo" /> + <wsdl:input> + <soap:body use="literal" />
+ </wsdl:input> + <wsdl:output> + <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation> + </wsdl:binding>
+ <wsdl:service name="Formation">
+ <wsdl:port binding="tns:FormationServiceV1"
+ name="FormationSOAP">
+ <soap:address
+ location="http://localhost:8080/webapp/services/FormationServiceV1" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/ext/soap/tests/bugs/bug41097.phpt b/ext/soap/tests/bugs/bug41097.phpt new file mode 100644 index 0000000..a9cfd14 --- /dev/null +++ b/ext/soap/tests/bugs/bug41097.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #41097 (ext/soap returning associative array as indexed without using WSDL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test($soap, $array) { + $soap->test($array); + echo (strpos($soap->__getLastRequest(), ':Map"') != false)?"Map\n":"Array\n"; +} + + +$soap = new SoapClient(null, array('uri' => 'http://uri/', 'location' => 'test://', 'exceptions' => 0, 'trace' => 1)); +test($soap, array('Foo', 'Bar')); +test($soap, array(5 => 'Foo', 10 => 'Bar')); +test($soap, array('5' => 'Foo', '10' => 'Bar')); +$soap->test(new SoapVar(array('Foo', 'Bar'), APACHE_MAP)); +echo (strpos($soap->__getLastRequest(), ':Map"') != false)?"Map\n":"Array\n"; +$soap->test(new SoapVar(array('Foo', 'Bar'), SOAP_ENC_ARRAY)); +echo (strpos($soap->__getLastRequest(), ':Map"') != false)?"Map\n":"Array\n"; +?> +--EXPECT-- +Array +Map +Map +Map +Array diff --git a/ext/soap/tests/bugs/bug41337.phpt b/ext/soap/tests/bugs/bug41337.phpt new file mode 100644 index 0000000..cd777d1 --- /dev/null +++ b/ext/soap/tests/bugs/bug41337.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #41337 (WSDL parsing doesn't ignore non soap bindings) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$client = new SoapClient(dirname(__FILE__)."/bug41337.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug41337.wsdl b/ext/soap/tests/bugs/bug41337.wsdl new file mode 100755 index 0000000..14e5dc4 --- /dev/null +++ b/ext/soap/tests/bugs/bug41337.wsdl @@ -0,0 +1,63 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + + <types> + <xsd:schema targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> + </xsd:schema> + </types> + + <message name="AddRequest"> + <part name="x" type="xsd:double" /> + <part name="y" type="xsd:double" /> + </message> + <message name="AddResponse"> + <part name="result" type="xsd:double" /> + </message> + + <portType name="TestServicePortType"> + <operation name="Add"> + <input message="tns:AddRequest" /> + <output message="tns:AddResponse" /> + </operation> + </portType> + + <binding name="TestServiceBinding2" type="tns:TestServicePortType"> + <operation name="Add"> + <input/> + <output/> + </operation> + </binding> + + <binding name="TestServiceBinding" type="tns:TestServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> + <operation name="Add"> + <soap:operation soapAction="Add" style="rpc" /> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </output> + </operation> + </binding> + + <service name="TestService"> + <port name="TestServicePort2" binding="tns:TestServiceBinding"/> + <port name="TestServicePort" binding="tns:TestServiceBinding"> + <soap:address location="http://linuxsrv.home/~dmitry/soap/soap_server.php" /> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/bugs/bug41337_2.phpt b/ext/soap/tests/bugs/bug41337_2.phpt new file mode 100644 index 0000000..d594d25 --- /dev/null +++ b/ext/soap/tests/bugs/bug41337_2.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #41337 (WSDL parsing doesn't ignore non soap bindings) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$client = new SoapClient(dirname(__FILE__)."/bug41337_2.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug41337_2.wsdl b/ext/soap/tests/bugs/bug41337_2.wsdl new file mode 100755 index 0000000..46c078a --- /dev/null +++ b/ext/soap/tests/bugs/bug41337_2.wsdl @@ -0,0 +1,36 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + + <import namespace="http://linuxsrv.home/~dmitry/soap/test.wsdl" + location="bug41337_2_1.wsdl" /> + + <binding name="TestServiceBinding" type="tns:TestServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> + <operation name="Add"> + <soap:operation soapAction="Add" style="rpc" /> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </output> + </operation> + </binding> + + <service name="TestService"> + <port name="TestServicePort" binding="tns:TestServiceBinding"> + <soap:address location="http://linuxsrv.home/~dmitry/soap/soap_server.php" /> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/bugs/bug41337_2_1.wsdl b/ext/soap/tests/bugs/bug41337_2_1.wsdl new file mode 100755 index 0000000..857dc6c --- /dev/null +++ b/ext/soap/tests/bugs/bug41337_2_1.wsdl @@ -0,0 +1,47 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + + <types> + <xsd:schema targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> + </xsd:schema> + </types> + + <message name="AddRequest"> + <part name="x" type="xsd:double" /> + <part name="y" type="xsd:double" /> + </message> + <message name="AddResponse"> + <part name="result" type="xsd:double" /> + </message> + + <portType name="TestServicePortType"> + <operation name="Add"> + <input message="tns:AddRequest" /> + <output message="tns:AddResponse" /> + </operation> + </portType> + + <binding name="TestServiceBinding2" type="tns:TestServicePortType"> + <operation name="Add"> + <input/> + <output/> + </operation> + </binding> + + <service name="TestService2"> + <port name="TestServicePort2" binding="tns:TestServiceBinding"/> + </service> + +</definitions> diff --git a/ext/soap/tests/bugs/bug41477.phpt b/ext/soap/tests/bugs/bug41477.phpt new file mode 100644 index 0000000..a103e69 --- /dev/null +++ b/ext/soap/tests/bugs/bug41477.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #41477 (no arginfo about SoapClient::__soapCall()) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$objRfClass = new ReflectionClass('SoapClient'); +$objRfMethod = $objRfClass->getMethod('__soapCall'); +$arrParams = $objRfMethod->getParameters(); +foreach($arrParams as $objRfParam) +{ + var_dump($objRfParam->getName()); +} +?> +--EXPECT-- +string(13) "function_name" +string(9) "arguments" +string(7) "options" +string(13) "input_headers" +string(14) "output_headers" diff --git a/ext/soap/tests/bugs/bug41566.phpt b/ext/soap/tests/bugs/bug41566.phpt new file mode 100644 index 0000000..03ecdde --- /dev/null +++ b/ext/soap/tests/bugs/bug41566.phpt @@ -0,0 +1,65 @@ +--TEST-- +Bug #41566 (SOAP Server not properly generating href attributes) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test() { + $aUser = new User(); + $aUser->sName = 'newUser'; + + $aUsers = Array(); + $aUsers[] = $aUser; + $aUsers[] = $aUser; + $aUsers[] = $aUser; + $aUsers[] = $aUser; + return $aUsers; +} + +/* Simple User definition */ +Class User { + /** @var string */ + public $sName; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org", 'soap_version'=>SOAP_1_2)); +$server->addfunction("test"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +ob_start(); +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:ns1="http://testuri.org" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <env:Body> + <ns1:test env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"/> + </env:Body> +</env:Envelope> +EOF; +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +ob_flush(); +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><return SOAP-ENC:arrayType="SOAP-ENC:Struct[4]" xsi:type="SOAP-ENC:Array"><item xsi:type="SOAP-ENC:Struct" id="ref1"><sName xsi:type="xsd:string">newUser</sName></item><item href="#ref1"/><item href="#ref1"/><item href="#ref1"/></return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://testuri.org" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:testResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return enc:itemType="enc:Struct" enc:arraySize="4" xsi:type="enc:Array"><item xsi:type="enc:Struct" enc:id="ref1"><sName xsi:type="xsd:string">newUser</sName></item><item enc:ref="#ref1"/><item enc:ref="#ref1"/><item enc:ref="#ref1"/></return></ns1:testResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/bugs/bug42086.phpt b/ext/soap/tests/bugs/bug42086.phpt new file mode 100644 index 0000000..6edc06f --- /dev/null +++ b/ext/soap/tests/bugs/bug42086.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #42086 (SoapServer return Procedure '' not present for WSIBasic compliant wsdl) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$request = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><firstFunctionWithoutParam/></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + +class firstFunctionWithoutParamResponse { + public $param; +} + +function firstFunctionWithoutParam() { + $ret = new firstFunctionWithoutParamResponse(); + $ret->param = "firstFunctionWithoutParam"; + return $ret; +} + +$server = new SoapServer(dirname(__FILE__).'/bug42086.wsdl', + array('features'=>SOAP_SINGLE_ELEMENT_ARRAYS)); +$server->addFunction('firstFunctionWithoutParam'); +$server->handle($request); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><firstFunctionWithoutParamReturn><param>firstFunctionWithoutParam</param></firstFunctionWithoutParamReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug42086.wsdl b/ext/soap/tests/bugs/bug42086.wsdl new file mode 100755 index 0000000..5ec3d95 --- /dev/null +++ b/ext/soap/tests/bugs/bug42086.wsdl @@ -0,0 +1,141 @@ +<?xml version='1.0' encoding='UTF-8'?>
+
+<!-- WSDL file generated by Zend Studio. -->
+
+<definitions name="LBAService" targetNamespace="http://xml.avaya.com/ws/device-management/distributed-enterprise" xmlns:typens="http://xml.avaya.com/ws/device-management/distributed-enterprise" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.avaya.com/ws/device-management/distributed-enterprise">
+ <xsd:complexType name="firstFunctionClassParam">
+ <xsd:all>
+ <xsd:element name="param" type="xsd:string"/>
+ <xsd:element name="vectparam" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:complexType name="firstFunctionClassParamResponse">
+ <xsd:all>
+ <xsd:element name="param" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:complexType name="firstFunctionWithoutParamResponse">
+ <xsd:all>
+ <xsd:element name="param" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:complexType name="secondFunctionClassParam">
+ <xsd:all>
+ <xsd:element name="param" type="xsd:string"/>
+ <xsd:element name="vectparam" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:complexType name="secondFunctionClassParamResponse">
+ <xsd:all>
+ <xsd:element name="param" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:complexType name="secondFunctionWithoutParamResponse">
+ <xsd:all>
+ <xsd:element name="param" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:schema>
+ </types>
+ <message name="firstFunctionClassParam">
+ <part name="firstFunctionClassParam" type="typens:firstFunctionClassParam"/>
+ </message>
+ <message name="firstFunctionClassParamResponse">
+ <part name="firstFunctionClassParamReturn" type="typens:firstFunctionClassParamResponse"/>
+ </message>
+ <message name="firstFunctionWithoutParam"/>
+<!--
+ <message name="firstFunctionWithoutParam">
+ <part name="firstFunctionWithoutParam"/>
+ </message>
+-->
+ <message name="firstFunctionWithoutParamResponse">
+ <part name="firstFunctionWithoutParamReturn" type="typens:firstFunctionWithoutParamResponse"/>
+ </message>
+ <message name="secondFunctionClassParam">
+ <part name="secondFunctionClassParam" type="typens:secondFunctionClassParam"/>
+ </message>
+ <message name="secondFunctionClassParamResponse">
+ <part name="secondFunctionClassParamReturn" type="typens:secondFunctionClassParamResponse"/>
+ </message>
+ <message name="secondFunctionWithoutParam"/>
+ <message name="secondFunctionWithoutParamResponse">
+ <part name="secondFunctionWithoutParamReturn" type="typens:secondFunctionWithoutParamResponse"/>
+ </message>
+ <portType name="wsImpPortType">
+ <operation name="firstFunctionClassParam">
+ <documentation>
+ Enter description here...
+ </documentation>
+ <input message="typens:firstFunctionClassParam"/>
+ <output message="typens:firstFunctionClassParamResponse"/>
+ </operation>
+ <operation name="firstFunctionWithoutParam">
+ <documentation>
+ Enter description here...
+ </documentation>
+ <input message="typens:firstFunctionWithoutParam"/>
+ <output message="typens:firstFunctionWithoutParamResponse"/>
+ </operation>
+ <operation name="secondFunctionClassParam">
+ <documentation>
+ Enter description here...
+ </documentation>
+ <input message="typens:secondFunctionClassParam"/>
+ <output message="typens:secondFunctionClassParamResponse"/>
+ </operation>
+ <operation name="secondFunctionWithoutParam">
+ <documentation>
+ Enter description here...
+ </documentation>
+ <input message="typens:secondFunctionWithoutParam"/>
+ <output message="typens:secondFunctionWithoutParamResponse"/>
+ </operation>
+ </portType>
+ <binding name="wsImpBinding" type="typens:wsImpPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="firstFunctionClassParam">
+ <soap:operation soapAction="urn:wsImpAction"/>
+ <input>
+ <soap:body namespace="http://xml.avaya.com/ws/device-management/distributed-enterprise" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://xml.avaya.com/ws/device-management/distributed-enterprise" use="literal"/>
+ </output>
+ </operation>
+ <operation name="firstFunctionWithoutParam">
+ <soap:operation soapAction="urn:wsImpAction"/>
+ <input>
+ <soap:body namespace="http://xml.avaya.com/ws/device-management/distributed-enterprise" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://xml.avaya.com/ws/device-management/distributed-enterprise" use="literal"/>
+ </output>
+ </operation>
+ <operation name="secondFunctionClassParam">
+ <soap:operation soapAction="urn:wsImpAction"/>
+ <input>
+ <soap:body namespace="http://xml.avaya.com/ws/device-management/distributed-enterprise" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://xml.avaya.com/ws/device-management/distributed-enterprise" use="literal"/>
+ </output>
+ </operation>
+ <operation name="secondFunctionWithoutParam">
+ <soap:operation soapAction="urn:wsImpAction"/>
+ <input>
+ <soap:body namespace="http://xml.avaya.com/ws/device-management/distributed-enterprise" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://xml.avaya.com/ws/device-management/distributed-enterprise" use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="LBAService">
+ <port name="wsImpPort" binding="typens:wsImpBinding">
+ <soap:address location="test://"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug42151.phpt b/ext/soap/tests/bugs/bug42151.phpt new file mode 100644 index 0000000..ee53e6d --- /dev/null +++ b/ext/soap/tests/bugs/bug42151.phpt @@ -0,0 +1,32 @@ +--TEST-- +Bug #42151 (__destruct functions not called after catching a SoapFault exception) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class foo { + function __construct(){ + $foo = @ new SoapClient('httpx://'); + } + function __destruct(){ + echo 'I never get executed.' . "\n"; + } +} +class bar { + function __destruct(){ + echo 'I don\'t get executed either.' . "\n"; + } +} +try { + $bar = new bar(); + $foo = new foo(); +} catch (Exception $e){ + echo $e->getMessage() . "\n"; +} +echo "ok\n"; +?> +--EXPECT-- +SOAP-ERROR: Parsing WSDL: Couldn't load from 'httpx://' : failed to load external entity "httpx://" + +ok +I don't get executed either. diff --git a/ext/soap/tests/bugs/bug42183.phpt b/ext/soap/tests/bugs/bug42183.phpt new file mode 100644 index 0000000..d34311f --- /dev/null +++ b/ext/soap/tests/bugs/bug42183.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #42183 (classmap cause crash in non-wsdl mode ) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class PHPObject { +} + +$req = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws.sit.com" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + +function test() { + return new PHPObject(); +} + +$server = new SoapServer(NULL, array('uri' => 'http://ws.sit.com', + 'classmap' => array('Object' => 'PHPObject'))); +$server->addFunction("test"); +ob_start(); +$server->handle($req); +ob_end_clean(); +echo "ok\n"; +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug42214.phpt b/ext/soap/tests/bugs/bug42214.phpt new file mode 100644 index 0000000..a31f16d --- /dev/null +++ b/ext/soap/tests/bugs/bug42214.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #42214 (SoapServer sends clients internal PHP errors) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$request = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/server.php" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + +function test() { + $a = $b; + obvious_error(); // will cause an error +} + +$server = new SoapServer(NULL, array('uri' =>'http://localhost/server.php', + 'send_errors'=>0)); +$server->addFunction('test'); +$server->handle($request); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Internal Error</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug42326.phpt b/ext/soap/tests/bugs/bug42326.phpt new file mode 100644 index 0000000..2e6c7c3 --- /dev/null +++ b/ext/soap/tests/bugs/bug42326.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #42326 (SoapServer crash) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$request = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.com/"><SOAP-ENV:Body><ns1:GetProductsRequest><time></time></ns1:GetProductsRequest></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + + +$soap_admin_classmap = array('productDetailsType' => 'SOAP_productDetailsType', + 'GetProductsRequest' => 'SOAP_GetProductsRequest', + 'GetProductsResponse' => 'SOAP_GetProductsResponse'); + +class SOAP_productDetailsType { + public $id = 0; +} + +class SOAP_GetProductsRequest { + public $time = ''; +} + +class SOAP_GetProductsResponse { + public $products; + function __construct(){ + $this->products = new SOAP_productDetailsType(); + + } +} + +class SOAP_Admin { + public function GetProducts($time){ + return new SOAP_GetProductsResponse(); + } +} + +$soap = new SoapServer(dirname(__FILE__).'/bug42326.wsdl', array('classmap' => $soap_admin_classmap)); +$soap->setClass('SOAP_Admin'); +ob_start(); +$soap->handle($request); +ob_end_clean(); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug42326.wsdl b/ext/soap/tests/bugs/bug42326.wsdl new file mode 100755 index 0000000..a125ed8 --- /dev/null +++ b/ext/soap/tests/bugs/bug42326.wsdl @@ -0,0 +1,82 @@ +<?xml version="1.0"?>
+<wsdl:definitions name="OSCAdmin.wsdl"
+targetNamespace="http://www.example.com/"
+xmlns:tns="http://www.example.com/"
+xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <wsdl:types>
+
+ <xsd:schema targetNamespace="http://www.example.com/"
+ xmlns="http://www.w3.org/2000/10/XMLSchema">
+ <xsd:element name="productDetailsType">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="id" type="xsd:integer"/>
+
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+
+
+ <xsd:schema targetNamespace="http://www.example.com/"
+ xmlns="http://www.w3.org/2000/10/XMLSchema">
+ <xsd:element name="GetProductsRequest">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="time" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+
+ <xsd:schema targetNamespace="http://www.example.com/"
+ xmlns="http://www.w3.org/2000/10/XMLSchema">
+ <xsd:element name="GetProductsResponse">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="products" type="tns:productDetailsType"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+
+
+ </wsdl:types>
+
+ <wsdl:message name="GetProductsRequest">
+ <wsdl:part name="in" element="tns:GetProductsRequest"/>
+ </wsdl:message>
+
+ <wsdl:message name="GetProductsResponse">
+ <wsdl:part name="out" element="tns:GetProductsResponse"/>
+ </wsdl:message>
+
+ <wsdl:portType name="OSCAdminPortType">
+ <wsdl:operation name="GetProducts">
+ <wsdl:input message="tns:GetProductsRequest"/>
+ <wsdl:output message="tns:GetProductsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="OSCAdminSoapBinding" type="tns:OSCAdminPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="GetProducts">
+ <soap:operation soapAction=""/>
+ <wsdl:input name="in">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="out">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="OSCAdminService">
+ <wsdl:port name="OSCAdminPort" binding="tns:OSCAdminSoapBinding">
+ <soap:address location="test://"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug42359.phpt b/ext/soap/tests/bugs/bug42359.phpt new file mode 100644 index 0000000..94738ff --- /dev/null +++ b/ext/soap/tests/bugs/bug42359.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #42326 (SoapServer crash) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$soap = new SoapClient(dirname(__FILE__)."/bug42359.wsdl"); +print_r($soap->__getTypes()); +?> +--EXPECT-- +Array +( + [0] => list listItem {anonymous1} + [1] => string anonymous1 + [2] => string enumItem + [3] => list listItem2 {enumItem} +) + diff --git a/ext/soap/tests/bugs/bug42359.wsdl b/ext/soap/tests/bugs/bug42359.wsdl new file mode 100755 index 0000000..bc73ada --- /dev/null +++ b/ext/soap/tests/bugs/bug42359.wsdl @@ -0,0 +1,58 @@ +<?xml version='1.0' encoding='UTF-8'?>
+<definitions name="listTest" targetNamespace="urn:listTest" xmlns:typens="urn:listTest" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:listTest">
+ <xsd:simpleType name="listItem">
+ <xsd:list>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="test1" />
+ <xsd:enumeration value="test2" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:list>
+ </xsd:simpleType>
+ <xsd:simpleType name="enumItem">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="test1" />
+ <xsd:enumeration value="test2" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="listItem2">
+ <xsd:list itemType="typens:enumItem"/>
+ </xsd:simpleType>
+ </xsd:schema>
+ </types>
+ <message name="testRequest">
+ <part name="item" type="typens:listItem"/>
+ </message>
+ <message name="testRequestResponse">
+ <part name="testRequestReturn" type="xsd:integer"/>
+ </message>
+ <portType name="listTestPortType">
+ <operation name="testRequest">
+ <documentation>
+ Test request
+ </documentation>
+ <input message="typens:testRequest"/>
+ <output message="typens:testRequestResponse"/>
+ </operation>
+ </portType>
+ <binding name="listTestBinding" type="typens:listTestPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="testRequest">
+ <soap:operation soapAction="urn:listTestAction"/>
+ <input>
+ <soap:body namespace="urn:listTest" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body namespace="urn:listTest" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="listTestService">
+ <port name="listTestPort" binding="typens:listTestBinding">
+ <soap:address location="http://test/service"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug42488.phpt b/ext/soap/tests/bugs/bug42488.phpt new file mode 100644 index 0000000..4069c9f --- /dev/null +++ b/ext/soap/tests/bugs/bug42488.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #42488 (SoapServer reports an encoding error and the error itself breaks) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$request = <<<EOF +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getBadUTF/></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; +$soap = new SoapServer(NULL, array('uri'=>'test://')); +function getBadUTF(){ + return "stuff\x93thing"; +} +$soap->addFunction('getBadUTF'); +$soap->handle($request); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>SOAP-ERROR: Encoding: string 'stuff\x93...' is not a valid utf-8 string</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug42692.phpt b/ext/soap/tests/bugs/bug42692.phpt new file mode 100644 index 0000000..1436f88 --- /dev/null +++ b/ext/soap/tests/bugs/bug42692.phpt @@ -0,0 +1,39 @@ +--TEST-- +Bug #42692 (Procedure 'int1' not present with doc/lit SoapServer) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set('soap.wsdl_cache_enabled','0'); + +function checkAuth($peid,$auth) { + return $peid; +} + +class TestSoap extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("checkAuth"); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoap(dirname(__FILE__) . "/bug42692.wsdl", array("trace"=>1)); +try { + $result = $client->checkAuth(1,"two"); + echo "Auth for 1 is $result\n"; +} catch (Exception $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +Auth for 1 is 1 diff --git a/ext/soap/tests/bugs/bug42692.wsdl b/ext/soap/tests/bugs/bug42692.wsdl new file mode 100755 index 0000000..c8928e3 --- /dev/null +++ b/ext/soap/tests/bugs/bug42692.wsdl @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="netDB"
+ targetNamespace="urn:netDB"
+ xmlns:typens="urn:netDB"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <message name="checkAuthIN">
+ <part name="peid" type="xsd:integer" />
+ <part name="auth" type="xsd:string" />
+ </message>
+ <message name="checkAuthOUT">
+ <part name="peidx" type="xsd:integer" />
+ </message>
+ <portType name="netDB">
+ <operation name="checkAuth">
+ <input message="typens:checkAuthIN" />
+ <output message="typens:checkAuthOUT" />
+ </operation>
+ </portType>
+ <binding name="netDB" type="typens:netDB">
+ <soap:binding type="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="checkAuth">
+ <soap:operation soapAction="urn:checkAuth" />
+ <input>
+ <soap:body use="encoded" namespace="urn:netDB" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="urn:netDB" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </output>
+ </operation>
+ </binding>
+ <service name="netDB">
+ <port name="netDBPort" binding="typens:netDB">
+ <soap:address location="http://netdb.alphawest.com.au/xml/soap/server.php"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/bugs/bug43045.phpt b/ext/soap/tests/bugs/bug43045.phpt new file mode 100644 index 0000000..a32acfe --- /dev/null +++ b/ext/soap/tests/bugs/bug43045.phpt @@ -0,0 +1,52 @@ +--TEST-- +Bug #43045i (SOAP encoding violation on "INF" for type double/float) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test($x) { + return $x; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + + echo $request; + return '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" +soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> +<soap:Body><testResponse xmlns="urn:TestSOAP"> +<s-gensym3> +<doubleInfinity xsi:type="xsd:double">INF</doubleInfinity> +</s-gensym3> +</testResponse> +</soap:Body></soap:Envelope>'; + } +} +$client = new TestSoapClient(NULL, array( + "location" => "test://", + "uri" => 'urn:TestSOAP', + "style" => SOAP_RPC, + "use" => SOAP_ENCODED + )); +var_dump($client->test(0.1)); +var_dump($client->test(NAN)); +var_dump($response = $client->test(INF)); +var_dump($response = $client->test(-INF)); +--EXPECT-- +float(0.1) +float(NAN) +float(INF) +float(-INF) diff --git a/ext/soap/tests/bugs/bug44686.phpt b/ext/soap/tests/bugs/bug44686.phpt new file mode 100644 index 0000000..cff9799 --- /dev/null +++ b/ext/soap/tests/bugs/bug44686.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #44686 (SOAP-ERROR: Parsing WSDL with references) +--SKIPIF-- +<?php require_once 'skipif.inc'; ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +new SoapClient(dirname(__FILE__) . "/bug44686.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok + diff --git a/ext/soap/tests/bugs/bug44686.wsdl b/ext/soap/tests/bugs/bug44686.wsdl new file mode 100644 index 0000000..87b4640 --- /dev/null +++ b/ext/soap/tests/bugs/bug44686.wsdl @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="utf-8"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.gomeznetworks.com/webservices/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.gomeznetworks.com/webservices/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + <wsdl:types> + <s:schema elementFormDefault="qualified" targetNamespace="http://www.gomeznetworks.com/webservices/"> + <s:element name="ProvisionMonitors"> + <s:complexType> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" /> + <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> + <s:element minOccurs="0" maxOccurs="1" ref="ProvisioningOrder" /> + </s:sequence> + </s:complexType> + </s:element> + <s:element name="ProvisionMonitorsResponse"> + <s:complexType> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" ref="ProvisioningOrderResponse" /> + </s:sequence> + </s:complexType> + </s:element> + </s:schema> + <s:schema elementFormDefault="qualified"> + <s:element name="ProvisioningOrder" type="ProvisioningOrder" /> + <s:complexType name="ProvisioningOrder"> + <s:complexContent mixed="false"> + <s:extension base="CServiceObject"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="MonitorOrders" type="ArrayOfMonitorOrder" /> + <s:element minOccurs="0" maxOccurs="1" name="MonitorSites" type="ArrayOfMonitorSiteOrder" /> + <s:element minOccurs="0" maxOccurs="1" name="ReportOrders" type="ArrayOfReportOrder" /> + <s:element minOccurs="0" maxOccurs="1" name="MonitorAttributes" type="ArrayOfMonitorAttribute" /> + </s:sequence> + <s:attribute name="name" type="s:string" /> + <s:attribute name="expirationDate" type="s:dateTime" use="required" /> + <s:attribute name="autoDelete" type="s:boolean" use="required" /> + </s:extension> + </s:complexContent> + </s:complexType> + <s:complexType name="CServiceObject" abstract="true" /> + <s:complexType name="ArrayOfMonitorOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="MonitorOrder" nillable="true" type="MonitorOrder" /> + </s:sequence> + </s:complexType> + <s:complexType name="MonitorOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="MonitorSites" type="ArrayOfMonitorSiteOrder" /> + <s:element minOccurs="0" maxOccurs="1" name="MonitorAttributes" type="ArrayOfMonitorAttribute" /> + </s:sequence> + <s:attribute name="name" type="s:string" /> + <s:attribute name="url" type="s:string" /> + <s:attribute name="frequencyInMins" type="s:int" use="required" /> + <s:attribute name="targetClass" type="MonitorTargetClass" use="required" /> + <s:attribute name="fileSizeOverrideInKB" type="s:int" use="required" /> + </s:complexType> + <s:complexType name="ArrayOfMonitorSiteOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="MonitorSite" nillable="true" type="MonitorSiteOrder" /> + </s:sequence> + </s:complexType> + <s:complexType name="MonitorSiteOrder"> + <s:attribute name="siteId" type="s:int" use="required" /> + </s:complexType> + <s:complexType name="ArrayOfMonitorAttribute"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="MonitorAttribute" nillable="true" type="MonitorAttribute" /> + </s:sequence> + </s:complexType> + <s:complexType name="MonitorAttribute"> + <s:attribute name="name" type="s:string" /> + <s:attribute name="value" type="s:string" /> + </s:complexType> + <s:simpleType name="MonitorTargetClass"> + <s:restriction base="s:string"> + <s:enumeration value="eTransaction" /> + <s:enumeration value="eSingleURL" /> + </s:restriction> + </s:simpleType> + <s:complexType name="ArrayOfReportOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="ReportOrder" nillable="true" type="ReportOrder" /> + </s:sequence> + </s:complexType> + <s:complexType name="ReportOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="EmailTargets" type="ArrayOfEmailTarget" /> + </s:sequence> + <s:attribute name="name" type="s:string" /> + <s:attribute name="reportFormatType" type="ReportFormatType" use="required" /> + <s:attribute name="reportDeliveryType" type="ReportDeliveryType" use="required" /> + <s:attribute name="reportDelayInMins" type="s:int" use="required" /> + </s:complexType> + <s:complexType name="ArrayOfEmailTarget"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="EmailTarget" nillable="true" type="EmailTarget" /> + </s:sequence> + </s:complexType> + <s:complexType name="EmailTarget"> + <s:attribute name="address" type="s:string" /> + </s:complexType> + <s:simpleType name="ReportFormatType"> + <s:restriction base="s:string"> + <s:enumeration value="eBarChartTestByNode" /> + </s:restriction> + </s:simpleType> + <s:simpleType name="ReportDeliveryType"> + <s:restriction base="s:string"> + <s:enumeration value="eHTML" /> + </s:restriction> + </s:simpleType> + <s:element name="ProvisioningOrderResponse" type="ProvisioningOrderResponse" /> + <s:complexType name="ProvisioningOrderResponse"> + <s:complexContent mixed="false"> + <s:extension base="CommonServiceResponse"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="MonitorOrderResponses" type="ArrayOfMonitorOrderResponse" /> + <s:element minOccurs="0" maxOccurs="1" name="ReportOrderResponses" type="ArrayOfReportOrderResponse" /> + </s:sequence> + <s:attribute name="name" type="s:string" /> + <s:attribute name="groupId" type="s:int" use="required" /> + </s:extension> + </s:complexContent> + </s:complexType> + <s:complexType name="CommonServiceResponse"> + <s:sequence> + <s:element minOccurs="1" maxOccurs="1" name="status" type="StatusType" /> + <s:element minOccurs="0" maxOccurs="1" name="errorMessage" type="s:string" /> + </s:sequence> + </s:complexType> + <s:simpleType name="StatusType"> + <s:restriction base="s:string"> + <s:enumeration value="SUCCESS" /> + <s:enumeration value="FAILED" /> + </s:restriction> + </s:simpleType> + <s:complexType name="ReportOrderResponse"> + <s:complexContent mixed="false"> + <s:extension base="CommonServiceResponse"> + <s:attribute name="name" type="s:string" /> + </s:extension> + </s:complexContent> + </s:complexType> + <s:complexType name="MonitorOrderResponse"> + <s:complexContent mixed="false"> + <s:extension base="CommonServiceResponse"> + <s:attribute name="monitorId" type="s:int" use="required" /> + <s:attribute name="name" type="s:string" /> + <s:attribute name="url" type="s:string" /> + </s:extension> + </s:complexContent> + </s:complexType> + <s:complexType name="ArrayOfMonitorOrderResponse"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="MonitorOrderResponse" nillable="true" type="MonitorOrderResponse" /> + </s:sequence> + </s:complexType> + <s:complexType name="ArrayOfReportOrderResponse"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="ReportOrderResponse" nillable="true" type="ReportOrderResponse" /> + </s:sequence> + </s:complexType> + </s:schema> + </wsdl:types> + <wsdl:message name="ProvisionMonitorsSoapIn"> + <wsdl:part name="parameters" element="tns:ProvisionMonitors" /> + </wsdl:message> + <wsdl:message name="ProvisionMonitorsSoapOut"> + <wsdl:part name="parameters" element="tns:ProvisionMonitorsResponse" /> + </wsdl:message> + <wsdl:portType name="ProvisioningServiceSoap"> + <wsdl:operation name="ProvisionMonitors"> + <wsdl:input message="tns:ProvisionMonitorsSoapIn" /> + <wsdl:output message="tns:ProvisionMonitorsSoapOut" /> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="ProvisioningServiceSoap" type="tns:ProvisioningServiceSoap"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="ProvisionMonitors"> + <soap:operation soapAction="http://www.gomeznetworks.com/webservices/ProvisionMonitors" style="document" /> + <wsdl:input> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="ProvisioningService"> + <wsdl:port name="ProvisioningServiceSoap" binding="tns:ProvisioningServiceSoap"> + <soap:address location="test://" /> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug44811.phpt b/ext/soap/tests/bugs/bug44811.phpt new file mode 100644 index 0000000..8cfc4a7 --- /dev/null +++ b/ext/soap/tests/bugs/bug44811.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #44811 (Improve error messages when creating new SoapClient which contains invalid data) +--SKIPIF-- +<?php require_once 'skipif.inc'; ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +try { + $x = new SoapClient('http://slashdot.org'); +} catch (SoapFault $e) { + echo $e->getMessage() . PHP_EOL; +} +die('ok'); +?> +--EXPECTF-- +SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://slashdot.org' : %s + +ok diff --git a/ext/soap/tests/bugs/bug44882.phpt b/ext/soap/tests/bugs/bug44882.phpt new file mode 100644 index 0000000..366ddde --- /dev/null +++ b/ext/soap/tests/bugs/bug44882.phpt @@ -0,0 +1,64 @@ +--TEST-- +Bug #44882 (SOAP extension object decoding bug) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestSoapClient extends SoapClient +{ + public function __doRequest($req, $loc, $act, $ver, $one_way = 0) + { + return <<<XML +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ns="urn:ebay:api:PayPalAPI"> + <SOAP-ENV:Body id="_0"> + <GetExpressCheckoutDetailsResponse xmlns="urn:ebay:api:PayPalAPI"> + <Timestamp>2008-06-23T14:51:08Z</Timestamp> + <Ack>Success</Ack> + <CorrelationID>ae013a0ccdf13</CorrelationID> + <Version>50.000000</Version> + <Build>588340</Build> + <GetExpressCheckoutDetailsResponseDetails xsi:type="ns:GetExpressCheckoutDetailsResponseDetailsType"> + <Token>EC-11Y75137T2399952C</Token> + <PayerInfo> + <Payer>example@example.com</Payer> + <PayerID>MU82WA43YXM9C</PayerID> + <PayerStatus>verified</PayerStatus> + </PayerInfo> + </GetExpressCheckoutDetailsResponseDetails> + </GetExpressCheckoutDetailsResponse> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +XML; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug44882.wsdl'); +print_r($client->GetExpressCheckoutDetails()); +?> +--EXPECT-- +stdClass Object +( + [Timestamp] => 2008-06-23T14:51:08Z + [Ack] => Success + [CorrelationID] => ae013a0ccdf13 + [Version] => 50.000000 + [Build] => 588340 + [GetExpressCheckoutDetailsResponseDetails] => stdClass Object + ( + [Token] => EC-11Y75137T2399952C + [PayerInfo] => stdClass Object + ( + [Payer] => example@example.com + [PayerID] => MU82WA43YXM9C + [PayerStatus] => verified + ) + + ) + +) diff --git a/ext/soap/tests/bugs/bug44882.wsdl b/ext/soap/tests/bugs/bug44882.wsdl new file mode 100644 index 0000000..266f6a0 --- /dev/null +++ b/ext/soap/tests/bugs/bug44882.wsdl @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:ns="urn:ebay:api:PayPalAPI" + xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" + targetNamespace="urn:ebay:api:PayPalAPI"> + <wsdl:types> + <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:ebay:api:PayPalAPI" elementFormDefault="qualified" attributeFormDefault="unqualified"> + <complexType name="PayerInfoType"> + <sequence> + <element name="Payer" type="xs:string" minOccurs="0"/> + <element name="PayerID" type="xs:string" minOccurs="0"/> + <element name="PayerStatus" type="xs:string" minOccurs="0"/> + </sequence> + </complexType> + <complexType name="AbstractResponseType" abstract="true"> + <sequence> + <element name="Timestamp" type="xs:dateTime" minOccurs="0"/> + <element name="Ack" type="xs:string"/> + <element name="CorrelationID" type="xs:string" minOccurs="0"/> + <element name="Version" type="xs:string"/> + <element name="Build" type="xs:string"/> + <any processContents="lax" minOccurs="0"/> + </sequence> + </complexType> + <xs:element name="GetExpressCheckoutDetailsResponseDetails" type="ns:GetExpressCheckoutDetailsResponseDetailsType"/> + <xs:complexType name="GetExpressCheckoutDetailsResponseDetailsType"> + <xs:sequence> + <xs:element name="Token" type="xs:string"/> + <xs:element name="PayerInfo" type="ns:PayerInfoType"/> + </xs:sequence> + </xs:complexType> + <xs:element name="GetExpressCheckoutDetailsResponse" type="ns:GetExpressCheckoutDetailsResponseType"/> + <xs:complexType name="GetExpressCheckoutDetailsResponseType"> + <xs:complexContent> + <xs:extension base="ns:AbstractResponseType"> + <xs:sequence> + <xs:element ref="ns:GetExpressCheckoutDetailsResponseDetails" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </schema> + </wsdl:types> + <wsdl:message name="GetExpressCheckoutDetailsRequest"> + </wsdl:message> + <wsdl:message name="GetExpressCheckoutDetailsResponse"> + <wsdl:part name="GetExpressCheckoutDetailsResponse" element="ns:GetExpressCheckoutDetailsResponse"/> + </wsdl:message> + <wsdl:portType name="PayPalAPIAAInterface"> + <wsdl:operation name="GetExpressCheckoutDetails"> + <wsdl:input message="ns:GetExpressCheckoutDetailsRequest"/> + <wsdl:output message="ns:GetExpressCheckoutDetailsResponse"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="PayPalAPIAASoapBinding" type="ns:PayPalAPIAAInterface"> + <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="GetExpressCheckoutDetails"> + <wsdlsoap:operation/> + <wsdl:input> + <wsdlsoap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <wsdlsoap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="PayPalAPIInterfaceService"> + <wsdl:port name="PayPalAPIAA" binding="ns:PayPalAPIAASoapBinding"> + <wsdlsoap:address location="test://"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug46419.phpt b/ext/soap/tests/bugs/bug46419.phpt new file mode 100644 index 0000000..cb113e2 --- /dev/null +++ b/ext/soap/tests/bugs/bug46419.phpt @@ -0,0 +1,43 @@ +--TEST-- +Bug #46419 (Elements of associative arrays with NULL value are lost) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function bar() { + return array('a' => 1, 'b' => NULL, 'c' => 2, 'd'=>''); +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('bar'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$x = new LocalSoapClient(NULL,array('location'=>'test://', + 'uri'=>'http://testuri.org')); +var_dump($x->bar()); +?> +--EXPECT-- +array(4) { + ["a"]=> + int(1) + ["b"]=> + NULL + ["c"]=> + int(2) + ["d"]=> + string(0) "" +} diff --git a/ext/soap/tests/bugs/bug46427.phpt b/ext/soap/tests/bugs/bug46427.phpt new file mode 100644 index 0000000..a49071e --- /dev/null +++ b/ext/soap/tests/bugs/bug46427.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #46427 (SoapClient() stumbles over its "stream_context" parameter) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +error_reporting(E_ALL|E_STRICT); + +function getSoapClient_1() { + $ctx = stream_context_create(); + return new SoapClient(NULL, array( + 'stream_context' => $ctx, + 'location' => 'test://', + 'uri' => 'test://', + 'exceptions' => false)); +} + +getSoapClient_1()->__soapCall('Help', array()); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug47049.phpt b/ext/soap/tests/bugs/bug47049.phpt new file mode 100644 index 0000000..bdc1627 --- /dev/null +++ b/ext/soap/tests/bugs/bug47049.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #47049 (SoapClient::__soapCall causes a segmentation fault) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__) . '/bug47049.wsdl', + array('trace' => 1 , 'exceptions' => 0)); +$host = array('uuid' => 'foo'); +$software_list = array(array('name' => 'package', 'version' => '1.2.3', 'state' => 'installed')); +$updates = array(); +$report_id = $client->__soapCall('reportSoftwareStatus',array($host, $software_list, $updates)); +echo $client->__getLastRequest(); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/reporter/" 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:reportSoftwareStatus><host xsi:type="ns1:host"><uuid xsi:type="xsd:string">foo</uuid></host><software_list xsi:type="ns1:software_list"><software xsi:type="ns1:software"><name xsi:type="xsd:string">package</name><version xsi:type="xsd:string">1.2.3</version><state xsi:type="xsd:string">installed</state></software></software_list><updates xsi:type="ns1:updates"/></ns1:reportSoftwareStatus></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug47049.wsdl b/ext/soap/tests/bugs/bug47049.wsdl new file mode 100644 index 0000000..b5730a3 --- /dev/null +++ b/ext/soap/tests/bugs/bug47049.wsdl @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.example.org/reporter/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="reporter" targetNamespace="http://www.example.org/reporter/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> + <wsdl:types><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/reporter/"> + <xsd:complexType name="host"> + <xsd:sequence> + <xsd:element name="uuid" type="xsd:string"></xsd:element> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="software_list"> + <xsd:sequence> + <xsd:element name="software" type="tns:software" + maxOccurs="unbounded" minOccurs="1"> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="software"> + <xsd:sequence> + <xsd:element name="name" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element> + <xsd:element name="version" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element> + <xsd:element name="state" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="updates"> + <xsd:sequence> + <xsd:element name="update" type="tns:update" + maxOccurs="unbounded" minOccurs="0"> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="update"> + <xsd:sequence> + <xsd:element name="software" type="xsd:string"></xsd:element> + <xsd:element name="old_version" type="xsd:string"></xsd:element> + <xsd:element name="new_version" type="xsd:string"></xsd:element> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema></wsdl:types> + <wsdl:message name="reportSoftwareStatusRequest"> + <wsdl:part name="host" type="tns:host"/> + <wsdl:part name="software_list" type="tns:software_list"></wsdl:part> + <wsdl:part name="updates" type="tns:updates"></wsdl:part> + </wsdl:message> + <wsdl:message name="reportSoftwareStatusResponse"> + <wsdl:part name="report_id" type="xsd:int"/> + </wsdl:message> + <wsdl:portType name="reporter"> + <wsdl:operation name="reportSoftwareStatus"> + <wsdl:input message="tns:reportSoftwareStatusRequest"/> + <wsdl:output message="tns:reportSoftwareStatusResponse"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="reporterHTTP" type="tns:reporter"> + + <soap:binding style="document" + transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="reportSoftwareStatus"> + + <soap:operation + soapAction="http://www.example.org/reporter/reportSoftwareStatus" /> + <wsdl:input> + + + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output> + + + <soap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="reporter"> + <wsdl:port binding="tns:reporterHTTP" name="reporterHTTP"> + <http:address location="test://"/> + </wsdl:port> + </wsdl:service> + +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug47273.phpt b/ext/soap/tests/bugs/bug47273.phpt new file mode 100644 index 0000000..174948f --- /dev/null +++ b/ext/soap/tests/bugs/bug47273.phpt @@ -0,0 +1,53 @@ +--TEST-- +Bug #47273 (Encoding bug in SoapServer->fault) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +unicode.script_encoding=ISO-8859-1 +unicode.output_encoding=ISO-8859-1 +--FILE-- +<?php +$request1 = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://127.0.0.1:8080/test/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test1/></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; +$request2 = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://127.0.0.1:8080/test/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test2/></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + +class SoapFaultTest +{ + public function test1() { + // Test #1 + return 'Test #1 exception with some special chars: Äßö'; + } + public function test2() { + // Test #2 + //throw new SoapFault('Server', 'Test #2 exception with some special chars: Äßö'); + throw new Exception('Test #2 exception with some special chars: Äßö'); + } +} + +$server = new SoapServer(null, array( +'uri' => "http://127.0.0.1:8080/test/", +'encoding' => 'ISO-8859-1')); +$server->setClass('SoapFaultTest'); + +try { + $server->handle($request1); +} catch (Exception $e) { + $server->fault("Sender", $e->getMessage()); +} +try { + $server->handle($request2); +} catch (Exception $e) { + $server->fault("Sender", $e->getMessage()); +} +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://127.0.0.1:8080/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:test1Response><return xsi:type="xsd:string">Test #1 exception with some special chars: Äßö</return></ns1:test1Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>Sender</faultcode><faultstring>Test #2 exception with some special chars: Äßö</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> + diff --git a/ext/soap/tests/bugs/bug50698_1.phpt b/ext/soap/tests/bugs/bug50698_1.phpt new file mode 100644 index 0000000..eb5f1e0 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_1.phpt @@ -0,0 +1,13 @@ +--TEST-- +Request #50698_1 (SoapClient should handle wsdls with some incompatiable endpoints) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +new SoapClient(dirname(__FILE__) . '/bug50698_1.wsdl'); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_1.wsdl b/ext/soap/tests/bugs/bug50698_1.wsdl new file mode 100644 index 0000000..9c6a9ad --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_1.wsdl @@ -0,0 +1,228 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="BasicHttpBinding_EchoService" type="tns:EchoService"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="Echo"> + <soap:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService"> + <wsdl:port name="BasicHttpBinding_EchoService" binding="tns:BasicHttpBinding_EchoService"> + <soap:address location="http://localhost:8731/EchoService/Basic"/> + </wsdl:port> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50698_2.phpt b/ext/soap/tests/bugs/bug50698_2.phpt new file mode 100644 index 0000000..a39f4b5 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Request #50698_2 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large mix of compatiable and incompatiable endpoints.) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +try { + new SoapClient(dirname(__FILE__) . '/bug50698_2.wsdl'); + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_2.wsdl');\" should throw an exception of type 'SoapFault'"; +} catch (SoapFault $e) { + if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') { + echo "ok\n"; + } else { + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_2.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; + print_r($e); + } +} +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_2.wsdl b/ext/soap/tests/bugs/bug50698_2.wsdl new file mode 100644 index 0000000..e4dab6c --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_2.wsdl @@ -0,0 +1,422 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService-NetTcp-1"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-1"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-2"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-2"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-3"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-3"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-4"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-4"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-5"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-5"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-6"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-6"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-7"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-7"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-8"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-8"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-9"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-9"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-10"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-10"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50698_3.phpt b/ext/soap/tests/bugs/bug50698_3.phpt new file mode 100644 index 0000000..6cee6a6 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_3.phpt @@ -0,0 +1,22 @@ +--TEST-- +Request #50698_3 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large set of endpoints all incompatiable.) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +try { + new SoapClient(dirname(__FILE__) . '/bug50698_3.wsdl'); + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" should throw an exception of type 'SoapFault'"; +} catch (SoapFault $e) { + if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') { + echo "ok\n"; + } else { + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; + print_r($e); + } +} +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_3.wsdl b/ext/soap/tests/bugs/bug50698_3.wsdl new file mode 100644 index 0000000..bed21df --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_3.wsdl @@ -0,0 +1,312 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService-1"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-2"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-3"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-4"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-5"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-6"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-7"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-8"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-9"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-10"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50698_4.phpt b/ext/soap/tests/bugs/bug50698_4.phpt new file mode 100644 index 0000000..bb02d00 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_4.phpt @@ -0,0 +1,13 @@ +--TEST-- +Request #50698_4 (SoapClient should handle wsdls with some incompatiable endpoints) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +new SoapClient(dirname(__FILE__) . '/bug50698_4.wsdl'); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_4.wsdl b/ext/soap/tests/bugs/bug50698_4.wsdl new file mode 100644 index 0000000..dc9c329 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_4.wsdl @@ -0,0 +1,228 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="BasicHttpBinding_EchoService" type="tns:EchoService"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="Echo"> + <soap:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + <wsdl:port name="BasicHttpBinding_EchoService" binding="tns:BasicHttpBinding_EchoService"> + <soap:address location="http://localhost:8731/EchoService/Basic"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50762.phpt b/ext/soap/tests/bugs/bug50762.phpt new file mode 100644 index 0000000..77eb6ee --- /dev/null +++ b/ext/soap/tests/bugs/bug50762.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug #50762 (in WSDL mode Soap Header handler function only being called if defined in WSDL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class testSoap { + private $auth; + public function authToken($token){ + $this->auth=true; + } + public function testHeader($param){ + return 'header handler ' . ($this->auth ? 'called' : 'not called'); + } +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->setObject(new testSoap()); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$cl = new LocalSoapClient(dirname(__FILE__).'/bug50762.wsdl', array('cache_wsdl'=>WSDL_CACHE_NONE, 'trace'=>true)); + +class authToken{ + public function __construct($token){ + $this->authToken=$token; + } +} + +$cl->__setSoapHeaders(array(new SoapHeader('http://sova.pronto.ru/', 'authToken', new authToken('tokendata')))); +echo $cl->testHeader('param') . PHP_EOL; +?> +--EXPECT-- +header handler called diff --git a/ext/soap/tests/bugs/bug50762.wsdl b/ext/soap/tests/bugs/bug50762.wsdl new file mode 100644 index 0000000..2980589 --- /dev/null +++ b/ext/soap/tests/bugs/bug50762.wsdl @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://sova.pronto.ru/" xmlns:xsd1="http://sova.pronto.ru/schema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="sova" targetNamespace="http://sova.pronto.ru/"> + <wsdl:message name="authToken"> + <wsdl:part name="authToken" type="xsd:string"/> + </wsdl:message> + <wsdl:message name="message"> + <wsdl:part name="param" type="xsd:string"/> + </wsdl:message> + + <wsdl:portType name="sova"> + <wsdl:operation name="testHeader"> + <wsdl:input message="tns:message"/> + <wsdl:output message="tns:message"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="sovaSOAP" type="tns:sova"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + + <wsdl:operation name="testHeader"> + <soap:operation soapAction="http://sova.pronto.ru/testHeader"/> + <wsdl:input> + <soap:body namespace="http://sova.pronto.ru/" use="literal"/> + <soap:header use="literal" part="authToken" message="tns:authToken" wsdl:required="true"/> + </wsdl:input> + <wsdl:output> + <soap:body namespace="http://sova.pronto.ru/" use="literal"/> + </wsdl:output> + </wsdl:operation> + + </wsdl:binding> + <wsdl:service name="sova"> + <wsdl:port binding="tns:sovaSOAP" name="sovaSOAP"> + <soap:address location="http://sova.mephius.prontosoft.by/sova/soaptest.php"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50997.phpt b/ext/soap/tests/bugs/bug50997.phpt new file mode 100644 index 0000000..0508aac --- /dev/null +++ b/ext/soap/tests/bugs/bug50997.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #50997 (SOAP Error when trying to submit 2nd Element of a choice) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$soapClient = new SoapClient(__DIR__ . '/bug50997.wsdl', array('trace' => 1, 'exceptions'=>0)); +$params = array('code'=>'foo'); +$soapClient->newOperation($params); +echo $soapClient->__getLastRequest(); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/service2/"><SOAP-ENV:Body><ns1:NewOperation><code>foo</code></ns1:NewOperation></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/bug50997.wsdl b/ext/soap/tests/bugs/bug50997.wsdl new file mode 100644 index 0000000..16c6d36 --- /dev/null +++ b/ext/soap/tests/bugs/bug50997.wsdl @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/service2/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="service2" targetNamespace="http://www.example.org/service2/"> + <wsdl:types> + <xsd:schema targetNamespace="http://www.example.org/service2/"> + <xsd:element name="NewOperation"> + <xsd:complexType> + <xsd:choice> + <xsd:sequence> + <xsd:element name="firstName" type="xsd:string"> </xsd:element> + <xsd:element name="surName" type="xsd:string"/> + </xsd:sequence> + <xsd:element name="code" type="xsd:string"/> + </xsd:choice> + </xsd:complexType> + </xsd:element> + <xsd:element name="NewOperationResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="out" type="xsd:string"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:schema> + </wsdl:types> + <wsdl:message name="NewOperationRequest"> + <wsdl:part element="tns:NewOperation" name="parameters"/> + </wsdl:message> + <wsdl:message name="NewOperationResponse"> + <wsdl:part element="tns:NewOperationResponse" name="parameters"/> + </wsdl:message> + <wsdl:portType name="service2"> + <wsdl:operation name="NewOperation"> + <wsdl:input message="tns:NewOperationRequest"/> + <wsdl:output message="tns:NewOperationResponse"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="service2SOAP" type="tns:service2"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="NewOperation"> + <soap:operation soapAction="http://www.example.org/service2/NewOperation"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="service2"> + <wsdl:port binding="tns:service2SOAP" name="service2SOAP"> + <soap:address location="test://"/> + </wsdl:port> + </wsdl:service> + </wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug54911.phpt b/ext/soap/tests/bugs/bug54911.phpt new file mode 100644 index 0000000..da57383 --- /dev/null +++ b/ext/soap/tests/bugs/bug54911.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #54911 (Access to a undefined member in inherit SoapClient may cause Segmentation Fault) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + class XSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version, $one_way=false) { + echo self::$crash; + } + } + $client = new XSoapClient(null, array('uri'=>'', 'location'=>'')); + $client->__soapCall('', array()); +?> +--EXPECTF-- +Fatal error: Uncaught SoapFault exception: [Client] Access to undeclared static property: XSoapClient::$crash in %sbug54911.php:4 +Stack trace: +#0 %sbug54911.php(4): XSoapClient::__doRequest() +#1 [internal function]: XSoapClient->__doRequest('<?xml version="...', '', '#', 1, 0) +#2 %sbug54911.php(8): SoapClient->__soapCall('', Array) +#3 {main} + thrown in %sbug54911.php on line 4
\ No newline at end of file diff --git a/ext/soap/tests/bugs/bug55323.phpt b/ext/soap/tests/bugs/bug55323.phpt new file mode 100644 index 0000000..7855dd8 --- /dev/null +++ b/ext/soap/tests/bugs/bug55323.phpt @@ -0,0 +1,45 @@ +--TEST-- +Bug #55323 (SoapClient segmentation fault when XSD_TYPEKIND_EXTENSION contains itself) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$timestamp = "2011-07-30T03:25:00-05:00"; +$wsdl = dirname(__FILE__)."/bug55323.wsdl"; + +class TestSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + return <<<EOF +<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test.com/soap/v3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> + <SOAP-ENV:Body> + <ns1:getObjectResponse> + <getObjectReturn xsi:type="ns1:Customer" id="ref1"> + <accountId xsi:type="xsd:int">1234</accountId> + <parent href="#ref1"/> + </getObjectReturn> + </ns1:getObjectResponse> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + } + +} + +$soapClient = new TestSoapClient($wsdl, + array('trace' => 1, 'exceptions' => 0)); +$result = $soapClient->getObject(); +var_dump($result); +?> +--EXPECTF-- +object(stdClass)#%d (2) { + ["accountId"]=> + int(1234) + ["parent"]=> + *RECURSION* +} diff --git a/ext/soap/tests/bugs/bug55323.wsdl b/ext/soap/tests/bugs/bug55323.wsdl new file mode 100644 index 0000000..c260d34 --- /dev/null +++ b/ext/soap/tests/bugs/bug55323.wsdl @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://test.com/soap/v3/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="slApi" targetNamespace="http://test.com/soap/v3/"> + <types> + <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://test.com/soap/v3/" + xmlns:tns="http://test.com/soap/v3/" + xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + elementFormDefault="qualified"> + <complexType name="Customer"> + <complexContent> + <extension base="tns:Interface"> + <sequence> + <element minOccurs="0" maxOccurs="1" nillable="true" name="accountId" type="int"/> + <element minOccurs="0" maxOccurs="1" name="parent" type="tns:Customer"/> + </sequence> + </extension> + </complexContent> + </complexType> + <complexType name="Interface" abstract="true"/> + </xsd:schema> + </types> + <message name="getObject"/> + <message name="getObjectResponse"> + <part name="getObjectReturn" type="tns:Customer"/> + </message> + <portType name="CustomerPortType"> + <operation name="getObject"> + <input message="tns:getObject"/> + <output message="tns:getObjectResponse"/> + </operation> + </portType> + <binding name="CustomerBinding" type="tns:CustomerPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="getObject"> + <soap:operation soapAction="http://test.com/soap/v3/CustomerAction"/> + <input> + <soap:body namespace="http://test.com/soap/v3/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body namespace="http://test.com/soap/v3/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + <service name="CustomerService"> + <port name="CustomerPort" binding="tns:CustomerBinding"> + <soap:address location="test://"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/bugs/multiport.phpt b/ext/soap/tests/bugs/multiport.phpt new file mode 100644 index 0000000..0b5e944 --- /dev/null +++ b/ext/soap/tests/bugs/multiport.phpt @@ -0,0 +1,16 @@ +--TEST-- +Proper binding selection +--SKIPIF-- +<?php require_once 'skipif.inc'; ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__).'/multiport.wsdl', + array('trace' => true, 'exceptions' => false)); +$response = $client->GetSessionId(array('userId'=>'user', 'password'=>'password')); +echo $client->__getLastRequest(); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.reuters.com/"><SOAP-ENV:Body><ns1:GetSessionId><ns1:userId>user</ns1:userId><ns1:password>password</ns1:password></ns1:GetSessionId></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/bugs/multiport.wsdl b/ext/soap/tests/bugs/multiport.wsdl new file mode 100644 index 0000000..604e963 --- /dev/null +++ b/ext/soap/tests/bugs/multiport.wsdl @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions targetNamespace="http://www.reuters.com/" xmlns:tns="http://www.reuters.com/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:s="http://www.w3.org/2001/XMLSchema"> + <wsdl:types> + <s:schema elementFormDefault="qualified" targetNamespace="http://www.reuters.com/"> + <s:element name="GetSessionId"> + <s:complexType> + <s:sequence> + <s:element maxOccurs="1" minOccurs="0" name="userId" type="s:string"/> + <s:element maxOccurs="1" minOccurs="0" name="password" type="s:string"/> + </s:sequence> + </s:complexType> + </s:element> + <s:element name="GetSessionIdResponse"> + <s:complexType> + <s:sequence> + <s:element maxOccurs="1" minOccurs="0" name="GetSessionIdResult" type="s:string"/> + </s:sequence> + </s:complexType> + </s:element> + </s:schema> + </wsdl:types> + <wsdl:message name="GetSessionIdHttpGetIn"> + <wsdl:part name="userId" type="s:string"> + </wsdl:part> + <wsdl:part name="password" type="s:string"> + </wsdl:part> + </wsdl:message> + <wsdl:message name="GetSessionIdHttpGetOut"> + <wsdl:part name="Body" element="tns:string"> + </wsdl:part> + </wsdl:message> + <wsdl:message name="GetSessionIdSoapOut"> + <wsdl:part name="parameters" element="tns:GetSessionIdResponse"> + </wsdl:part> + </wsdl:message> + <wsdl:message name="GetSessionIdSoapIn"> + <wsdl:part name="parameters" element="tns:GetSessionId"> + </wsdl:part> + </wsdl:message> + <wsdl:portType name="StocksDataSecureHttpGet"> + <wsdl:operation name="GetSessionId"> + <wsdl:input message="tns:GetSessionIdHttpGetIn"> + </wsdl:input> + <wsdl:output message="tns:GetSessionIdHttpGetOut"> + </wsdl:output> + </wsdl:operation> + </wsdl:portType> + <wsdl:portType name="StocksDataSecureSoap"> + <wsdl:operation name="GetSessionId"> + <wsdl:input message="tns:GetSessionIdSoapIn"> + </wsdl:input> + <wsdl:output message="tns:GetSessionIdSoapOut"> + </wsdl:output> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="StocksDataSecureHttpGet" type="tns:StocksDataSecureHttpGet"> + <http:binding verb="GET"/> + <wsdl:operation name="GetSessionId"> + <http:operation location="/GetSessionId"/> + <wsdl:input> + <http:urlEncoded/> + </wsdl:input> + <wsdl:output> + <mime:mimeXml part="Body"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="StocksDataSecureSoap" type="tns:StocksDataSecureSoap"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="GetSessionId"> + <soap:operation soapAction="http://www.reuters.com/GetSessionId" style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="StocksDataSecure"> + <wsdl:port name="StocksDataSecureHttpGet" binding="tns:StocksDataSecureHttpGet"> + <http:address location="test://"/> + </wsdl:port> + <wsdl:port name="StocksDataSecureSoap" binding="tns:StocksDataSecureSoap"> + <soap:address location="test://"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/skipif.inc b/ext/soap/tests/bugs/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/bugs/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/bugs/xml.xsd b/ext/soap/tests/bugs/xml.xsd new file mode 100644 index 0000000..abb844a --- /dev/null +++ b/ext/soap/tests/bugs/xml.xsd @@ -0,0 +1,34 @@ +<?xml version='1.0'?> +<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" > +<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en"> + + <xs:attribute name="lang" type="xs:language"> + <xs:annotation> + <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter + codes as the enumerated possible values . . .</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="space" default="preserve"> + <xs:simpleType> + <xs:restriction base="xs:NCName"> + <xs:enumeration value="default"/> + <xs:enumeration value="preserve"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="base" type="xs:anyURI"> + <xs:annotation> + <xs:documentation>See http://www.w3.org/TR/xmlbase/ for + information about this attribute.</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attributeGroup name="specialAttrs"> + <xs:attribute ref="xml:base"/> + <xs:attribute ref="xml:lang"/> + <xs:attribute ref="xml:space"/> + </xs:attributeGroup> + +</xs:schema> diff --git a/ext/soap/tests/bugs/xml2.xsd b/ext/soap/tests/bugs/xml2.xsd new file mode 100755 index 0000000..a8e2185 --- /dev/null +++ b/ext/soap/tests/bugs/xml2.xsd @@ -0,0 +1,146 @@ +<?xml version='1.0'?> +<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en"> + + <xs:annotation> + <xs:documentation> + See http://www.w3.org/XML/1998/namespace.html and + http://www.w3.org/TR/REC-xml for information about this namespace. + + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + + Note that local names in this namespace are intended to be defined + only by the World Wide Web Consortium or its subgroups. The + following names are currently defined in this namespace and should + not be used with conflicting semantics by any Working Group, + specification, or document instance: + + base (as an attribute name): denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification. + + id (as an attribute name): denotes an attribute whose value + should be interpreted as if declared to be of type ID. + The xml:id specification is not yet a W3C Recommendation, + but this attribute is included here to facilitate experimentation + with the mechanisms it proposes. Note that it is _not_ included + in the specialAttrs attribute group. + + lang (as an attribute name): denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification. + + space (as an attribute name): denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification. + + Father (in any context at all): denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + + In appreciation for his vision, leadership and dedication + the W3C XML Plenary on this 10th day of February, 2000 + reserves for Jon Bosak in perpetuity the XML name + xml:Father + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation>This schema defines attributes and an attribute group + suitable for use by + schemas wishing to allow xml:base, xml:lang or xml:space attributes + on elements they define. + + To enable this, such a schema must import this schema + for the XML namespace, e.g. as follows: + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/03/xml.xsd"/> + + Subsequently, qualified reference to any of the attributes + or the group defined below will have the desired effect, e.g. + + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + + will define a type which will schema-validate an instance + element with any of those attributes</xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation>In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + http://www.w3.org/2005/08/xml.xsd. + At the date of issue it can also be found at + http://www.w3.org/2001/xml.xsd. + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML Schema + itself, or with the XML namespace itself. In other words, if the XML + Schema or XML namespaces change, the version of this document at + http://www.w3.org/2001/xml.xsd will change + accordingly; the version at + http://www.w3.org/2005/08/xml.xsd will not change. + </xs:documentation> + </xs:annotation> + + <xs:attribute name="lang"> + <xs:annotation> + <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. See + RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry + at http://www.iana.org/assignments/lang-tag-apps.htm for + further information. + + The union allows for the 'un-declaration' of xml:lang with + the empty string.</xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:union memberTypes="xs:language"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value=""/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="space"> + <xs:simpleType> + <xs:restriction base="xs:NCName"> + <xs:enumeration value="default"/> + <xs:enumeration value="preserve"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="base" type="xs:anyURI"> + <xs:annotation> + <xs:documentation>See http://www.w3.org/TR/xmlbase/ for + information about this attribute.</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="id" type="xs:ID"> + <xs:annotation> + <xs:documentation>See http://www.w3.org/TR/xml-id/ for + information about this attribute.</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attributeGroup name="specialAttrs"> + <xs:attribute ref="xml:base"/> + <xs:attribute ref="xml:lang"/> + <xs:attribute ref="xml:space"/> + </xs:attributeGroup> + +</xs:schema> diff --git a/ext/soap/tests/classmap.wsdl b/ext/soap/tests/classmap.wsdl new file mode 100644 index 0000000..7fcf596 --- /dev/null +++ b/ext/soap/tests/classmap.wsdl @@ -0,0 +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> diff --git a/ext/soap/tests/classmap001.phpt b/ext/soap/tests/classmap001.phpt new file mode 100644 index 0000000..247a1de --- /dev/null +++ b/ext/soap/tests/classmap001.phpt @@ -0,0 +1,52 @@ +--TEST-- +SOAP Classmap 1: SoapServer support for classmap +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--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($GLOBALS['HTTP_RAW_POST_DATA']); +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 diff --git a/ext/soap/tests/classmap002.phpt b/ext/soap/tests/classmap002.phpt new file mode 100644 index 0000000..d79deb6 --- /dev/null +++ b/ext/soap/tests/classmap002.phpt @@ -0,0 +1,46 @@ +--TEST-- +SOAP Classmap 2: SoapClient support for classmap +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestSoapClient extends SoapClient{ + function __doRequest($request, $location, $action, $version, $one_way = 0) { + 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 diff --git a/ext/soap/tests/classmap003.phpt b/ext/soap/tests/classmap003.phpt new file mode 100644 index 0000000..4d0118f --- /dev/null +++ b/ext/soap/tests/classmap003.phpt @@ -0,0 +1,54 @@ +--TEST-- +SOAP Classmap 3: encoding of inherited objects +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); + +class A { + public $x; + function __construct($a){ + $this->x = $a; + } +} + +class B extends A { + public $y; + function __construct($a){ + parent::__construct($a); + $this->y = $a + 1; + } +} + +function f(){ + return new B(5); +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("f"); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new LocalSoapClient(dirname(__FILE__)."/classmap003.wsdl", + array('classmap'=>array('A'=>'A','B'=>'B'))); +print_r($client->f()); +?> +--EXPECT-- +B Object +( + [y] => 6 + [x] => 5 +) diff --git a/ext/soap/tests/classmap003.wsdl b/ext/soap/tests/classmap003.wsdl new file mode 100755 index 0000000..494c418 --- /dev/null +++ b/ext/soap/tests/classmap003.wsdl @@ -0,0 +1,51 @@ +<?xml version='1.0' encoding='UTF-8'?>
+
+<!-- WSDL file generated by Zend Studio. -->
+
+<definitions name="ab" targetNamespace="urn:ab" xmlns:typens="urn:ab" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:ab">
+ <xsd:complexType name="A">
+ <xsd:sequence>
+ <xsd:element name="x" type="xsd:anyType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="B">
+ <xsd:complexContent>
+ <xsd:extension base="typens:A">
+ <xsd:sequence>
+ <xsd:element name="y" type="xsd:anyType"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:schema>
+ </types>
+ <message name="f"/>
+ <message name="fResponse">
+ <part name="fReturn" type="typens:A"/>
+ </message>
+ <portType name="abServerPortType">
+ <operation name="f">
+ <input message="typens:f"/>
+ <output message="typens:fResponse"/>
+ </operation>
+ </portType>
+ <binding name="abServerBinding" type="typens:abServerPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="f">
+ <soap:operation soapAction="urn:abServerAction"/>
+ <input>
+ <soap:body namespace="urn:ab" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body namespace="urn:ab" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="abService">
+ <port name="abServerPort" binding="typens:abServerBinding">
+ <soap:address location="http://localhost/abServer.php"/>
+ </port>
+ </service>
+</definitions>
diff --git a/ext/soap/tests/classmap004.phpt b/ext/soap/tests/classmap004.phpt new file mode 100644 index 0000000..e8bf58a --- /dev/null +++ b/ext/soap/tests/classmap004.phpt @@ -0,0 +1,66 @@ +--TEST-- +SOAP Classmap 4: encoding of objects with __get() +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); + +class A { + public $a; + function __construct($a){ + $this->x = $a; + } + function __get($name) { + return @$this->a[$name]; + } + function __set($name, $val) { + $this->a[$name] = $val; + } + function __unset($name) { + unset($this->a[$name]); + } +} + +class B extends A { + function __construct($a){ + parent::__construct($a); + $this->y = $a + 1; + } +} + +function f(){ + return new B(5); +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("f"); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new LocalSoapClient(dirname(__FILE__)."/classmap003.wsdl", + array('classmap'=>array('A'=>'A','B'=>'B'))); +print_r($client->f()); +?> +--EXPECT-- +B Object +( + [a] => Array + ( + [x] => 5 + [y] => 6 + ) + +) diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_001p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_001p.phpt new file mode 100644 index 0000000..f88cddd --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_001p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 001 (php/direct): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array("Hello World!"), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><param0 xsi:type="xsd:string">Hello World!</param0></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string">Hello World!</outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_001s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_001s.phpt new file mode 100644 index 0000000..a25eea5 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_001s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 001 (soap/direct): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array(new SoapParam(new SoapVar("Hello World!",XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><inputString xsi:type="xsd:string">Hello World!</inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string">Hello World!</outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt new file mode 100644 index 0000000..2442933 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 001 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString("Hello World!"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><inputString xsi:type="xsd:string">Hello World!</inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string">Hello World!</outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_002p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_002p.phpt new file mode 100644 index 0000000..a5c6242 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_002p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 002 (php/direct): echoString(empty) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array(""), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><param0 xsi:type="xsd:string"></param0></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string"></outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_002s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_002s.phpt new file mode 100644 index 0000000..3a25624 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_002s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 002 (soap/direct): echoString(empty) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array(new SoapParam(new SoapVar("",XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><inputString xsi:type="xsd:string"></inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string"></outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt new file mode 100644 index 0000000..b2a21f3 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 002 (php/wsdl): echoString(empty) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString(""); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><inputString xsi:type="xsd:string"></inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string"></outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_003p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_003p.phpt new file mode 100644 index 0000000..8aadcbb --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_003p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 003 (php/direct): echoString(NULL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array(NULL), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoString><param0 xsi:nil="true"/></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringResponse><outputString xsi:nil="true"/></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_003s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_003s.phpt new file mode 100644 index 0000000..e215ec1 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_003s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 003 (soap/direct): echoString(NULL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array(new SoapParam(new SoapVar(NULL,XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoString><inputString xsi:nil="true"/></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringResponse><outputString xsi:nil="true"/></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt new file mode 100644 index 0000000..7dbaa23 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 003 (php/wsdl): echoString(NULL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString(NULL); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoString><inputString xsi:nil="true"/></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringResponse><outputString xsi:nil="true"/></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_004p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_004p.phpt new file mode 100644 index 0000000..cb56ce6 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_004p.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 004 (php/direct): echoString(entities) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array(">,<,&,\",',\\,\n"), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><param0 xsi:type="xsd:string">>,<,&,",',\, +</param0></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string">>,<,&,",',\, +</outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_004s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_004s.phpt new file mode 100644 index 0000000..20c899e --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_004s.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 004 (soap/direct): echoString(entities) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array(new SoapParam(new SoapVar(">,<,&,\",',\\,\n",XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><inputString xsi:type="xsd:string">>,<,&,",',\, +</inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string">>,<,&,",',\, +</outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt new file mode 100644 index 0000000..2843519 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round2 base 004 (php/wsdl): echoString(entities) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString(">,<,&,\",',\\,\n"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><inputString xsi:type="xsd:string">>,<,&,",',\, +</inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string">>,<,&,",',\, +</outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt new file mode 100644 index 0000000..22bab4e --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP Interop Round2 base 005 (php/direct): echoString(utf-8) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array(utf8_encode('ỗÈéóÒ₧⅜ỗỸ')), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><param0 xsi:type="xsd:string">ỗÈéóÒ₧⅜ỗỸ</param0></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string">ỗÈéóÒ₧⅜ỗỸ</outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt new file mode 100644 index 0000000..f94c06f --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP Interop Round2 base 005 (soap/direct): echoString(utf-8) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString", array(new SoapParam(new SoapVar(utf8_encode('ỗÈéóÒ₧⅜ỗỸ'),XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><inputString xsi:type="xsd:string">ỗÈéóÒ₧⅜ỗỸ</inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string">ỗÈéóÒ₧⅜ỗỸ</outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt new file mode 100644 index 0000000..3bb1368 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round2 base 005 (php/wsdl): echoString(utf-8) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString(utf8_encode('ỗÈéóÒ₧⅜ỗỸ')); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoString><inputString xsi:type="xsd:string">ỗÈéóÒ₧⅜ỗỸ</inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStringResponse><outputString xsi:type="xsd:string">ỗÈéóÒ₧⅜ỗỸ</outputString></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_006p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_006p.phpt new file mode 100644 index 0000000..a85d3c4 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_006p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 006 (php/direct): echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStringArray", array(array('good','bad')), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><param0 SOAP-ENC:arrayType="xsd:string[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">good</item><item xsi:type="xsd:string">bad</item></param0></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[2]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item><item xsi:type="xsd:string">bad</item></outputStringArray></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_006s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_006s.phpt new file mode 100644 index 0000000..8ea498a --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_006s.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round2 base 006 (soap/direct): echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + new SoapVar('good', XSD_STRING), + new SoapVar('bad', XSD_STRING) + ), SOAP_ENC_ARRAY, "ArrayOfstring","http://soapinterop.org/xsd"), "inputStringArray"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><inputStringArray SOAP-ENC:arrayType="xsd:string[2]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item><item xsi:type="xsd:string">bad</item></inputStringArray></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[2]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item><item xsi:type="xsd:string">bad</item></outputStringArray></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt new file mode 100644 index 0000000..6b63f45 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 006 (php/wsdl): echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringArray(array('good','bad')); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><inputStringArray SOAP-ENC:arrayType="xsd:string[2]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item><item xsi:type="xsd:string">bad</item></inputStringArray></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[2]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item><item xsi:type="xsd:string">bad</item></outputStringArray></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_007p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_007p.phpt new file mode 100644 index 0000000..bfa5e1c --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_007p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 007 (php/direct): echoStringArray(one) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStringArray", array(array('good')), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><param0 SOAP-ENC:arrayType="xsd:string[1]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">good</item></param0></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[1]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item></outputStringArray></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_007s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_007s.phpt new file mode 100644 index 0000000..6d46588 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_007s.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round2 base 007 (soap/direct): echoStringArray(one) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + new SoapVar('good', XSD_STRING) + ), SOAP_ENC_ARRAY, "ArrayOfstring","http://soapinterop.org/xsd"), "inputStringArray"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><inputStringArray SOAP-ENC:arrayType="xsd:string[1]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item></inputStringArray></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[1]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item></outputStringArray></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt new file mode 100644 index 0000000..53a9161 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 007 (php/wsdl): echoStringArray(one) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringArray(array('good')); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><inputStringArray SOAP-ENC:arrayType="xsd:string[1]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item></inputStringArray></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[1]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">good</item></outputStringArray></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_008p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_008p.phpt new file mode 100644 index 0000000..2112558 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_008p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 008 (php/direct): echoStringArray(empty) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStringArray", array(array()), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><param0 SOAP-ENC:arrayType="xsd:ur-type[0]" xsi:type="SOAP-ENC:Array"/></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[0]" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_008s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_008s.phpt new file mode 100644 index 0000000..2bae845 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_008s.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 008 (soap/direct): echoStringArray(empty) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + ), SOAP_ENC_ARRAY, "ArrayOfstring","http://soapinterop.org/xsd"), "inputStringArray"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><inputStringArray SOAP-ENC:arrayType="xsd:ur-type[0]" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[0]" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt new file mode 100644 index 0000000..a99a0fc --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 008 (php/wsdl): echoStringArray(empty) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringArray(array()); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><inputStringArray SOAP-ENC:arrayType="xsd:string[0]" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray SOAP-ENC:arrayType="xsd:string[0]" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_009p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_009p.phpt new file mode 100644 index 0000000..bee2f79 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_009p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 009 (php/direct): echoStringArray(NULL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStringArray", array(NULL), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><param0 xsi:nil="true"/></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray xsi:nil="true" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_009s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_009s.phpt new file mode 100644 index 0000000..6aec611 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_009s.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP Interop Round2 base 009 (soap/direct): echoStringArray(NULL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$param = new SoapParam(new SoapVar(NULL, SOAP_ENC_ARRAY, "ArrayOfstring","http://soapinterop.org/xsd"), "inputStringArray"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><inputStringArray xsi:nil="true" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray xsi:nil="true" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt new file mode 100644 index 0000000..16ae634 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 009 (php/wsdl): echoStringArray(NULL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringArray(NULL); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><inputStringArray xsi:nil="true" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><outputStringArray xsi:nil="true" xsi:type="ns2:ArrayOfstring"/></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_010p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_010p.phpt new file mode 100644 index 0000000..9c2aa0f --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_010p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 010 (php/direct): echoInteger +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoInteger", array(34345), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoInteger><param0 xsi:type="xsd:int">34345</param0></ns1:echoInteger></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoIntegerResponse><outputInteger xsi:type="xsd:int">34345</outputInteger></ns1:echoIntegerResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_010s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_010s.phpt new file mode 100644 index 0000000..1f012ca --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_010s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 010 (soap/direct): echoInteger +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoInteger", array(new SoapParam(new soapVar(34345, XSD_INT), "inputInteger")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoInteger><inputInteger xsi:type="xsd:int">34345</inputInteger></ns1:echoInteger></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoIntegerResponse><outputInteger xsi:type="xsd:int">34345</outputInteger></ns1:echoIntegerResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt new file mode 100644 index 0000000..c7689fa --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 010 (php/wsdl): echoInteger +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoInteger(34345); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoInteger><inputInteger xsi:type="xsd:int">34345</inputInteger></ns1:echoInteger></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoIntegerResponse><outputInteger xsi:type="xsd:int">34345</outputInteger></ns1:echoIntegerResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_011p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_011p.phpt new file mode 100644 index 0000000..739ded9 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_011p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 011 (php/direct): echoIntegerArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoIntegerArray", array(array(1,234324324,2)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoIntegerArray><param0 SOAP-ENC:arrayType="xsd:int[3]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:int">1</item><item xsi:type="xsd:int">234324324</item><item xsi:type="xsd:int">2</item></param0></ns1:echoIntegerArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoIntegerArrayResponse><outputIntegerArray SOAP-ENC:arrayType="xsd:int[3]" xsi:type="ns2:ArrayOfint"><item xsi:type="xsd:int">1</item><item xsi:type="xsd:int">234324324</item><item xsi:type="xsd:int">2</item></outputIntegerArray></ns1:echoIntegerArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_011s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_011s.phpt new file mode 100644 index 0000000..d7699e2 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_011s.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP Interop Round2 base 011 (soap/direct): echoIntegerArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + new SoapVar(1,XSD_INT), + new SoapVar(234324324,XSD_INT), + new SoapVar(2,XSD_INT) + ), SOAP_ENC_ARRAY, "ArrayOfint","http://soapinterop.org/xsd"), "inputIntegerArray"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoIntegerArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoIntegerArray><inputIntegerArray SOAP-ENC:arrayType="xsd:int[3]" xsi:type="ns2:ArrayOfint"><item xsi:type="xsd:int">1</item><item xsi:type="xsd:int">234324324</item><item xsi:type="xsd:int">2</item></inputIntegerArray></ns1:echoIntegerArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoIntegerArrayResponse><outputIntegerArray SOAP-ENC:arrayType="xsd:int[3]" xsi:type="ns2:ArrayOfint"><item xsi:type="xsd:int">1</item><item xsi:type="xsd:int">234324324</item><item xsi:type="xsd:int">2</item></outputIntegerArray></ns1:echoIntegerArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt new file mode 100644 index 0000000..05b27c8 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 011 (php/wsdl): echoIntegerArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoIntegerArray(array(1,234324324,2)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoIntegerArray><inputIntegerArray SOAP-ENC:arrayType="xsd:int[3]" xsi:type="ns2:ArrayOfint"><item xsi:type="xsd:int">1</item><item xsi:type="xsd:int">234324324</item><item xsi:type="xsd:int">2</item></inputIntegerArray></ns1:echoIntegerArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoIntegerArrayResponse><outputIntegerArray SOAP-ENC:arrayType="xsd:int[3]" xsi:type="ns2:ArrayOfint"><item xsi:type="xsd:int">1</item><item xsi:type="xsd:int">234324324</item><item xsi:type="xsd:int">2</item></outputIntegerArray></ns1:echoIntegerArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_012p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_012p.phpt new file mode 100644 index 0000000..7cee319 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_012p.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 012 (php/direct): echoFloat +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoFloat", array(342.23), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoFloat><param0 xsi:type="xsd:float">342.23</param0></ns1:echoFloat></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoFloatResponse><outputFloat xsi:type="xsd:float">342.23</outputFloat></ns1:echoFloatResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_012s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_012s.phpt new file mode 100644 index 0000000..e004339 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_012s.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 012 (soap/direct): echoFloat +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoFloat", array(new SoapParam(new SoapVar(342.23,XSD_FLOAT),"inputFloat")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoFloat><inputFloat xsi:type="xsd:float">342.23</inputFloat></ns1:echoFloat></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoFloatResponse><outputFloat xsi:type="xsd:float">342.23</outputFloat></ns1:echoFloatResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt new file mode 100644 index 0000000..63a506c --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round2 base 012 (php/wsdl): echoFloat +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoFloat(342.23); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoFloat><inputFloat xsi:type="xsd:float">342.23</inputFloat></ns1:echoFloat></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoFloatResponse><outputFloat xsi:type="xsd:float">342.23</outputFloat></ns1:echoFloatResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_013p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_013p.phpt new file mode 100644 index 0000000..c680182 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_013p.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 013 (php/direct): echoFloatArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoFloatArray", array(array(1.3223,34.2,325.325)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoFloatArray><param0 SOAP-ENC:arrayType="xsd:float[3]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:float">1.3223</item><item xsi:type="xsd:float">34.2</item><item xsi:type="xsd:float">325.325</item></param0></ns1:echoFloatArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoFloatArrayResponse><outputFloatArray SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns2:ArrayOffloat"><item xsi:type="xsd:float">1.3223</item><item xsi:type="xsd:float">34.2</item><item xsi:type="xsd:float">325.325</item></outputFloatArray></ns1:echoFloatArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_013s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_013s.phpt new file mode 100644 index 0000000..9ebc294 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_013s.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP Interop Round2 base 013 (soap/direct): echoFloatArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + new SoapVar(1.3223, XSD_FLOAT), + new SoapVar(34.2, XSD_FLOAT), + new SoapVar(325.325, XSD_FLOAT) + ), SOAP_ENC_ARRAY, "ArrayOffloat","http://soapinterop.org/xsd"), "inputFloatArray"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoFloatArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoFloatArray><inputFloatArray SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns2:ArrayOffloat"><item xsi:type="xsd:float">1.3223</item><item xsi:type="xsd:float">34.2</item><item xsi:type="xsd:float">325.325</item></inputFloatArray></ns1:echoFloatArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoFloatArrayResponse><outputFloatArray SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns2:ArrayOffloat"><item xsi:type="xsd:float">1.3223</item><item xsi:type="xsd:float">34.2</item><item xsi:type="xsd:float">325.325</item></outputFloatArray></ns1:echoFloatArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt new file mode 100644 index 0000000..6c28380 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round2 base 013 (php/wsdl): echoFloatArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoFloatArray(array(1.3223,34.2,325.325)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoFloatArray><inputFloatArray SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns2:ArrayOffloat"><item xsi:type="xsd:float">1.3223</item><item xsi:type="xsd:float">34.2</item><item xsi:type="xsd:float">325.325</item></inputFloatArray></ns1:echoFloatArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoFloatArrayResponse><outputFloatArray SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns2:ArrayOffloat"><item xsi:type="xsd:float">1.3223</item><item xsi:type="xsd:float">34.2</item><item xsi:type="xsd:float">325.325</item></outputFloatArray></ns1:echoFloatArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt new file mode 100644 index 0000000..61a2213 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP Interop Round2 base 014 (php/direct): echoStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} + +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStruct", array(new SOAPStruct('arg',34,325.325)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoStruct><param0 xsi:type="SOAP-ENC:Struct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></param0></ns1:echoStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructResponse><outputStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></outputStruct></ns1:echoStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014s.phpt new file mode 100644 index 0000000..681f604 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_014s.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP Interop Round2 base 014 (soap/direct): echoStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + new SoapVar('arg', XSD_STRING, null, null, 'varString'), + new SoapVar('34', XSD_INT, null, null, 'varInt'), + new SoapVar('325.325', XSD_FLOAT, null, null, 'varFloat') + ),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"), "inputStruct"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStruct", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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/" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStruct><inputStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></inputStruct></ns1:echoStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructResponse><outputStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></outputStruct></ns1:echoStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt new file mode 100644 index 0000000..b03cc19 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round2 base 014 (php/wsdl): echoStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} + +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStruct(new SOAPStruct('arg',34,325.325)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStruct><inputStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></inputStruct></ns1:echoStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructResponse><outputStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></outputStruct></ns1:echoStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt new file mode 100644 index 0000000..930c277 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round2 base 015 (php/direct): echoStructArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} + +$struct1 = new SOAPStruct('arg',34,325.325); +$struct2 = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStructArray", array(array($struct1,$struct2)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructArray><param0 SOAP-ENC:arrayType="SOAP-ENC:Struct[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="SOAP-ENC:Struct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item><item xsi:type="SOAP-ENC:Struct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item></param0></ns1:echoStructArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructArrayResponse><outputStructArray SOAP-ENC:arrayType="ns2:SOAPStruct[2]" xsi:type="ns2:ArrayOfSOAPStruct"><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item></outputStructArray></ns1:echoStructArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt new file mode 100644 index 0000000..e1052df --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt @@ -0,0 +1,44 @@ +--TEST-- +SOAP Interop Round2 base 015 (soap/direct): echoStructArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} + +$struct1 = new SoapVar(array( + new SoapVar('arg', XSD_STRING, null, null, 'varString'), + new SoapVar('34', XSD_INT, null, null, 'varInt'), + new SoapVar('325.325', XSD_FLOAT, null, null, 'varFloat') + ),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"); +$struct2 = new SoapVar(array( + new SoapVar('arg', XSD_STRING, null, null, 'varString'), + new SoapVar('34', XSD_INT, null, null, 'varInt'), + new SoapVar('325.325', XSD_FLOAT, null, null, 'varFloat') + ),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"); + +$param = new SoapParam(new SoapVar(array( + $struct1, + $struct2 + ),SOAP_ENC_ARRAY,"ArrayOfSOAPStruct","http://soapinterop.org/xsd"), "inputStructArray"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStructArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructArray><inputStructArray SOAP-ENC:arrayType="ns2:SOAPStruct[2]" xsi:type="ns2:ArrayOfSOAPStruct"><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item></inputStructArray></ns1:echoStructArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructArrayResponse><outputStructArray SOAP-ENC:arrayType="ns2:SOAPStruct[2]" xsi:type="ns2:ArrayOfSOAPStruct"><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item></outputStructArray></ns1:echoStructArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt new file mode 100644 index 0000000..46b8d7d --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP Interop Round2 base 015 (php/wsdl): echoStructArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} + +$struct1 = new SOAPStruct('arg',34,325.325); +$struct2 = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStructArray(array($struct1,$struct2)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructArray><inputStructArray SOAP-ENC:arrayType="ns2:SOAPStruct[2]" xsi:type="ns2:ArrayOfSOAPStruct"><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item></inputStructArray></ns1:echoStructArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructArrayResponse><outputStructArray SOAP-ENC:arrayType="ns2:SOAPStruct[2]" xsi:type="ns2:ArrayOfSOAPStruct"><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item></outputStructArray></ns1:echoStructArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_016p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_016p.phpt new file mode 100644 index 0000000..0c3a028 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_016p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 016 (php/direct): echoVoid +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoVoid", array(), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVoid/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVoidResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_016s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_016s.phpt new file mode 100644 index 0000000..24cd42b --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_016s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 016 (soap/direct): echoVoid +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoVoid", array(), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVoid/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVoidResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt new file mode 100644 index 0000000..11e379c --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 016 (php/wsdl): echoVoid +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoVoid(); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVoid/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVoidResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_017p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_017p.phpt new file mode 100644 index 0000000..5f6b3c3 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_017p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 017 (php/direct): echoBase64 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBase64", array('Nebraska'), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBase64><param0 xsi:type="xsd:string">Nebraska</param0></ns1:echoBase64></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBase64Response><outputBase64 xsi:type="xsd:base64Binary">TmVicmFza2E=</outputBase64></ns1:echoBase64Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_017s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_017s.phpt new file mode 100644 index 0000000..3e3c6e1 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_017s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 017 (soap/direct): echoBase64 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBase64", array(new SoapParam(new SoapVar('Nebraska',XSD_BASE64BINARY),"inputBase64")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBase64><inputBase64 xsi:type="xsd:base64Binary">TmVicmFza2E=</inputBase64></ns1:echoBase64></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBase64Response><outputBase64 xsi:type="xsd:base64Binary">TmVicmFza2E=</outputBase64></ns1:echoBase64Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt new file mode 100644 index 0000000..e82360e --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 017 (php/wsdl): echoBase64 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoBase64('Nebraska'); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBase64><inputBase64 xsi:type="xsd:base64Binary">TmVicmFza2E=</inputBase64></ns1:echoBase64></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBase64Response><outputBase64 xsi:type="xsd:base64Binary">TmVicmFza2E=</outputBase64></ns1:echoBase64Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_018p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_018p.phpt new file mode 100644 index 0000000..3738148 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_018p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 018 (php/direct): echoHexBinary +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoHexBinary", array('soapx4'), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoHexBinary><param0 xsi:type="xsd:string">soapx4</param0></ns1:echoHexBinary></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoHexBinaryResponse><outputHexBinary xsi:type="xsd:hexBinary">736F61707834</outputHexBinary></ns1:echoHexBinaryResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_018s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_018s.phpt new file mode 100644 index 0000000..a531069 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_018s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 018 (soap/direct): echoHexBinary +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoHexBinary", array(new SoapParam(new SoapVar('soapx4',XSD_HEXBINARY),"inputHexBinary")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoHexBinary><inputHexBinary xsi:type="xsd:hexBinary">736F61707834</inputHexBinary></ns1:echoHexBinary></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoHexBinaryResponse><outputHexBinary xsi:type="xsd:hexBinary">736F61707834</outputHexBinary></ns1:echoHexBinaryResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt new file mode 100644 index 0000000..2c0380f --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 018 (php/wsdl): echoHexBinary +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoHexBinary('soapx4'); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoHexBinary><inputHexBinary xsi:type="xsd:hexBinary">736F61707834</inputHexBinary></ns1:echoHexBinary></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoHexBinaryResponse><outputHexBinary xsi:type="xsd:hexBinary">736F61707834</outputHexBinary></ns1:echoHexBinaryResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_019p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_019p.phpt new file mode 100644 index 0000000..a767301 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_019p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 019 (php/direct): echoDecimal +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoDecimal", array('12345.67890'), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoDecimal><param0 xsi:type="xsd:string">12345.67890</param0></ns1:echoDecimal></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoDecimalResponse><outputDecimal xsi:type="xsd:decimal">12345.67890</outputDecimal></ns1:echoDecimalResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_019s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_019s.phpt new file mode 100644 index 0000000..56bea8b --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_019s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 019 (soap/direct): echoDecimal +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoDecimal", array(new SoapParam(new SoapVar('12345.67890',XSD_DECIMAL), "inputDecimal")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoDecimal><inputDecimal xsi:type="xsd:decimal">12345.67890</inputDecimal></ns1:echoDecimal></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoDecimalResponse><outputDecimal xsi:type="xsd:decimal">12345.67890</outputDecimal></ns1:echoDecimalResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt new file mode 100644 index 0000000..45278ef --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 019 (php/wsdl): echoDecimal +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoDecimal('12345.67890'); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoDecimal><inputDecimal xsi:type="xsd:decimal">12345.67890</inputDecimal></ns1:echoDecimal></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoDecimalResponse><outputDecimal xsi:type="xsd:decimal">12345.67890</outputDecimal></ns1:echoDecimalResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_020p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_020p.phpt new file mode 100644 index 0000000..4afe922 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_020p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 020 (php/direct): echoDate +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoDate", array('2001-05-24T17:31:41Z'), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoDate><param0 xsi:type="xsd:string">2001-05-24T17:31:41Z</param0></ns1:echoDate></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoDateResponse><outputDate xsi:type="xsd:dateTime">2001-05-24T17:31:41Z</outputDate></ns1:echoDateResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_020s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_020s.phpt new file mode 100644 index 0000000..6ced748 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_020s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 020 (soap/direct): echoDate +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoDate", array(new SoapParam(new SoapVar('2001-05-24T17:31:41Z', XSD_DATETIME), "inputDate")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoDate><inputDate xsi:type="xsd:dateTime">2001-05-24T17:31:41Z</inputDate></ns1:echoDate></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoDateResponse><outputDate xsi:type="xsd:dateTime">2001-05-24T17:31:41Z</outputDate></ns1:echoDateResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt new file mode 100644 index 0000000..787d1e9 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 020 (php/wsdl): echoDate +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoDate('2001-05-24T17:31:41Z'); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoDate><inputDate xsi:type="xsd:dateTime">2001-05-24T17:31:41Z</inputDate></ns1:echoDate></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoDateResponse><outputDate xsi:type="xsd:dateTime">2001-05-24T17:31:41Z</outputDate></ns1:echoDateResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_021p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_021p.phpt new file mode 100644 index 0000000..69edf34 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_021p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 021 (php/direct): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBoolean", array(true), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><param0 xsi:type="xsd:boolean">true</param0></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">true</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_021s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_021s.phpt new file mode 100644 index 0000000..8f2a66f --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_021s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 021 (soap/direct): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBoolean", array(new SoapParam(new SoapVar(true, XSD_BOOLEAN), "inputBoolean")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><inputBoolean xsi:type="xsd:boolean">true</inputBoolean></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">true</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt new file mode 100644 index 0000000..140a823 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 021 (php/wsdl): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoBoolean(true); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><inputBoolean xsi:type="xsd:boolean">true</inputBoolean></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">true</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_022p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_022p.phpt new file mode 100644 index 0000000..07322b9 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_022p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 022 (php/direct): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBoolean", array(false), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><param0 xsi:type="xsd:boolean">false</param0></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">false</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_022s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_022s.phpt new file mode 100644 index 0000000..9f4309c --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_022s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 022 (soap/direct): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBoolean", array(new SoapParam(new SoapVar(false, XSD_BOOLEAN), "inputBoolean")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><inputBoolean xsi:type="xsd:boolean">false</inputBoolean></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">false</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt new file mode 100644 index 0000000..699a5f5 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 022 (php/wsdl): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoBoolean(false); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><inputBoolean xsi:type="xsd:boolean">false</inputBoolean></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">false</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_023p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_023p.phpt new file mode 100644 index 0000000..65dcad2 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_023p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 023 (php/direct): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBoolean", array(1), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><param0 xsi:type="xsd:int">1</param0></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">true</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_023s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_023s.phpt new file mode 100644 index 0000000..8985f38 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_023s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 023 (soap/direct): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBoolean", array(new SoapParam(new SoapVar(1, XSD_BOOLEAN), "inputBoolean")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><inputBoolean xsi:type="xsd:boolean">true</inputBoolean></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">true</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt new file mode 100644 index 0000000..356cdcc --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 023 (php/wsdl): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoBoolean(1); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><inputBoolean xsi:type="xsd:boolean">true</inputBoolean></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">true</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_024p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_024p.phpt new file mode 100644 index 0000000..f55f095 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_024p.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 024 (php/direct): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBoolean", array(0), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><param0 xsi:type="xsd:int">0</param0></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">false</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_024s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_024s.phpt new file mode 100644 index 0000000..f10e762 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_024s.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP Interop Round2 base 024 (soap/direct): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoBoolean", array(new SoapParam(new SoapVar(0, XSD_BOOLEAN), "inputBoolean")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><inputBoolean xsi:type="xsd:boolean">false</inputBoolean></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">false</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt new file mode 100644 index 0000000..9fde836 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 base 024 (php/wsdl): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoBoolean(0); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_base.inc"); +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://soapinterop.org/" 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:echoBoolean><inputBoolean xsi:type="xsd:boolean">false</inputBoolean></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoBooleanResponse><outputBoolean xsi:type="xsd:boolean">false</outputBoolean></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/Base/round2_base.inc b/ext/soap/tests/interop/Round2/Base/round2_base.inc new file mode 100644 index 0000000..48eaf40 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/round2_base.inc @@ -0,0 +1,81 @@ +<?php +class SOAP_Interop_Base { + + function echoString($inputString) + { + return $inputString; + } + + function echoStringArray($inputStringArray) + { + return $inputStringArray; + } + + + function echoInteger($inputInteger) + { + return $inputInteger; + } + + function echoIntegerArray($inputIntegerArray) + { + return $inputIntegerArray; + } + + function echoFloat($inputFloat) + { + return $inputFloat; + } + + function echoFloatArray($inputFloatArray) + { + return $inputFloatArray; + } + + function echoStruct($inputStruct) + { + return $inputStruct; + } + + function echoStructArray($inputStructArray) + { + return $inputStructArray; + } + + function echoVoid() + { + return NULL; + } + + function echoBase64($b_encoded) + { + return $b_encoded; + } + + function echoDate($timeInstant) + { + return $timeInstant; + } + + function echoHexBinary($hb) + { + return $hb; + } + + function echoDecimal($dec) + { + return $dec; + } + + function echoBoolean($boolean) + { + return $boolean; + } + +} + +ini_set("soap.wsdl_cache_enabled",0); +$server = new SoapServer(dirname(__FILE__)."/round2_base.wsdl"); +$server->setClass("SOAP_Interop_Base"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round2/Base/round2_base.wsdl b/ext/soap/tests/interop/Round2/Base/round2_base.wsdl new file mode 100644 index 0000000..c7c7031 --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/round2_base.wsdl @@ -0,0 +1,332 @@ +<?xml version="1.0"?> +<definitions name="InteropTest" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:tns="http://soapinterop.org/" + xmlns:s="http://soapinterop.org/xsd" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://soapinterop.org/"> + + <types> + <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/xsd"> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> + <xsd:complexType name="ArrayOfstring"> + <xsd:complexContent> + <xsd:restriction base="SOAP-ENC:Array"> + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + <xsd:complexType name="ArrayOfint"> + <xsd:complexContent> + <xsd:restriction base="SOAP-ENC:Array"> + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + <xsd:complexType name="ArrayOffloat"> + <xsd:complexContent> + <xsd:restriction base="SOAP-ENC:Array"> + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + <xsd:complexType name="SOAPStruct"> + <xsd:all> + <xsd:element name="varString" type="string"/> + <xsd:element name="varInt" type="int"/> + <xsd:element name="varFloat" type="float"/> + </xsd:all> + </xsd:complexType> + <xsd:complexType name="ArrayOfSOAPStruct"> + <xsd:complexContent> + <xsd:restriction base="SOAP-ENC:Array"> + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="s:SOAPStruct[]"/> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </schema> + </types> + + <message name="echoStringRequest"> + <part name="inputString" type="xsd:string" /> + </message> + <message name="echoStringResponse"> + <part name="outputString" type="xsd:string" /> + </message> + <message name="echoStringArrayRequest"> + <part name="inputStringArray" type="s:ArrayOfstring" /> + </message> + <message name="echoStringArrayResponse"> + <part name="outputStringArray" type="s:ArrayOfstring" /> + </message> + <message name="echoIntegerRequest"> + <part name="inputInteger" type="xsd:int" /> + </message> + <message name="echoIntegerResponse"> + <part name="outputInteger" type="xsd:int" /> + </message> + <message name="echoIntegerArrayRequest"> + <part name="inputIntegerArray" type="s:ArrayOfint" /> + </message> + <message name="echoIntegerArrayResponse"> + <part name="outputIntegerArray" type="s:ArrayOfint" /> + </message> + <message name="echoFloatRequest"> + <part name="inputFloat" type="xsd:float" /> + </message> + <message name="echoFloatResponse"> + <part name="outputFloat" type="xsd:float" /> + </message> + <message name="echoFloatArrayRequest"> + <part name="inputFloatArray" type="s:ArrayOffloat" /> + </message> + <message name="echoFloatArrayResponse"> + <part name="outputFloatArray" type="s:ArrayOffloat" /> + </message> + <message name="echoStructRequest"> + <part name="inputStruct" type="s:SOAPStruct" /> + </message> + <message name="echoStructResponse"> + <part name="outputStruct" type="s:SOAPStruct" /> + </message> + <message name="echoStructArrayRequest"> + <part name="inputStructArray" type="s:ArrayOfSOAPStruct" /> + </message> + <message name="echoStructArrayResponse"> + <part name="outputStructArray" type="s:ArrayOfSOAPStruct" /> + </message> + <message name="echoVoidRequest"> + </message> + <message name="echoVoidResponse"> + </message> + <message name="echoBase64Request"> + <part name="inputBase64" type="xsd:base64Binary" /> + </message> + <message name="echoBase64Response"> + <part name="outputBase64" type="xsd:base64Binary" /> + </message> + <message name="echoDateRequest"> + <part name="inputDate" type="xsd:dateTime" /> + </message> + <message name="echoDateResponse"> + <part name="outputDate" type="xsd:dateTime" /> + </message> + <message name="echoHexBinaryRequest"> + <part name="inputHexBinary" type="xsd:hexBinary" /> + </message> + <message name="echoHexBinaryResponse"> + <part name="outputHexBinary" type="xsd:hexBinary" /> + </message> + <message name="echoDecimalRequest"> + <part name="inputDecimal" type="xsd:decimal" /> + </message> + <message name="echoDecimalResponse"> + <part name="outputDecimal" type="xsd:decimal" /> + </message> + <message name="echoBooleanRequest"> + <part name="inputBoolean" type="xsd:boolean" /> + </message> + <message name="echoBooleanResponse"> + <part name="outputBoolean" type="xsd:boolean" /> + </message> + + <portType name="InteropTestPortType"> + <operation name="echoString"> + <input message="tns:echoStringRequest"/> + <output message="tns:echoStringResponse"/> + </operation> + <operation name="echoStringArray"> + <input message="tns:echoStringArrayRequest"/> + <output message="tns:echoStringArrayResponse"/> + </operation> + <operation name="echoInteger"> + <input message="tns:echoIntegerRequest"/> + <output message="tns:echoIntegerResponse"/> + </operation> + <operation name="echoIntegerArray"> + <input message="tns:echoIntegerArrayRequest"/> + <output message="tns:echoIntegerArrayResponse"/> + </operation> + <operation name="echoFloat"> + <input message="tns:echoFloatRequest"/> + <output message="tns:echoFloatResponse"/> + </operation> + <operation name="echoFloatArray"> + <input message="tns:echoFloatArrayRequest"/> + <output message="tns:echoFloatArrayResponse"/> + </operation> + <operation name="echoStruct"> + <input message="tns:echoStructRequest"/> + <output message="tns:echoStructResponse"/> + </operation> + <operation name="echoStructArray"> + <input message="tns:echoStructArrayRequest"/> + <output message="tns:echoStructArrayResponse"/> + </operation> + <operation name="echoVoid"> + <input message="tns:echoVoidRequest"/> + <output message="tns:echoVoidResponse"/> + </operation> + <operation name="echoBase64"> + <input message="tns:echoBase64Request"/> + <output message="tns:echoBase64Response"/> + </operation> + <operation name="echoDate"> + <input message="tns:echoDateRequest"/> + <output message="tns:echoDateResponse"/> + </operation> + <operation name="echoHexBinary"> + <input message="tns:echoHexBinaryRequest"/> + <output message="tns:echoHexBinaryResponse"/> + </operation> + <operation name="echoDecimal"> + <input message="tns:echoDecimalRequest"/> + <output message="tns:echoDecimalResponse"/> + </operation> + <operation name="echoBoolean"> + <input message="tns:echoBooleanRequest"/> + <output message="tns:echoBooleanResponse"/> + </operation> + </portType> + + <binding name="InteropTestBinding" type="tns:InteropTestPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoStringArray"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoInteger"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoIntegerArray"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoFloat"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoFloatArray"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoStruct"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoStructArray"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoVoid"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoBase64"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoDate"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoHexBinary"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoDecimal"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoBoolean"> + <soap:operation soapAction="http://" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + + <service name="InteropTest"> + <port name="InteropTestPort" binding="tns:InteropTestBinding"> + <soap:address location="round2_base.inc"/> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/interop/Round2/Base/skipif.inc b/ext/soap/tests/interop/Round2/Base/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/interop/Round2/Base/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001p.phpt new file mode 100644 index 0000000..88080cf --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001p.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 groupB 001 (php/direct): echoStructAsSimpleTypes +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStructAsSimpleTypes", array((object)array('varString'=>"arg",'varInt'=>34,'varFloat'=>34.345)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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:echoStructAsSimpleTypes><param0 xsi:type="SOAP-ENC:Struct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">34.345</varFloat></param0></ns1:echoStructAsSimpleTypes></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStructAsSimpleTypesResponse><outputString xsi:type="xsd:string">arg</outputString><outputInteger xsi:type="xsd:int">34</outputInteger><outputFloat xsi:type="xsd:float">34.345</outputFloat></ns1:echoStructAsSimpleTypesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001s.phpt new file mode 100644 index 0000000..3f59200 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001s.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP Interop Round2 groupB 001 (soap/direct): echoStructAsSimpleTypes +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + new SoapVar("arg", XSD_STRING, null, null, "varString"), + new SoapVar(34, XSD_INT, null, null, "varInt"), + new SoapVar(34.345, XSD_FLOAT, null, null, "varFloat") + ), SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/xsd"), "inputStruct"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoStructAsSimpleTypes", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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/" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructAsSimpleTypes><inputStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">34.345</varFloat></inputStruct></ns1:echoStructAsSimpleTypes></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStructAsSimpleTypesResponse><outputString xsi:type="xsd:string">arg</outputString><outputInteger xsi:type="xsd:int">34</outputInteger><outputFloat xsi:type="xsd:float">34.345</outputFloat></ns1:echoStructAsSimpleTypesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt new file mode 100644 index 0000000..2d7fb63 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round2 groupB 001 (php/wsdl): echoStructAsSimpleTypes +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStructAsSimpleTypes((object)array('varString'=>"arg",'varInt'=>34,'varFloat'=>34.345)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructAsSimpleTypes><inputStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">34.345</varFloat></inputStruct></ns1:echoStructAsSimpleTypes></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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:echoStructAsSimpleTypesResponse><outputString xsi:type="xsd:string">arg</outputString><outputInteger xsi:type="xsd:int">34</outputInteger><outputFloat xsi:type="xsd:float">34.345</outputFloat></ns1:echoStructAsSimpleTypesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002p.phpt new file mode 100644 index 0000000..3dba334 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002p.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round2 groupB 002 (php/direct): echoSimpleTypesAsStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoSimpleTypesAsStruct", array("arg",34,34.345), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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:echoSimpleTypesAsStruct><param0 xsi:type="xsd:string">arg</param0><param1 xsi:type="xsd:int">34</param1><param2 xsi:type="xsd:float">34.345</param2></ns1:echoSimpleTypesAsStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoSimpleTypesAsStructResponse><return xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">34.345</varFloat></return></ns1:echoSimpleTypesAsStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002s.phpt new file mode 100644 index 0000000..bda5baa --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002s.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP Interop Round2 groupB 002 (soap/direct): echoSimpleTypesAsStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoSimpleTypesAsStruct", array( + new SoapParam(new SoapVar("arg",XSD_STRING), "inputString"), + new SoapParam(new SoapVar(34,XSD_INT), "inputInteger"), + new SoapParam(new SoapVar(34.345,XSD_FLOAT), "inputFloat")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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:echoSimpleTypesAsStruct><inputString xsi:type="xsd:string">arg</inputString><inputInteger xsi:type="xsd:int">34</inputInteger><inputFloat xsi:type="xsd:float">34.345</inputFloat></ns1:echoSimpleTypesAsStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoSimpleTypesAsStructResponse><return xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">34.345</varFloat></return></ns1:echoSimpleTypesAsStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt new file mode 100644 index 0000000..c2b0c05 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round2 groupB 002 (php/wsdl): echoSimpleTypesAsStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoSimpleTypesAsStruct("arg",34,34.345); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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:echoSimpleTypesAsStruct><inputString xsi:type="xsd:string">arg</inputString><inputInteger xsi:type="xsd:int">34</inputInteger><inputFloat xsi:type="xsd:float">34.345</inputFloat></ns1:echoSimpleTypesAsStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoSimpleTypesAsStructResponse><return xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">34.345</varFloat></return></ns1:echoSimpleTypesAsStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003p.phpt new file mode 100644 index 0000000..417ae10 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003p.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round2 groupB 003 (php/direct): echo2DStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$param = array( + array('row0col0', 'row0col1', 'row0col2'), + array('row1col0', 'row1col1', 'row1col2')); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echo2DStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echo2DStringArray><param0 SOAP-ENC:arrayType="SOAP-ENC:Array[2]" xsi:type="SOAP-ENC:Array"><item SOAP-ENC:arrayType="xsd:string[3]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">row0col0</item><item xsi:type="xsd:string">row0col1</item><item xsi:type="xsd:string">row0col2</item></item><item SOAP-ENC:arrayType="xsd:string[3]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">row1col0</item><item xsi:type="xsd:string">row1col1</item><item xsi:type="xsd:string">row1col2</item></item></param0></ns1:echo2DStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echo2DStringArrayResponse><return SOAP-ENC:arrayType="xsd:string[2,3]" xsi:type="ns2:ArrayOfString2D"><item xsi:type="xsd:string">row0col0</item><item xsi:type="xsd:string">row0col1</item><item xsi:type="xsd:string">row0col2</item><item xsi:type="xsd:string">row1col0</item><item xsi:type="xsd:string">row1col1</item><item xsi:type="xsd:string">row1col2</item></return></ns1:echo2DStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003s.phpt new file mode 100644 index 0000000..59f2134 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003s.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round2 groupB 003 (soap/direct): echo2DStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + new SoapVar(array( + new SoapVar('row0col0', XSD_STRING), + new SoapVar('row0col1', XSD_STRING), + new SoapVar('row0col2', XSD_STRING) + ), SOAP_ENC_ARRAY), + new SoapVar(array( + new SoapVar('row1col0', XSD_STRING), + new SoapVar('row1col1', XSD_STRING), + new SoapVar('row1col2', XSD_STRING) + ), SOAP_ENC_ARRAY) + ), SOAP_ENC_ARRAY, "ArrayOfString2D", "http://soapinterop.org/xsd"),"input2DStringArray"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echo2DStringArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echo2DStringArray><input2DStringArray SOAP-ENC:arrayType="SOAP-ENC:Array[2]" xsi:type="ns2:ArrayOfString2D"><item SOAP-ENC:arrayType="xsd:string[3]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">row0col0</item><item xsi:type="xsd:string">row0col1</item><item xsi:type="xsd:string">row0col2</item></item><item SOAP-ENC:arrayType="xsd:string[3]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">row1col0</item><item xsi:type="xsd:string">row1col1</item><item xsi:type="xsd:string">row1col2</item></item></input2DStringArray></ns1:echo2DStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echo2DStringArrayResponse><return SOAP-ENC:arrayType="xsd:string[2,3]" xsi:type="ns2:ArrayOfString2D"><item xsi:type="xsd:string">row0col0</item><item xsi:type="xsd:string">row0col1</item><item xsi:type="xsd:string">row0col2</item><item xsi:type="xsd:string">row1col0</item><item xsi:type="xsd:string">row1col1</item><item xsi:type="xsd:string">row1col2</item></return></ns1:echo2DStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt new file mode 100644 index 0000000..cb89dc0 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP Interop Round2 groupB 003 (php/wsdl): echo2DStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$param = array( + array('row0col0', 'row0col1', 'row0col2'), + array('row1col0', 'row1col1', 'row1col2')); +$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echo2DStringArray($param); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echo2DStringArray><input2DStringArray SOAP-ENC:arrayType="xsd:string[2,3]" xsi:type="ns2:ArrayOfString2D"><item xsi:type="xsd:string">row0col0</item><item xsi:type="xsd:string">row0col1</item><item xsi:type="xsd:string">row0col2</item><item xsi:type="xsd:string">row1col0</item><item xsi:type="xsd:string">row1col1</item><item xsi:type="xsd:string">row1col2</item></input2DStringArray></ns1:echo2DStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echo2DStringArrayResponse><return SOAP-ENC:arrayType="xsd:string[2,3]" xsi:type="ns2:ArrayOfString2D"><item xsi:type="xsd:string">row0col0</item><item xsi:type="xsd:string">row0col1</item><item xsi:type="xsd:string">row0col2</item><item xsi:type="xsd:string">row1col0</item><item xsi:type="xsd:string">row1col1</item><item xsi:type="xsd:string">row1col2</item></return></ns1:echo2DStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004p.phpt new file mode 100644 index 0000000..fb5f485 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004p.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round2 groupB 004 (php/direct): echoNestedStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$param = (object)array( + 'varString' => "arg", + 'varInt' => 34, + 'varFloat' => 123.45, + 'varStruct' => (object)array( + 'varString' => "arg2", + 'varInt' => 342, + 'varFloat' => 123.452, + )); + +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoNestedStruct", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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:echoNestedStruct><param0 xsi:type="SOAP-ENC:Struct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">123.45</varFloat><varStruct xsi:type="SOAP-ENC:Struct"><varString xsi:type="xsd:string">arg2</varString><varInt xsi:type="xsd:int">342</varInt><varFloat xsi:type="xsd:float">123.452</varFloat></varStruct></param0></ns1:echoNestedStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedStructResponse><return xsi:type="ns2:SOAPStructStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">123.45</varFloat><varStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg2</varString><varInt xsi:type="xsd:int">342</varInt><varFloat xsi:type="xsd:float">123.452</varFloat></varStruct></return></ns1:echoNestedStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004s.phpt new file mode 100644 index 0000000..126bdff --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004s.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round2 groupB 004 (soap/direct): echoNestedStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + new SoapVar("arg", XSD_STRING, null, null, "varString"), + new SoapVar(34, XSD_INT, null, null, "varInt"), + new SoapVar(123.45, XSD_FLOAT, null, null, "varFloat"), + new SoapVar(array( + new SoapVar("arg2", XSD_STRING, null, null, "varString"), + new SoapVar(342, XSD_INT, null, null, "varInt"), + new SoapVar(123.452, XSD_FLOAT, null, null, "varFloat") + ), SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/xsd", 'varStruct') + ), SOAP_ENC_OBJECT, "SOAPStructStruct", "http://soapinterop.org/xsd"), "inputStruct"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoNestedStruct", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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/" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedStruct><inputStruct xsi:type="ns2:SOAPStructStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">123.45</varFloat><varStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg2</varString><varInt xsi:type="xsd:int">342</varInt><varFloat xsi:type="xsd:float">123.452</varFloat></varStruct></inputStruct></ns1:echoNestedStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedStructResponse><return xsi:type="ns2:SOAPStructStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">123.45</varFloat><varStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg2</varString><varInt xsi:type="xsd:int">342</varInt><varFloat xsi:type="xsd:float">123.452</varFloat></varStruct></return></ns1:echoNestedStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt new file mode 100644 index 0000000..a51ab2b --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP Interop Round2 groupB 004 (php/wsdl): echoNestedStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$param = (object)array( + 'varString' => "arg", + 'varInt' => 34, + 'varFloat' => 123.45, + 'varStruct' => (object)array( + 'varString' => "arg2", + 'varInt' => 342, + 'varFloat' => 123.452, + )); + +$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoNestedStruct($param); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedStruct><inputStruct xsi:type="ns2:SOAPStructStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">123.45</varFloat><varStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg2</varString><varInt xsi:type="xsd:int">342</varInt><varFloat xsi:type="xsd:float">123.452</varFloat></varStruct></inputStruct></ns1:echoNestedStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedStructResponse><return xsi:type="ns2:SOAPStructStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">123.45</varFloat><varStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg2</varString><varInt xsi:type="xsd:int">342</varInt><varFloat xsi:type="xsd:float">123.452</varFloat></varStruct></return></ns1:echoNestedStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005p.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005p.phpt new file mode 100644 index 0000000..3dd17e6 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005p.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP Interop Round2 groupB 005 (php/direct): echoNestedArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$param = (object)array( + 'varString'=>'arg', + 'varInt'=>34, + 'varFloat'=>325.325, + 'varArray' => array('red','blue','green')); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoNestedArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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:echoNestedArray><param0 xsi:type="SOAP-ENC:Struct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat><varArray SOAP-ENC:arrayType="xsd:string[3]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">red</item><item xsi:type="xsd:string">blue</item><item xsi:type="xsd:string">green</item></varArray></param0></ns1:echoNestedArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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/" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedArrayResponse><return xsi:type="ns2:SOAPArrayStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat><varArray SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">red</item><item xsi:type="xsd:string">blue</item><item xsi:type="xsd:string">green</item></varArray></return></ns1:echoNestedArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005s.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005s.phpt new file mode 100644 index 0000000..e8cacfa --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005s.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round2 groupB 005 (soap/direct): echoNestedArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$param = new SoapParam(new SoapVar(array( + new SoapVar("arg", XSD_STRING, null, null, "varString"), + new SoapVar(34, XSD_INT, null, null, "varInt"), + new SoapVar(325.325, XSD_FLOAT, null, null, "varFloat"), + new SoapVar(array( + new SoapVar("red", XSD_STRING), + new SoapVar("blue", XSD_STRING), + new SoapVar("green", XSD_STRING), + ), SOAP_ENC_ARRAY, "ArrayOfString", "http://soapinterop.org/xsd", 'varArray') + ), SOAP_ENC_OBJECT, "SOAPArrayStruct", "http://soapinterop.org/xsd"), "inputStruct"); +$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoNestedArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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/" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedArray><inputStruct xsi:type="ns2:SOAPArrayStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat><varArray SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfString"><item xsi:type="xsd:string">red</item><item xsi:type="xsd:string">blue</item><item xsi:type="xsd:string">green</item></varArray></inputStruct></ns1:echoNestedArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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/" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedArrayResponse><return xsi:type="ns2:SOAPArrayStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat><varArray SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">red</item><item xsi:type="xsd:string">blue</item><item xsi:type="xsd:string">green</item></varArray></return></ns1:echoNestedArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt new file mode 100644 index 0000000..e11051f --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP Interop Round2 groupB 005 (php/wsdl): echoNestedArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$param = (object)array( + 'varString'=>'arg', + 'varInt'=>34, + 'varFloat'=>325.325, + 'varArray' => array('red','blue','green')); +$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoNestedArray($param); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round2_groupB.inc"); +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://soapinterop.org/" 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/" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedArray><inputStruct xsi:type="ns2:SOAPArrayStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat><varArray SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">red</item><item xsi:type="xsd:string">blue</item><item xsi:type="xsd:string">green</item></varArray></inputStruct></ns1:echoNestedArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/" 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/" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoNestedArrayResponse><return xsi:type="ns2:SOAPArrayStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat><varArray SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">red</item><item xsi:type="xsd:string">blue</item><item xsi:type="xsd:string">green</item></varArray></return></ns1:echoNestedArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round2/GroupB/round2_groupB.inc b/ext/soap/tests/interop/Round2/GroupB/round2_groupB.inc new file mode 100644 index 0000000..77b8127 --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/round2_groupB.inc @@ -0,0 +1,38 @@ +<?php +class SOAP_Interop_GroupB { + + function echoStructAsSimpleTypes ($struct) + { + return array('outputString' => $struct->varString, + 'outputInteger' => $struct->varInt, + 'outputFloat' => $struct->varFloat); + } + + function echoSimpleTypesAsStruct($string, $int, $float) + { + return (object)array("varString" => $string, + "varInt" => $int, + "varFloat" => $float); + } + + function echoNestedStruct($struct) + { + return $struct; + } + + function echo2DStringArray($ary) + { + return $ary; + } + + function echoNestedArray($ary) + { + return $ary; + } +} + +ini_set("soap.wsdl_cache_enabled",0); +$server = new SoapServer(dirname(__FILE__)."/round2_groupB.wsdl"); +$server->setClass("SOAP_Interop_GroupB"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round2/GroupB/round2_groupB.wsdl b/ext/soap/tests/interop/Round2/GroupB/round2_groupB.wsdl new file mode 100644 index 0000000..8fc2a1b --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/round2_groupB.wsdl @@ -0,0 +1,192 @@ +<?xml version="1.0"?> +<definitions name="InteropTest" + targetNamespace="http://soapinterop.org/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:tns="http://soapinterop.org/" + xmlns:s="http://soapinterop.org/xsd" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + + <types> + <schema xmlns="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://soapinterop.org/xsd"> + + <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> + + <complexType name="ArrayOfstring"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/> + </restriction> + </complexContent> + </complexType> + <complexType name="ArrayOfint"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/> + </restriction> + </complexContent> + </complexType> + <complexType name="ArrayOffloat"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/> + </restriction> + </complexContent> + </complexType> + <complexType name="ArrayOfSOAPStruct"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="s:SOAPStruct[]"/> + </restriction> + </complexContent> + </complexType> + <complexType name="SOAPStruct"> + <all> + <element name="varString" type="string" nillable="true"/> + <element name="varInt" type="int" nillable="true"/> + <element name="varFloat" type="float" nillable="true"/> + </all> + </complexType> + <complexType name="SOAPStructStruct"> + <all> + <element name="varString" type="string" nillable="true"/> + <element name="varInt" type="int" nillable="true"/> + <element name="varFloat" type="float" nillable="true"/> + <element name="varStruct" type="s:SOAPStruct"/> + </all> + </complexType> + <complexType name="SOAPArrayStruct"> + <all> + <element name="varString" type="string" nillable="true"/> + <element name="varInt" type="int" nillable="true"/> + <element name="varFloat" type="float" nillable="true"/> + <element name="varArray" type="s:ArrayOfstring"/> + </all> + </complexType> + <complexType name="ArrayOfString2D"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[,]"/> + </restriction> + </complexContent> + </complexType> + </schema> + </types> + + <message name="echoStructAsSimpleTypesRequest"> + <part name="inputStruct" type="s:SOAPStruct"/> + </message> + <message name="echoStructAsSimpleTypesResponse"> + <part name="outputString" type="xsd:string"/> + <part name="outputInteger" type="xsd:int"/> + <part name="outputFloat" type="xsd:float"/> + </message> + <message name="echoSimpleTypesAsStructRequest"> + <part name="inputString" type="xsd:string"/> + <part name="inputInteger" type="xsd:int"/> + <part name="inputFloat" type="xsd:float"/> + </message> + <message name="echoSimpleTypesAsStructResponse"> + <part name="return" type="s:SOAPStruct"/> + </message> + <message name="echo2DStringArrayRequest"> + <part name="input2DStringArray" type="s:ArrayOfString2D"/> + </message> + <message name="echo2DStringArrayResponse"> + <part name="return" type="s:ArrayOfString2D"/> + </message> + <message name="echoNestedStructRequest"> + <part name="inputStruct" type="s:SOAPStructStruct"/> + </message> + <message name="echoNestedStructResponse"> + <part name="return" type="s:SOAPStructStruct"/> + </message> + <message name="echoNestedArrayRequest"> + <part name="inputStruct" type="s:SOAPArrayStruct"/> + </message> + <message name="echoNestedArrayResponse"> + <part name="return" type="s:SOAPArrayStruct"/> + </message> + + <portType name="InteropTestPortTypeB"> + <operation name="echoStructAsSimpleTypes" parameterOrder="inputStruct outputString outputInteger outputFloat"> + <input message="tns:echoStructAsSimpleTypesRequest" name="echoStructAsSimpleTypes"/> + <output message="tns:echoStructAsSimpleTypesResponse" name="echoStructAsSimpleTypesResponse"/> + </operation> + <operation name="echoSimpleTypesAsStruct" parameterOrder="inputString inputInteger inputFloat"> + <input message="tns:echoSimpleTypesAsStructRequest" name="echoSimpleTypesAsStruct"/> + <output message="tns:echoSimpleTypesAsStructResponse" name="echoSimpleTypesAsStructResponse"/> + </operation> + <operation name="echo2DStringArray" parameterOrder="input2DStringArray"> + <input message="tns:echo2DStringArrayRequest" name="echo2DStringArray"/> + <output message="tns:echo2DStringArrayResponse" name="echo2DStringArrayResponse"/> + </operation> + <operation name="echoNestedStruct" parameterOrder="inputStruct"> + <input message="tns:echoNestedStructRequest" name="echoNestedStruct"/> + <output message="tns:echoNestedStructResponse" name="echoNestedStructResponse"/> + </operation> + <operation name="echoNestedArray" parameterOrder="inputStruct"> + <input message="tns:echoNestedArrayRequest" name="echoNestedArray"/> + <output message="tns:echoNestedArrayResponse" name="echoNestedArrayResponse"/> + </operation> + </portType> + + <binding name="InteropTestSoapBindingB" type="tns:InteropTestPortTypeB"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoStructAsSimpleTypes"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoSimpleTypesAsStruct"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echo2DStringArray"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoNestedStruct"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoNestedArray"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + + <service name="interopLabB"> + <port name="interopTestPortB" binding="tns:InteropTestSoapBindingB"> + <soap:address location="round2_groupB.inc"/> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/interop/Round2/GroupB/skipif.inc b/ext/soap/tests/interop/Round2/GroupB/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/interop/Round2/GroupB/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/interop/Round3/GroupD/imported/import1B.wsdl b/ext/soap/tests/interop/Round3/GroupD/imported/import1B.wsdl new file mode 100644 index 0000000..26ab6db --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/imported/import1B.wsdl @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<definitions name="SoapInterop" targetNamespace="http://soapinterop.org/definitions/" + xmlns:wsdlns="http://soapinterop.org/definitions/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + <types/> + <message name="echoStringRequest"> + <part name="x" type="xsd:string"/> + </message> + <message name="echoStringResponse"> + <part name="Result" type="xsd:string"/> + </message> + <portType name="SoapInteropImport1PortType"> + <operation name="echoString" parameterOrder="x"> + <input message="wsdlns:echoStringRequest"/> + <output message="wsdlns:echoStringResponse"/> + </operation> + </portType> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/imported/import2B.wsdl b/ext/soap/tests/interop/Round3/GroupD/imported/import2B.wsdl new file mode 100644 index 0000000..8a397bc --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/imported/import2B.wsdl @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<definitions name="SoapInterop" targetNamespace="http://soapinterop.org/definitions/" + xmlns:wsdlns="http://soapinterop.org/definitions/" + xmlns:typens="http://soapinterop.org/xsd" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + <import location="import2B.xsd" namespace="http://soapinterop.org/xsd" /> + <message name='Server.echoStruct'> + <part name='inputStruct' type='typens:SOAPStruct'/> + </message> + <message name='Server.echoStructResponse'> + <part name='Result' type='typens:SOAPStruct'/> + </message> + + <portType name="SoapInteropImport2PortType"> + <operation name='echoStruct' parameterOrder='inputStruct'> + <input message='wsdlns:Server.echoStruct' /> + <output message='wsdlns:Server.echoStructResponse' /> + </operation> + </portType> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/imported/import2B.xsd b/ext/soap/tests/interop/Round3/GroupD/imported/import2B.xsd new file mode 100644 index 0000000..b35eded --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/imported/import2B.xsd @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<schema targetNamespace='http://soapinterop.org/xsd' + xmlns='http://www.w3.org/2001/XMLSchema' + elementFormDefault='unqualified'> + <complexType name="SOAPStruct"> + <all> + <element name="varString" type="string" /> + <element name="varInt" type="int" /> + <element name="varFloat" type="float" /> + </all> + </complexType> +</schema>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt new file mode 100644 index 0000000..edff0a4 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round3 GroupD Compound1 001 (php/wsdl): echoPerson +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class Person { + function Person($a=NULL, $i=NULL, $n=NULL, $m=NULL) { + $this->Age = $a; + $this->ID = $i; + $this->Name = $n; + $this->Male = $m; + } +} +$person = new Person(32,12345,'Shane',TRUE); +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoPerson($person); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_compound1.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:x_Person Name="Shane" Male="true"><ns1:Age>32</ns1:Age><ns1:ID>12345</ns1:ID></ns1:x_Person></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:result_Person Name="Shane" Male="true"><ns1:Age>32</ns1:Age><ns1:ID>12345</ns1:ID></ns1:result_Person></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt new file mode 100644 index 0000000..9b80248 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD Compound1 002 (php/wsdl): echoDocument +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoDocument("Test Document Here"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_compound1.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:x_Document>Test Document Here</ns1:x_Document></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:result_Document>Test Document Here</ns1:result_Document></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt new file mode 100644 index 0000000..d8dbf28 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD Compound1 003 (php/wsdl): echoDocument +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoDocument((object)array("_"=>"Test Document Here","ID"=>1)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_compound1.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:x_Document ID="1">Test Document Here</ns1:x_Document></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:result_Document ID="1">Test Document Here</ns1:result_Document></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt new file mode 100644 index 0000000..b1a60df --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt @@ -0,0 +1,40 @@ +--TEST-- +SOAP Interop Round3 GroupD Compound2 001 (php/wsdl): echoEmployee +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class Person { + function Person($a=NULL, $i=NULL, $n=NULL, $m=NULL) { + $this->Age = $a; + $this->ID = $i; + $this->Name = $n; + $this->Male = $m; + } +} +class Employee { + function Employee($person=NULL,$id=NULL,$salary=NULL) { + $this->person = $person; + $this->ID = $id; + $this->salary = $salary; + } +} +$person = new Person(32,12345,'Shane',TRUE); +$employee = new Employee($person,12345,1000000.00); + +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound2.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoEmployee($employee); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_compound2.inc"); +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://soapinterop.org/person" xmlns:ns2="http://soapinterop.org/employee"><SOAP-ENV:Body><ns2:x_Employee><ns2:person><ns1:Name>Shane</ns1:Name><ns1:Male>true</ns1:Male></ns2:person><ns2:salary>1000000</ns2:salary><ns2:ID>12345</ns2:ID></ns2:x_Employee></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/person" xmlns:ns2="http://soapinterop.org/employee"><SOAP-ENV:Body><ns2:result_Employee><ns2:person><ns1:Name>Shane</ns1:Name><ns1:Male>true</ns1:Male></ns2:person><ns2:salary>1000000</ns2:salary><ns2:ID>12345</ns2:ID></ns2:result_Employee></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt new file mode 100644 index 0000000..9f6fc41 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD Doc Lit 001 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString("Hello World"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_doclit.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringParam>Hello World</ns1:echoStringParam></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringReturn>Hello World</ns1:echoStringReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt new file mode 100644 index 0000000..f3e035e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD Doc Lit 002 (php/wsdl): echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringArray(array("one","two","three")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_doclit.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringArrayParam><ns1:string>one</ns1:string><ns1:string>two</ns1:string><ns1:string>three</ns1:string></ns1:echoStringArrayParam></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringArrayReturn><ns1:string>one</ns1:string><ns1:string>two</ns1:string><ns1:string>three</ns1:string></ns1:echoStringArrayReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt new file mode 100644 index 0000000..2e74e7c --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round3 GroupD Doc Lit 003 (php/wsdl): echoStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStruct($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_doclit.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStructParam><ns1:varFloat>325.325</ns1:varFloat><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString></ns1:echoStructParam></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStructReturn><ns1:varFloat>325.325</ns1:varFloat><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString></ns1:echoStructReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt new file mode 100644 index 0000000..32fedea --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD Doc Lit 004 (php/wsdl): echoVoid +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoVoid(); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_doclit.inc"); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body/></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body/></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt new file mode 100644 index 0000000..3fd9c5e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD Doc Lit Parameters 001 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString(array("param0"=>"Hello World")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_doclitparams.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoString><ns1:param0>Hello World</ns1:param0></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringResponse><ns1:return>Hello World</ns1:return></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt new file mode 100644 index 0000000..564407d --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD Doc Lit Parameters 002 (php/wsdl): echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringArray(array("param0"=>array("one","two","three"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_doclitparams.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringArray><ns1:param0><ns1:string>one</ns1:string><ns1:string>two</ns1:string><ns1:string>three</ns1:string></ns1:param0></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringArrayResponse><ns1:return><ns1:string>one</ns1:string><ns1:string>two</ns1:string><ns1:string>three</ns1:string></ns1:return></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt new file mode 100644 index 0000000..26ce8de --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round3 GroupD Doc Lit Parameters 003 (php/wsdl): echoStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStruct(array("param0"=>$struct)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_doclitparams.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStruct><ns1:param0><ns1:varFloat>325.325</ns1:varFloat><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString></ns1:param0></ns1:echoStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStructResponse><ns1:return><ns1:varFloat>325.325</ns1:varFloat><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString></ns1:return></ns1:echoStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt new file mode 100644 index 0000000..79b0ced --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD Doc Lit Parameters 004 (php/wsdl): echoVoid +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoVoid(); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_doclitparams.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoVoid/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoVoidResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt new file mode 100644 index 0000000..47e2900 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD EmptySA 001 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_emptysa.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString("Hello World"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_emptysa.inc"); +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://soapinterop/" 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:echoString><a xsi:type="xsd:string">Hello World</a></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop/" 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:echoStringResponse><Result xsi:type="xsd:string">Hello World</Result></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt new file mode 100644 index 0000000..34eac1c --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD Import1 001 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import1.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString("Hello World"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_import1.inc"); +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://soapinterop/echoString/" 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:echoString><x xsi:type="xsd:string">Hello World</x></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop/echoStringResponse/" 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:echoStringResponse><Result xsi:type="xsd:string">Hello World</Result></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt new file mode 100644 index 0000000..270b30f --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round3 GroupD Import2 001 (php/wsdl): echoStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import2.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStruct($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_import2.inc"); +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://soapinterop/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStruct><inputStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></inputStruct></ns1:echoStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructResponse><Result xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></Result></ns1:echoStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt new file mode 100644 index 0000000..892ef45 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round3 GroupD Import3 001 (php/wsdl): echoStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStruct($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_import3.inc"); +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://soapinterop/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStruct><inputStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></inputStruct></ns1:echoStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructResponse><Result xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></Result></ns1:echoStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt new file mode 100644 index 0000000..e4279fc --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round3 GroupD Import3 002 (php/wsdl): echoStructArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct1 = new SOAPStruct('arg',34,325.325); +$struct2 = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStructArray(array($struct1,$struct2)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_import3.inc"); +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://soapinterop/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://soapinterop.org/xsd2" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructArray><inputArray SOAP-ENC:arrayType="ns2:SOAPStruct[2]" xsi:type="ns3:ArrayOfSOAPStruct"><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item></inputArray></ns1:echoStructArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop/" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://soapinterop.org/xsd2" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructArrayResponse><Result SOAP-ENC:arrayType="ns2:SOAPStruct[2]" xsi:type="ns3:ArrayOfSOAPStruct"><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></item></Result></ns1:echoStructArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt new file mode 100644 index 0000000..c70eae0 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD RPC Encoded 001 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString("Hello World"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_rpcenc.inc"); +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://soapinterop.org/WSDLInteropTestRpcEnc" 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:echoString><param0 xsi:type="xsd:string">Hello World</param0></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" 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:echoStringResponse><return xsi:type="xsd:string">Hello World</return></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt new file mode 100644 index 0000000..839afde --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD RPC Encoded 002 (php/wsdl): echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringArray(array("one","two","three")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_rpcenc.inc"); +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://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArray><param0 SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">one</item><item xsi:type="xsd:string">two</item><item xsi:type="xsd:string">three</item></param0></ns1:echoStringArray></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStringArrayResponse><return SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">one</item><item xsi:type="xsd:string">two</item><item xsi:type="xsd:string">three</item></return></ns1:echoStringArrayResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt new file mode 100644 index 0000000..cc27d6f --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round3 GroupD RPC Encoded 003 (php/wsdl): echoStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStruct($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_rpcenc.inc"); +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://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStruct><param0 xsi:type="ns2:SOAPStruct"><varFloat xsi:type="xsd:float">325.325</varFloat><varInt xsi:type="xsd:int">34</varInt><varString xsi:type="xsd:string">arg</varString></param0></ns1:echoStruct></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoStructResponse><return xsi:type="ns2:SOAPStruct"><varFloat xsi:type="xsd:float">325.325</varFloat><varInt xsi:type="xsd:int">34</varInt><varString xsi:type="xsd:string">arg</varString></return></ns1:echoStructResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt new file mode 100644 index 0000000..a6cbbe8 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupD RPC Encoded 004 (php/wsdl): echoVoid +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoVoid(); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupD_rpcenc.inc"); +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://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVoid/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVoidResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound1.inc b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound1.inc new file mode 100644 index 0000000..8e28669 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound1.inc @@ -0,0 +1,17 @@ +<?php +class SOAP_Interop_GroupD { + function echoPerson($person) + { + return $person; + } + + function echoDocument($doc) + { + return $doc; + } +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupD_compound1.wsdl"); +$server->setClass("SOAP_Interop_GroupD"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound1.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound1.wsdl new file mode 100644 index 0000000..6a8f851 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound1.wsdl @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="SoapInteropCompound" + targetNamespace="http://soapinterop.org/" + xmlns:wsdlns="http://soapinterop.org/" + xmlns:typens="http://soapinterop.org/xsd" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + <types> + <schema targetNamespace="http://soapinterop.org/xsd" + xmlns="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + > + <complexType name="Person"> + <sequence> + <element minOccurs="1" maxOccurs="1" name="Age" type="double"/> + <element minOccurs="1" maxOccurs="1" name="ID" type="xsd:float"/> + </sequence> + <attribute name="Name" type="string"/> + <attribute name="Male" type="boolean"/> + </complexType> + <element name="x_Person" type="typens:Person"/> + <element name="result_Person" type="typens:Person"/> + + <complexType name="Document"> + <simpleContent> + <extension base="string"> + <xsd:attribute name ="ID" type="string"/> + </extension> + </simpleContent> + </complexType> + <element name="x_Document" type="typens:Document"/> + <element name="result_Document" type="typens:Document"/> + </schema> + </types> + <message name="echoPerson"> + <part name="x" element="typens:x_Person"/> + </message> + <message name="echoPersonResponse"> + <part name="Result" element="typens:result_Person"/> + </message> + <message name="echoDocument"> + <part name="x" element="typens:x_Document"/> + </message> + <message name="echoDocumentResponse"> + <part name="Result" element="typens:result_Document"/> + </message> + <portType name="SoapInteropCompound1PortType"> + <operation name="echoPerson" parameterOrder="x"> + <input message="wsdlns:echoPerson"/> + <output message="wsdlns:echoPersonResponse"/> + </operation> + <operation name="echoDocument" parameterOrder="x"> + <input message="wsdlns:echoDocument"/> + <output message="wsdlns:echoDocumentResponse"/> + </operation> + </portType> + <binding name="SoapInteropCompound1Binding" type="wsdlns:SoapInteropCompound1PortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoPerson"> + <soap:operation soapAction="http://soapinterop/echoPerson"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="echoDocument"> + <soap:operation soapAction="http://soapinterop/echoDocument"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + + </binding> + <service name="Compound1"> + <port name="SoapInteropCompound1Port" binding="wsdlns:SoapInteropCompound1Binding"> + <soap:address location="round3_groupD_compound1.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound2.inc b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound2.inc new file mode 100644 index 0000000..8f470ba --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound2.inc @@ -0,0 +1,12 @@ +<?php +class SOAP_Interop_GroupD { + function echoEmployee($employee) + { + return $employee; + } +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupD_compound2.wsdl"); +$server->setClass("SOAP_Interop_GroupD"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound2.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound2.wsdl new file mode 100644 index 0000000..e8b63e0 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_compound2.wsdl @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="SoapInteropCompound" targetNamespace="http://soapinterop.org/" + xmlns:wsdlns="http://soapinterop.org/" + xmlns:emp="http://soapinterop.org/employee" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + <types> + <schema targetNamespace="http://soapinterop.org/person" + xmlns="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified"> + + <complexType name="Person"> + <sequence> + <element minOccurs="1" maxOccurs="1" name="Name" type="string"/> + <element minOccurs="1" maxOccurs="1" name="Male" type="boolean"/> + </sequence> + </complexType> + </schema> + <schema targetNamespace = "http://soapinterop.org/employee" + xmlns:prs = "http://soapinterop.org/person" + xmlns="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified"> + <import namespace="http://soapinterop.org/person" /> + <complexType name="Employee"> + <sequence> + <element minOccurs="1" maxOccurs="1" name="person" type="prs:Person"/> + <element minOccurs="1" maxOccurs="1" name="salary" type="double"/> + <element minOccurs="1" maxOccurs="1" name="ID" type="int"/> + </sequence> + </complexType> + <element name="x_Employee" type="emp:Employee"/> + <element name="result_Employee" type="emp:Employee"/> + </schema> + </types> + <message name="echoEmployee"> + <part name="x" element="emp:x_Employee"/> + </message> + <message name="echoEmployeeResponse"> + <part name="result" element="emp:result_Employee"/> + </message> + <portType name="SoapInteropCompound2PortType"> + <operation name="echoEmployee" parameterOrder="x"> + <input message="wsdlns:echoEmployee"/> + <output message="wsdlns:echoEmployeeResponse"/> + </operation> + </portType> + <binding name="SoapInteropCompound2Binding" type="wsdlns:SoapInteropCompound2PortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoEmployee"> + <soap:operation soapAction="#echoEmployee"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + </binding> + <service name="Compound2"> + <port name="SoapInteropCompound2Port" binding="wsdlns:SoapInteropCompound2Binding"> + <soap:address location="round3_groupD_compound2.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclit.inc b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclit.inc new file mode 100644 index 0000000..a9da565 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclit.inc @@ -0,0 +1,28 @@ +<?php +class SOAP_Interop_GroupD { + + function echoString($inputString) + { + return $inputString; + } + + function echoStringArray($inputStringArray) + { + return $inputStringArray; + } + + function echoStruct($inputStruct) + { + return $inputStruct; + } + + function echoVoid() + { + return NULL; + } +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupD_doclit.wsdl"); +$server->setClass("SOAP_Interop_GroupD"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclit.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclit.wsdl new file mode 100644 index 0000000..4febca8 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclit.wsdl @@ -0,0 +1,135 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="WSDLInteropTestDocLitService" + targetNamespace="http://soapinterop.org/WSDLInteropTestDocLit" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://soapinterop.org/WSDLInteropTestDocLit" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsd1="http://soapinterop.org/xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <types> + <schema targetNamespace="http://soapinterop.org/xsd" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + elementFormDefault="qualified"> + <complexType name="ArrayOfstring_literal"> + <sequence> + <element maxOccurs="unbounded" minOccurs="1" name="string" type="xsd:string"/> + </sequence> + </complexType> + <complexType name="SOAPStruct"> + <all> + <element name="varFloat" type="xsd:float"/> + <element name="varInt" type="xsd:int"/> + <element name="varString" type="xsd:string"/> + </all> + </complexType> + + <element name="echoStringParam" type="xsd:string"/> + + <element name="echoStringReturn" type="xsd:string"/> + <element name="echoStringArrayParam" type="xsd1:ArrayOfstring_literal"/> + + <element name="echoStringArrayReturn" type="xsd1:ArrayOfstring_literal"/> + + <element name="echoStructParam" type="xsd1:SOAPStruct"/> + + <element name="echoStructReturn" type="xsd1:SOAPStruct"/> + </schema> + </types> + <message name="echoString"> + <part element="xsd1:echoStringParam" name="a"/> + </message> + <message name="echoStringResponse"> + <part element="xsd1:echoStringReturn" name="result"/> + </message> + <message name="echoStringArray"> + <part element="xsd1:echoStringArrayParam" name="a"/> + </message> + <message name="echoStringArrayResponse"> + <part element="xsd1:echoStringArrayReturn" name="result"/> + </message> + <message name="echoStruct"> + <part element="xsd1:echoStructParam" name="a"/> + </message> + <message name="echoStructResponse"> + <part element="xsd1:echoStructReturn" name="result"/> + </message> + <message name="echoVoid"/> + <message name="echoVoidResponse"/> + + <portType name="WSDLInteropTestDocLitPortType"> + <operation name="echoString"> + <input message="tns:echoString" name="echoString"/> + <output message="tns:echoStringResponse" name="echoStringResponse"/> + </operation> + <operation name="echoStringArray"> + <input message="tns:echoStringArray" name="echoStringArray"/> + <output message="tns:echoStringArrayResponse" name="echoStringArrayResponse"/> + </operation> + <operation name="echoStruct"> + <input message="tns:echoStruct" name="echoStruct"/> + <output message="tns:echoStructResponse" name="echoStructResponse"/> + </operation> + <operation name="echoVoid"> + <input message="tns:echoVoid" name="echoVoid"/> + <output message="tns:echoVoidResponse" name="echoVoidResponse"/> + </operation> + </portType> + <binding name="WSDLInteropTestDocLitPortBinding" + type="tns:WSDLInteropTestDocLitPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoString"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoStringArray"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoStringArray"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringArrayResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoStruct"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoStruct"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStructResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoVoid"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoVoid"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoVoidResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + </binding> + <service name="WSDLInteropTestDocLitService"> + <port binding="tns:WSDLInteropTestDocLitPortBinding" + name="WSDLInteropTestDocLitPort"> + <soap:address + location="round3_groupD_doclit.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclitparams.inc b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclitparams.inc new file mode 100644 index 0000000..6561ff1 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclitparams.inc @@ -0,0 +1,29 @@ +<?php +class SOAP_Interop_GroupD { + + function echoString($inputString) + { + return array("return"=>$inputString->param0); + } + + function echoStringArray($inputStringArray) + { + return array("return"=>$inputStringArray->param0); + } + + function echoStruct($inputStruct) + { + return array("return"=>$inputStruct->param0); + } + + function echoVoid() + { + return NULL; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl"); +$server->setClass("SOAP_Interop_GroupD"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclitparams.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclitparams.wsdl new file mode 100644 index 0000000..9ecf1e1 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_doclitparams.wsdl @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="WSDLInteropTestDocLitService" + targetNamespace="http://soapinterop.org/WSDLInteropTestDocLit" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://soapinterop.org/WSDLInteropTestDocLit" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsd1="http://soapinterop.org/xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <types> + <schema targetNamespace="http://soapinterop.org/xsd" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" elementFormDefault="qualified"> + <complexType name="ArrayOfstring_literal"> + <sequence> + <element maxOccurs="unbounded" minOccurs="1" name="string" type="xsd:string"/> + </sequence> + </complexType> + <complexType name="SOAPStruct"> + <all> + <element name="varFloat" type="xsd:float"/> + <element name="varInt" type="xsd:int"/> + <element name="varString" type="xsd:string"/> + </all> + </complexType> + + <element name="echoString"> + <complexType> + <sequence> + <element name="param0" type="xsd:string"/> + </sequence> + </complexType> + </element> + <element name="echoStringResponse"> + <complexType> + <sequence> + <element name="return" type="xsd:string"/> + </sequence> + </complexType> + </element> + <element name="echoStringArray"> + <complexType> + <sequence> + <element name="param0" type="xsd1:ArrayOfstring_literal"/> + </sequence> + </complexType> + </element> + <element name="echoStringArrayResponse"> + <complexType> + <sequence> + <element name="return" type="xsd1:ArrayOfstring_literal"/> + </sequence> + </complexType> + </element> + <element name="echoStruct"> + <complexType> + <sequence> + <element name="param0" type="xsd1:SOAPStruct"/> + </sequence> + </complexType> + </element> + <element name="echoStructResponse"> + <complexType> + <sequence> + <element name="return" type="xsd1:SOAPStruct"/> + </sequence> + </complexType> + </element> + <element name="echoVoid"> + <complexType/> + </element> + <element name="echoVoidResponse"> + <complexType/> + </element> + </schema> + </types> + <message name="echoString"> + <part element="xsd1:echoString" name="parameters"/> + </message> + <message name="echoStringResponse"> + <part element="xsd1:echoStringResponse" name="parameters"/> + </message> + <message name="echoStringArray"> + <part element="xsd1:echoStringArray" name="parameters"/> + </message> + <message name="echoStringArrayResponse"> + <part element="xsd1:echoStringArrayResponse" name="parameters"/> + </message> + <message name="echoStruct"> + <part element="xsd1:echoStruct" name="parameters"/> + </message> + <message name="echoStructResponse"> + <part element="xsd1:echoStructResponse" name="parameters"/> + </message> + <message name="echoVoid"> + <part element="xsd1:echoVoid" name="parameters"/> + </message> + <message name="echoVoidResponse"> + <part element="xsd1:echoVoidResponse" name="parameters"/> + </message> + <portType name="WSDLInteropTestDocLitPortType"> + <operation name="echoString"> + <input message="tns:echoString" name="echoString"/> + <output message="tns:echoStringResponse" name="echoStringResponse"/> + </operation> + <operation name="echoStringArray"> + <input message="tns:echoStringArray" name="echoStringArray"/> + <output message="tns:echoStringArrayResponse" name="echoStringArrayResponse"/> + </operation> + <operation name="echoStruct"> + <input message="tns:echoStruct" name="echoStruct"/> + <output message="tns:echoStructResponse" name="echoStructResponse"/> + </operation> + <operation name="echoVoid"> + <input message="tns:echoVoid" name="echoVoid"/> + <output message="tns:echoVoidResponse" name="echoVoidResponse"/> + </operation> + </portType> + <binding name="WSDLInteropTestDocLitPortBinding" + type="tns:WSDLInteropTestDocLitPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoString"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoStringArray"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoStringArray"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringArrayResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoStruct"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoStruct"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStructResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + <operation name="echoVoid"> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoVoid"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoVoidResponse"> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + </binding> + <service name="WSDLInteropTestDocLitService"> + <port binding="tns:WSDLInteropTestDocLitPortBinding" + name="WSDLInteropTestDocLitPort"> + <soap:address + location="round3_groupD_doclitparams.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_emptysa.inc b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_emptysa.inc new file mode 100644 index 0000000..ee38a12 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_emptysa.inc @@ -0,0 +1,14 @@ +<?php +class SOAP_Interop_GroupD { + + function echoString($inputString) + { + return $inputString; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupD_emptysa.wsdl"); +$server->setClass("SOAP_Interop_GroupD"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_emptysa.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_emptysa.wsdl new file mode 100644 index 0000000..09a09a4 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_emptysa.wsdl @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="SoapInterop" targetNamespace="http://soapinterop/" + xmlns:wsdlns="http://soapinterop/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + <types/> + <message name="echoStringRequest"> + <part name="a" type="xsd:string"/> + </message> + <message name="echoStringResponse"> + <part name="Result" type="xsd:string"/> + </message> + <portType name="SoapInteropEmptySAPortType"> + <operation name="echoString" parameterOrder="a"> + <input message="wsdlns:echoStringRequest"/> + <output message="wsdlns:echoStringResponse"/> + </operation> + </portType> + <binding name="SoapInteropEmptySABinding" type="wsdlns:SoapInteropEmptySAPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <soap:operation soapAction=""/> + <input> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + <service name="EmptySA"> + <port name="SoapInteropEmptySAPort" binding="wsdlns:SoapInteropEmptySABinding"> + <soap:address location="round3_groupD_emptysa.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import1.inc b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import1.inc new file mode 100644 index 0000000..ecde53e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import1.inc @@ -0,0 +1,14 @@ +<?php +class SOAP_Interop_GroupD { + + function echoString($inputString) + { + return $inputString; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupD_import1.wsdl"); +$server->setClass("SOAP_Interop_GroupD"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import1.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import1.wsdl new file mode 100644 index 0000000..d928830 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import1.wsdl @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="SoapInterop" targetNamespace="http://soapinterop.org/" + xmlns:wsdlns1="http://soapinterop.org/definitions/" + xmlns:wsdlns="http://soapinterop.org/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + <import location="imported/import1B.wsdl" namespace="http://soapinterop.org/definitions/" /> + + <binding name="SoapInteropImport1Binding" type="wsdlns1:SoapInteropImport1PortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop/echoString/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop/echoStringResponse/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + <service name="Import1"> + <port name="SoapInteropImport1Port" binding="wsdlns:SoapInteropImport1Binding"> + <soap:address location="round3_groupD_import1.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2.inc b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2.inc new file mode 100644 index 0000000..5957c37 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2.inc @@ -0,0 +1,14 @@ +<?php +class SOAP_Interop_GroupD { + + function echoStruct($inputStruct) + { + return $inputStruct; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupD_import2.wsdl"); +$server->setClass("SOAP_Interop_GroupD"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2.wsdl new file mode 100644 index 0000000..fc0f8ae --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2.wsdl @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="SoapInterop" targetNamespace="http://soapinterop.org/main/" + xmlns:wsdlns1="http://soapinterop.org/definitions/" + xmlns:wsdlns="http://soapinterop.org/main/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + <import location="imported/import2B.wsdl" namespace="http://soapinterop.org/definitions/" /> + + <binding name="SoapInteropImport2Binding" type="wsdlns1:SoapInteropImport2PortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoStruct"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + <service name="Import2"> + <port name="SoapInteropImport2Port" binding="wsdlns:SoapInteropImport2Binding"> + <soap:address location="round3_groupD_import2.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2_absolute.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2_absolute.wsdl new file mode 100644 index 0000000..fc0f8ae --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2_absolute.wsdl @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="SoapInterop" targetNamespace="http://soapinterop.org/main/" + xmlns:wsdlns1="http://soapinterop.org/definitions/" + xmlns:wsdlns="http://soapinterop.org/main/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + <import location="imported/import2B.wsdl" namespace="http://soapinterop.org/definitions/" /> + + <binding name="SoapInteropImport2Binding" type="wsdlns1:SoapInteropImport2PortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoStruct"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + <service name="Import2"> + <port name="SoapInteropImport2Port" binding="wsdlns:SoapInteropImport2Binding"> + <soap:address location="round3_groupD_import2.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import3.inc b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import3.inc new file mode 100644 index 0000000..3a3df97 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import3.inc @@ -0,0 +1,19 @@ +<?php +class SOAP_Interop_GroupD { + + function echoStruct($inputStruct) + { + return $inputStruct; + } + + function echoStructArray($inputStructArray) + { + return $inputStructArray; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupD_import3.wsdl"); +$server->setClass("SOAP_Interop_GroupD"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import3.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import3.wsdl new file mode 100644 index 0000000..3dd2642 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_import3.wsdl @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="SoapInterop" targetNamespace="http://soapinterop.org/main2/" + xmlns:wsdlns="http://soapinterop.org/main2/" + xmlns:impns="http://soapinterop.org/definitions/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:typens2="http://soapinterop.org/xsd2" + xmlns:typens="http://soapinterop.org/xsd" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + + <import namespace = "http://soapinterop.org/xsd" location = "round3_groupD_import2.wsdl"/> + <import namespace = "http://soapinterop.org/definitions/" location = "round3_groupD_import2.wsdl"/> + + <types> + <schema targetNamespace='http://soapinterop.org/xsd2' + xmlns='http://www.w3.org/2001/XMLSchema' + xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' + xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/" + elementFormDefault='unqualified'> + <import namespace = "http://schemas.xmlsoap.org/soap/encoding/"/> + <import namespace = "http://soapinterop.org/xsd"/> + <complexType name ='ArrayOfSOAPStruct'> + <complexContent> + <restriction base='SOAP-ENC:Array'> + <attribute ref='SOAP-ENC:arrayType' wsdl:arrayType='typens:SOAPStruct[]'/> + </restriction> + </complexContent> + </complexType> + </schema> + </types> + + <message name='Server.echoStructArray'> + <part name='inputArray' type='typens2:ArrayOfSOAPStruct'/> + </message> + <message name='Server.echoStructArrayResponse'> + <part name='Result' type='typens2:ArrayOfSOAPStruct'/> + </message> + + <portType name="SoapInteropImport3PortType"> + <operation name='echoStruct' parameterOrder='inputStruct'> + <input message='impns:Server.echoStruct' /> + <output message='impns:Server.echoStructResponse' /> + </operation> + <operation name='echoStructArray' parameterOrder='inputArray'> + <input message='wsdlns:Server.echoStructArray' /> + <output message='wsdlns:Server.echoStructArrayResponse' /> + </operation> + </portType> + + <binding name="SoapInteropImport3Binding" type="wsdlns:SoapInteropImport3PortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoStruct"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + <operation name="echoStructArray"> + <soap:operation soapAction="http://soapinterop.org/"/> + <input> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://soapinterop/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + <service name="Import3"> + <port name="SoapInteropImport3Port" binding="wsdlns:SoapInteropImport3Binding"> + <soap:address location="round3_groupD_import3.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_rpcenc.inc b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_rpcenc.inc new file mode 100644 index 0000000..e88df33 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_rpcenc.inc @@ -0,0 +1,28 @@ +<?php +class SOAP_Interop_GroupD { + + function echoString($inputString) + { + return $inputString; + } + + function echoStringArray($inputStringArray) + { + return $inputStringArray; + } + + function echoStruct($inputStruct) + { + return $inputStruct; + } + + function echoVoid() + { + return NULL; + } +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl"); +$server->setClass("SOAP_Interop_GroupD"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupD/round3_groupD_rpcenc.wsdl b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_rpcenc.wsdl new file mode 100644 index 0000000..5e24411 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/round3_groupD_rpcenc.wsdl @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="WSDLInteropTestRpcEncService" + targetNamespace="http://soapinterop.org/WSDLInteropTestRpcEnc" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://soapinterop.org/WSDLInteropTestRpcEnc" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsd1="http://soapinterop.org/xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <types> + <schema targetNamespace="http://soapinterop.org/xsd" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" elementFormDefault="qualified"> + <import namespace = "http://schemas.xmlsoap.org/soap/encoding/"/> + <complexType name="ArrayOfstring"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[]"/> + </restriction> + </complexContent> + </complexType> + <complexType name="SOAPStruct"> + <all> + <element name="varFloat" type="xsd:float"/> + <element name="varInt" type="xsd:int"/> + <element name="varString" type="xsd:string"/> + </all> + </complexType> + </schema> + </types> + + <message name="echoString"> + <part name="param0" type="xsd:string"/> + </message> + <message name="echoStringResponse"> + <part name="return" type="xsd:string"/> + </message> + <message name="echoStringArray"> + <part name="param0" type="xsd1:ArrayOfstring"/> + </message> + <message name="echoStringArrayResponse"> + <part name="return" type="xsd1:ArrayOfstring"/> + </message> + <message name="echoStruct"> + <part name="param0" type="xsd1:SOAPStruct"/> + </message> + <message name="echoStructResponse"> + <part name="return" type="xsd1:SOAPStruct"/> + </message> + <message name="echoVoid"/> + <message name="echoVoidResponse"/> + <portType name="WSDLInteropTestRpcEncPortType"> + <operation name="echoString"> + <input message="tns:echoString" name="echoString"/> + <output message="tns:echoStringResponse" name="echoStringResponse"/> + </operation> + <operation name="echoStringArray"> + <input message="tns:echoStringArray" name="echoStringArray"/> + <output message="tns:echoStringArrayResponse" name="echoStringArrayResponse"/> + </operation> + <operation name="echoStruct"> + <input message="tns:echoStruct" name="echoStruct"/> + <output message="tns:echoStructResponse" name="echoStructResponse"/> + </operation> + <operation name="echoVoid"> + <input message="tns:echoVoid" name="echoVoid"/> + <output message="tns:echoVoidResponse" name="echoVoidResponse"/> + </operation> + </portType> + <binding name="WSDLInteropTestRpcEncPortBinding" + type="tns:WSDLInteropTestRpcEncPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <soap:operation soapAction="" style="rpc"/> + <input name="echoString"> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </input> + <output name="echoStringResponse"> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </output> + </operation> + <operation name="echoStringArray"> + <soap:operation soapAction="" style="rpc"/> + <input name="echoStringArray"> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </input> + <output name="echoStringArrayResponse"> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </output> + </operation> + <operation name="echoStruct"> + <soap:operation soapAction="" style="rpc"/> + <input name="echoStruct"> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </input> + <output name="echoStructResponse"> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </output> + </operation> + <operation name="echoVoid"> + <soap:operation soapAction="" style="rpc"/> + <input name="echoVoid"> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </input> + <output name="echoVoidResponse"> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </output> + </operation> + </binding> + <service name="WSDLInteropTestRpcEncService"> + <port binding="tns:WSDLInteropTestRpcEncPortBinding" + name="WSDLInteropTestRpcEncPort"> + <soap:address + location="round3_groupD_rpcenc.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupD/skipif.inc b/ext/soap/tests/interop/Round3/GroupD/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupD/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt new file mode 100644 index 0000000..07b087e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Interop Round3 GroupE List 001 (php/wsdl): echoLinkedList +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPList { + function SOAPList($s, $i, $c) { + $this->varString = $s; + $this->varInt = $i; + $this->child = $c; + } +} +$struct = new SOAPList('arg1',1,NULL); +$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoLinkedList($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupE_list.inc"); +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://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:nil="true" xsi:type="ns2:List"/></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:nil="true" xsi:type="ns2:List"/></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#5 (3) { + ["varInt"]=> + int(1) + ["varString"]=> + string(4) "arg1" + ["child"]=> + NULL +} +ok diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt new file mode 100644 index 0000000..efc25e2 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt @@ -0,0 +1,44 @@ +--TEST-- +SOAP Interop Round3 GroupE List 002 (php/wsdl): echoLinkedList +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPList { + function SOAPList($s, $i, $c) { + $this->varString = $s; + $this->varInt = $i; + $this->child = $c; + } +} +$struct = new SOAPList('arg1',1, new SOAPList('arg2',2,NULL)); +$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoLinkedList($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupE_list.inc"); +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://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:nil="true" xsi:type="ns2:List"/></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:nil="true" xsi:type="ns2:List"/></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#6 (3) { + ["varInt"]=> + int(1) + ["varString"]=> + string(4) "arg1" + ["child"]=> + object(stdClass)#7 (3) { + ["varInt"]=> + int(2) + ["varString"]=> + string(4) "arg2" + ["child"]=> + NULL + } +} +ok diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt new file mode 100644 index 0000000..705e203 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt @@ -0,0 +1,51 @@ +--TEST-- +SOAP Interop Round3 GroupE List 003 (php/wsdl): echoLinkedList +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPList { + function SOAPList($s, $i, $c) { + $this->varString = $s; + $this->varInt = $i; + $this->child = $c; + } +} +$struct = new SOAPList('arg1',1,new SOAPList('arg2',2,new SOAPList('arg3',3,NULL))); +$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoLinkedList($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupE_list.inc"); +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://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="true" xsi:type="ns2:List"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="true" xsi:type="ns2:List"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#7 (3) { + ["varInt"]=> + int(1) + ["varString"]=> + string(4) "arg1" + ["child"]=> + object(stdClass)#8 (3) { + ["varInt"]=> + int(2) + ["varString"]=> + string(4) "arg2" + ["child"]=> + object(stdClass)#9 (3) { + ["varInt"]=> + int(3) + ["varString"]=> + string(4) "arg3" + ["child"]=> + NULL + } + } +} +ok diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt new file mode 100644 index 0000000..ade6d83 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round3 GroupE List 004 (php/wsdl): echoLinkedList +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPList { + function SOAPList($s, $i, $c) { + $this->varString = $s; + $this->varInt = $i; + $this->child = $c; + } +} +$struct = NULL; +$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoLinkedList($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupE_list.inc"); +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://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:nil="true" xsi:type="ns2:List"/></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:nil="true" xsi:type="ns2:List"/></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +NULL +ok diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt new file mode 100644 index 0000000..8d149a3 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt @@ -0,0 +1,52 @@ +--TEST-- +SOAP Interop Round3 GroupE List 005 (php/wsdl): echoLinkedList (cyclic) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPList { + function SOAPList($s, $i, $c) { + $this->varString = $s; + $this->varInt = $i; + $this->child = $c; + } +} +$struct = new SOAPList('arg1',1,new SOAPList('arg2',2,new SOAPList('arg3',3,NULL))); +$struct->child->child->child = $struct; +$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoLinkedList($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupE_list.inc"); +echo "ok\n"; +?> +--EXPECTF-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["varInt"]=> + int(1) + ["varString"]=> + string(4) "arg1" + ["child"]=> + object(stdClass)#%d (3) { + ["varInt"]=> + int(2) + ["varString"]=> + string(4) "arg2" + ["child"]=> + object(stdClass)#%d (3) { + ["varInt"]=> + int(3) + ["varString"]=> + string(4) "arg3" + ["child"]=> + *RECURSION* + } + } +} +ok diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt new file mode 100644 index 0000000..3549f45 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt @@ -0,0 +1,52 @@ +--TEST-- +SOAP Interop Round3 GroupE List 006 (php/wsdl): echoLinkedList (cyclic) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPList { + function SOAPList($s, $i, $c) { + $this->varString = $s; + $this->varInt = $i; + $this->child = $c; + } +} +$struct = new SOAPList('arg1',1,new SOAPList('arg2',2,new SOAPList('arg3',3,NULL))); +$struct->child->child->child = $struct->child; +$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoLinkedList($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupE_list.inc"); +echo "ok\n"; +?> +--EXPECTF-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["varInt"]=> + int(1) + ["varString"]=> + string(4) "arg1" + ["child"]=> + &object(stdClass)#%d (3) { + ["varInt"]=> + int(2) + ["varString"]=> + string(4) "arg2" + ["child"]=> + object(stdClass)#%d (3) { + ["varInt"]=> + int(3) + ["varString"]=> + string(4) "arg3" + ["child"]=> + *RECURSION* + } + } +} +ok diff --git a/ext/soap/tests/interop/Round3/GroupE/round3_groupE_list.inc b/ext/soap/tests/interop/Round3/GroupE/round3_groupE_list.inc new file mode 100644 index 0000000..19a769c --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupE/round3_groupE_list.inc @@ -0,0 +1,17 @@ +<?php +class SOAP_Interop_GroupE { + + function echoLinkedList($inputList) + { + global $d; + $d = $inputList; + return $inputList; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupE_list.wsdl"); +$server->setClass("SOAP_Interop_GroupE"); +$server->handle($HTTP_RAW_POST_DATA); +var_dump($d); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupE/round3_groupE_list.wsdl b/ext/soap/tests/interop/Round3/GroupE/round3_groupE_list.wsdl new file mode 100644 index 0000000..49e6a8c --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupE/round3_groupE_list.wsdl @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="WSDLInteropTestList" + targetNamespace="http://soapinterop.org/WSDLInteropTestList" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://soapinterop.org/WSDLInteropTestList" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsd1="http://soapinterop.org/xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <types> + <schema targetNamespace="http://soapinterop.org/xsd" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + + <complexType name="List"> + <all> + <element name="varInt" type="xsd:int"/> + <element name="varString" type="xsd:string"/> + <element name="child" type = "xsd1:List"/> + </all> + </complexType> + </schema> + </types> + + <message name="echoLinkedList"> + <part name="param0" type="xsd1:List"/> + </message> + <message name="echoLinkedListResponse"> + <part name="return" type="xsd1:List"/> + </message> + <portType name="WSDLInteropTestListPortType"> + <operation name="echoLinkedList"> + <input message="tns:echoLinkedList"/> + <output message="tns:echoLinkedListResponse"/> + </operation> + </portType> + <binding name="WSDLInteropTestListBinding" + type="tns:WSDLInteropTestListPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoLinkedList"> + <soap:operation soapAction="" style="rpc"/> + <input> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </input> + <output> + <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + namespace="http://soapinterop.org/WSDLInteropTestRpcEnc" use="encoded"/> + </output> + </operation> + + </binding> + <service name="WSDLInteropTestListService"> + <port binding="tns:WSDLInteropTestListBinding" + name="WSDLInteropTestListPort"> + <soap:address + location="round3_groupE_list.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupE/skipif.inc b/ext/soap/tests/interop/Round3/GroupE/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupE/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt new file mode 100644 index 0000000..bc6af1a --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupF Extensibility 001 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupF_ext.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString("Hello World"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupF_ext.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringParam>Hello World</ns1:echoStringParam></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringReturn>Hello World</ns1:echoStringReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt new file mode 100644 index 0000000..fa8940e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt @@ -0,0 +1,17 @@ +--TEST-- +SOAP Interop Round3 GroupF Extensibility Required 001 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupF_extreq.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString("Hello World"); +echo $client->__getlastrequest(); +//$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +//include("round3_groupF_extreq.inc"); +echo "ok\n"; +?> +--EXPECTF-- +Fatal error: SOAP-ERROR: Parsing WSDL: Unknown required WSDL extension 'http://soapinterop.org/ext' in %sr3_groupF_extreq_001w.php on line %d diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt new file mode 100644 index 0000000..65bda0c --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round3 GroupF Headers 001 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString("Hello World"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupF_headers.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringParam>Hello World</ns1:echoStringParam></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringReturn>Hello World</ns1:echoStringReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt new file mode 100644 index 0000000..ae723a3 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round3 GroupF Headers 002 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = new SoapHeader("http://soapinterop.org/xsd","Header1", array("int"=>34,"string"=>"arg")); +$client = new SoapClient(dirname(__FILE__)."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString",array("Hello World"),null,$hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupF_headers.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Header><ns1:Header1><ns1:string>arg</ns1:string><ns1:int>34</ns1:int></ns1:Header1></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoStringParam>Hello World</ns1:echoStringParam></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringReturn>Hello World</ns1:echoStringReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt new file mode 100644 index 0000000..b4cb283 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round3 GroupF Headers 003 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = new SoapHeader("http://soapinterop.org/xsd","Header2", array("int"=>34,"string"=>"arg")); +$client = new SoapClient(dirname(__FILE__)."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString",array("Hello World"),null,$hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupF_headers.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Header><ns1:Header2><ns1:int>34</ns1:int><ns1:string>arg</ns1:string></ns1:Header2></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoStringParam>Hello World</ns1:echoStringParam></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringReturn>Hello World</ns1:echoStringReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt new file mode 100644 index 0000000..f0a427a --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP Interop Round3 GroupF Headers 004 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = array( + new SoapHeader("http://soapinterop.org/xsd","Header1", array("int"=>34,"string"=>"arg1")), + new SoapHeader("http://soapinterop.org/xsd","Header2", array("int"=>43,"string"=>"arg2")) +); +$client = new SoapClient(dirname(__FILE__)."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoString",array("Hello World"),null,$hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round3_groupF_headers.inc"); +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://soapinterop.org/xsd"><SOAP-ENV:Header><ns1:Header1><ns1:string>arg1</ns1:string><ns1:int>34</ns1:int></ns1:Header1><ns1:Header2><ns1:int>43</ns1:int><ns1:string>arg2</ns1:string></ns1:Header2></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoStringParam>Hello World</ns1:echoStringParam></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:echoStringReturn>Hello World</ns1:echoStringReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round3/GroupF/round3_groupF_ext.inc b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_ext.inc new file mode 100644 index 0000000..e90586e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_ext.inc @@ -0,0 +1,14 @@ +<?php +class SOAP_Interop_GroupF { + + function echoString($inputString) + { + return $inputString; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupF_ext.wsdl"); +$server->setClass("SOAP_Interop_GroupF"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupF/round3_groupF_ext.wsdl b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_ext.wsdl new file mode 100644 index 0000000..74ec018 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_ext.wsdl @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="WSDLInteropTestDocLitService" + targetNamespace="http://soapinterop.org/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://soapinterop.org/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsd1="http://soapinterop.org/xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ext="http://soapinterop.org/ext"> + <ext:types/> + + <types> + <ext:schema targetNamespace="http://soapinterop.org/xsd"/> + <schema targetNamespace="http://soapinterop.org/xsd" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + + <element name="echoStringParam" type="xsd:string"/> + + <element name="echoStringReturn" type="xsd:string"/> + </schema> + </types> + <ext:message name="echoString"/> + <message name="echoString"> + <part element="xsd1:echoStringParam" name="a"/> + </message> + <message name="echoStringResponse"> + <part element="xsd1:echoStringReturn" name="result"/> + </message> + + <ext:portType name="WSDLInteropTestDocLitPortType"/> + + <portType name="WSDLInteropTestDocLitPortType"> + <operation name="echoString"> + <input message="tns:echoString" name="echoString"/> + <output message="tns:echoStringResponse" name="echoStringResponse"/> + </operation> + </portType> + <ext:binding name="WSDLInteropTestDocLitPortBinding"/> + <binding name="WSDLInteropTestDocLitPortBinding" + type="tns:WSDLInteropTestDocLitPortType"> + <ext:binding style ="chunked"/> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <ext:operation style ="chunked"/> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoString"> + <ext:body use ="direct"/> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringResponse"> + <ext:body use ="direct"/> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + </binding> + <ext:service name="WSDLInteropTestDocLitService"/> + <service name="WSDLInteropTestDocLitService"> + <ext:port binding="tns:WSDLInteropTestDocLitPortBinding" + name="WSDLInteropTestDocLitPort"/> + <port binding="tns:WSDLInteropTestDocLitPortBinding" + name="WSDLInteropTestDocLitPort"> + <ext:address location=""/> + <soap:address + location="round3_groupF_ext.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupF/round3_groupF_extreq.wsdl b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_extreq.wsdl new file mode 100644 index 0000000..8dfd65e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_extreq.wsdl @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="WSDLInteropTestDocLitService" + targetNamespace="http://soapinterop.org/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://soapinterop.org/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsd1="http://soapinterop.org/xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ext="http://soapinterop.org/ext"> + <ext:types/> + + <types> + <ext:schema targetNamespace="http://soapinterop.org/xsd"/> + <schema targetNamespace="http://soapinterop.org/xsd" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + + <element name="echoStringParam" type="xsd:string"/> + + <element name="echoStringReturn" type="xsd:string"/> + </schema> + </types> + <ext:message name="echoString"/> + <message name="echoString"> + <part element="xsd1:echoStringParam" name="a"/> + </message> + <message name="echoStringResponse"> + <part element="xsd1:echoStringReturn" name="result"/> + </message> + + <ext:portType name="WSDLInteropTestDocLitPortType"/> + + <portType name="WSDLInteropTestDocLitPortType"> + <operation name="echoString"> + <input message="tns:echoString" name="echoString"/> + <output message="tns:echoStringResponse" name="echoStringResponse"/> + </operation> + </portType> + <ext:binding name="WSDLInteropTestDocLitPortBinding"/> + <binding name="WSDLInteropTestDocLitPortBinding" + type="tns:WSDLInteropTestDocLitPortType"> + <ext:binding style ="chunked" wsdl:required="true"/> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="echoString"> + <ext:operation style ="chunked"/> + <soap:operation soapAction="http://soapinterop.org/" style="document"/> + <input name="echoString"> + <ext:body use ="direct"/> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </input> + <output name="echoStringResponse"> + <ext:body use ="direct"/> + <soap:body namespace="http://soapinterop.org/WSDLInteropTestDocLit" + use="literal"/> + </output> + </operation> + </binding> + <ext:service name="WSDLInteropTestDocLitService"/> + <service name="WSDLInteropTestDocLitService"> + <ext:port binding="tns:WSDLInteropTestDocLitPortBinding" + name="WSDLInteropTestDocLitPort"/> + <port binding="tns:WSDLInteropTestDocLitPortBinding" + name="WSDLInteropTestDocLitPort"> + <ext:address location=""/> + <soap:address + location="round3_groupF_extreq.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupF/round3_groupF_headers.inc b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_headers.inc new file mode 100644 index 0000000..b7e67b0 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_headers.inc @@ -0,0 +1,22 @@ +<?php +class SOAP_Interop_GroupF { + + function Header1($input) + { + } + + function Header2($input) + { + } + + function echoString($inputString) + { + return $inputString; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round3_groupF_ext.wsdl"); +$server->setClass("SOAP_Interop_GroupF"); +$server->handle($HTTP_RAW_POST_DATA); +?>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round3/GroupF/round3_groupF_headers.wsdl b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_headers.wsdl new file mode 100644 index 0000000..d03fc32 --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/round3_groupF_headers.wsdl @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:s="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/" + xmlns:types="http://soapinterop.org/xsd" + targetNamespace="http://soapinterop.org/" + xmlns="http://schemas.xmlsoap.org/wsdl/"> + <types> + <s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/xsd"> + <s:element name="echoStringParam" type="s:string"/> + + <s:element name="echoStringReturn" type="s:string"/> + + <s:element name="Header1" type="types:Header1" /> + <s:complexType name="Header1"> + <s:sequence> + <s:element name="string" type="s:string" /> + <s:element name="int" type="s:int" /> + </s:sequence> + <s:anyAttribute /> + </s:complexType> + <s:element name="Header2" type="types:Header2" /> + <s:complexType name="Header2"> + <s:sequence> + <s:element name="int" type="s:int" /> + <s:element name="string" type="s:string" /> + </s:sequence> + <s:anyAttribute /> + </s:complexType> + </s:schema> + </types> + <message name="echoString"> + <part element="types:echoStringParam" name="a"/> + </message> + <message name="echoStringResponse"> + <part element="types:echoStringReturn" name="result"/> + </message> + <message name="Header1"> + <part name="Header1" element="types:Header1" /> + </message> + <message name="Header2"> + <part name="Header2" element="types:Header2" /> + </message> + <portType name="RetHeaderPortType"> + <operation name="echoString"> + <input message="tns:echoString" /> + <output message="tns:echoStringResponse" /> + </operation> + </portType> + <binding name = "RetHeaderBinding" type="tns:RetHeaderPortType"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> + <operation name="echoString"> + <soap:operation soapAction="http://soapinterop.org/" style="document" /> + <input> + <soap:body use="literal" /> + <soap:header message="tns:Header1" part="Header1" use="literal"/> + <soap:header message="tns:Header2" part="Header2" use="literal"/> + </input> + <output> + <soap:body use="literal" /> + </output> + </operation> + </binding> + <service name="RetHeaderService"> + <port name="RetHeaderPort" binding="tns:RetHeaderBinding"> + <soap:address location="round3_groupF_headers.inc"/> + </port> + </service> +</definitions> diff --git a/ext/soap/tests/interop/Round3/GroupF/skipif.inc b/ext/soap/tests/interop/Round3/GroupF/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/interop/Round3/GroupF/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimedoc.inc b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimedoc.inc new file mode 100644 index 0000000..bf95d0a --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimedoc.inc @@ -0,0 +1,33 @@ +<?php +class SOAP_Interop_GroupG { + + function EchoBase64AsAttachment($in) { + return $in; + } + + function EchoAttachmentAsBase64($in) { + return $in; + } + + function EchoAttachment($in) { + return $in; + } + + function EchoAttachments($in) { + return $in; + } + + function EchoAttachmentAsString($in) { + return $in; + } + + function EchoUnrefAttachments($in) { + return $in; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupG_dimedoc.wsdl"); +$server->setClass("SOAP_Interop_GroupG"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimedoc.wsdl b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimedoc.wsdl new file mode 100644 index 0000000..f82216e --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimedoc.wsdl @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions name="SOAPBuilders" xmlns="http://soapinterop.org/attachments/wsdl" xmlns:types="http://soapinterop.org/attachments/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:dime="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/" xmlns:content="http://schemas.xmlsoap.org/ws/2002/04/content-type/" xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/" targetNamespace="http://soapinterop.org/attachments/wsdl">
+ <wsdl:types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/attachments/xsd" elementFormDefault="qualified" attributeFormDefault="qualified">
+ <import namespace="http://schemas.xmlsoap.org/ws/2002/04/reference/"/>
+ <import namespace="http://schemas.xmlsoap.org/ws/2002/04/content-type/"/>
+ <complexType name="ReferencedBinary">
+ <simpleContent>
+ <restriction base="xsd:base64Binary">
+ <annotation>
+ <appinfo>
+ <content:mediaType value="application/octetstream"/>
+ </appinfo>
+ </annotation>
+ <attribute ref="ref:location" use="optional"/>
+ </restriction>
+ </simpleContent>
+ </complexType>
+ <complexType name="ReferencedText">
+ <simpleContent>
+ <restriction base="xsd:base64Binary">
+ <annotation>
+ <appinfo>
+ <content:mediaType value="text/plain"/>
+ </appinfo>
+ </annotation>
+ <attribute ref="ref:location" use="optional"/>
+ </restriction>
+ </simpleContent>
+ </complexType>
+ <element name="EchoAttachment" type="types:EchoAttachment"/>
+ <element name="EchoAttachmentResponse" type="types:EchoAttachmentResponse"/>
+ <complexType name="EchoAttachment">
+ <sequence>
+ <element name="In" type="types:ReferencedBinary"/>
+ </sequence>
+ </complexType>
+ <complexType name="EchoAttachmentResponse">
+ <sequence>
+ <element name="Out" type="types:ReferencedBinary"/>
+ </sequence>
+ </complexType>
+ <element name="EchoAttachments" type="types:Attachments"/>
+ <element name="EchoAttachmentsResponse" type="types:Attachments"/>
+ <complexType name="Attachments">
+ <sequence>
+ <element name="Item" minOccurs="0" maxOccurs="unbounded" type="types:ReferencedBinary"/>
+ </sequence>
+ </complexType>
+ <element name="EchoAttachmentAsBase64" type="types:EchoAttachment"/>
+ <element name="EchoAttachmentAsBase64Response" type="types:base64Out"/>
+ <element name="EchoBase64AsAttachment" type="types:base64In"/>
+ <element name="EchoBase64AsAttachmentResponse" type="types:EchoAttachmentResponse"/>
+ <complexType name="base64In">
+ <sequence>
+ <element name="In" type="xsd:base64Binary"/>
+ </sequence>
+ </complexType>
+ <complexType name="base64Out">
+ <sequence>
+ <element name="Out" type="xsd:base64Binary"/>
+ </sequence>
+ </complexType>
+ <element name="EchoUnrefAttachments" type="types:emptyType"/>
+ <element name="EchoUnrefAttachmentsResponse" type="types:emptyType"/>
+ <complexType name="emptyType">
+ <sequence/>
+ </complexType>
+ <element name="EchoAttachmentAsString" type="types:EchoAttachmentAsString"/>
+ <element name="EchoAttachmentAsStringResponse" type="types:EchoAttachmentAsStringResponse"/>
+ <complexType name="EchoAttachmentAsString">
+ <sequence>
+ <element name="In" type="types:ReferencedText"/>
+ </sequence>
+ </complexType>
+ <complexType name="EchoAttachmentAsStringResponse">
+ <sequence>
+ <element name="Out" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </schema>
+ </wsdl:types>
+ <wsdl:message name="EchoAttachmentIn">
+ <wsdl:part name="In" element="types:EchoAttachment"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentOut">
+ <wsdl:part name="Out" element="types:EchoAttachmentResponse"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentsIn">
+ <wsdl:part name="In" element="types:EchoAttachments"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentsOut">
+ <wsdl:part name="Out" element="types:EchoAttachmentsResponse"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentAsBase64In">
+ <wsdl:part name="In" element="types:EchoAttachmentAsBase64"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentAsBase64Out">
+ <wsdl:part name="Out" element="types:EchoAttachmentAsBase64Response"/>
+ </wsdl:message>
+ <wsdl:message name="EchoBase64AsAttachmentIn">
+ <wsdl:part name="In" element="types:EchoBase64AsAttachment"/>
+ </wsdl:message>
+ <wsdl:message name="EchoBase64AsAttachmentOut">
+ <wsdl:part name="Out" element="types:EchoBase64AsAttachmentResponse"/>
+ </wsdl:message>
+ <wsdl:message name="EchoUnrefAttachmentsIn">
+ <wsdl:part name="In" element="types:EchoUnrefAttachments"/>
+ </wsdl:message>
+ <wsdl:message name="EchoUnrefAttachmentsOut">
+ <wsdl:part name="Out" element="types:EchoUnrefAttachmentsResponse"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentAsStringIn">
+ <wsdl:part name="In" element="types:EchoAttachmentAsString"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentAsStringOut">
+ <wsdl:part name="Out" element="types:EchoAttachmentAsStringResponse"/>
+ </wsdl:message>
+ <wsdl:portType name="AttachmentsPortType">
+ <wsdl:operation name="EchoAttachment">
+ <wsdl:input name="EchoAttachmentInput" message="EchoAttachmentIn"/>
+ <wsdl:output name="EchoAttachmentOutput" message="EchoAttachmentOut"/>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachments">
+ <wsdl:input name="EchoAttachmentsInput" message="EchoAttachmentsIn"/>
+ <wsdl:output name="EchoAttachmentsOutput" message="EchoAttachmentsOut"/>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachmentAsBase64">
+ <wsdl:input name="EchoAttachmentAsBase64Input" message="EchoAttachmentAsBase64In"/>
+ <wsdl:output name="EchoAttachmentAsBase64Output" message="EchoAttachmentAsBase64Out"/>
+ </wsdl:operation>
+ <wsdl:operation name="EchoBase64AsAttachment">
+ <wsdl:input name="EchoBase64AsAttachmentInput" message="EchoBase64AsAttachmentIn"/>
+ <wsdl:output name="EchoBase64AsAttachmentOutput" message="EchoBase64AsAttachmentOut"/>
+ </wsdl:operation>
+ <wsdl:operation name="EchoUnrefAttachments">
+ <wsdl:input name="EchoUnrefAttachmentsInput" message="EchoUnrefAttachmentsIn"/>
+ <wsdl:output name="EchoUnrefAttachmentsOutput" message="EchoUnrefAttachmentsOut"/>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachmentAsString">
+ <wsdl:input name="EchoAttachmentAsStringInput" message="EchoAttachmentAsStringIn"/>
+ <wsdl:output name="EchoAttachmentAsStringOutput" message="EchoAttachmentAsStringOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="AttachmentsBinding" type="AttachmentsPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="EchoAttachment">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoAttachmentInput">
+ <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="EchoAttachmentOutput">
+ <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachments">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoAttachmentsInput">
+ <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="EchoAttachmentsOutput">
+ <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachmentAsBase64">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoAttachmentAsBase64Input">
+ <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="EchoAttachmentAsBase64Output">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="EchoBase64AsAttachment">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoBase64AsAttachmentInput">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="EchoBase64AsAttachmentOutput">
+ <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="EchoUnrefAttachments">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoUnrefAttachmentsInput">
+ <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/open-layout" wsdl:required="true"/>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="EchoUnrefAttachmentsOutput">
+ <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/open-layout" wsdl:required="true"/>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachmentAsString">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoAttachmentAsStringInput">
+ <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="EchoAttachmentAsStringOutput">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="Round4DIMEDOC">
+ <wsdl:port name="Round4DIMEDOCTestSoap" binding="AttachmentsBinding">
+ <soap:address location="test://" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimerpc.inc b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimerpc.inc new file mode 100644 index 0000000..9dcbed7 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimerpc.inc @@ -0,0 +1,33 @@ +<?php +class SOAP_Interop_GroupG { + + function EchoBase64AsAttachment($in) { + return $in; + } + + function EchoAttachmentAsBase64($in) { + return $in; + } + + function EchoAttachment($in) { + return $in; + } + + function EchoAttachments($in) { + return $in; + } + + function EchoAttachmentAsString($in) { + return $in; + } + + function EchoUnrefAttachments($in) { + return $in; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupG_dimerpc.wsdl"); +$server->setClass("SOAP_Interop_GroupG"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimerpc.wsdl b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimerpc.wsdl new file mode 100644 index 0000000..d837da0 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_dimerpc.wsdl @@ -0,0 +1,171 @@ +<?xml version="1.0" encoding="utf-8"?> +<wsdl:definitions name="SOAPBuilders" xmlns="http://soapinterop.org/attachments/wsdl" xmlns:types="http://soapinterop.org/attachments/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:dime="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/" xmlns:content="http://schemas.xmlsoap.org/ws/2002/04/content-type/" targetNamespace="http://soapinterop.org/attachments/wsdl"> + <wsdl:types> + <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/attachments/xsd"> + <import namespace="http://schemas.xmlsoap.org/soap/encoding/" location="http://schemas.xmlsoap.org/soap/encoding/" /> + <import namespace="http://schemas.xmlsoap.org/ws/2002/04/content-type/"/> + <import namespace="http://schemas.xmlsoap.org/ws/2002/04/reference/"/> + <complexType name="ReferencedBinary"> + <simpleContent> + <restriction base="soap-enc:base64Binary"> + <annotation> + <appinfo> + <content:mediaType value="application/octetstream"/> + </appinfo> + </annotation> + <attributeGroup ref="soap-enc:commonAttributes"/> + </restriction> + </simpleContent> + </complexType> + <complexType name="ArrayOfBinary"> + <complexContent> + <restriction base="soap-enc:Array"> + <attribute ref="soap-enc:arrayType" wsdl:arrayType="types:ReferencedBinary[]"/> + </restriction> + </complexContent> + </complexType> + <complexType name="ReferencedText"> + <simpleContent> + <restriction base="soap-enc:base64Binary"> + <annotation> + <appinfo> + <content:mediaType value="text/plain"/> + </appinfo> + </annotation> + <attributeGroup ref="soap-enc:commonAttributes"/> + </restriction> + </simpleContent> + </complexType> + </schema> + </wsdl:types> + <wsdl:message name="EchoAttachmentIn"> + <wsdl:part name="In" type="types:ReferencedBinary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentOut"> + <wsdl:part name="Out" type="types:ReferencedBinary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentsIn"> + <wsdl:part name="In" type="types:ArrayOfBinary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentsOut"> + <wsdl:part name="Out" type="types:ArrayOfBinary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentAsBase64In"> + <wsdl:part name="In" type="types:ReferencedBinary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentAsBase64Out"> + <wsdl:part name="Out" type="xsd:base64Binary"/> + </wsdl:message> + <wsdl:message name="EchoBase64AsAttachmentIn"> + <wsdl:part name="In" type="xsd:base64Binary"/> + </wsdl:message> + <wsdl:message name="EchoBase64AsAttachmentOut"> + <wsdl:part name="Out" type="types:ReferencedBinary"/> + </wsdl:message> + <wsdl:message name="EchoUnrefAttachmentsIn" /> + <wsdl:message name="EchoUnrefAttachmentsOut" /> + <wsdl:message name="EchoAttachmentAsStringIn"> + <wsdl:part name="In" type="types:ReferencedText"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentAsStringOut"> + <wsdl:part name="Out" type="xsd:string"/> + </wsdl:message> + + <wsdl:portType name="AttachmentsPortType"> + <wsdl:operation name="EchoAttachment"> + <wsdl:input name="EchoAttachmentInput" message="EchoAttachmentIn"/> + <wsdl:output name="EchoAttachmentOutput" message="EchoAttachmentOut"/> + </wsdl:operation> + <wsdl:operation name="EchoAttachments"> + <wsdl:input name="EchoAttachmentsInput" message="EchoAttachmentsIn"/> + <wsdl:output name="EchoAttachmentsOutput" message="EchoAttachmentsOut"/> + </wsdl:operation> + <wsdl:operation name="EchoAttachmentAsBase64"> + <wsdl:input name="EchoAttachmentAsBase64Input" message="EchoAttachmentAsBase64In"/> + <wsdl:output name="EchoAttachmentAsBase64Output" message="EchoAttachmentAsBase64Out"/> + </wsdl:operation> + <wsdl:operation name="EchoBase64AsAttachment"> + <wsdl:input name="EchoBase64AsAttachmentInput" message="EchoBase64AsAttachmentIn"/> + <wsdl:output name="EchoBase64AsAttachmentOutput" message="EchoBase64AsAttachmentOut"/> + </wsdl:operation> + <wsdl:operation name="EchoUnrefAttachments"> + <wsdl:input name="EchoUnrefAttachmentsInput" message="EchoUnrefAttachmentsIn"/> + <wsdl:output name="EchoUnrefAttachmentsOutput" message="EchoUnrefAttachmentsOut"/> + </wsdl:operation> + <wsdl:operation name="EchoAttachmentAsString"> + <wsdl:input name="EchoAttachmentAsStringInput" message="EchoAttachmentAsStringIn"/> + <wsdl:output name="EchoAttachmentAsStringOutput" message="EchoAttachmentAsStringOut"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="AttachmentsBinding" type="AttachmentsPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="EchoAttachment"> + <soap:operation style="rpc" soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoAttachmentInput"> + <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:input> + <wsdl:output name="EchoAttachmentOutput"> + <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="EchoAttachments"> + <soap:operation style="rpc" soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoAttachmentsInput"> + <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:input> + <wsdl:output name="EchoAttachmentsOutput"> + <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="EchoAttachmentAsBase64"> + <soap:operation style="rpc" soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoAttachmentAsBase64Input"> + <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:input> + <wsdl:output name="EchoAttachmentAsBase64Output"> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="EchoBase64AsAttachment"> + <soap:operation style="rpc" soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoBase64AsAttachmentInput"> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:input> + <wsdl:output name="EchoBase64AsAttachmentOutput"> + <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="EchoUnrefAttachments"> + <soap:operation style="rpc" soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoUnrefAttachmentsInput"> + <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/open-layout" wsdl:required="true"/> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:input> + <wsdl:output name="EchoUnrefAttachmentsOutput"> + <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/open-layout" wsdl:required="true"/> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="EchoAttachmentAsString"> + <soap:operation style="rpc" soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoAttachmentAsStringInput"> + <dime:message layout="http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout" wsdl:required="true"/> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:input> + <wsdl:output name="EchoAttachmentAsStringOutput"> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="Round4DIMERPC"> + <wsdl:port name="Round4DIMERPCTestSoap" binding="AttachmentsBinding"> + <soap:address location="test://" /> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimedoc.inc b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimedoc.inc new file mode 100644 index 0000000..ef9d9b8 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimedoc.inc @@ -0,0 +1,25 @@ +<?php +class SOAP_Interop_GroupG { + + function EchoBase64AsAttachment($in) { + return $in; + } + + function EchoAttachmentAsBase64($in) { + return $in; + } + + function EchoAttachment($in) { + return $in; + } + + function EchoAttachments($in) { + return $in; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupG_dimedoc.wsdl"); +$server->setClass("SOAP_Interop_GroupG"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimedoc.wsdl b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimedoc.wsdl new file mode 100644 index 0000000..c67172e --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimedoc.wsdl @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions name="SOAPBuilders"
+ xmlns="http://soapinterop.org/attachments/wsdl"
+ xmlns:types="http://soapinterop.org/attachments/xsd"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
+ targetNamespace="http://soapinterop.org/attachments/wsdl">
+ <wsdl:types>
+ <schema
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://soapinterop.org/attachments/xsd"
+ elementFormDefault="qualified"
+ attributeFormDefault="qualified">
+
+ <complexType name="binary">
+ <simpleContent>
+ <extension base="xsd:base64Binary">
+ <attribute name="href" type="xsd:anyURI"/>
+ </extension>
+ </simpleContent>
+ </complexType >
+
+ <element name="EchoAttachment" type="types:EchoAttachment"/>
+ <element name="EchoAttachmentResponse" type="types:EchoAttachmentResponse"/>
+ <complexType name="EchoAttachment">
+ <sequence>
+ <element name="In" type="types:binary"/>
+ </sequence>
+ </complexType>
+ <complexType name="EchoAttachmentResponse">
+ <sequence>
+ <element name="Out" type="types:binary"/>
+ </sequence>
+ </complexType>
+
+ <element name="EchoAttachments" type="types:Attachments"/>
+ <element name="EchoAttachmentsResponse" type="types:Attachments"/>
+ <complexType name="Attachments">
+ <sequence>
+ <element name="Item" minOccurs="0" maxOccurs="unbounded" type="types:binary">
+ </element>
+ </sequence>
+ </complexType>
+
+ <element name="EchoAttachmentAsBase64" type="types:EchoAttachment"/>
+ <element name="EchoAttachmentAsBase64Response" type="types:EchoAttachmentResponse"/>
+
+ <element name="EchoBase64AsAttachment" type="types:EchoAttachment"/>
+ <element name="EchoBase64AsAttachmentResponse" type="types:EchoAttachmentResponse"/>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="EchoAttachmentIn">
+ <wsdl:part name="In" element="types:EchoAttachment"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentOut">
+ <wsdl:part name="Out" element="types:EchoAttachmentResponse"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentsIn">
+ <wsdl:part name="In" element="types:EchoAttachments"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentsOut">
+ <wsdl:part name="Out" element="types:EchoAttachmentsResponse"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentAsBase64In">
+ <wsdl:part name="In" element="types:EchoAttachmentAsBase64"/>
+ </wsdl:message>
+ <wsdl:message name="EchoAttachmentAsBase64Out">
+ <wsdl:part name="Out" element="types:EchoAttachmentAsBase64Response"/>
+ </wsdl:message>
+ <wsdl:message name="EchoBase64AsAttachmentIn">
+ <wsdl:part name="In" element="types:EchoBase64AsAttachment"/>
+ </wsdl:message>
+ <wsdl:message name="EchoBase64AsAttachmentOut">
+ <wsdl:part name="Out" element="types:EchoBase64AsAttachmentResponse"/>
+ </wsdl:message>
+
+ <wsdl:portType name="AttachmentsPortType">
+ <wsdl:operation name="EchoAttachment">
+ <wsdl:input name="EchoAttachmentInput" message="EchoAttachmentIn"/>
+ <wsdl:output name="EchoAttachmentOutput" message="EchoAttachmentOut"/>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachments">
+ <wsdl:input name="EchoAttachmentsInput" message="EchoAttachmentsIn"/>
+ <wsdl:output name="EchoAttachmentsOutput" message="EchoAttachmentsOut"/>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachmentAsBase64">
+ <wsdl:input name="EchoAttachmentAsBase64Input" message="EchoAttachmentAsBase64In"/>
+ <wsdl:output name="EchoAttachmentAsBase64Output" message="EchoAttachmentAsBase64Out"/>
+ </wsdl:operation>
+ <wsdl:operation name="EchoBase64AsAttachment">
+ <wsdl:input name="EchoBase64AsAttachmentInput" message="EchoBase64AsAttachmentIn"/>
+ <wsdl:output name="EchoBase64AsAttachmentOutput" message="EchoBase64AsAttachmentOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="AttachmentsBinding" type="AttachmentsPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="EchoAttachment">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoAttachmentInput">
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="In" type="application/octetstream"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </wsdl:input>
+ <wsdl:output name="EchoAttachmentOutput">
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body use="literal" />
+ </mime:part>
+ <mime:part>
+ <mime:content part="Out" type="application/octetstream"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachments">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoAttachmentsInput">
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="In" type="application/octetstream"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </wsdl:input>
+ <wsdl:output name="EchoAttachmentsOutput">
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="Out" type="application/octetstream"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="EchoAttachmentAsBase64">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoAttachmentAsBase64Input">
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="In" type="application/octetstream"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </wsdl:input>
+ <wsdl:output name="EchoAttachmentAsBase64Output">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="EchoBase64AsAttachment">
+ <soap:operation soapAction="http://soapinterop.org/attachments/"/>
+ <wsdl:input name="EchoBase64AsAttachmentInput">
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="EchoBase64AsAttachmentOutput">
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="Out" type="application/octetstream"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="Round4MIMEDOC">
+ <wsdl:port name="Round4MIMEDOCTestSoap" binding="AttachmentsBinding">
+ <soap:address location="test://" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimerpc.inc b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimerpc.inc new file mode 100644 index 0000000..ef9d9b8 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimerpc.inc @@ -0,0 +1,25 @@ +<?php +class SOAP_Interop_GroupG { + + function EchoBase64AsAttachment($in) { + return $in; + } + + function EchoAttachmentAsBase64($in) { + return $in; + } + + function EchoAttachment($in) { + return $in; + } + + function EchoAttachments($in) { + return $in; + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupG_dimedoc.wsdl"); +$server->setClass("SOAP_Interop_GroupG"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimerpc.wsdl b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimerpc.wsdl new file mode 100644 index 0000000..30a56d1 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimerpc.wsdl @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="utf-8"?> +<wsdl:definitions name="SOAPBuilders" + xmlns="http://soapinterop.org/attachments/wsdl" + xmlns:types="http://soapinterop.org/attachments/xsd" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" + xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" + targetNamespace="http://soapinterop.org/attachments/wsdl"> + <wsdl:types> + <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/attachments/xsd"> + <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> + <complexType name="ArrayOfBinary"> + <complexContent> + <restriction base="soap-enc:Array"> + <attribute ref="soap-enc:arrayType" wsdl:arrayType="soap-enc:base64Binary[]"/> + </restriction> + </complexContent> + </complexType> + </schema> + </wsdl:types> + <wsdl:message name="EchoAttachmentIn"> + <wsdl:part name="In" type="xsd:base64Binary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentOut"> + <wsdl:part name="Out" type="xsd:base64Binary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentsIn"> + <wsdl:part name="In" type="types:ArrayOfBinary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentsOut"> + <wsdl:part name="Out" type="types:ArrayOfBinary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentAsBase64In"> + <wsdl:part name="In" type="xsd:base64Binary"/> + </wsdl:message> + <wsdl:message name="EchoAttachmentAsBase64Out"> + <wsdl:part name="Out" type="xsd:base64Binary"/> + </wsdl:message> + <wsdl:message name="EchoBase64AsAttachmentIn"> + <wsdl:part name="In" type="xsd:base64Binary"/> + </wsdl:message> + <wsdl:message name="EchoBase64AsAttachmentOut"> + <wsdl:part name="Out" type="xsd:base64Binary"/> + </wsdl:message> + <wsdl:portType name="AttachmentsPortType"> + <wsdl:operation name="EchoAttachment"> + <wsdl:input name="EchoAttachmentInput" message="EchoAttachmentIn"/> + <wsdl:output name="EchoAttachmentOutput" message="EchoAttachmentOut"/> + </wsdl:operation> + <wsdl:operation name="EchoAttachments"> + <wsdl:input name="EchoAttachmentsInput" message="EchoAttachmentsIn"/> + <wsdl:output name="EchoAttachmentsOutput" message="EchoAttachmentsOut"/> + </wsdl:operation> + <wsdl:operation name="EchoAttachmentAsBase64"> + <wsdl:input name="EchoAttachmentAsBase64Input" message="EchoAttachmentAsBase64In"/> + <wsdl:output name="EchoAttachmentAsBase64Output" message="EchoAttachmentAsBase64Out"/> + </wsdl:operation> + <wsdl:operation name="EchoBase64AsAttachment"> + <wsdl:input name="EchoBase64AsAttachmentInput" message="EchoBase64AsAttachmentIn"/> + <wsdl:output name="EchoBase64AsAttachmentOutput" message="EchoBase64AsAttachmentOut"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="AttachmentsBinding" type="AttachmentsPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="EchoAttachment"> + <soap:operation soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoAttachmentInput"> + <mime:multipartRelated> + <mime:part> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </mime:part> + <mime:part> + <mime:content part="In" type="application/octetstream"/> + </mime:part> + </mime:multipartRelated> + </wsdl:input> + <wsdl:output name="EchoAttachmentOutput"> + <mime:multipartRelated> + <mime:part> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </mime:part> + <mime:part> + <mime:content part="Out" type="application/octetstream"/> + </mime:part> + </mime:multipartRelated> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="EchoAttachments"> + <soap:operation soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoAttachmentsInput"> + <mime:multipartRelated> + <mime:part> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </mime:part> + <mime:part> + <mime:content part="In" type="application/octetstream"/> + </mime:part> + </mime:multipartRelated> + </wsdl:input> + <wsdl:output name="EchoAttachmentsOutput"> + <mime:multipartRelated> + <mime:part> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </mime:part> + <mime:part> + <mime:content part="Out" type="application/octetstream"/> + </mime:part> + </mime:multipartRelated> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="EchoAttachmentAsBase64"> + <soap:operation soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoAttachmentAsBase64Input"> + <mime:multipartRelated> + <mime:part> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </mime:part> + <mime:part> + <mime:content part="In" type="application/octetstream"/> + </mime:part> + </mime:multipartRelated> + </wsdl:input> + <wsdl:output name="EchoAttachmentAsBase64Output"> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="EchoBase64AsAttachment"> + <soap:operation soapAction="http://soapinterop.org/attachments/"/> + <wsdl:input name="EchoBase64AsAttachmentInput"> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </wsdl:input> + <wsdl:output name="EchoBase64AsAttachmentOutput"> + <mime:multipartRelated> + <mime:part> + <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </mime:part> + <mime:part> + <mime:content part="Out" type="application/octetstream"/> + </mime:part> + </mime:multipartRelated> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="Round4MIMERPC"> + <wsdl:port name="Round4MIMERPCTestSoap" binding="AttachmentsBinding"> + <soap:address location="test://" /> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/interop/Round4/GroupG/skipif.inc b/ext/soap/tests/interop/Round4/GroupG/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupG/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt new file mode 100644 index 0000000..27a0c93 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 001 (php/wsdl): echoSOAPStructFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoSOAPStructFault($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns2:echoSOAPStructFaultRequest><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>325.325</ns1:varFloat></ns2:echoSOAPStructFaultRequest></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoSOAPStructFault'.</faultstring><detail><ns2:SOAPStructFaultPart><ns1:soapStruct><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>325.325</ns1:varFloat></ns1:soapStruct></ns2:SOAPStructFaultPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt new file mode 100644 index 0000000..1ed1fe7 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 002 (php/wsdl): echoBaseStructFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->structMessage = $f; + $this->shortMessage = $s; + } +} +$struct = new BaseStruct(new SOAPStruct("a1",11,12.345),11); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoBaseStructFault($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns2:echoBaseStructFaultRequest><ns1:structMessage><ns1:varString>a1</ns1:varString><ns1:varInt>11</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns1:structMessage><ns1:shortMessage>11</ns1:shortMessage></ns2:echoBaseStructFaultRequest></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoBaseStructFault'.</faultstring><detail><ns2:BaseStructPart><ns1:structMessage><ns1:varString>a1</ns1:varString><ns1:varInt>11</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns1:structMessage><ns1:shortMessage>11</ns1:shortMessage></ns2:BaseStructPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt new file mode 100644 index 0000000..fde7d75 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt @@ -0,0 +1,44 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 003 (php/wsdl): echoExtendedStructFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->structMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +$struct = new ExtendedStruct(new SOAPStruct("a1",11,12.345),12,"arg",-3,5); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoExtendedStructFault($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns2:echoExtendedStructFaultRequest><ns1:structMessage><ns1:varString>a1</ns1:varString><ns1:varInt>11</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns1:structMessage><ns1:shortMessage>12</ns1:shortMessage><ns1:stringMessage>arg</ns1:stringMessage><ns1:intMessage>-3</ns1:intMessage><ns1:anotherIntMessage>5</ns1:anotherIntMessage></ns2:echoExtendedStructFaultRequest></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoExtendedStructFault'.</faultstring><detail><ns2:ExtendedStructPart><ns1:structMessage><ns1:varString>a1</ns1:varString><ns1:varInt>11</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns1:structMessage><ns1:shortMessage>12</ns1:shortMessage><ns1:stringMessage>arg</ns1:stringMessage><ns1:intMessage>-3</ns1:intMessage><ns1:anotherIntMessage>5</ns1:anotherIntMessage></ns2:ExtendedStructPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt new file mode 100644 index 0000000..d448974 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt @@ -0,0 +1,39 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 004 (php/wsdl): echoMultipleFaults1(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->structMessage = $f; + $this->shortMessage = $s; + } +} +$s1 = new SOAPStruct('arg1',34,325.325); +$s2 = new BaseStruct(new SOAPStruct('arg2',34,325.325),12); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(array("whichFault" => 1, + "param1" => $s1, + "param2" => $s2)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults1Request><ns1:whichFault>1</ns1:whichFault><ns1:param1><ns2:varString>arg1</ns2:varString><ns2:varInt>34</ns2:varInt><ns2:varFloat>325.325</ns2:varFloat></ns1:param1><ns1:param2><ns2:structMessage><ns2:varString>arg2</ns2:varString><ns2:varInt>34</ns2:varInt><ns2:varFloat>325.325</ns2:varFloat></ns2:structMessage><ns2:shortMessage>12</ns2:shortMessage></ns1:param2></ns1:echoMultipleFaults1Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:SOAPStructFaultPart><ns1:soapStruct><ns1:varString>arg1</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>325.325</ns1:varFloat></ns1:soapStruct></ns2:SOAPStructFaultPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt new file mode 100644 index 0000000..52451ac --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt @@ -0,0 +1,39 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 005 (php/wsdl): echoMultipleFaults1(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->structMessage = $f; + $this->shortMessage = $s; + } +} +$s1 = new SOAPStruct('arg1',34,325.325); +$s2 = new BaseStruct(new SOAPStruct('arg2',34,325.325),12); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(array("whichFault" => 2, + "param1" => $s1, + "param2" => $s2)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults1Request><ns1:whichFault>2</ns1:whichFault><ns1:param1><ns2:varString>arg1</ns2:varString><ns2:varInt>34</ns2:varInt><ns2:varFloat>325.325</ns2:varFloat></ns1:param1><ns1:param2><ns2:structMessage><ns2:varString>arg2</ns2:varString><ns2:varInt>34</ns2:varInt><ns2:varFloat>325.325</ns2:varFloat></ns2:structMessage><ns2:shortMessage>12</ns2:shortMessage></ns1:param2></ns1:echoMultipleFaults1Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:BaseStructPart><ns1:structMessage><ns1:varString>arg2</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>325.325</ns1:varFloat></ns1:structMessage><ns1:shortMessage>12</ns1:shortMessage></ns2:BaseStructPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt new file mode 100644 index 0000000..c9ad1c5 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt @@ -0,0 +1,39 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 006 (php/wsdl): echoMultipleFaults1(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->structMessage = $f; + $this->shortMessage = $s; + } +} +$s1 = new SOAPStruct('arg1',34,325.325); +$s2 = new BaseStruct(new SOAPStruct('arg2',34,325.325),12); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(array("whichFault" => 3, + "param1" => $s1, + "param2" => $s2)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults1Request><ns1:whichFault>3</ns1:whichFault><ns1:param1><ns2:varString>arg1</ns2:varString><ns2:varInt>34</ns2:varInt><ns2:varFloat>325.325</ns2:varFloat></ns1:param1><ns1:param2><ns2:structMessage><ns2:varString>arg2</ns2:varString><ns2:varInt>34</ns2:varInt><ns2:varFloat>325.325</ns2:varFloat></ns2:structMessage><ns2:shortMessage>12</ns2:shortMessage></ns1:param2></ns1:echoMultipleFaults1Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:SOAPStructFaultPart><ns1:soapStruct><ns1:varString>arg1</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>325.325</ns1:varFloat></ns1:soapStruct></ns2:SOAPStructFaultPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt new file mode 100644 index 0000000..fac6c3b --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt @@ -0,0 +1,54 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 007 (php/wsdl): echoMultipleFaults2(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->structMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +class MoreExtendedStruct extends ExtendedStruct { + function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { + $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + $this->booleanMessage = $b; + } +} +$s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1); +$s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5); +$s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(array("whichFault" => 1, + "param1" => $s1, + "param2" => $s2, + "param3" => $s3)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults2Request><ns1:whichFault>1</ns1:whichFault><ns1:param1><ns2:structMessage><ns2:varString>s1</ns2:varString><ns2:varInt>1</ns2:varInt><ns2:varFloat>1.1</ns2:varFloat></ns2:structMessage><ns2:shortMessage>1</ns2:shortMessage></ns1:param1><ns1:param2><ns2:structMessage><ns2:varString>s2</ns2:varString><ns2:varInt>2</ns2:varInt><ns2:varFloat>2.2</ns2:varFloat></ns2:structMessage><ns2:shortMessage>2</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage></ns1:param2><ns1:param3><ns2:structMessage><ns2:varString>s3</ns2:varString><ns2:varInt>3</ns2:varInt><ns2:varFloat>3.3</ns2:varFloat></ns2:structMessage><ns2:shortMessage>3</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage><ns2:booleanMessage>true</ns2:booleanMessage></ns1:param3></ns1:echoMultipleFaults2Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:BaseStructPart><ns1:structMessage><ns1:varString>s1</ns1:varString><ns1:varInt>1</ns1:varInt><ns1:varFloat>1.1</ns1:varFloat></ns1:structMessage><ns1:shortMessage>1</ns1:shortMessage></ns2:BaseStructPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt new file mode 100644 index 0000000..c020790 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt @@ -0,0 +1,54 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 008 (php/wsdl): echoMultipleFaults2(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->structMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +class MoreExtendedStruct extends ExtendedStruct { + function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { + $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + $this->booleanMessage = $b; + } +} +$s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1); +$s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5); +$s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(array("whichFault" => 2, + "param1" => $s1, + "param2" => $s2, + "param3" => $s3)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults2Request><ns1:whichFault>2</ns1:whichFault><ns1:param1><ns2:structMessage><ns2:varString>s1</ns2:varString><ns2:varInt>1</ns2:varInt><ns2:varFloat>1.1</ns2:varFloat></ns2:structMessage><ns2:shortMessage>1</ns2:shortMessage></ns1:param1><ns1:param2><ns2:structMessage><ns2:varString>s2</ns2:varString><ns2:varInt>2</ns2:varInt><ns2:varFloat>2.2</ns2:varFloat></ns2:structMessage><ns2:shortMessage>2</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage></ns1:param2><ns1:param3><ns2:structMessage><ns2:varString>s3</ns2:varString><ns2:varInt>3</ns2:varInt><ns2:varFloat>3.3</ns2:varFloat></ns2:structMessage><ns2:shortMessage>3</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage><ns2:booleanMessage>true</ns2:booleanMessage></ns1:param3></ns1:echoMultipleFaults2Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:ExtendedStructPart><ns1:structMessage><ns1:varString>s2</ns1:varString><ns1:varInt>2</ns1:varInt><ns1:varFloat>2.2</ns1:varFloat></ns1:structMessage><ns1:shortMessage>2</ns1:shortMessage><ns1:stringMessage>arg</ns1:stringMessage><ns1:intMessage>-3</ns1:intMessage><ns1:anotherIntMessage>5</ns1:anotherIntMessage></ns2:ExtendedStructPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt new file mode 100644 index 0000000..f3a07d7 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt @@ -0,0 +1,54 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 009 (php/wsdl): echoMultipleFaults2(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->structMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +class MoreExtendedStruct extends ExtendedStruct { + function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { + $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + $this->booleanMessage = $b; + } +} +$s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1); +$s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5); +$s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(array("whichFault" => 3, + "param1" => $s1, + "param2" => $s2, + "param3" => $s3)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults2Request><ns1:whichFault>3</ns1:whichFault><ns1:param1><ns2:structMessage><ns2:varString>s1</ns2:varString><ns2:varInt>1</ns2:varInt><ns2:varFloat>1.1</ns2:varFloat></ns2:structMessage><ns2:shortMessage>1</ns2:shortMessage></ns1:param1><ns1:param2><ns2:structMessage><ns2:varString>s2</ns2:varString><ns2:varInt>2</ns2:varInt><ns2:varFloat>2.2</ns2:varFloat></ns2:structMessage><ns2:shortMessage>2</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage></ns1:param2><ns1:param3><ns2:structMessage><ns2:varString>s3</ns2:varString><ns2:varInt>3</ns2:varInt><ns2:varFloat>3.3</ns2:varFloat></ns2:structMessage><ns2:shortMessage>3</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage><ns2:booleanMessage>true</ns2:booleanMessage></ns1:param3></ns1:echoMultipleFaults2Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:MoreExtendedStructPart><ns1:structMessage><ns1:varString>s3</ns1:varString><ns1:varInt>3</ns1:varInt><ns1:varFloat>3.3</ns1:varFloat></ns1:structMessage><ns1:shortMessage>3</ns1:shortMessage><ns1:stringMessage>arg</ns1:stringMessage><ns1:intMessage>-3</ns1:intMessage><ns1:anotherIntMessage>5</ns1:anotherIntMessage><ns1:booleanMessage>true</ns1:booleanMessage></ns2:MoreExtendedStructPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt new file mode 100644 index 0000000..55d62c1 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt @@ -0,0 +1,54 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex Doc Lit 010 (php/wsdl): echoMultipleFaults2(4) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->structMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +class MoreExtendedStruct extends ExtendedStruct { + function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { + $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + $this->booleanMessage = $b; + } +} +$s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1); +$s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5); +$s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(array("whichFault" => 4, + "param1" => $s1, + "param2" => $s2, + "param3" => $s3)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults2Request><ns1:whichFault>4</ns1:whichFault><ns1:param1><ns2:structMessage><ns2:varString>s1</ns2:varString><ns2:varInt>1</ns2:varInt><ns2:varFloat>1.1</ns2:varFloat></ns2:structMessage><ns2:shortMessage>1</ns2:shortMessage></ns1:param1><ns1:param2><ns2:structMessage><ns2:varString>s2</ns2:varString><ns2:varInt>2</ns2:varInt><ns2:varFloat>2.2</ns2:varFloat></ns2:structMessage><ns2:shortMessage>2</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage></ns1:param2><ns1:param3><ns2:structMessage><ns2:varString>s3</ns2:varString><ns2:varInt>3</ns2:varInt><ns2:varFloat>3.3</ns2:varFloat></ns2:structMessage><ns2:shortMessage>3</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage><ns2:booleanMessage>true</ns2:booleanMessage></ns1:param3></ns1:echoMultipleFaults2Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:BaseStructPart><ns1:structMessage><ns1:varString>s1</ns1:varString><ns1:varInt>1</ns1:varInt><ns1:varFloat>1.1</ns1:varFloat></ns1:structMessage><ns1:shortMessage>1</ns1:shortMessage></ns2:BaseStructPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt new file mode 100644 index 0000000..bf867d9 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 001 (php/wsdl): echoSOAPStructFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPStruct('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoSOAPStructFault(array("soapStruct"=>$struct)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoSOAPStructFault><param xsi:type="ns2:SOAPStructFault"><soapStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></soapStruct></param></ns1:echoSOAPStructFault></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoSOAPStructFault'.</faultstring><detail><ns2:part1 xsi:type="ns1:SOAPStructFault"><soapStruct xsi:type="ns1:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></soapStruct></ns2:part1></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt new file mode 100644 index 0000000..6ac7641 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 002 (php/wsdl): echoBaseStructFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class BaseStruct { + function BaseStruct($f, $s) { + $this->floatMessage = $f; + $this->shortMessage = $s; + } +} +$struct = new BaseStruct(12.345,12); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoBaseStructFault($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoBaseStructFault><param xsi:type="ns2:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">12</shortMessage></param></ns1:echoBaseStructFault></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoBaseStructFault'.</faultstring><detail><ns2:part2 xsi:type="ns1:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">12</shortMessage></ns2:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt new file mode 100644 index 0000000..dda5b69 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 003 (php/wsdl): echoExtendedStructFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class BaseStruct { + function BaseStruct($f, $s) { + $this->floatMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +$struct = new ExtendedStruct(12.345,12,"arg",-3,5); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoExtendedStructFault($struct); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoExtendedStructFault><param xsi:type="ns2:ExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">12</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage></param></ns1:echoExtendedStructFault></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoExtendedStructFault'.</faultstring><detail><ns2:part3 xsi:type="ns1:ExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">12</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage></ns2:part3></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt new file mode 100644 index 0000000..e4b2917 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 004 (php/wsdl): echoMultipleFaults1(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->floatMessage = $f; + $this->shortMessage = $s; + } +} +$s1 = new SOAPStruct('arg',34,325.325); +$s2 = new BaseStruct(12.345,12); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(1,$s1,$s2); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults1><whichFault xsi:type="xsd:int">1</whichFault><param1 xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></param1><param2 xsi:type="ns2:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">12</shortMessage></param2></ns1:echoMultipleFaults1></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:part1 xsi:type="ns1:SOAPStructFault"><soapStruct xsi:type="ns1:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></soapStruct></ns2:part1></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt new file mode 100644 index 0000000..074b258 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 005 (php/wsdl): echoMultipleFaults1(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->floatMessage = $f; + $this->shortMessage = $s; + } +} +$s1 = new SOAPStruct('arg',34,325.325); +$s2 = new BaseStruct(12.345,12); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(2,$s1,$s2); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults1><whichFault xsi:type="xsd:int">2</whichFault><param1 xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></param1><param2 xsi:type="ns2:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">12</shortMessage></param2></ns1:echoMultipleFaults1></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:part2 xsi:type="ns1:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">12</shortMessage></ns2:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt new file mode 100644 index 0000000..8fd9b39 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 006 (php/wsdl): echoMultipleFaults1(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPStruct { + function SOAPStruct($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class BaseStruct { + function BaseStruct($f, $s) { + $this->floatMessage = $f; + $this->shortMessage = $s; + } +} +$s1 = new SOAPStruct('arg',34,325.325); +$s2 = new BaseStruct(12.345,12); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(3,$s1,$s2); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults1><whichFault xsi:type="xsd:int">3</whichFault><param1 xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></param1><param2 xsi:type="ns2:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">12</shortMessage></param2></ns1:echoMultipleFaults1></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:part1 xsi:type="ns1:SOAPStructFault"><soapStruct xsi:type="ns1:SOAPStruct"><varString xsi:type="xsd:string">arg</varString><varInt xsi:type="xsd:int">34</varInt><varFloat xsi:type="xsd:float">325.325</varFloat></soapStruct></ns2:part1></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt new file mode 100644 index 0000000..f54c188 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt @@ -0,0 +1,45 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 007 (php/wsdl): echoMultipleFaults2(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class BaseStruct { + function BaseStruct($f, $s) { + $this->floatMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +class MoreExtendedStruct extends ExtendedStruct { + function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { + $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + $this->booleanMessage = $b; + } +} +$s1 = new BaseStruct(12.345,1); +$s2 = new ExtendedStruct(12.345,2,"arg",-3,5); +$s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(1,$s1,$s2,$s3); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults2><whichFault xsi:type="xsd:int">1</whichFault><param1 xsi:type="ns2:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">1</shortMessage></param1><param2 xsi:type="ns2:ExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">2</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage></param2><param3 xsi:type="ns2:MoreExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">3</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage><booleanMessage xsi:type="xsd:boolean">true</booleanMessage></param3></ns1:echoMultipleFaults2></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:part2 xsi:type="ns1:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">1</shortMessage></ns2:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt new file mode 100644 index 0000000..d6f16a7 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt @@ -0,0 +1,45 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 008 (php/wsdl): echoMultipleFaults2(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class BaseStruct { + function BaseStruct($f, $s) { + $this->floatMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +class MoreExtendedStruct extends ExtendedStruct { + function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { + $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + $this->booleanMessage = $b; + } +} +$s1 = new BaseStruct(12.345,1); +$s2 = new ExtendedStruct(12.345,2,"arg",-3,5); +$s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(2,$s1,$s2,$s3); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults2><whichFault xsi:type="xsd:int">2</whichFault><param1 xsi:type="ns2:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">1</shortMessage></param1><param2 xsi:type="ns2:ExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">2</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage></param2><param3 xsi:type="ns2:MoreExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">3</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage><booleanMessage xsi:type="xsd:boolean">true</booleanMessage></param3></ns1:echoMultipleFaults2></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:part3 xsi:type="ns1:ExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">2</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage></ns2:part3></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt new file mode 100644 index 0000000..2bf7341 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt @@ -0,0 +1,45 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 009 (php/wsdl): echoMultipleFaults2(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class BaseStruct { + function BaseStruct($f, $s) { + $this->floatMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +class MoreExtendedStruct extends ExtendedStruct { + function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { + $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + $this->booleanMessage = $b; + } +} +$s1 = new BaseStruct(12.345,1); +$s2 = new ExtendedStruct(12.345,2,"arg",-3,5); +$s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(3,$s1,$s2,$s3); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults2><whichFault xsi:type="xsd:int">3</whichFault><param1 xsi:type="ns2:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">1</shortMessage></param1><param2 xsi:type="ns2:ExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">2</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage></param2><param3 xsi:type="ns2:MoreExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">3</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage><booleanMessage xsi:type="xsd:boolean">true</booleanMessage></param3></ns1:echoMultipleFaults2></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:part4 xsi:type="ns1:MoreExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">3</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage><booleanMessage xsi:type="xsd:boolean">true</booleanMessage></ns2:part4></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt new file mode 100644 index 0000000..f1eeac2 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt @@ -0,0 +1,45 @@ +--TEST-- +SOAP Interop Round4 GroupH Complex RPC Enc 010 (php/wsdl): echoMultipleFaults2(4) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class BaseStruct { + function BaseStruct($f, $s) { + $this->floatMessage = $f; + $this->shortMessage = $s; + } +} +class ExtendedStruct extends BaseStruct { + function ExtendedStruct($f, $s, $x1, $x2, $x3) { + $this->BaseStruct($f,$s); + $this->stringMessage = $x1; + $this->intMessage = $x2; + $this->anotherIntMessage = $x3; + } +} +class MoreExtendedStruct extends ExtendedStruct { + function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { + $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + $this->booleanMessage = $b; + } +} +$s1 = new BaseStruct(12.345,1); +$s2 = new ExtendedStruct(12.345,2,"arg",-3,5); +$s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(4,$s1,$s2,$s3); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_complex_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults2><whichFault xsi:type="xsd:int">4</whichFault><param1 xsi:type="ns2:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">1</shortMessage></param1><param2 xsi:type="ns2:ExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">2</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage></param2><param3 xsi:type="ns2:MoreExtendedStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">3</shortMessage><stringMessage xsi:type="xsd:string">arg</stringMessage><intMessage xsi:type="xsd:int">-3</intMessage><anotherIntMessage xsi:type="xsd:int">5</anotherIntMessage><booleanMessage xsi:type="xsd:boolean">true</booleanMessage></param3></ns1:echoMultipleFaults2></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:part2 xsi:type="ns1:BaseStruct"><floatMessage xsi:type="xsd:float">12.345</floatMessage><shortMessage xsi:type="xsd:short">1</shortMessage></ns2:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt new file mode 100644 index 0000000..104f7f5 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 001 (php/wsdl): echoEmptyFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoEmptyFault(); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns1:echoEmptyFaultRequest/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoEmptyFault'.</faultstring><detail><ns1:EmptyPart/></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt new file mode 100644 index 0000000..b713aed --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 002 (php/wsdl): echoStringFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringFault("Hello World"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns1:echoStringFaultRequest>Hello World</ns1:echoStringFaultRequest></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoStringFault'.</faultstring><detail><ns1:StringPart>Hello World</ns1:StringPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt new file mode 100644 index 0000000..e203ea0 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 003 (php/wsdl): echoIntArrayFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoIntArrayFault(array(34,12.345)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns2:echoIntArrayFaultRequest><ns1:value>34</ns1:value><ns1:value>12</ns1:value></ns2:echoIntArrayFaultRequest></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoIntArrayFault'.</faultstring><detail><ns2:ArrayOfIntPart><ns1:value>34</ns1:value><ns1:value>12</ns1:value></ns2:ArrayOfIntPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt new file mode 100644 index 0000000..f673ec0 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 004 (php/wsdl): echoMultipleFaults1(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(array("whichFault" => 1, + "param1" => "Hello world", + "param2" => array(12.345,45,678))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults1Request><ns1:whichFault>1</ns1:whichFault><ns1:param1>Hello world</ns1:param1><ns1:param2><ns2:value>12.345</ns2:value><ns2:value>45</ns2:value><ns2:value>678</ns2:value></ns1:param2></ns1:echoMultipleFaults1Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns1:EmptyPart/></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt new file mode 100644 index 0000000..67db504 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 005 (php/wsdl): echoMultipleFaults1(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(array("whichFault" => 2, + "param1" => "Hello world", + "param2" => array(12.345,45,678))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults1Request><ns1:whichFault>2</ns1:whichFault><ns1:param1>Hello world</ns1:param1><ns1:param2><ns2:value>12.345</ns2:value><ns2:value>45</ns2:value><ns2:value>678</ns2:value></ns1:param2></ns1:echoMultipleFaults1Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns1:StringPart>Hello world</ns1:StringPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt new file mode 100644 index 0000000..7c6c1b5 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 006 (php/wsdl): echoMultipleFaults1(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(array("whichFault" => 3, + "param1" => "Hello world", + "param2" => array(12.345,45,678))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults1Request><ns1:whichFault>3</ns1:whichFault><ns1:param1>Hello world</ns1:param1><ns1:param2><ns2:value>12.345</ns2:value><ns2:value>45</ns2:value><ns2:value>678</ns2:value></ns1:param2></ns1:echoMultipleFaults1Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:ArrayOfFloatPart><ns1:value>12.345</ns1:value><ns1:value>45</ns1:value><ns1:value>678</ns1:value></ns2:ArrayOfFloatPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt new file mode 100644 index 0000000..e8e9bba --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 007 (php/wsdl): echoMultipleFaults1(4) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(array("whichFault" => 4, + "param1" => "Hello world", + "param2" => array(12.345,45,678))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults1Request><ns1:whichFault>4</ns1:whichFault><ns1:param1>Hello world</ns1:param1><ns1:param2><ns2:value>12.345</ns2:value><ns2:value>45</ns2:value><ns2:value>678</ns2:value></ns1:param2></ns1:echoMultipleFaults1Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns1:EmptyPart/></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt new file mode 100644 index 0000000..5bd6b4c --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 008 (php/wsdl): echoMultipleFaults2(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(array("whichFault" => 1, + "param1" => "Hello world", + "param2" => 12.345, + "param3" => array("one","two","three"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults2Request><ns1:whichFault>1</ns1:whichFault><ns1:param1>Hello world</ns1:param1><ns1:param2>12.345</ns1:param2><ns1:param3><ns2:value>one</ns2:value><ns2:value>two</ns2:value><ns2:value>three</ns2:value></ns1:param3></ns1:echoMultipleFaults2Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns1:FloatPart>12.345</ns1:FloatPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt new file mode 100644 index 0000000..461a477 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 009 (php/wsdl): echoMultipleFaults2(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(array("whichFault" => 2, + "param1" => "Hello world", + "param2" => 12.345, + "param3" => array("one","two","three"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults2Request><ns1:whichFault>2</ns1:whichFault><ns1:param1>Hello world</ns1:param1><ns1:param2>12.345</ns1:param2><ns1:param3><ns2:value>one</ns2:value><ns2:value>two</ns2:value><ns2:value>three</ns2:value></ns1:param3></ns1:echoMultipleFaults2Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns1:StringPart>Hello world</ns1:StringPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt new file mode 100644 index 0000000..f312c36 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 010 (php/wsdl): echoMultipleFaults2(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(array("whichFault" => 3, + "param1" => "Hello world", + "param2" => 12.345, + "param3" => array("one","two","three"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults2Request><ns1:whichFault>3</ns1:whichFault><ns1:param1>Hello world</ns1:param1><ns1:param2>12.345</ns1:param2><ns1:param3><ns2:value>one</ns2:value><ns2:value>two</ns2:value><ns2:value>three</ns2:value></ns1:param3></ns1:echoMultipleFaults2Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:ArrayOfStringPart><ns1:value>one</ns1:value><ns1:value>two</ns1:value><ns1:value>three</ns1:value></ns2:ArrayOfStringPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt new file mode 100644 index 0000000..403cfaa --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 011 (php/wsdl): echoMultipleFaults2(4) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(array("whichFault" => 4, + "param1" => "Hello world", + "param2" => 12.345, + "param3" => array("one","two","three"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults2Request><ns1:whichFault>4</ns1:whichFault><ns1:param1>Hello world</ns1:param1><ns1:param2>12.345</ns1:param2><ns1:param3><ns2:value>one</ns2:value><ns2:value>two</ns2:value><ns2:value>three</ns2:value></ns1:param3></ns1:echoMultipleFaults2Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns1:FloatPart>12.345</ns1:FloatPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt new file mode 100644 index 0000000..e979765 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 012 (php/wsdl): echoMultipleFaults3(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults3(array("whichFault" => 1, + "param1" => "arg1", + "param2" => "arg2")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns1:echoMultipleFaults3Request><ns1:whichFault>1</ns1:whichFault><ns1:param1>arg1</ns1:param1><ns1:param2>arg2</ns1:param2></ns1:echoMultipleFaults3Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults3'.</faultstring><detail><ns1:StringPart>arg1</ns1:StringPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt new file mode 100644 index 0000000..92e3e3d --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 013 (php/wsdl): echoMultipleFaults3(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults3(array("whichFault" => 2, + "param1" => "arg1", + "param2" => "arg2")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns1:echoMultipleFaults3Request><ns1:whichFault>2</ns1:whichFault><ns1:param1>arg1</ns1:param1><ns1:param2>arg2</ns1:param2></ns1:echoMultipleFaults3Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults3'.</faultstring><detail><ns1:String2Part>arg2</ns1:String2Part></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt new file mode 100644 index 0000000..84875bd --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 014 (php/wsdl): echoMultipleFaults3(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults3(array("whichFault" => 3, + "param1" => "arg1", + "param2" => "arg2")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns1:echoMultipleFaults3Request><ns1:whichFault>3</ns1:whichFault><ns1:param1>arg1</ns1:param1><ns1:param2>arg2</ns1:param2></ns1:echoMultipleFaults3Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults3'.</faultstring><detail><ns1:StringPart>arg1</ns1:StringPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt new file mode 100644 index 0000000..0f61447 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 015 (php/wsdl): echoMultipleFaults4(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults4(array("whichFault" => 1, + "param1" => 162, + "param2" => 1)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns1:echoMultipleFaults4Request><ns1:whichFault>1</ns1:whichFault><ns1:param1>162</ns1:param1><ns1:param2>1</ns1:param2></ns1:echoMultipleFaults4Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults4'.</faultstring><detail><ns1:IntPart>162</ns1:IntPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt new file mode 100644 index 0000000..1b2379a --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 016 (php/wsdl): echoMultipleFaults4(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults4(array("whichFault" => 2, + "param1" => 162, + "param2" => 1)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns1:echoMultipleFaults4Request><ns1:whichFault>2</ns1:whichFault><ns1:param1>162</ns1:param1><ns1:param2>1</ns1:param2></ns1:echoMultipleFaults4Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults4'.</faultstring><detail><ns1:EnumPart>1</ns1:EnumPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt new file mode 100644 index 0000000..003f3ac --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple Doc Lit 017 (php/wsdl): echoMultipleFaults4(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults4(array("whichFault" => 3, + "param1" => 162, + "param2" => 1)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_doclit.inc"); +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://soapinterop.org/types/requestresponse"><SOAP-ENV:Body><ns1:echoMultipleFaults4Request><ns1:whichFault>3</ns1:whichFault><ns1:param1>162</ns1:param1><ns1:param2>1</ns1:param2></ns1:echoMultipleFaults4Request></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults4'.</faultstring><detail><ns1:IntPart>162</ns1:IntPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt new file mode 100644 index 0000000..ba76cfe --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 001 (php/wsdl): echoEmptyFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoEmptyFault(); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoEmptyFault/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoEmptyFault'.</faultstring><detail><ns2:part1 xsi:nil="true" xsi:type="ns1:EmptyFault"/></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt new file mode 100644 index 0000000..0d82b67 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 002 (php/wsdl): echoStringFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringFault("Hello World"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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:echoStringFault><param xsi:type="xsd:string">Hello World</param></ns1:echoStringFault></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoStringFault'.</faultstring><detail><ns1:part2 xsi:type="xsd:string">Hello World</ns1:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt new file mode 100644 index 0000000..2925197 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 003 (php/wsdl): echoIntArrayFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoIntArrayFault(array(34,12.345)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoIntArrayFault><param SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns2:ArrayOfInt"><item xsi:type="xsd:int">34</item><item xsi:type="xsd:int">12</item></param></ns1:echoIntArrayFault></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoIntArrayFault'.</faultstring><detail><ns2:part5 SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns1:ArrayOfInt"><item xsi:type="xsd:int">34</item><item xsi:type="xsd:int">12</item></ns2:part5></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt new file mode 100644 index 0000000..7926e15 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 004 (php/wsdl): echoMultipleFaults1(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(1,"Hello world",array(12.345,45,678)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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/" xmlns:ns2="http://soapinterop.org/types" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults1><whichFault xsi:type="xsd:int">1</whichFault><param1 xsi:type="xsd:string">Hello world</param1><param2 SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns2:ArrayOfFloat"><item xsi:type="xsd:float">12.345</item><item xsi:type="xsd:float">45</item><item xsi:type="xsd:float">678</item></param2></ns1:echoMultipleFaults1></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:part1 xsi:nil="true" xsi:type="ns1:EmptyFault"/></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt new file mode 100644 index 0000000..fb332a4 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 005 (php/wsdl): echoMultipleFaults1(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(2,"Hello world",array(12.345,45,678)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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/" xmlns:ns2="http://soapinterop.org/types" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults1><whichFault xsi:type="xsd:int">2</whichFault><param1 xsi:type="xsd:string">Hello world</param1><param2 SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns2:ArrayOfFloat"><item xsi:type="xsd:float">12.345</item><item xsi:type="xsd:float">45</item><item xsi:type="xsd:float">678</item></param2></ns1:echoMultipleFaults1></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns1:part2 xsi:type="xsd:string">Hello world</ns1:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt new file mode 100644 index 0000000..2ed546f --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 006 (php/wsdl): echoMultipleFaults1(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(3,"Hello world",array(12.345,45,678)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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/" xmlns:ns2="http://soapinterop.org/types" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults1><whichFault xsi:type="xsd:int">3</whichFault><param1 xsi:type="xsd:string">Hello world</param1><param2 SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns2:ArrayOfFloat"><item xsi:type="xsd:float">12.345</item><item xsi:type="xsd:float">45</item><item xsi:type="xsd:float">678</item></param2></ns1:echoMultipleFaults1></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:part7 SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns1:ArrayOfFloat"><item xsi:type="xsd:float">12.345</item><item xsi:type="xsd:float">45</item><item xsi:type="xsd:float">678</item></ns2:part7></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt new file mode 100644 index 0000000..bd31aa3 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 007 (php/wsdl): echoMultipleFaults1(4) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults1(4,"Hello world",array(12.345,45,678)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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/" xmlns:ns2="http://soapinterop.org/types" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults1><whichFault xsi:type="xsd:int">4</whichFault><param1 xsi:type="xsd:string">Hello world</param1><param2 SOAP-ENC:arrayType="xsd:float[3]" xsi:type="ns2:ArrayOfFloat"><item xsi:type="xsd:float">12.345</item><item xsi:type="xsd:float">45</item><item xsi:type="xsd:float">678</item></param2></ns1:echoMultipleFaults1></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults1'.</faultstring><detail><ns2:part1 xsi:nil="true" xsi:type="ns1:EmptyFault"/></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt new file mode 100644 index 0000000..e61e374 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 008 (php/wsdl): echoMultipleFaults2(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(1, "Hello World", 12.345, array("one","two","three")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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/" xmlns:ns2="http://soapinterop.org/types" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults2><whichFault xsi:type="xsd:int">1</whichFault><param1 xsi:type="xsd:string">Hello World</param1><param2 xsi:type="xsd:float">12.345</param2><param3 SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfString"><item xsi:type="xsd:string">one</item><item xsi:type="xsd:string">two</item><item xsi:type="xsd:string">three</item></param3></ns1:echoMultipleFaults2></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns1:part4 xsi:type="xsd:float">12.345</ns1:part4></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt new file mode 100644 index 0000000..d186947 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 009 (php/wsdl): echoMultipleFaults2(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(2, "Hello World", 12.345, array("one","two","three")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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/" xmlns:ns2="http://soapinterop.org/types" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults2><whichFault xsi:type="xsd:int">2</whichFault><param1 xsi:type="xsd:string">Hello World</param1><param2 xsi:type="xsd:float">12.345</param2><param3 SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfString"><item xsi:type="xsd:string">one</item><item xsi:type="xsd:string">two</item><item xsi:type="xsd:string">three</item></param3></ns1:echoMultipleFaults2></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns1:part2 xsi:type="xsd:string">Hello World</ns1:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt new file mode 100644 index 0000000..3431180 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 010 (php/wsdl): echoMultipleFaults2(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(3, "Hello World", 12.345, array("one","two","three")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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/" xmlns:ns2="http://soapinterop.org/types" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults2><whichFault xsi:type="xsd:int">3</whichFault><param1 xsi:type="xsd:string">Hello World</param1><param2 xsi:type="xsd:float">12.345</param2><param3 SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfString"><item xsi:type="xsd:string">one</item><item xsi:type="xsd:string">two</item><item xsi:type="xsd:string">three</item></param3></ns1:echoMultipleFaults2></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:part6 SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns1:ArrayOfString"><item xsi:type="xsd:string">one</item><item xsi:type="xsd:string">two</item><item xsi:type="xsd:string">three</item></ns2:part6></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt new file mode 100644 index 0000000..1d66e0c --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 011 (php/wsdl): echoMultipleFaults2(4) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults2(4, "Hello World", 12.345, array("one","two","three")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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/" xmlns:ns2="http://soapinterop.org/types" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults2><whichFault xsi:type="xsd:int">4</whichFault><param1 xsi:type="xsd:string">Hello World</param1><param2 xsi:type="xsd:float">12.345</param2><param3 SOAP-ENC:arrayType="xsd:string[3]" xsi:type="ns2:ArrayOfString"><item xsi:type="xsd:string">one</item><item xsi:type="xsd:string">two</item><item xsi:type="xsd:string">three</item></param3></ns1:echoMultipleFaults2></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns1:part4 xsi:type="xsd:float">12.345</ns1:part4></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt new file mode 100644 index 0000000..e6bbcc7 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 012 (php/wsdl): echoMultipleFaults3(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults3(1,"arg1","arg2"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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:echoMultipleFaults3><whichFault xsi:type="xsd:int">1</whichFault><param1 xsi:type="xsd:string">arg1</param1><param2 xsi:type="xsd:string">arg2</param2></ns1:echoMultipleFaults3></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl/fault1" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults3'.</faultstring><detail><ns1:part2 xsi:type="xsd:string">arg1</ns1:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt new file mode 100644 index 0000000..ba93028 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 013 (php/wsdl): echoMultipleFaults3(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults3(2,"arg1","arg2"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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:echoMultipleFaults3><whichFault xsi:type="xsd:int">2</whichFault><param1 xsi:type="xsd:string">arg1</param1><param2 xsi:type="xsd:string">arg2</param2></ns1:echoMultipleFaults3></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl/fault2" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults3'.</faultstring><detail><ns1:part2 xsi:type="xsd:string">arg2</ns1:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt new file mode 100644 index 0000000..e7449d9 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 014 (php/wsdl): echoMultipleFaults3(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults3(3,"arg1","arg2"); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" 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:echoMultipleFaults3><whichFault xsi:type="xsd:int">3</whichFault><param1 xsi:type="xsd:string">arg1</param1><param2 xsi:type="xsd:string">arg2</param2></ns1:echoMultipleFaults3></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl/fault1" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults3'.</faultstring><detail><ns1:part2 xsi:type="xsd:string">arg1</ns1:part2></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt new file mode 100644 index 0000000..7da5cd5 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 015 (php/wsdl): echoMultipleFaults4(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults4(1, 162, 1); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults4><whichFault xsi:type="xsd:int">1</whichFault><param1 xsi:type="xsd:int">162</param1><param2 xsi:type="ns2:Enum">1</param2></ns1:echoMultipleFaults4></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults4'.</faultstring><detail><ns1:part3 xsi:type="xsd:int">162</ns1:part3></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt new file mode 100644 index 0000000..e44b743 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 016 (php/wsdl): echoMultipleFaults4(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults4(2, 162, 1); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults4><whichFault xsi:type="xsd:int">2</whichFault><param1 xsi:type="xsd:int">162</param1><param2 xsi:type="ns2:Enum">1</param2></ns1:echoMultipleFaults4></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults4'.</faultstring><detail><ns2:part9 xsi:type="ns1:Enum">1</ns2:part9></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt new file mode 100644 index 0000000..f7de4aa --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH Simple RPC Enc 017 (php/wsdl): echoMultipleFaults4(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoMultipleFaults4(3, 162, 1); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_simple_rpcenc.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoMultipleFaults4><whichFault xsi:type="xsd:int">3</whichFault><param1 xsi:type="xsd:int">162</param1><param2 xsi:type="ns2:Enum">1</param2></ns1:echoMultipleFaults4></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults4'.</faultstring><detail><ns1:part3 xsi:type="xsd:int">162</ns1:part3></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt new file mode 100644 index 0000000..d7c5172 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH SoapFault 001 (php/wsdl): echoVersionMismatchFault(SOAP 1.1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoVersionMismatchFault(); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_soapfault.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVersionMismatchFault/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoVersionMismatchFaultResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt new file mode 100644 index 0000000..64ebf70 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH SoapFault 002 (php/wsdl): echoVersionMismatchFault(SOAP 1.2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0,"soap_version"=>SOAP_1_2)); +$client->echoVersionMismatchFault(); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_soapfault.inc"); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body><ns1:echoVersionMismatchFault env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"/></env:Body></env:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body><ns1:echoVersionMismatchFaultResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"/></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_003w.phpt new file mode 100644 index 0000000..ffed23b --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_003w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH SoapFault 003 (php/wsdl): echoVersionMismatchFault(unknown version) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://unknown.org/envelope/" xmlns:ns1="http://soapinterop.org/wsdl" 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:echoVersionMismatchFault/></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; +echo $HTTP_RAW_POST_DATA."\n"; +include("round4_groupH_soapfault.inc"); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://unknown.org/envelope/" xmlns:ns1="http://soapinterop.org/wsdl" 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:echoVersionMismatchFault/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:VersionMismatch</faultcode><faultstring>Wrong Version</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt new file mode 100644 index 0000000..ad791dd --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupH SoapFault 004 (php/wsdl): echoMustUnderstandFault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = new SoapHeader("http://soapinterop.org/wsdl", "UnknownHeaderRequest", "Hello World", 1); +$client = new SoapClient(dirname(__FILE__)."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoVersionMismatchFault",array(), null, $hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupH_soapfault.inc"); +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://soapinterop.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header><ns1:UnknownHeaderRequest SOAP-ENV:mustUnderstand="1">Hello World</ns1:UnknownHeaderRequest></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoVersionMismatchFault/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:MustUnderstand</faultcode><faultstring>Header not understood</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_doclit.inc b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_doclit.inc new file mode 100644 index 0000000..a27f96e --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_doclit.inc @@ -0,0 +1,38 @@ +<?php +class SOAP_Interop_GroupH { + + function echoSOAPStructFault($input) { + return new SoapFault("Server", "Fault in response to 'echoSOAPStructFault'.", null, array("soapStruct"=>$input), "ComplexFault"); + } + + function echoBaseStructFault($input) { + return new SoapFault("Server", "Fault in response to 'echoBaseStructFault'.", null, $input, "ComplexFault"); + } + + function echoExtendedStructFault($input) { + return new SoapFault("Server", "Fault in response to 'echoExtendedStructFault'.", null, $input, "ComplexFault"); + } + + function echoMultipleFaults1($input) { + if ($input->whichFault == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, $input->param2, "ComplexFault2"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, array("soapStruct"=>$input->param1), "ComplexFault1"); + } + } + + function echoMultipleFaults2($input) { + if ($input->whichFault == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $input->param2, "ComplexFault2"); + } else if ($input->whichFault == 3) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $input->param3, "ComplexFault3"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $input->param1, "ComplexFault1"); + } + } +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl"); +$server->setClass("SOAP_Interop_GroupH"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_doclit.wsdl b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_doclit.wsdl new file mode 100644 index 0000000..f1c383d --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_doclit.wsdl @@ -0,0 +1,329 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://soapinterop.org/wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:ns2="http://soapinterop.org/types" + xmlns:ns3="http://soapinterop.org/types/part" + xmlns:ns4="http://soapinterop.org/types/requestresponse" + targetNamespace="http://soapinterop.org/wsdl"> + + <types> + <schema elementFormDefault="qualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/types" + targetNamespace="http://soapinterop.org/types"> + + <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> + + <complexType name="SOAPStruct"> + <sequence> + <element name="varString" type="xsd:string"/> + <element name="varInt" type="xsd:int"/> + <element name="varFloat" type="xsd:float"/> + </sequence> + </complexType> + + <complexType name="SOAPStructFault"> + <sequence> + <element name="soapStruct" type="tns:SOAPStruct"/> + </sequence> + </complexType> + + <complexType name="BaseStruct"> + <sequence> + <element name="structMessage" type="tns:SOAPStruct"/> + <element name="shortMessage" type="xsd:short"/> + </sequence> + </complexType> + + <complexType name="ExtendedStruct"> + <complexContent> + <extension base="tns:BaseStruct"> + <sequence> + <element name="stringMessage" type="xsd:string"/> + <element name="intMessage" type="xsd:int"/> + <element name="anotherIntMessage" type="xsd:int"/> + </sequence> + </extension> + </complexContent> + </complexType> + + <complexType name="MoreExtendedStruct"> + <complexContent> + <extension base="tns:ExtendedStruct"> + <sequence> + <element name="booleanMessage" type="xsd:boolean"/> + </sequence> + </extension> + </complexContent> + </complexType> + + </schema> + + <schema elementFormDefault="qualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/types/part" + targetNamespace="http://soapinterop.org/types/part"> + + <element name="SOAPStructFaultPart" type="ns2:SOAPStructFault"/> + <element name="BaseStructPart" type="ns2:BaseStruct"/> + <element name="ExtendedStructPart" type="ns2:ExtendedStruct"/> + <element name="MoreExtendedStructPart" type="ns2:MoreExtendedStruct"/> + + </schema> + + <schema elementFormDefault="qualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/types/requestresponse" + targetNamespace="http://soapinterop.org/types/requestresponse"> + + <element name="echoSOAPStructFaultRequest" type="ns2:SOAPStruct"/> + <element name="echoSOAPStructFaultResponse"> + <complexType/> + </element> + + <element name="echoBaseStructFaultRequest" type="ns2:BaseStruct"/> + <element name="echoBaseStructFaultResponse"> + <complexType/> + </element> + + <element name="echoExtendedStructFaultRequest" type="ns2:ExtendedStruct"/> + <element name="echoExtendedStructFaultResponse"> + <complexType/> + </element> + + <element name="echoMultipleFaults1Request"> + <complexType> + <sequence> + <element name="whichFault" type="xsd:int"/> + <element name="param1" type="ns2:SOAPStruct"/> + <element name="param2" type="ns2:BaseStruct"/> + </sequence> + </complexType> + </element> + <element name="echoMultipleFaults1Response"> + <complexType/> + </element> + + <element name="echoMultipleFaults2Request"> + <complexType> + <sequence> + <element name="whichFault" type="xsd:int"/> + <element name="param1" type="ns2:BaseStruct"/> + <element name="param2" type="ns2:ExtendedStruct"/> + <element name="param3" type="ns2:MoreExtendedStruct"/> + </sequence> + </complexType> + </element> + <element name="echoMultipleFaults2Response"> + <complexType/> + </element> + + </schema> + </types> + + <message name="echoSOAPStructFaultRequest"> + <part name="param" element="ns4:echoSOAPStructFaultRequest"/> + </message> + <message name="echoSOAPStructFaultResponse"> + <part name="param" element="ns4:echoSOAPStructFaultResponse"/> + </message> + + <message name="echoBaseStructFaultRequest"> + <part name="param" element="ns4:echoBaseStructFaultRequest"/> + </message> + <message name="echoBaseStructFaultResponse"> + <part name="param" element="ns4:echoBaseStructFaultResponse"/> + </message> + + <message name="echoExtendedStructFaultRequest"> + <part name="param" element="ns4:echoExtendedStructFaultRequest"/> + </message> + <message name="echoExtendedStructFaultResponse"> + <part name="param" element="ns4:echoExtendedStructFaultResponse"/> + </message> + + <message name="echoMultipleFaults1Request"> + <part name="param" element="ns4:echoMultipleFaults1Request"/> + </message> + <message name="echoMultipleFaults1Response"> + <part name="param" element="ns4:echoMultipleFaults1Response"/> + </message> + + <message name="echoMultipleFaults2Request"> + <part name="param" element="ns4:echoMultipleFaults2Request"/> + </message> + <message name="echoMultipleFaults2Response"> + <part name="param" element="ns4:echoMultipleFaults2Response"/> + </message> + + <!-- Fault messages --> + <message name="SOAPStructFault"> + <part name="part3" element="ns3:SOAPStructFaultPart"/> + </message> + <message name="BaseStructFault"> + <part name="part1" element="ns3:BaseStructPart"/> + </message> + <message name="ExtendedStructFault"> + <part name="part2" element="ns3:ExtendedStructPart"/> + </message> + <message name="MoreExtendedStructFault"> + <part name="part5" element="ns3:MoreExtendedStructPart"/> + </message> + + <portType name="ComplexDocLitPortType"> + <!-- + Throws a fault with an embedded SOAPStruct + --> + <operation name="echoSOAPStructFault" parameterOrder=""> + <input message="tns:echoSOAPStructFaultRequest"/> + <output message="tns:echoSOAPStructFaultResponse"/> + <fault name="ComplexFault" message="tns:SOAPStructFault"/> + </operation> + + <!-- + Throws a fault with a base complex struct + --> + <operation name="echoBaseStructFault" parameterOrder=""> + <input message="tns:echoBaseStructFaultRequest"/> + <output message="tns:echoBaseStructFaultResponse"/> + <fault name="ComplexFault" message="tns:BaseStructFault"/> + </operation> + + <!-- + Throws a fault with an en extended complex type + --> + <operation name="echoExtendedStructFault" parameterOrder=""> + <input message="tns:echoExtendedStructFaultRequest"/> + <output message="tns:echoExtendedStructFaultResponse"/> + <fault name="ComplexFault" message="tns:ExtendedStructFault"/> + </operation> + + <!-- + Throws a fault with embedded complex type, fault with an + extended complex type and fault with an array of a base + complex type + --> + <operation name="echoMultipleFaults1" parameterOrder="param"> + <input message="tns:echoMultipleFaults1Request"/> + <output message="tns:echoMultipleFaults1Response"/> + <fault name="ComplexFault1" message="tns:SOAPStructFault"/> + <fault name="ComplexFault2" message="tns:BaseStructFault"/> + </operation> + + <!-- + Throws a fault with an array of base complex type and + a fault with doubly extended complex type + --> + <operation name="echoMultipleFaults2" parameterOrder="param"> + <input message="tns:echoMultipleFaults2Request"/> + <output message="tns:echoMultipleFaults2Response"/> + <fault name="ComplexFault1" message="tns:BaseStructFault"/> + <fault name="ComplexFault2" message="tns:ExtendedStructFault"/> + <fault name="ComplexFault3" message="tns:MoreExtendedStructFault"/> + </operation> + </portType> + + <binding name="ComplexDocLitBinding" type="tns:ComplexDocLitPortType"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> + <operation name="echoSOAPStructFault"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="ComplexFault"> + <soap:fault + name="ComplexFault" + use="literal"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoBaseStructFault"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="ComplexFault"> + <soap:fault + name="ComplexFault" + use="literal"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoExtendedStructFault"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="ComplexFault"> + <soap:fault + name="ComplexFault" + use="literal"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoMultipleFaults1"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="ComplexFault1"> + <soap:fault + name="ComplexFault1" + use="literal"/> + </fault> + <fault name="ComplexFault2"> + <soap:fault + name="ComplexFault2" + use="literal"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoMultipleFaults2"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="ComplexFault1"> + <soap:fault + name="ComplexFault1" + use="literal"/> + </fault> + <fault name="ComplexFault2"> + <soap:fault + name="ComplexFault2" + use="literal"/> + </fault> + <fault name="ComplexFault3"> + <soap:fault + name="ComplexFault3" + use="literal"/> + </fault> + <soap:operation soapAction=""/> + </operation> + </binding> + + <service name="ComplexDocLitService"> + <port name="ComplexDocLitPort" binding="tns:ComplexDocLitBinding"> + <soap:address + location="test://"/> + </port> + </service> +</definitions> + diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_rpcenc.inc b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_rpcenc.inc new file mode 100644 index 0000000..52165ba --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_rpcenc.inc @@ -0,0 +1,38 @@ +<?php +class SOAP_Interop_GroupH { + + function echoSOAPStructFault($input) { + return new SoapFault("Server", "Fault in response to 'echoSOAPStructFault'.", null, $input, "ComplexFault"); + } + + function echoBaseStructFault($input) { + return new SoapFault("Server", "Fault in response to 'echoBaseStructFault'.", null, $input, "ComplexFault"); + } + + function echoExtendedStructFault($input) { + return new SoapFault("Server", "Fault in response to 'echoExtendedStructFault'.", null, $input, "ComplexFault"); + } + + function echoMultipleFaults1($which, $s1, $s2) { + if ($which == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, $s2, "ComplexFault2"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, array("soapStruct"=>$s1), "ComplexFault1"); + } + } + + function echoMultipleFaults2($which, $s1, $s2, $s3) { + if ($which == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $s2, "ComplexFault2"); + } else if ($which == 3) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $s3, "ComplexFault3"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $s1, "ComplexFault1"); + } + } +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl"); +$server->setClass("SOAP_Interop_GroupH"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_rpcenc.wsdl b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_rpcenc.wsdl new file mode 100644 index 0000000..e78ca38 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_complex_rpcenc.wsdl @@ -0,0 +1,301 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://soapinterop.org/wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:ns2="http://soapinterop.org/types" + targetNamespace="http://soapinterop.org/wsdl"> + + <types> + <schema elementFormDefault="qualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/types" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://soapinterop.org/types"> + + <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> + + <complexType name="SOAPStruct"> + <sequence> + <element name="varString" type="xsd:string"/> + <element name="varInt" type="xsd:int"/> + <element name="varFloat" type="xsd:float"/> + </sequence> + </complexType> + + <complexType name="SOAPStructFault"> + <sequence> + <element name="soapStruct" type="tns:SOAPStruct"/> + </sequence> + </complexType> + + <complexType name="BaseStruct"> + <sequence> + <element name="floatMessage" type="xsd:float"/> + <element name="shortMessage" type="xsd:short"/> + </sequence> + </complexType> + + <complexType name="ExtendedStruct"> + <complexContent> + <extension base="tns:BaseStruct"> + <sequence> + <element name="stringMessage" type="xsd:string"/> + <element name="intMessage" type="xsd:int"/> + <element name="anotherIntMessage" type="xsd:int"/> + </sequence> + </extension> + </complexContent> + </complexType> + + <complexType name="MoreExtendedStruct"> + <complexContent> + <extension base="tns:ExtendedStruct"> + <sequence> + <element name="booleanMessage" type="xsd:boolean"/> + </sequence> + </extension> + </complexContent> + </complexType> + + </schema> + </types> + + <message name="echoFaultResponse"/> + <message name="echoSOAPStructFaultRequest"> + <part name="param" type="ns2:SOAPStructFault"/> + </message> + <message name="echoBaseStructFaultRequest"> + <part name="param" type="ns2:BaseStruct"/> + </message> + <message name="echoExtendedStructFaultRequest"> + <part name="param" type="ns2:ExtendedStruct"/> + </message> + <message name="echoMultipleFaults1Request"> + <part name="whichFault" type="xsd:int"/> + <part name="param1" type="ns2:SOAPStruct"/> + <part name="param2" type="ns2:BaseStruct"/> + </message> + <message name="echoMultipleFaults2Request"> + <part name="whichFault" type="xsd:int"/> + <part name="param1" type="ns2:BaseStruct"/> + <part name="param2" type="ns2:ExtendedStruct"/> + <part name="param3" type="ns2:MoreExtendedStruct"/> + </message> + + <!-- Fault messages --> + <message name="SOAPStructFault"> + <part name="part1" type="ns2:SOAPStructFault"/> + </message> + <message name="BaseStructFault"> + <part name="part2" type="ns2:BaseStruct"/> + </message> + <message name="ExtendedStructFault"> + <part name="part3" type="ns2:ExtendedStruct"/> + </message> + <message name="MoreExtendedStructFault"> + <part name="part4" type="ns2:MoreExtendedStruct"/> + </message> + + <portType name="ComplexRpcEncPortType"> + <!-- + Throws a fault with an embedded SOAPStruct + --> + <operation name="echoSOAPStructFault" parameterOrder="param"> + <input message="tns:echoSOAPStructFaultRequest"/> + <output message="tns:echoFaultResponse"/> + <fault name="ComplexFault" message="tns:SOAPStructFault"/> + </operation> + + <!-- + Throws a fault with a base complex struct + --> + <operation name="echoBaseStructFault" parameterOrder="param"> + <input message="tns:echoBaseStructFaultRequest"/> + <output message="tns:echoFaultResponse"/> + <fault name="ComplexFault" message="tns:BaseStructFault"/> + </operation> + + <!-- + Throws a fault with an en extended complex type + --> + <operation name="echoExtendedStructFault" parameterOrder="param"> + <input message="tns:echoExtendedStructFaultRequest"/> + <output message="tns:echoFaultResponse"/> + <fault name="ComplexFault" message="tns:ExtendedStructFault"/> + </operation> + + <!-- + Throws a fault with embedded complex type and fault with + another complex type + --> + <operation name="echoMultipleFaults1" parameterOrder="whichFault param1 param2"> + <input message="tns:echoMultipleFaults1Request"/> + <output message="tns:echoFaultResponse"/> + <fault name="ComplexFault1" message="tns:SOAPStructFault"/> + <fault name="ComplexFault2" message="tns:BaseStructFault"/> + </operation> + + <!-- + Throws a fault with base complex type, fault with an extended + complex type and a fault with doubly extended complex type + --> + <operation name="echoMultipleFaults2" parameterOrder="whichFault param1 param2 param3"> + <input message="tns:echoMultipleFaults2Request"/> + <output message="tns:echoFaultResponse"/> + <fault name="ComplexFault1" message="tns:BaseStructFault"/> + <fault name="ComplexFault2" message="tns:ExtendedStructFault"/> + <fault name="ComplexFault3" message="tns:MoreExtendedStructFault"/> + </operation> + </portType> + + <binding name="ComplexRpcEncBinding" type="tns:ComplexRpcEncPortType"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> + <operation name="echoSOAPStructFault"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="ComplexFault"> + <soap:fault + name="ComplexFault" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoBaseStructFault"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="ComplexFault"> + <soap:fault + name="ComplexFault" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoExtendedStructFault"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="ComplexFault"> + <soap:fault + name="ComplexFault" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoMultipleFaults1"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="ComplexFault1"> + <soap:fault + name="ComplexFault1" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <fault name="ComplexFault2"> + <soap:fault + name="ComplexFault2" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoMultipleFaults2"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="ComplexFault1"> + <soap:fault + name="ComplexFault1" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <fault name="ComplexFault2"> + <soap:fault + name="ComplexFault2" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <fault name="ComplexFault3"> + <soap:fault + name="ComplexFault3" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + </binding> + + <service name="ComplexRpcEncService"> + <port name="ComplexRpcEncPort" binding="tns:ComplexRpcEncBinding"> + <soap:address + location="test://"/> + </port> + </service> +</definitions> + diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_doclit.inc b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_doclit.inc new file mode 100644 index 0000000..e0e35f1 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_doclit.inc @@ -0,0 +1,56 @@ +<?php +class SOAP_Interop_GroupH { + + function echoEmptyFault() { + return new SoapFault("Server", "Fault in response to 'echoEmptyFault'.", null, null, "SimpleFault"); + } + + function echoStringFault($input) { + return new SoapFault("Server", "Fault in response to 'echoStringFault'.", null, $input, "SimpleFault"); + } + + function echoIntArrayFault($input) { + return new SoapFault("Server", "Fault in response to 'echoIntArrayFault'.", null, $input, "SimpleFault"); + } + + function echoMultipleFaults1($input) { + if ($input->whichFault == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, $input->param1, "SimpleFault2"); + } else if ($input->whichFault == 3) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, $input->param2, "SimpleFault3"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, null, "SimpleFault1"); + } + } + + function echoMultipleFaults2($input) { + if ($input->whichFault == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $input->param1, "SimpleFault1"); + } else if ($input->whichFault == 3) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $input->param3, "SimpleFault3"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $input->param2, "SimpleFault2"); + } + } + + function echoMultipleFaults3($input) { + if ($input->whichFault == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults3'.", null, $input->param2, "SimpleFault2"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults3'.", null, $input->param1, "SimpleFault1"); + } + } + + function echoMultipleFaults4($input) { + if ($input->whichFault == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults4'.", null, $input->param2, "SimpleFault2"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults4'.", null, $input->param1, "SimpleFault1"); + } + } +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl"); +$server->setClass("SOAP_Interop_GroupH"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_doclit.wsdl b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_doclit.wsdl new file mode 100644 index 0000000..8f0d322 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_doclit.wsdl @@ -0,0 +1,418 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://soapinterop.org/wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:ns2="http://soapinterop.org/types" + xmlns:ns3="http://soapinterop.org/types/part" + xmlns:ns4="http://soapinterop.org/types/requestresponse" + targetNamespace="http://soapinterop.org/wsdl"> + <types> + <schema elementFormDefault="qualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/types" + targetNamespace="http://soapinterop.org/types"> + + <complexType name="ArrayOfString"> + <sequence> + <element name="value" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/> + </sequence> + </complexType> + + <complexType name="ArrayOfInt"> + <sequence> + <element name="value" minOccurs="0" maxOccurs="unbounded" type="xsd:int"/> + </sequence> + </complexType> + + <complexType name="ArrayOfFloat"> + <sequence> + <element name="value" minOccurs="0" maxOccurs="unbounded" type="xsd:float"/> + </sequence> + </complexType> + + <simpleType name="Enum"> + <restriction base="xsd:int"> + <enumeration value="1"/> + <enumeration value="2"/> + </restriction> + </simpleType> + + </schema> + + <schema elementFormDefault="qualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/types/part" + targetNamespace="http://soapinterop.org/types/part"> + + <element name="EmptyPart"> + <complexType/> + </element> + + <element name="StringPart" type="xsd:string"/> + <element name="IntPart" type="xsd:int"/> + <element name="FloatPart" type="xsd:float"/> + <element name="ArrayOfStringPart" type="ns2:ArrayOfString"/> + <element name="ArrayOfIntPart" type="ns2:ArrayOfInt"/> + <element name="ArrayOfFloatPart" type="ns2:ArrayOfFloat"/> + <element name="String2Part" type="xsd:string"/> + <element name="EnumPart" type="ns2:Enum"/> + + </schema> + + <schema elementFormDefault="qualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/types/requestresponse" + targetNamespace="http://soapinterop.org/types/requestresponse"> + + <element name="echoEmptyFaultRequest"> + <complexType/> + </element> + <element name="echoEmptyFaultResponse"> + <complexType/> + </element> + + <element name="echoStringFaultRequest" type="xsd:string"/> + <element name="echoStringFaultResponse"> + <complexType/> + </element> + + <element name="echoIntArrayFaultRequest" type="ns2:ArrayOfInt"/> + <element name="echoIntArrayFaultResponse"> + <complexType/> + </element> + + <element name="echoMultipleFaults1Request"> + <complexType> + <sequence> + <element name="whichFault" type="xsd:int"/> + <element name="param1" type="xsd:string"/> + <element name="param2" type="ns2:ArrayOfFloat"/> + </sequence> + </complexType> + </element> + <element name="echoMultipleFaults1Response"> + <complexType/> + </element> + + <element name="echoMultipleFaults2Request"> + <complexType> + <sequence> + <element name="whichFault" type="xsd:int"/> + <element name="param1" type="xsd:string"/> + <element name="param2" type="xsd:float"/> + <element name="param3" type="ns2:ArrayOfString"/> + </sequence> + </complexType> + </element> + <element name="echoMultipleFaults2Response"> + <complexType/> + </element> + + <element name="echoMultipleFaults3Request"> + <complexType> + <sequence> + <element name="whichFault" type="xsd:int"/> + <element name="param1" type="xsd:string"/> + <element name="param2" type="xsd:string"/> + </sequence> + </complexType> + </element> + <element name="echoMultipleFaults3Response"> + <complexType/> + </element> + + <element name="echoMultipleFaults4Request"> + <complexType> + <sequence> + <element name="whichFault" type="xsd:int"/> + <element name="param1" type="xsd:int"/> + <element name="param2" type="ns2:Enum"/> + </sequence> + </complexType> + </element> + <element name="echoMultipleFaults4Response"> + <complexType/> + </element> + + </schema> + </types> + + <message name="echoEmptyFaultRequest"> + <part name="param" element="ns4:echoEmptyFaultRequest"/> + </message> + <message name="echoEmptyFaultResponse"> + <part name="param" element="ns4:echoEmptyFaultResponse"/> + </message> + + <message name="echoStringFaultRequest"> + <part name="param" element="ns4:echoStringFaultRequest"/> + </message> + <message name="echoStringFaultResponse"> + <part name="param" element="ns4:echoStringFaultResponse"/> + </message> + + <message name="echoIntArrayFaultRequest"> + <part name="param" element="ns4:echoIntArrayFaultRequest"/> + </message> + <message name="echoIntArrayFaultResponse"> + <part name="param" element="ns4:echoIntArrayFaultResponse"/> + </message> + + <message name="echoMultipleFaults1Request"> + <part name="param" element="ns4:echoMultipleFaults1Request"/> + </message> + <message name="echoMultipleFaults1Response"> + <part name="param" element="ns4:echoMultipleFaults1Response"/> + </message> + + <message name="echoMultipleFaults2Request"> + <part name="param" element="ns4:echoMultipleFaults2Request"/> + </message> + <message name="echoMultipleFaults2Response"> + <part name="param" element="ns4:echoMultipleFaults2Response"/> + </message> + + <message name="echoMultipleFaults3Request"> + <part name="param" element="ns4:echoMultipleFaults3Request"/> + </message> + <message name="echoMultipleFaults3Response"> + <part name="param" element="ns4:echoMultipleFaults3Response"/> + </message> + + <message name="echoMultipleFaults4Request"> + <part name="param" element="ns4:echoMultipleFaults4Request"/> + </message> + <message name="echoMultipleFaults4Response"> + <part name="param" element="ns4:echoMultipleFaults4Response"/> + </message> + + <!-- Fault messages --> + <message name="EmptyFault"> + <part name="part1" element="ns3:EmptyPart"/> + </message> + <message name="StringFault"> + <part name="part2" element="ns3:StringPart"/> + </message> + <message name="IntFault"> + <part name="part3" element="ns3:IntPart"/> + </message> + <message name="FloatFault"> + <part name="part4" element="ns3:FloatPart"/> + </message> + <message name="StringArrayFault"> + <part name="part5" element="ns3:ArrayOfStringPart"/> + </message> + <message name="IntArrayFault"> + <part name="part6" element="ns3:ArrayOfIntPart"/> + </message> + <message name="FloatArrayFault"> + <part name="part7" element="ns3:ArrayOfFloatPart"/> + </message> + <!-- + Part name same as in Fault2 message + --> + <message name="String2Fault"> + <part name="part2" element="ns3:String2Part"/> + </message> + <message name="EnumFault"> + <part name="part9" element="ns3:EnumPart"/> + </message> + + <portType name="SimpleDocLitPortType"> + <!-- + Throws an empty fault + --> + <operation name="echoEmptyFault" parameterOrder=""> + <input message="tns:echoEmptyFaultRequest"/> + <output message="tns:echoEmptyFaultResponse"/> + <fault name="SimpleFault" message="tns:EmptyFault"/> + </operation> + + <!-- + Throws fault with xsd:string parameter + --> + <operation name="echoStringFault" parameterOrder="param"> + <input message="tns:echoStringFaultRequest"/> + <output message="tns:echoStringFaultResponse"/> + <fault name="SimpleFault" message="tns:StringFault"/> + </operation> + + <!-- + Throws fault with xsd:int[] parameter + --> + <operation name="echoIntArrayFault" parameterOrder="param"> + <input message="tns:echoIntArrayFaultRequest"/> + <output message="tns:echoIntArrayFaultResponse"/> + <fault name="SimpleFault" message="tns:IntArrayFault"/> + </operation> + + <!-- + Throws empty fault, fault with a xsd:string + parameter and fault with xsd:float[] parameter + --> + <operation name="echoMultipleFaults1" parameterOrder="param"> + <input message="tns:echoMultipleFaults1Request"/> + <output message="tns:echoMultipleFaults1Response"/> + <fault name="SimpleFault1" message="tns:EmptyFault"/> + <fault name="SimpleFault2" message="tns:StringFault"/> + <fault name="SimpleFault3" message="tns:FloatArrayFault"/> + </operation> + + <!-- + Throws fault with xsd:string parameter, fault with + xsd:float parameter and fault with xsd:string[] + parameters + --> + <operation name="echoMultipleFaults2" parameterOrder="param"> + <input message="tns:echoMultipleFaults2Request"/> + <output message="tns:echoMultipleFaults2Response"/> + <fault name="SimpleFault1" message="tns:StringFault"/> + <fault name="SimpleFault2" message="tns:FloatFault"/> + <fault name="SimpleFault3" message="tns:StringArrayFault"/> + </operation> + + <!-- + Throws two faults, each with xsd:string parameters + and same part names + --> + <operation name="echoMultipleFaults3" parameterOrder="param"> + <input message="tns:echoMultipleFaults3Request"/> + <output message="tns:echoMultipleFaults3Response"/> + <fault name="SimpleFault1" message="tns:StringFault"/> + <fault name="SimpleFault2" message="tns:String2Fault"/> + </operation> + + <!-- + Throws fault with xsd:int parameter and fault with an + int enumeration parameter + --> + <operation name="echoMultipleFaults4" parameterOrder="param"> + <input message="tns:echoMultipleFaults4Request"/> + <output message="tns:echoMultipleFaults4Response"/> + <fault name="SimpleFault1" message="tns:IntFault"/> + <fault name="SimpleFault2" message="tns:EnumFault"/> + </operation> + </portType> + + <binding name="SimpleDocLitBinding" type="tns:SimpleDocLitPortType"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> + + <operation name="echoEmptyFault"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <soap:fault use="literal"/> + <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/> + </operation> + + <operation name="echoStringFault"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="SimpleFault"> + <soap:fault use="literal"/> + </fault> + <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/> + </operation> + + <operation name="echoIntArrayFault"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="SimpleFault"> + <soap:fault use="literal"/> + </fault> + <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/> + </operation> + + <operation name="echoMultipleFaults1"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="SimpleFault1"> + <soap:fault use="literal"/> + </fault> + <fault name="SimpleFault2"> + <soap:fault use="literal"/> + </fault> + <fault name="SimpleFault3"> + <soap:fault use="literal"/> + </fault> + <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/> + </operation> + + <operation name="echoMultipleFaults2"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="SimpleFault1"> + <soap:fault use="literal"/> + </fault> + <fault name="SimpleFault2"> + <soap:fault use="literal"/> + </fault> + <fault name="SimpleFault3"> + <soap:fault use="literal"/> + </fault> + <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/> + </operation> + + <operation name="echoMultipleFaults3"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="SimpleFault1"> + <soap:fault use="literal"/> + </fault> + <fault name="SimpleFault2"> + <soap:fault use="literal"/> + </fault> + <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/> + </operation> + + <operation name="echoMultipleFaults4"> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + <fault name="SimpleFault1"> + <soap:fault use="literal"/> + </fault> + <fault name="SimpleFault2"> + <soap:fault use="literal"/> + </fault> + <soap:operation soapAction="http://soapinterop.org/r4/groupg/"/> + </operation> + + </binding> + + <service name="SimpleDocLitService"> + <port name="SimpleDocLitPort" binding="tns:SimpleDocLitBinding"> + <soap:address + location="http://"/> + </port> + </service> +</definitions> + diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_rpcenc.inc b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_rpcenc.inc new file mode 100644 index 0000000..d39f060 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_rpcenc.inc @@ -0,0 +1,56 @@ +<?php +class SOAP_Interop_GroupH { + + function echoEmptyFault() { + return new SoapFault("Server", "Fault in response to 'echoEmptyFault'.", null, null, "SimpleFault"); + } + + function echoStringFault($input) { + return new SoapFault("Server", "Fault in response to 'echoStringFault'.", null, $input, "SimpleFault"); + } + + function echoIntArrayFault($input) { + return new SoapFault("Server", "Fault in response to 'echoIntArrayFault'.", null, $input, "SimpleFault"); + } + + function echoMultipleFaults1($param, $string, $floats) { + if ($param == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, $string, "SimpleFault2"); + } else if ($param == 3) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, $floats, "SimpleFault3"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults1'.", null, null, "SimpleFault1"); + } + } + + function echoMultipleFaults2($param, $string, $float, $strings) { + if ($param == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $string, "SimpleFault1"); + } else if ($param == 3) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $strings, "SimpleFault3"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults2'.", null, $float, "SimpleFault2"); + } + } + + function echoMultipleFaults3($param, $param1, $param2) { + if ($param == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults3'.", null, $param2, "SimpleFault2"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults3'.", null, $param1, "SimpleFault1"); + } + } + + function echoMultipleFaults4($param, $int, $enum) { + if ($param == 2) { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults4'.", null, $enum, "SimpleFault2"); + } else { + return new SoapFault("Server", "Fault in response to 'echoMultipleFaults4'.", null, $int, "SimpleFault1"); + } + } +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl"); +$server->setClass("SOAP_Interop_GroupH"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_rpcenc.wsdl b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_rpcenc.wsdl new file mode 100644 index 0000000..24f73fc --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_simple_rpcenc.wsdl @@ -0,0 +1,408 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://soapinterop.org/wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:ns2="http://soapinterop.org/types" + targetNamespace="http://soapinterop.org/wsdl"> + <types> + <schema elementFormDefault="qualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://soapinterop.org/types" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://soapinterop.org/types"> + + <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> + + <complexType name="EmptyFault"/> + + <complexType name="ArrayOfString"> + <complexContent> + <restriction base="soap-enc:Array"> + <attribute ref="soap-enc:arrayType" wsdl:arrayType="string[]"/> + </restriction> + </complexContent> + </complexType> + + <complexType name="ArrayOfInt"> + <complexContent> + <restriction base="soap-enc:Array"> + <attribute ref="soap-enc:arrayType" wsdl:arrayType="int[]"/> + </restriction> + </complexContent> + </complexType> + + <complexType name="ArrayOfFloat"> + <complexContent> + <restriction base="soap-enc:Array"> + <attribute ref="soap-enc:arrayType" wsdl:arrayType="float[]"/> + </restriction> + </complexContent> + </complexType> + + <simpleType name="Enum"> + <restriction base="int"> + <enumeration value="1"/> + <enumeration value="2"/> + </restriction> + </simpleType> + </schema> + </types> + + <message name="echoFaultRequest"/> + <message name="echoFaultResponse"/> + <message name="echoStringFaultRequest"> + <part name="param" type="xsd:string"/> + </message> + <message name="echoIntArrayFaultRequest"> + <part name="param" type="ns2:ArrayOfInt"/> + </message> + <message name="echoMultipleFaults1Request"> + <part name="whichFault" type="xsd:int"/> + <part name="param1" type="xsd:string"/> + <part name="param2" type="ns2:ArrayOfFloat"/> + </message> + <message name="echoMultipleFaults2Request"> + <part name="whichFault" type="xsd:int"/> + <part name="param1" type="xsd:string"/> + <part name="param2" type="xsd:float"/> + <part name="param3" type="ns2:ArrayOfString"/> + </message> + <message name="echoMultipleFaults3Request"> + <part name="whichFault" type="xsd:int"/> + <part name="param1" type="xsd:string"/> + <part name="param2" type="xsd:string"/> + </message> + <message name="echoMultipleFaults4Request"> + <part name="whichFault" type="xsd:int"/> + <part name="param1" type="xsd:int"/> + <part name="param2" type="ns2:Enum"/> + </message> + + <!-- Fault messages --> + <message name="EmptyFault"> + <part name="part1" type="ns2:EmptyFault"/> + </message> + <message name="StringFault"> + <part name="part2" type="xsd:string"/> + </message> + <message name="IntFault"> + <part name="part3" type="xsd:int"/> + </message> + <message name="FloatFault"> + <part name="part4" type="xsd:float"/> + </message> + <message name="IntArrayFault"> + <part name="part5" type="ns2:ArrayOfInt"/> + </message> + <message name="StringArrayFault"> + <part name="part6" type="ns2:ArrayOfString"/> + </message> + <message name="FloatArrayFault"> + <part name="part7" type="ns2:ArrayOfFloat"/> + </message> + <!-- + Part name same as in StringFault message + --> + <message name="String2Fault"> + <part name="part2" type="xsd:string"/> + </message> + <message name="EnumFault"> + <part name="part9" type="ns2:Enum"/> + </message> + + <portType name="SimpleRpcEncPortType"> + <!-- + Throws an empty fault + --> + <operation name="echoEmptyFault" parameterOrder=""> + <input message="tns:echoFaultRequest"/> + <output message="tns:echoFaultResponse"/> + <fault name="SimpleFault" message="tns:EmptyFault"/> + </operation> + + <!-- + Throws fault with xsd:string parameter + --> + <operation name="echoStringFault" parameterOrder="param"> + <input message="tns:echoStringFaultRequest"/> + <output message="tns:echoFaultResponse"/> + <fault name="SimpleFault" message="tns:StringFault"/> + </operation> + + <!-- + Throws fault with xsd:int[] parameter + --> + <operation name="echoIntArrayFault" parameterOrder="param"> + <input message="tns:echoIntArrayFaultRequest"/> + <output message="tns:echoFaultResponse"/> + <fault name="SimpleFault" message="tns:IntArrayFault"/> + </operation> + + <!-- + Throws empty fault, fault with a xsd:string + parameter and fault with xsd:float[] parameter + --> + <operation name="echoMultipleFaults1" parameterOrder="whichFault param1 param2"> + <input message="tns:echoMultipleFaults1Request"/> + <output message="tns:echoFaultResponse"/> + <fault name="SimpleFault1" message="tns:EmptyFault"/> + <fault name="SimpleFault2" message="tns:StringFault"/> + <fault name="SimpleFault3" message="tns:FloatArrayFault"/> + </operation> + + <!-- + Throws fault with xsd:string parameter, fault with + xsd:float parameter and fault with xsd:string[] + parameters + --> + <operation name="echoMultipleFaults2" parameterOrder="whichFault param1 param2 param3"> + <input message="tns:echoMultipleFaults2Request"/> + <output message="tns:echoFaultResponse"/> + <fault name="SimpleFault1" message="tns:StringFault"/> + <fault name="SimpleFault2" message="tns:FloatFault"/> + <fault name="SimpleFault3" message="tns:StringArrayFault"/> + </operation> + + <!-- + Throws two faults, each with xsd:string parameters + and same part names. Each part name is bound to a different + namespace. + --> + <operation name="echoMultipleFaults3" parameterOrder="whichFault param1 param2"> + <input message="tns:echoMultipleFaults3Request"/> + <output message="tns:echoFaultResponse"/> + <fault name="SimpleFault1" message="tns:StringFault"/> + <fault name="SimpleFault2" message="tns:String2Fault"/> + </operation> + + <!-- + Throws fault with xsd:int parameter and fault with an + int enumeration parameter + --> + <operation name="echoMultipleFaults4" parameterOrder="whichFault param1 param2"> + <input message="tns:echoMultipleFaults4Request"/> + <output message="tns:echoFaultResponse"/> + <fault name="SimpleFault1" message="tns:IntFault"/> + <fault name="SimpleFault2" message="tns:EnumFault"/> + </operation> + </portType> + + <binding name="SimpleRpcEncBinding" type="tns:SimpleRpcEncPortType"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> + + <operation name="echoEmptyFault"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="SimpleFault"> + <soap:fault + name="SimpleFault" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoStringFault"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="SimpleFault"> + <soap:fault + name="SimpleFault" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoIntArrayFault"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="SimpleFault"> + <soap:fault + name="SimpleFault" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoMultipleFaults1"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="SimpleFault1"> + <soap:fault + name="SimpleFault1" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <fault name="SimpleFault2"> + <soap:fault + name="SimpleFault2" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <fault name="SimpleFault3"> + <soap:fault + name="SimpleFault3" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoMultipleFaults2"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="SimpleFault1"> + <soap:fault + name="SimpleFault1" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <fault name="SimpleFault2"> + <soap:fault + name="SimpleFault2" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <fault name="SimpleFault3"> + <soap:fault + name="SimpleFault3" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoMultipleFaults3"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="SimpleFault1"> + <soap:fault + name="SimpleFault1" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl/fault1"/> + </fault> + <fault name="SimpleFault2"> + <soap:fault + name="SimpleFault2" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl/fault2"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoMultipleFaults4"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <fault name="SimpleFault1"> + <soap:fault + name="SimpleFault1" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <fault name="SimpleFault2"> + <soap:fault + name="SimpleFault2" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </fault> + <soap:operation soapAction=""/> + </operation> + + </binding> + + <service name="SimpleRpcEncService"> + <port name="SimpleRpcEncPort" binding="tns:SimpleRpcEncBinding"> + <soap:address location="test://"/> + </port> + </service> +</definitions> + diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_soapfault.inc b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_soapfault.inc new file mode 100644 index 0000000..a92484e --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_soapfault.inc @@ -0,0 +1,22 @@ +<?php +class SOAP_Interop_GroupH { + + function echoVersionMismatchFault() + { + } + + function echoMustUnderstandFault() + { + } + + function HeaderRequest($string) + { + } + + +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupH_soapfault.wsdl"); +$server->setClass("SOAP_Interop_GroupH"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupH/round4_groupH_soapfault.wsdl b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_soapfault.wsdl new file mode 100644 index 0000000..4f49b8f --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/round4_groupH_soapfault.wsdl @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://soapinterop.org/wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:ns2="http://soapinterop.org/types" + targetNamespace="http://soapinterop.org/wsdl"> + + <message name="echoVoidRequest"/> + <message name="echoVoidResponse"/> + <message name="HeaderRequest"> + <part name="param" type="xsd:string"/> + </message> + + <portType name="SOAPFaultPortType"> + <operation name="echoVersionMismatchFault" parameterOrder=""> + <input message="tns:echoVoidRequest"/> + <output message="tns:echoVoidResponse"/> + </operation> + + <operation name="echoMustUnderstandFault" parameterOrder=""> + <input message="tns:echoVoidRequest"/> + <output message="tns:echoVoidResponse"/> + </operation> + </portType> + + <binding name="SOAPFaultBinding" type="tns:SOAPFaultPortType"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> + <!-- + If the server receives an envelope with an incorrect + namespace, then a fault with VersionMismatch fault code + is populated in the SOAP response + --> + <operation name="echoVersionMismatchFault"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <soap:operation soapAction=""/> + </operation> + + <operation name="echoMustUnderstandFault"> + <input> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + <soap:header + message="tns:HeaderRequest" + part="param" + use="encoded" + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body + encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + use="encoded" + namespace="http://soapinterop.org/wsdl"/> + </output> + <soap:operation soapAction=""/> + </operation> + + </binding> + + <service name="SOAPFaultService"> + <port name="SOAPFaultPort" binding="tns:SOAPFaultBinding"> + <soap:address location="test://"/> + </port> + </service> +</definitions> + + diff --git a/ext/soap/tests/interop/Round4/GroupH/skipif.inc b/ext/soap/tests/interop/Round4/GroupH/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupH/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt new file mode 100644 index 0000000..98ed58d --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 001 (php/wsdl): echoVoid +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoVoid(); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoVoid/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoVoidResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt new file mode 100644 index 0000000..67929f8 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 002 (php/wsdl): echoInteger +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoInteger(array("inputInteger"=>22)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoInteger><ns1:inputInteger>22</ns1:inputInteger></ns1:echoInteger></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoIntegerResponse><ns1:return>22</ns1:return></ns1:echoIntegerResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt new file mode 100644 index 0000000..8ee9418 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 003 (php/wsdl): echoFloat +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoFloat(array("inputFloat"=>12.345)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoFloat><ns1:inputFloat>12.345</ns1:inputFloat></ns1:echoFloat></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoFloatResponse><ns1:return>12.345</ns1:return></ns1:echoFloatResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt new file mode 100644 index 0000000..25b056d --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 004 (php/wsdl): echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString(array("inputString"=>"Hello World")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoString><ns1:inputString>Hello World</ns1:inputString></ns1:echoString></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoStringResponse><ns1:return>Hello World</ns1:return></ns1:echoStringResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt new file mode 100644 index 0000000..8d552dc --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 005 (php/wsdl): echoString(empty) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoString(array()); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoString/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoStringResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt Binary files differnew file mode 100644 index 0000000..2cc37b5 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt new file mode 100644 index 0000000..6f1edbe --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 007 (php/wsdl): echoDate +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoDate(array("inputDate"=>"2002-12-22T21:41:17Z")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoDate><ns1:inputDate>2002-12-22T21:41:17Z</ns1:inputDate></ns1:echoDate></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoDateResponse><ns1:return>2002-12-22T21:41:17Z</ns1:return></ns1:echoDateResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt new file mode 100644 index 0000000..d9dbed4 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 008 (php/wsdl): echoComplexType +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexType { + function SOAPComplexType($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPComplexType('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoComplexType(array("inputComplexType"=>$struct)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoComplexType><ns2:inputComplexType><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:inputComplexType></ns2:echoComplexType></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoComplexTypeResponse><ns2:return><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:return></ns2:echoComplexTypeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt new file mode 100644 index 0000000..41bf371 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 009 (php/wsdl): echoComplexType(minOccur=0) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexType { + function SOAPComplexType($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPComplexType('arg',34,325.325); +unset($struct->varString); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoComplexType(array("inputComplexType"=>$struct)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoComplexType><ns2:inputComplexType><ns1:varInt>34</ns1:varInt><ns1:varFloat>325.325</ns1:varFloat></ns2:inputComplexType></ns2:echoComplexType></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoComplexTypeResponse><ns2:return><ns1:varInt>34</ns1:varInt><ns1:varFloat>325.325</ns1:varFloat></ns2:return></ns2:echoComplexTypeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt new file mode 100644 index 0000000..0621716 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 010 (php/wsdl): echoIntegerMultiOccurs +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoIntegerMultiOccurs(array("inputIntegerMultiOccurs"=>array(22,29,36))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoIntegerMultiOccurs><ns1:inputIntegerMultiOccurs><ns1:int>22</ns1:int><ns1:int>29</ns1:int><ns1:int>36</ns1:int></ns1:inputIntegerMultiOccurs></ns1:echoIntegerMultiOccurs></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoIntegerMultiOccursResponse><ns1:return>22</ns1:return><ns1:return>29</ns1:return><ns1:return>36</ns1:return></ns1:echoIntegerMultiOccursResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt new file mode 100644 index 0000000..9e064e8 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 011 (php/wsdl): echoFloatMultiOccurs +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoFloatMultiOccurs(array("inputFloatMultiOccurs"=>array(22.5,12.345))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoFloatMultiOccurs><ns1:inputFloatMultiOccurs><ns1:float>22.5</ns1:float><ns1:float>12.345</ns1:float></ns1:inputFloatMultiOccurs></ns1:echoFloatMultiOccurs></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoFloatMultiOccursResponse><ns1:return>22.5</ns1:return><ns1:return>12.345</ns1:return></ns1:echoFloatMultiOccursResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt new file mode 100644 index 0000000..ecf1d53 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 012 (php/wsdl): echoStringMultiOccurs +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringMultiOccurs(array("inputStringMultiOccurs"=>array("arg1","arg2","arg3"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoStringMultiOccurs><ns1:inputStringMultiOccurs><ns1:string>arg1</ns1:string><ns1:string>arg2</ns1:string><ns1:string>arg3</ns1:string></ns1:inputStringMultiOccurs></ns1:echoStringMultiOccurs></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoStringMultiOccursResponse><ns1:return>arg1</ns1:return><ns1:return>arg2</ns1:return><ns1:return>arg3</ns1:return></ns1:echoStringMultiOccursResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt new file mode 100644 index 0000000..c237ae2 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 013 (php/wsdl): echoStringMultiOccurs(nil) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoStringMultiOccurs(array("inputStringMultiOccurs"=>array("arg1",NULL,"arg3"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns1:echoStringMultiOccurs><ns1:inputStringMultiOccurs><ns1:string>arg1</ns1:string><ns1:string xsi:nil="true"/><ns1:string>arg3</ns1:string></ns1:inputStringMultiOccurs></ns1:echoStringMultiOccurs></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoStringMultiOccursResponse><ns1:return>arg1</ns1:return><ns1:return/><ns1:return>arg3</ns1:return></ns1:echoStringMultiOccursResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt new file mode 100644 index 0000000..f3150b5 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 014 (php/wsdl): echoComplexTypeMultiOccurs(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexType { + function SOAPComplexType($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct1 = new SOAPComplexType('arg',34,325.325); +$struct2 = new SOAPComplexType('arg',34,325.325); +$struct3 = new SOAPComplexType('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,$struct2,$struct3))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoComplexTypeMultiOccurs><ns2:inputComplexTypeMultiOccurs><ns2:SOAPComplexType><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:SOAPComplexType><ns2:SOAPComplexType><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:SOAPComplexType><ns2:SOAPComplexType><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:SOAPComplexType></ns2:inputComplexTypeMultiOccurs></ns2:echoComplexTypeMultiOccurs></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoComplexTypeMultiOccursResponse><ns2:return><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:return><ns2:return><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:return><ns2:return><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:return></ns2:echoComplexTypeMultiOccursResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt new file mode 100644 index 0000000..6f07000 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 015 (php/wsdl): echoComplexTypeMultiOccurs(nil) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexType { + function SOAPComplexType($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct1 = new SOAPComplexType('arg',34,325.325); +$struct2 = new SOAPComplexType('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,null,$struct2))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns2:echoComplexTypeMultiOccurs><ns2:inputComplexTypeMultiOccurs><ns2:SOAPComplexType><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:SOAPComplexType><ns2:SOAPComplexType xsi:nil="true"/><ns2:SOAPComplexType><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:SOAPComplexType></ns2:inputComplexTypeMultiOccurs></ns2:echoComplexTypeMultiOccurs></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoComplexTypeMultiOccursResponse><ns2:return><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:return><ns2:return/><ns2:return><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:return></ns2:echoComplexTypeMultiOccursResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt new file mode 100644 index 0000000..55366c7 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 016 (php/wsdl): echoDecimal +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoDecimal(array("inputDecimal"=>"123456789.123456789")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoDecimal><ns1:inputDecimal>123456789.123456789</ns1:inputDecimal></ns1:echoDecimal></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoDecimalResponse><ns1:return>123456789.123456789</ns1:return></ns1:echoDecimalResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt new file mode 100644 index 0000000..20e3051 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 017 (php/wsdl): echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoBoolean(array("inputBoolean"=>true)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoBoolean><ns1:inputBoolean>true</ns1:inputBoolean></ns1:echoBoolean></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoBooleanResponse><ns1:return>true</ns1:return></ns1:echoBooleanResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt new file mode 100644 index 0000000..1b60add --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 018 (php/wsdl): echoHexBinary +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoHexBinary(array("inputHexBinary"=>"\x80\xFF\x00\x01\x7F")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoHexBinary><ns1:inputHexBinary>80FF00017F</ns1:inputHexBinary></ns1:echoHexBinary></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoHexBinaryResponse><ns1:return>80FF00017F</ns1:return></ns1:echoHexBinaryResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt new file mode 100644 index 0000000..ea9bb0f --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 019 (php/wsdl): echoComplexTypeAsSimpleTypes +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexType { + function SOAPComplexType($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPComplexType('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoComplexTypeAsSimpleTypes(array("inputComplexType"=>$struct)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoComplexTypeAsSimpleTypes><ns2:inputComplexType><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:inputComplexType></ns2:echoComplexTypeAsSimpleTypes></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoComplexTypeAsSimpleTypesResponse><ns1:outputString>arg</ns1:outputString><ns1:outputInteger>34</ns1:outputInteger><ns1:outputFloat>325.325</ns1:outputFloat></ns1:echoComplexTypeAsSimpleTypesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt new file mode 100644 index 0000000..1b6382c --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 020 (php/wsdl): echoComplexTypeAsSimpleTypes(minOccurs=0) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexType { + function SOAPComplexType($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPComplexType('arg',34,325.325); +unset($struct->varString); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoComplexTypeAsSimpleTypes(array("inputComplexType"=>$struct)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoComplexTypeAsSimpleTypes><ns2:inputComplexType><ns1:varInt>34</ns1:varInt><ns1:varFloat>325.325</ns1:varFloat></ns2:inputComplexType></ns2:echoComplexTypeAsSimpleTypes></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoComplexTypeAsSimpleTypesResponse><ns1:outputInteger>34</ns1:outputInteger><ns1:outputFloat>325.325</ns1:outputFloat></ns1:echoComplexTypeAsSimpleTypesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt new file mode 100644 index 0000000..ad1e60a --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 021 (php/wsdl): echoSimpleTypesAsComplexType +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoSimpleTypesAsComplexType(array("inputInteger"=>34, + "inputFloat"=>12.345, + "inputString"=>"arg")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoSimpleTypesAsComplexType><ns1:inputString>arg</ns1:inputString><ns1:inputInteger>34</ns1:inputInteger><ns1:inputFloat>12.345</ns1:inputFloat></ns1:echoSimpleTypesAsComplexType></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoSimpleTypesAsComplexTypeResponse><ns2:return><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>12.345</ns1:varFloat></ns2:return></ns2:echoSimpleTypesAsComplexTypeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt new file mode 100644 index 0000000..e9ad5d7 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 022 (php/wsdl): echoSimpleTypesAsComplexType(minOccurs=0) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoSimpleTypesAsComplexType(array("inputInteger"=>34, + "inputFloat"=>12.345)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoSimpleTypesAsComplexType><ns1:inputInteger>34</ns1:inputInteger><ns1:inputFloat>12.345</ns1:inputFloat></ns1:echoSimpleTypesAsComplexType></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoSimpleTypesAsComplexTypeResponse><ns2:return><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns2:return></ns2:echoSimpleTypesAsComplexTypeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt new file mode 100644 index 0000000..d312dbf --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt @@ -0,0 +1,38 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 023 (php/wsdl): echoNestedComplexType +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexType { + function SOAPComplexType($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +class SOAPComplexTypeComplexType { + function SOAPComplexTypeComplexType($s, $i, $f, $c) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + $this->varComplexType = $c; + } +} +$struct = new SOAPComplexTypeComplexType("arg",34,12.345,new SOAPComplexType("arg",43,54.321)); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoNestedComplexType(array("inputComplexType"=>$struct)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoNestedComplexType><ns2:inputComplexType><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat><ns1:varComplexType><ns1:varInt>43</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>54.321</ns1:varFloat></ns1:varComplexType></ns2:inputComplexType></ns2:echoNestedComplexType></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoNestedComplexTypeResponse><ns2:return><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat><ns1:varComplexType><ns1:varInt>43</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>54.321</ns1:varFloat></ns1:varComplexType></ns2:return></ns2:echoNestedComplexTypeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt new file mode 100644 index 0000000..dc4cdce --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 024 (php/wsdl): echoNestedComplexType(minOccurs=0) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexTypeComplexType { + function SOAPComplexTypeComplexType($s, $i, $f, $c) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + $this->varComplexType = $c; + } +} +$struct = new SOAPComplexTypeComplexType("arg",34,12.345,NULL); +unset($struct->varComplexType); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoNestedComplexType(array("inputComplexType"=>$struct)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoNestedComplexType><ns2:inputComplexType><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns2:inputComplexType></ns2:echoNestedComplexType></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoNestedComplexTypeResponse><ns2:return><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns2:return></ns2:echoNestedComplexTypeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt new file mode 100644 index 0000000..9ff6831 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 025 (php/wsdl): echoNestedMultiOccurs +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPMultiOccursComplexType { + function SOAPMultiOccursComplexType($s, $i, $f, $c) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + $this->varMultiOccurs = $c; + } +} +$struct = new SOAPMultiOccursComplexType("arg",34,12.345,array("red","green","blue")); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoNestedMultiOccurs(array("inputComplexType"=>$struct)); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoNestedMultiOccurs><ns2:inputComplexType><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat><ns1:varMultiOccurs><ns1:string>red</ns1:string><ns1:string>green</ns1:string><ns1:string>blue</ns1:string></ns1:varMultiOccurs></ns2:inputComplexType></ns2:echoNestedMultiOccurs></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoNestedMultiOccursResponse><ns2:return><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat><ns1:varMultiOccurs><ns1:string>red</ns1:string><ns1:string>green</ns1:string><ns1:string>blue</ns1:string></ns1:varMultiOccurs></ns2:return></ns2:echoNestedMultiOccursResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt new file mode 100644 index 0000000..3cec539 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 026 (php/wsdl): echoChoice +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoChoice(array("inputChoice"=>(object)array("name1"=>"Hello World"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoChoice><ns2:inputChoice><ns1:name1>Hello World</ns1:name1></ns2:inputChoice></ns2:echoChoice></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoChoiceResponse><ns2:return><ns1:name1>Hello World</ns1:name1></ns2:return></ns2:echoChoiceResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt new file mode 100644 index 0000000..c53b7aa --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 027 (php/wsdl): echoEnum +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoEnum(array("inputEnum"=>"bitTwo")); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoEnum><ns1:inputEnum>bitTwo</ns1:inputEnum></ns1:echoEnum></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoEnumResponse><ns1:return>bitTwo</ns1:return></ns1:echoEnumResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt new file mode 100644 index 0000000..5751a46 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 028 (php/wsdl): echoAnyType +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class SOAPComplexType { + function SOAPComplexType($s, $i, $f) { + $this->varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$struct = new SOAPComplexType('arg',34,325.325); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoAnyType(array('inputAnyType'=>new SoapVar($struct,SOAP_ENC_OBJECT,"SOAPComplexType","http://soapinterop.org/xsd"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoAnyType><ns2:inputAnyType xsi:type="ns1:SOAPComplexType"><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:inputAnyType></ns2:echoAnyType></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Body><ns2:echoAnyTypeResponse><ns2:return xsi:type="ns1:SOAPComplexType"><ns1:varInt>34</ns1:varInt><ns1:varString>arg</ns1:varString><ns1:varFloat>325.325</ns1:varFloat></ns2:return></ns2:echoAnyTypeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt new file mode 100644 index 0000000..ddbe23a --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 029 (php/wsdl): echoAnyElement +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->echoAnyElement(array("inputAny"=>array("any"=>"<bold>Hello World</bold>"))); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org/"><SOAP-ENV:Body><ns1:echoAnyElement><ns1:inputAny><bold>Hello World</bold></ns1:inputAny></ns1:echoAnyElement></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Body><ns1:echoAnyElementResponse><ns1:return><bold>Hello World</bold></ns1:return></ns1:echoAnyElementResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt new file mode 100644 index 0000000..48c8c44 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 030 (php/wsdl): echoVoidSoapHeader(1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array("varString"=>"Hello World"), 1); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org" xmlns:ns2="http://soapinterop.org/echoheader/" xmlns:ns3="http://soapinterop.org/"><SOAP-ENV:Header><ns3:echoMeStringRequest SOAP-ENV:mustUnderstand="1"><ns2:varString>Hello World</ns2:varString></ns3:echoMeStringRequest></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoVoidSoapHeader/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/echoheader/" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Header><ns2:echoMeStringResponse><ns1:varString>Hello World</ns1:varString></ns2:echoMeStringResponse></SOAP-ENV:Header><SOAP-ENV:Body><ns2:echoVoidSoapHeaderResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt new file mode 100644 index 0000000..c108fb6 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 031 (php/wsdl): echoVoidSoapHeader(2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array(), 1); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Header><ns2:echoMeStringRequest SOAP-ENV:mustUnderstand="1"/></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoVoidSoapHeader/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/"><SOAP-ENV:Header><ns1:echoMeStringResponse/></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoVoidSoapHeaderResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt new file mode 100644 index 0000000..03b0385 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 032 (php/wsdl): echoVoidSoapHeader(3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varString"=>"arg","varFloat"=>12.345), 1); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org" xmlns:ns2="http://soapinterop.org/echoheader/" xmlns:ns3="http://soapinterop.org/"><SOAP-ENV:Header><ns3:echoMeComplexTypeRequest SOAP-ENV:mustUnderstand="1"><ns2:varString>arg</ns2:varString><ns2:varInt>34</ns2:varInt><ns2:varFloat>12.345</ns2:varFloat></ns3:echoMeComplexTypeRequest></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoVoidSoapHeader/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/echoheader/" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Header><ns2:echoMeComplexTypeResponse><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns2:echoMeComplexTypeResponse></SOAP-ENV:Header><SOAP-ENV:Body><ns2:echoVoidSoapHeaderResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt new file mode 100644 index 0000000..e28f180 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 033 (php/wsdl): echoVoidSoapHeader(4) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varFloat"=>12.345), 1); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org" xmlns:ns2="http://soapinterop.org/echoheader/" xmlns:ns3="http://soapinterop.org/"><SOAP-ENV:Header><ns3:echoMeComplexTypeRequest SOAP-ENV:mustUnderstand="1"><ns2:varInt>34</ns2:varInt><ns2:varFloat>12.345</ns2:varFloat></ns3:echoMeComplexTypeRequest></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoVoidSoapHeader/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/echoheader/" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Header><ns2:echoMeComplexTypeResponse><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns2:echoMeComplexTypeResponse></SOAP-ENV:Header><SOAP-ENV:Body><ns2:echoVoidSoapHeaderResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt new file mode 100644 index 0000000..3639400 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 034 (php/wsdl): echoVoidSoapHeader(5) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array("varString"=>"Hello World"), 1, SOAP_ACTOR_NEXT); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org" xmlns:ns2="http://soapinterop.org/echoheader/" xmlns:ns3="http://soapinterop.org/"><SOAP-ENV:Header><ns3:echoMeStringRequest SOAP-ENV:mustUnderstand="1" SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next"><ns2:varString>Hello World</ns2:varString></ns3:echoMeStringRequest></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoVoidSoapHeader/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/echoheader/" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Header><ns2:echoMeStringResponse><ns1:varString>Hello World</ns1:varString></ns2:echoMeStringResponse></SOAP-ENV:Header><SOAP-ENV:Body><ns2:echoVoidSoapHeaderResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt new file mode 100644 index 0000000..2b894a7 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP Interop Round4 GroupI XSD 035 (php/wsdl): echoVoidSoapHeader(6) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +$hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varString"=>"arg","varFloat"=>12.345), 1, SOAP_ACTOR_NEXT); +$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); +echo $client->__getlastrequest(); +$HTTP_RAW_POST_DATA = $client->__getlastrequest(); +include("round4_groupI_xsd.inc"); +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://soapinterop.org" xmlns:ns2="http://soapinterop.org/echoheader/" xmlns:ns3="http://soapinterop.org/"><SOAP-ENV:Header><ns3:echoMeComplexTypeRequest SOAP-ENV:mustUnderstand="1" SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next"><ns2:varString>arg</ns2:varString><ns2:varInt>34</ns2:varInt><ns2:varFloat>12.345</ns2:varFloat></ns3:echoMeComplexTypeRequest></SOAP-ENV:Header><SOAP-ENV:Body><ns1:echoVoidSoapHeader/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/echoheader/" xmlns:ns2="http://soapinterop.org/"><SOAP-ENV:Header><ns2:echoMeComplexTypeResponse><ns1:varString>arg</ns1:varString><ns1:varInt>34</ns1:varInt><ns1:varFloat>12.345</ns1:varFloat></ns2:echoMeComplexTypeResponse></SOAP-ENV:Header><SOAP-ENV:Body><ns2:echoVoidSoapHeaderResponse/></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/interop/Round4/GroupI/round4_groupI_xsd.inc b/ext/soap/tests/interop/Round4/GroupI/round4_groupI_xsd.inc new file mode 100644 index 0000000..74ca577 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/round4_groupI_xsd.inc @@ -0,0 +1,198 @@ +<?php +class SOAP_Interop_GroupI { + + function echoString($inputString) + { + if (isset($inputString->inputString)) { + return array("return"=>$inputString->inputString); + } else { + return $inputString; + } + } + + function echoInteger($inputInteger) + { + return array("return"=>$inputInteger->inputInteger); + } + + function echoFloat($inputFloat) + { + return array("return"=>$inputFloat->inputFloat); + } + + function echoVoid() + { + } + + function echoBase64($inputBase64) + { + if (isset($inputBase64->inputBase64)) { + return array("return"=>$inputBase64->inputBase64); + } else { + return $inputBase64; + } + } + + function echoDate($timeInstant) + { + return array("return"=>$timeInstant->inputDate); + } + + function echoComplexType($inputComplexType) + { + if (isset($inputComplexType->inputComplexType)) { + return array("return"=>$inputComplexType->inputComplexType); + } else { + return $inputComplexType; + } + } + + function echoIntegerMultiOccurs($input) + { + if (isset($input->inputIntegerMultiOccurs->int)) { + return array("return"=>$input->inputIntegerMultiOccurs->int); + } else { + return array(); + } + } + + function echoFloatMultiOccurs($input) + { + if (isset($input->inputFloatMultiOccurs->float)) { + return array("return"=>$input->inputFloatMultiOccurs->float); + } else { + return array(); + } + } + + function echoStringMultiOccurs($input) + { + if (isset($input->inputStringMultiOccurs->string)) { + return array("return"=>$input->inputStringMultiOccurs->string); + } else { + return array(); + } + } + + function echoComplexTypeMultiOccurs($input) + { + if (isset($input->inputComplexTypeMultiOccurs->SOAPComplexType)) { + return array("return"=>$input->inputComplexTypeMultiOccurs->SOAPComplexType); + } else { + return array(); + } + } + + function echoHexBinary($hb) + { + if (isset($hb->inputHexBinary)) { + return array("return"=>$hb->inputHexBinary); + } else { + return $hb; + } + } + + function echoDecimal($dec) + { + return array("return"=>$dec->inputDecimal); + } + + function echoBoolean($boolean) + { + return array("return"=>$boolean->inputBoolean); + } + + function echoComplexTypeAsSimpleTypes($input) + { + if (isset($input->inputComplexType)) { + $ret = array("outputInteger" => $input->inputComplexType->varInt, + "outputFloat" => $input->inputComplexType->varFloat); + if (isset($input->inputComplexType->varString)) { + $ret["outputString"] = $input->inputComplexType->varString; + } + return $ret; + } else { + return array(); + } + } + + function echoSimpleTypesAsComplexType($input) + { + $ret = array("varInt" => $input->inputInteger, + "varFloat" => $input->inputFloat); + if (isset($input->inputString)) { + $ret["varString"] = $input->inputString; + } + return array("return"=>$ret); + } + + function echoNestedComplexType($inputComplexType) + { + if (isset($inputComplexType->inputComplexType)) { + return array("return"=>$inputComplexType->inputComplexType); + } else { + return $inputComplexType; + } + } + + function echoNestedMultiOccurs($inputComplexType) + { + if (isset($inputComplexType->inputComplexType)) { + return array("return"=>$inputComplexType->inputComplexType); + } else { + return $inputComplexType; + } + } + + function echoChoice($input) + { + if (isset($input->inputChoice)) { + return array("return"=>$input->inputChoice); + } else { + return $input; + } + } + + function echoEnum($input) + { + return array("return"=>$input->inputEnum); + } + + function echoAnyType($input) + { + if (isset($input->inputAnyType)) { + return array("return"=>$input->inputAnyType); + } else { + return $input; + } + } + + function echoAnyElement($input) + { + if (isset($input->inputAny)) { + return array("return"=>$input->inputAny); + } else { + return $input; + } + } + + function echoVoidSoapHeader() + { + } + + function echoMeStringRequest($input) + { + return new SoapHeader("http://soapinterop.org/","echoMeStringResponse",$input); + } + + function echoMeComplexTypeRequest($input) + { + return new SoapHeader("http://soapinterop.org/","echoMeComplexTypeResponse",$input); + } + +} + +$server = new SoapServer(dirname(__FILE__)."/round4_groupI_xsd.wsdl"); +$server->setClass("SOAP_Interop_GroupI"); +$server->handle($HTTP_RAW_POST_DATA); +?> diff --git a/ext/soap/tests/interop/Round4/GroupI/round4_groupI_xsd.wsdl b/ext/soap/tests/interop/Round4/GroupI/round4_groupI_xsd.wsdl new file mode 100644 index 0000000..b620846 --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/round4_groupI_xsd.wsdl @@ -0,0 +1,1113 @@ +<?xml version="1.0" encoding="utf-8"?>
+<definitions xmlns:s1="http://soapinterop.org/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://soapinterop.org/" xmlns:s3="http://soapinterop.org/echoheader/" xmlns:soap12enc="http://www.w3.org/2002/06/soap-envelope" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s2="http://soapinterop.org" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://soapinterop.org/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/">
+ <s:import namespace="http://soapinterop.org/xsd" />
+ <s:import namespace="http://soapinterop.org/echoheader/" />
+ <s:element name="echoVoid">
+ <s:complexType />
+ </s:element>
+ <s:element name="echoVoidResponse">
+ <s:complexType />
+ </s:element>
+ <s:element name="echoInteger">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="inputInteger" type="s:int" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoIntegerResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="return" type="s:int" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoFloat">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="inputFloat" type="s:float" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoFloatResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="return" type="s:float" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoString">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputString" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoStringResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoBase64">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputBase64" type="s:base64Binary" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoBase64Response">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return" type="s:base64Binary" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoDate">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="inputDate" type="s:dateTime" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoDateResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="return" type="s:dateTime" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoComplexType">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputComplexType" type="s1:SOAPComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoComplexTypeResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return" type="s1:SOAPComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoIntegerMultiOccurs">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputIntegerMultiOccurs" type="s0:ArrayOfInt" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfInt">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="int" type="s:int" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="echoIntegerMultiOccursResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="return" type="s:int" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoFloatMultiOccurs">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputFloatMultiOccurs" type="s0:ArrayOfFloat" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfFloat">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="float" type="s:float" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="echoFloatMultiOccursResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="return" type="s:float" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoStringMultiOccurs">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputStringMultiOccurs" type="s0:ArrayOfString" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfString">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="echoStringMultiOccursResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="return" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoComplexTypeMultiOccurs">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputComplexTypeMultiOccurs" type="s1:ArrayOfSOAPComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="SOAPComplexType" nillable="true" type="s1:SOAPComplexType" />
+ <s:element name="echoComplexTypeMultiOccursResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="return" type="s1:SOAPComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoDecimal">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="inputDecimal" type="s:decimal" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoDecimalResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="return" type="s:decimal" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoBoolean">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="inputBoolean" type="s:boolean" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoBooleanResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="return" type="s:boolean" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoHexBinary">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputHexBinary" type="s:hexBinary" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoHexBinaryResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return" type="s:hexBinary" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoComplexTypeAsSimpleTypes">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputComplexType" type="s1:SOAPComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoComplexTypeAsSimpleTypesResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="outputString" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="outputInteger" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="outputFloat" type="s:float" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoSimpleTypesAsComplexType">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputString" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="inputInteger" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="inputFloat" type="s:float" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoSimpleTypesAsComplexTypeResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return" type="s1:SOAPComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoNestedComplexType">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputComplexType" type="s1:SOAPComplexTypeComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoNestedComplexTypeResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return" type="s1:SOAPComplexTypeComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoNestedMultiOccurs">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputComplexType" type="s1:SOAPMultiOccursComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoNestedMultiOccursResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return" type="s1:SOAPMultiOccursComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoChoice">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputChoice" type="s1:ChoiceComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoChoiceResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return" type="s1:ChoiceComplexType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoEnum">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="inputEnum" type="s1:Enum" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoEnumResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="return" type="s1:Enum" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoAnyType">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputAnyType" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoAnyTypeResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoAnyElement">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="inputAny">
+ <s:complexType>
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoAnyElementResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="return">
+ <s:complexType>
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="echoVoidSoapHeaderResponse">
+ <s:complexType />
+ </s:element>
+ <s:element name="echoMeComplexTypeRequest" type="s3:echoMeComplexTypeRequest" />
+ <s:element name="echoMeStringRequest" type="s3:echoMeStringRequest" />
+ <s:element name="echoMeComplexTypeResponse" type="s3:echoMeComplexTypeResponse" />
+ <s:element name="echoMeStringResponse" type="s3:echoMeStringResponse" />
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/xsd">
+ <s:import namespace="http://soapinterop.org/" />
+ <s:complexType name="SOAPComplexType">
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="varInt" type="s:int" />
+ <s:element minOccurs="0" maxOccurs="1" name="varString" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="varFloat" type="s:float" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="ArrayOfSOAPComplexType">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" ref="s0:SOAPComplexType" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="SOAPComplexTypeComplexType">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="varString" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="varInt" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="varFloat" type="s:float" />
+ <s:element minOccurs="0" maxOccurs="1" name="varComplexType" type="s1:SOAPComplexType" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="SOAPMultiOccursComplexType">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="varString" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="varInt" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="varFloat" type="s:float" />
+ <s:element minOccurs="0" maxOccurs="1" name="varMultiOccurs" type="s1:ArrayOfString" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="ArrayOfString">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="ChoiceComplexType">
+ <s:sequence>
+ <s:choice minOccurs="1" maxOccurs="1">
+ <s:element minOccurs="0" maxOccurs="1" name="name0" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="name1" type="s:string" />
+ </s:choice>
+ </s:sequence>
+ </s:complexType>
+ <s:simpleType name="Enum">
+ <s:restriction base="s:string">
+ <s:enumeration value="BitOne" />
+ <s:enumeration value="BitTwo" />
+ <s:enumeration value="BitThree" />
+ <s:enumeration value="BitFour" />
+ <s:enumeration value="BitFive" />
+ </s:restriction>
+ </s:simpleType>
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org">
+ <s:element name="echoVoidSoapHeader">
+ <s:complexType />
+ </s:element>
+ </s:schema>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/echoheader/">
+ <s:complexType name="echoMeComplexTypeRequest">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="varString" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="varInt" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="varFloat" type="s:float" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="echoMeStringRequest">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="varString" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="echoMeComplexTypeResponse">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="varString" type="s:string" />
+ <s:element minOccurs="1" maxOccurs="1" name="varInt" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="varFloat" type="s:float" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="echoMeStringResponse">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="varString" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:schema>
+ </types>
+ <message name="echoVoidSoapIn">
+ <part name="parameters" element="s0:echoVoid" />
+ </message>
+ <message name="echoVoidSoapOut">
+ <part name="parameters" element="s0:echoVoidResponse" />
+ </message>
+ <message name="echoIntegerSoapIn">
+ <part name="parameters" element="s0:echoInteger" />
+ </message>
+ <message name="echoIntegerSoapOut">
+ <part name="parameters" element="s0:echoIntegerResponse" />
+ </message>
+ <message name="echoFloatSoapIn">
+ <part name="parameters" element="s0:echoFloat" />
+ </message>
+ <message name="echoFloatSoapOut">
+ <part name="parameters" element="s0:echoFloatResponse" />
+ </message>
+ <message name="echoStringSoapIn">
+ <part name="parameters" element="s0:echoString" />
+ </message>
+ <message name="echoStringSoapOut">
+ <part name="parameters" element="s0:echoStringResponse" />
+ </message>
+ <message name="echoBase64SoapIn">
+ <part name="parameters" element="s0:echoBase64" />
+ </message>
+ <message name="echoBase64SoapOut">
+ <part name="parameters" element="s0:echoBase64Response" />
+ </message>
+ <message name="echoDateSoapIn">
+ <part name="parameters" element="s0:echoDate" />
+ </message>
+ <message name="echoDateSoapOut">
+ <part name="parameters" element="s0:echoDateResponse" />
+ </message>
+ <message name="echoComplexTypeSoapIn">
+ <part name="parameters" element="s0:echoComplexType" />
+ </message>
+ <message name="echoComplexTypeSoapOut">
+ <part name="parameters" element="s0:echoComplexTypeResponse" />
+ </message>
+ <message name="echoIntegerMultiOccursSoapIn">
+ <part name="parameters" element="s0:echoIntegerMultiOccurs" />
+ </message>
+ <message name="echoIntegerMultiOccursSoapOut">
+ <part name="parameters" element="s0:echoIntegerMultiOccursResponse" />
+ </message>
+ <message name="echoFloatMultiOccursSoapIn">
+ <part name="parameters" element="s0:echoFloatMultiOccurs" />
+ </message>
+ <message name="echoFloatMultiOccursSoapOut">
+ <part name="parameters" element="s0:echoFloatMultiOccursResponse" />
+ </message>
+ <message name="echoStringMultiOccursSoapIn">
+ <part name="parameters" element="s0:echoStringMultiOccurs" />
+ </message>
+ <message name="echoStringMultiOccursSoapOut">
+ <part name="parameters" element="s0:echoStringMultiOccursResponse" />
+ </message>
+ <message name="echoComplexTypeMultiOccursSoapIn">
+ <part name="parameters" element="s0:echoComplexTypeMultiOccurs" />
+ </message>
+ <message name="echoComplexTypeMultiOccursSoapOut">
+ <part name="parameters" element="s0:echoComplexTypeMultiOccursResponse" />
+ </message>
+ <message name="echoDecimalSoapIn">
+ <part name="parameters" element="s0:echoDecimal" />
+ </message>
+ <message name="echoDecimalSoapOut">
+ <part name="parameters" element="s0:echoDecimalResponse" />
+ </message>
+ <message name="echoBooleanSoapIn">
+ <part name="parameters" element="s0:echoBoolean" />
+ </message>
+ <message name="echoBooleanSoapOut">
+ <part name="parameters" element="s0:echoBooleanResponse" />
+ </message>
+ <message name="echoHexBinarySoapIn">
+ <part name="parameters" element="s0:echoHexBinary" />
+ </message>
+ <message name="echoHexBinarySoapOut">
+ <part name="parameters" element="s0:echoHexBinaryResponse" />
+ </message>
+ <message name="echoComplexTypeAsSimpleTypesSoapIn">
+ <part name="parameters" element="s0:echoComplexTypeAsSimpleTypes" />
+ </message>
+ <message name="echoComplexTypeAsSimpleTypesSoapOut">
+ <part name="parameters" element="s0:echoComplexTypeAsSimpleTypesResponse" />
+ </message>
+ <message name="echoSimpleTypesAsComplexTypeSoapIn">
+ <part name="parameters" element="s0:echoSimpleTypesAsComplexType" />
+ </message>
+ <message name="echoSimpleTypesAsComplexTypeSoapOut">
+ <part name="parameters" element="s0:echoSimpleTypesAsComplexTypeResponse" />
+ </message>
+ <message name="echoNestedComplexTypeSoapIn">
+ <part name="parameters" element="s0:echoNestedComplexType" />
+ </message>
+ <message name="echoNestedComplexTypeSoapOut">
+ <part name="parameters" element="s0:echoNestedComplexTypeResponse" />
+ </message>
+ <message name="echoNestedMultiOccursSoapIn">
+ <part name="parameters" element="s0:echoNestedMultiOccurs" />
+ </message>
+ <message name="echoNestedMultiOccursSoapOut">
+ <part name="parameters" element="s0:echoNestedMultiOccursResponse" />
+ </message>
+ <message name="echoChoiceSoapIn">
+ <part name="parameters" element="s0:echoChoice" />
+ </message>
+ <message name="echoChoiceSoapOut">
+ <part name="parameters" element="s0:echoChoiceResponse" />
+ </message>
+ <message name="echoEnumSoapIn">
+ <part name="parameters" element="s0:echoEnum" />
+ </message>
+ <message name="echoEnumSoapOut">
+ <part name="parameters" element="s0:echoEnumResponse" />
+ </message>
+ <message name="echoAnyTypeSoapIn">
+ <part name="parameters" element="s0:echoAnyType" />
+ </message>
+ <message name="echoAnyTypeSoapOut">
+ <part name="parameters" element="s0:echoAnyTypeResponse" />
+ </message>
+ <message name="echoAnyElementSoapIn">
+ <part name="parameters" element="s0:echoAnyElement" />
+ </message>
+ <message name="echoAnyElementSoapOut">
+ <part name="parameters" element="s0:echoAnyElementResponse" />
+ </message>
+ <message name="echoVoidSoapHeaderSoapIn">
+ <part name="parameters" element="s2:echoVoidSoapHeader" />
+ </message>
+ <message name="echoVoidSoapHeaderSoapOut">
+ <part name="parameters" element="s0:echoVoidSoapHeaderResponse" />
+ </message>
+ <message name="echoVoidSoapHeaderechoMeComplexTypeRequest">
+ <part name="echoMeComplexTypeRequest" element="s0:echoMeComplexTypeRequest" />
+ </message>
+ <message name="echoVoidSoapHeaderechoMeComplexTypeResponse">
+ <part name="echoMeComplexTypeResponse" element="s0:echoMeComplexTypeResponse" />
+ </message>
+ <message name="echoVoidSoapHeaderechoMeStringRequest">
+ <part name="echoMeStringRequest" element="s0:echoMeStringRequest" />
+ </message>
+ <message name="echoVoidSoapHeaderechoMeStringResponse">
+ <part name="echoMeStringResponse" element="s0:echoMeStringResponse" />
+ </message>
+ <portType name="Round4XSDTestSoap">
+ <operation name="echoVoid">
+ <input message="s0:echoVoidSoapIn" />
+ <output message="s0:echoVoidSoapOut" />
+ </operation>
+ <operation name="echoInteger">
+ <input message="s0:echoIntegerSoapIn" />
+ <output message="s0:echoIntegerSoapOut" />
+ </operation>
+ <operation name="echoFloat">
+ <input message="s0:echoFloatSoapIn" />
+ <output message="s0:echoFloatSoapOut" />
+ </operation>
+ <operation name="echoString">
+ <input message="s0:echoStringSoapIn" />
+ <output message="s0:echoStringSoapOut" />
+ </operation>
+ <operation name="echoBase64">
+ <input message="s0:echoBase64SoapIn" />
+ <output message="s0:echoBase64SoapOut" />
+ </operation>
+ <operation name="echoDate">
+ <input message="s0:echoDateSoapIn" />
+ <output message="s0:echoDateSoapOut" />
+ </operation>
+ <operation name="echoComplexType">
+ <input message="s0:echoComplexTypeSoapIn" />
+ <output message="s0:echoComplexTypeSoapOut" />
+ </operation>
+ <operation name="echoIntegerMultiOccurs">
+ <input message="s0:echoIntegerMultiOccursSoapIn" />
+ <output message="s0:echoIntegerMultiOccursSoapOut" />
+ </operation>
+ <operation name="echoFloatMultiOccurs">
+ <input message="s0:echoFloatMultiOccursSoapIn" />
+ <output message="s0:echoFloatMultiOccursSoapOut" />
+ </operation>
+ <operation name="echoStringMultiOccurs">
+ <input message="s0:echoStringMultiOccursSoapIn" />
+ <output message="s0:echoStringMultiOccursSoapOut" />
+ </operation>
+ <operation name="echoComplexTypeMultiOccurs">
+ <input message="s0:echoComplexTypeMultiOccursSoapIn" />
+ <output message="s0:echoComplexTypeMultiOccursSoapOut" />
+ </operation>
+ <operation name="echoDecimal">
+ <input message="s0:echoDecimalSoapIn" />
+ <output message="s0:echoDecimalSoapOut" />
+ </operation>
+ <operation name="echoBoolean">
+ <input message="s0:echoBooleanSoapIn" />
+ <output message="s0:echoBooleanSoapOut" />
+ </operation>
+ <operation name="echoHexBinary">
+ <input message="s0:echoHexBinarySoapIn" />
+ <output message="s0:echoHexBinarySoapOut" />
+ </operation>
+ <operation name="echoComplexTypeAsSimpleTypes">
+ <input message="s0:echoComplexTypeAsSimpleTypesSoapIn" />
+ <output message="s0:echoComplexTypeAsSimpleTypesSoapOut" />
+ </operation>
+ <operation name="echoSimpleTypesAsComplexType">
+ <input message="s0:echoSimpleTypesAsComplexTypeSoapIn" />
+ <output message="s0:echoSimpleTypesAsComplexTypeSoapOut" />
+ </operation>
+ <operation name="echoNestedComplexType">
+ <input message="s0:echoNestedComplexTypeSoapIn" />
+ <output message="s0:echoNestedComplexTypeSoapOut" />
+ </operation>
+ <operation name="echoNestedMultiOccurs">
+ <input message="s0:echoNestedMultiOccursSoapIn" />
+ <output message="s0:echoNestedMultiOccursSoapOut" />
+ </operation>
+ <operation name="echoChoice">
+ <input message="s0:echoChoiceSoapIn" />
+ <output message="s0:echoChoiceSoapOut" />
+ </operation>
+ <operation name="echoEnum">
+ <input message="s0:echoEnumSoapIn" />
+ <output message="s0:echoEnumSoapOut" />
+ </operation>
+ <operation name="echoAnyType">
+ <input message="s0:echoAnyTypeSoapIn" />
+ <output message="s0:echoAnyTypeSoapOut" />
+ </operation>
+ <operation name="echoAnyElement">
+ <input message="s0:echoAnyElementSoapIn" />
+ <output message="s0:echoAnyElementSoapOut" />
+ </operation>
+ <operation name="echoVoidSoapHeader">
+ <input message="s0:echoVoidSoapHeaderSoapIn" />
+ <output message="s0:echoVoidSoapHeaderSoapOut" />
+ </operation>
+ </portType>
+ <binding name="Round4XSDTestSoap" type="s0:Round4XSDTestSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="echoVoid">
+ <soap:operation soapAction="http://soapinterop.org/echoVoid" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoInteger">
+ <soap:operation soapAction="http://soapinterop.org/echoInteger" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoFloat">
+ <soap:operation soapAction="http://soapinterop.org/echoFloat" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoString">
+ <soap:operation soapAction="http://soapinterop.org/echoString" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoBase64">
+ <soap:operation soapAction="http://soapinterop.org/echoBase64" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoDate">
+ <soap:operation soapAction="http://soapinterop.org/echoDate" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoComplexType">
+ <soap:operation soapAction="http://soapinterop.org/echoComplexType" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoIntegerMultiOccurs">
+ <soap:operation soapAction="http://soapinterop.org/echoIntegerMultiOccurs" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoFloatMultiOccurs">
+ <soap:operation soapAction="http://soapinterop.org/echoFloatMultiOccurs" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoStringMultiOccurs">
+ <soap:operation soapAction="http://soapinterop.org/echoStringMultiOccurs" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoComplexTypeMultiOccurs">
+ <soap:operation soapAction="http://soapinterop.org/echoComplexTypeMultiOccurs" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoDecimal">
+ <soap:operation soapAction="http://soapinterop.org/echoDecimal" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoBoolean">
+ <soap:operation soapAction="http://soapinterop.org/echoBoolean" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoHexBinary">
+ <soap:operation soapAction="http://soapinterop.org/echoHexBinary" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoComplexTypeAsSimpleTypes">
+ <soap:operation soapAction="http://soapinterop.org/echoComplexTypeAsSimpleTypes" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoSimpleTypesAsComplexType">
+ <soap:operation soapAction="http://soapinterop.org/echoSimpleTypesAsComplexType" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoNestedComplexType">
+ <soap:operation soapAction="http://soapinterop.org/echoNestedComplexType" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoNestedMultiOccurs">
+ <soap:operation soapAction="http://soapinterop.org/echoNestedMultiOccurs" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoChoice">
+ <soap:operation soapAction="http://soapinterop.org/echoChoice" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoEnum">
+ <soap:operation soapAction="http://soapinterop.org/echoEnum" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoAnyType">
+ <soap:operation soapAction="http://soapinterop.org/echoAnyType" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoAnyElement">
+ <soap:operation soapAction="http://soapinterop.org/echoAnyElement" style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoVoidSoapHeader">
+ <soap:operation soapAction="http://soapinterop.org" style="document" />
+ <input>
+ <soap:body use="literal" />
+ <soap:header message="s0:echoVoidSoapHeaderechoMeComplexTypeRequest" part="echoMeComplexTypeRequest" use="literal" />
+ <soap:header message="s0:echoVoidSoapHeaderechoMeStringRequest" part="echoMeStringRequest" use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ <soap:header message="s0:echoVoidSoapHeaderechoMeComplexTypeResponse" part="echoMeComplexTypeResponse" use="literal" />
+ <soap:header message="s0:echoVoidSoapHeaderechoMeStringResponse" part="echoMeStringResponse" use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="Round4XSDTestSoap12" type="s0:Round4XSDTestSoap">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="echoVoid">
+ <soap12:operation soapAction="http://soapinterop.org/echoVoid" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoInteger">
+ <soap12:operation soapAction="http://soapinterop.org/echoInteger" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoFloat">
+ <soap12:operation soapAction="http://soapinterop.org/echoFloat" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoString">
+ <soap12:operation soapAction="http://soapinterop.org/echoString" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoBase64">
+ <soap12:operation soapAction="http://soapinterop.org/echoBase64" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoDate">
+ <soap12:operation soapAction="http://soapinterop.org/echoDate" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoComplexType">
+ <soap12:operation soapAction="http://soapinterop.org/echoComplexType" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoIntegerMultiOccurs">
+ <soap12:operation soapAction="http://soapinterop.org/echoIntegerMultiOccurs" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoFloatMultiOccurs">
+ <soap12:operation soapAction="http://soapinterop.org/echoFloatMultiOccurs" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoStringMultiOccurs">
+ <soap12:operation soapAction="http://soapinterop.org/echoStringMultiOccurs" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoComplexTypeMultiOccurs">
+ <soap12:operation soapAction="http://soapinterop.org/echoComplexTypeMultiOccurs" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoDecimal">
+ <soap12:operation soapAction="http://soapinterop.org/echoDecimal" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoBoolean">
+ <soap12:operation soapAction="http://soapinterop.org/echoBoolean" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoHexBinary">
+ <soap12:operation soapAction="http://soapinterop.org/echoHexBinary" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoComplexTypeAsSimpleTypes">
+ <soap12:operation soapAction="http://soapinterop.org/echoComplexTypeAsSimpleTypes" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoSimpleTypesAsComplexType">
+ <soap12:operation soapAction="http://soapinterop.org/echoSimpleTypesAsComplexType" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoNestedComplexType">
+ <soap12:operation soapAction="http://soapinterop.org/echoNestedComplexType" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoNestedMultiOccurs">
+ <soap12:operation soapAction="http://soapinterop.org/echoNestedMultiOccurs" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoChoice">
+ <soap12:operation soapAction="http://soapinterop.org/echoChoice" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoEnum">
+ <soap12:operation soapAction="http://soapinterop.org/echoEnum" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoAnyType">
+ <soap12:operation soapAction="http://soapinterop.org/echoAnyType" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoAnyElement">
+ <soap12:operation soapAction="http://soapinterop.org/echoAnyElement" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ <operation name="echoVoidSoapHeader">
+ <soap12:operation soapAction="http://soapinterop.org" style="document" />
+ <input>
+ <soap12:body use="literal" />
+ <soap12:header message="s0:echoVoidSoapHeaderechoMeComplexTypeRequest" part="echoMeComplexTypeRequest" use="literal" />
+ <soap12:header message="s0:echoVoidSoapHeaderechoMeStringRequest" part="echoMeStringRequest" use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ <soap12:header message="s0:echoVoidSoapHeaderechoMeComplexTypeResponse" part="echoMeComplexTypeResponse" use="literal" />
+ <soap12:header message="s0:echoVoidSoapHeaderechoMeStringResponse" part="echoMeStringResponse" use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="Round4XSDTest">
+ <documentation>These operations implement DOC/LIT SOAP operations, for interop testing. Please email johnko@microsoft.com with any questions/coments.</documentation>
+ <port name="Round4XSDTestSoap" binding="s0:Round4XSDTestSoap">
+ <soap:address location="test://" />
+ </port>
+ <port name="Round4XSDTestSoap12" binding="s0:Round4XSDTestSoap12">
+ <soap12:address location="http://mssoapinterop.org/asmx/xsd/round4xsd.asmx" />
+ </port>
+ </service>
+</definitions>
\ No newline at end of file diff --git a/ext/soap/tests/interop/Round4/GroupI/skipif.inc b/ext/soap/tests/interop/Round4/GroupI/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/interop/Round4/GroupI/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/schema/schema001.phpt b/ext/soap/tests/schema/schema001.phpt new file mode 100644 index 0000000..9f2b7e5 --- /dev/null +++ b/ext/soap/tests/schema/schema001.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP XML Schema 1: simpleType/restriction +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <restriction base="xsd:int"/> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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 xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +int(123) +ok diff --git a/ext/soap/tests/schema/schema002.phpt b/ext/soap/tests/schema/schema002.phpt new file mode 100644 index 0000000..41f3bbe --- /dev/null +++ b/ext/soap/tests/schema/schema002.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP XML Schema 2: simpleType/restriction (reference to type) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType2"> + <restriction base="xsd:int"/> + </simpleType> + <simpleType name="testType"> + <restriction base="tns:testType2"/> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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 xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +int(123) +ok diff --git a/ext/soap/tests/schema/schema003.phpt b/ext/soap/tests/schema/schema003.phpt new file mode 100644 index 0000000..7599100 --- /dev/null +++ b/ext/soap/tests/schema/schema003.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP XML Schema 3: simpleType/restriction (reference to type, that is not defined yet) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <restriction base="tns:testType2"/> + </simpleType> + <simpleType name="testType2"> + <restriction base="xsd:int"/> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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 xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +int(123) +ok diff --git a/ext/soap/tests/schema/schema004.phpt b/ext/soap/tests/schema/schema004.phpt new file mode 100644 index 0000000..93ed1d1 --- /dev/null +++ b/ext/soap/tests/schema/schema004.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP XML Schema 4: simpleType/restriction (reference to undefined type) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <restriction base="tns:testType2"/> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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 xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(5) "123.5" +ok diff --git a/ext/soap/tests/schema/schema005.phpt b/ext/soap/tests/schema/schema005.phpt new file mode 100644 index 0000000..1db0c62 --- /dev/null +++ b/ext/soap/tests/schema/schema005.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP XML Schema 5: simpleType/restriction (inline type) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <restriction> + <simpleType name="testType2"> + <restriction base="xsd:int"/> + </simpleType> + </restriction> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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 xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +int(123) +ok diff --git a/ext/soap/tests/schema/schema006.phpt b/ext/soap/tests/schema/schema006.phpt new file mode 100644 index 0000000..e41f275 --- /dev/null +++ b/ext/soap/tests/schema/schema006.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP XML Schema 6: simpleType/restriction (referenced by ellement) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <restriction> + <simpleType name="testType2"> + <restriction base="xsd:int"/> + </simpleType> + </restriction> + </simpleType> + <element name="testElement" type="tns:testType"/> +EOF; +test_schema($schema,'element="tns:testElement"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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 xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +int(123) +ok diff --git a/ext/soap/tests/schema/schema007.phpt b/ext/soap/tests/schema/schema007.phpt new file mode 100644 index 0000000..fd93c7a --- /dev/null +++ b/ext/soap/tests/schema/schema007.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP XML Schema 7: simpleType/restriction (referenced by ellement) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <element name="testElement" type="tns:testType"/> + <simpleType name="testType"> + <restriction> + <simpleType name="testType2"> + <restriction base="xsd:int"/> + </simpleType> + </restriction> + </simpleType> +EOF; +test_schema($schema,'element="tns:testElement"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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 xsi:type="ns1:testType">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +int(123) +ok diff --git a/ext/soap/tests/schema/schema008.phpt b/ext/soap/tests/schema/schema008.phpt new file mode 100644 index 0000000..1c4005f --- /dev/null +++ b/ext/soap/tests/schema/schema008.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP XML Schema 8: simpleType/restriction (anonymous, inside an ellement) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF +<element name="testElement"> + <simpleType> + <restriction> + <simpleType name="testType2"> + <restriction base="xsd:int"/> + </simpleType> + </restriction> + </simpleType> +</element> +EOF; +test_schema($schema,'element="tns:testElement"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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 xsi:type="ns1:testElement">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +int(123) +ok + diff --git a/ext/soap/tests/schema/schema009.phpt b/ext/soap/tests/schema/schema009.phpt new file mode 100644 index 0000000..f7d1024 --- /dev/null +++ b/ext/soap/tests/schema/schema009.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP XML Schema 9: simpleType/list (as string) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <list itemType="token"/> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',"one two"); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">one two</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(7) "one two" +ok diff --git a/ext/soap/tests/schema/schema010.phpt b/ext/soap/tests/schema/schema010.phpt new file mode 100644 index 0000000..49136b9 --- /dev/null +++ b/ext/soap/tests/schema/schema010.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP XML Schema 10: simpleType/list (as array) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <list itemType="token"/> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',array("one","two")); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">one two</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(7) "one two" +ok diff --git a/ext/soap/tests/schema/schema011.phpt b/ext/soap/tests/schema/schema011.phpt new file mode 100644 index 0000000..8296311 --- /dev/null +++ b/ext/soap/tests/schema/schema011.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP XML Schema 11: simpleType/list (inline type) (as string) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <list> + <simpleType> + <restriction base="int"/> + </simpleType> + </list> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',"123 456.7"); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 456</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(7) "123 456" +ok diff --git a/ext/soap/tests/schema/schema012.phpt b/ext/soap/tests/schema/schema012.phpt new file mode 100644 index 0000000..1d542d8 --- /dev/null +++ b/ext/soap/tests/schema/schema012.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP XML Schema 12: simpleType/list (inline type) (as array) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <list> + <simpleType> + <restriction base="int"/> + </simpleType> + </list> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,456.7)); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 456</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(7) "123 456" +ok diff --git a/ext/soap/tests/schema/schema013.phpt b/ext/soap/tests/schema/schema013.phpt new file mode 100644 index 0000000..4794d2d --- /dev/null +++ b/ext/soap/tests/schema/schema013.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP XML Schema 13: simpleType/union +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <union memberTypes="string int float"/> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',"str"); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(3) "str" +ok diff --git a/ext/soap/tests/schema/schema014.phpt b/ext/soap/tests/schema/schema014.phpt new file mode 100644 index 0000000..3dab5f3 --- /dev/null +++ b/ext/soap/tests/schema/schema014.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP XML Schema 14: simpleType/union +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <union memberTypes="string int float"/> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(5) "123.5" +ok diff --git a/ext/soap/tests/schema/schema015.phpt b/ext/soap/tests/schema/schema015.phpt new file mode 100644 index 0000000..fe9b96b --- /dev/null +++ b/ext/soap/tests/schema/schema015.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP XML Schema 15: simpleType/union (inline type) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <union> + <simpleType> + <restriction base="string"/> + </simpleType> + <simpleType> + <restriction base="int"/> + </simpleType> + <simpleType> + <restriction base="float"/> + </simpleType> + </union> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',"str"); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(3) "str" +ok diff --git a/ext/soap/tests/schema/schema016.phpt b/ext/soap/tests/schema/schema016.phpt new file mode 100644 index 0000000..11e9436 --- /dev/null +++ b/ext/soap/tests/schema/schema016.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP XML Schema 16: simpleType/union (inline type) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <union> + <simpleType> + <restriction base="string"/> + </simpleType> + <simpleType> + <restriction base="int"/> + </simpleType> + <simpleType> + <restriction base="float"/> + </simpleType> + </union> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(5) "123.5" +ok diff --git a/ext/soap/tests/schema/schema017.phpt b/ext/soap/tests/schema/schema017.phpt new file mode 100644 index 0000000..6689c36 --- /dev/null +++ b/ext/soap/tests/schema/schema017.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 17: union with list +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <union> + <simpleType> + <restriction base="float"/> + </simpleType> + <simpleType> + <list itemType="int"/> + </simpleType> + </union> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',123.5); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(5) "123.5" +ok diff --git a/ext/soap/tests/schema/schema018.phpt b/ext/soap/tests/schema/schema018.phpt new file mode 100644 index 0000000..0f3e8b8 --- /dev/null +++ b/ext/soap/tests/schema/schema018.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP XML Schema 18: union with list +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <union> + <simpleType> + <restriction base="float"/> + </simpleType> + <simpleType> + <list itemType="int"/> + </simpleType> + </union> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',"123.5"); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(5) "123.5" +ok diff --git a/ext/soap/tests/schema/schema019.phpt b/ext/soap/tests/schema/schema019.phpt new file mode 100644 index 0000000..0d2d753 --- /dev/null +++ b/ext/soap/tests/schema/schema019.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP XML Schema 19: union with list +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <union> + <simpleType> + <restriction base="float"/> + </simpleType> + <simpleType> + <list itemType="int"/> + </simpleType> + </union> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',"123.5 456.7"); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5 456.7</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(11) "123.5 456.7" +ok diff --git a/ext/soap/tests/schema/schema020.phpt b/ext/soap/tests/schema/schema020.phpt new file mode 100644 index 0000000..344757a --- /dev/null +++ b/ext/soap/tests/schema/schema020.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 20: union with list +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <union> + <simpleType> + <restriction base="float"/> + </simpleType> + <simpleType> + <list itemType="int"/> + </simpleType> + </union> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',array(123.5,456.7)); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5 456.7</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(11) "123.5 456.7" +ok diff --git a/ext/soap/tests/schema/schema021.phpt b/ext/soap/tests/schema/schema021.phpt new file mode 100644 index 0000000..0628c6b --- /dev/null +++ b/ext/soap/tests/schema/schema021.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP XML Schema 21: list of unions +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <list> + <simpleType> + <union memberTypes="int float str"/> + </simpleType> + </list> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',"123 123.5 456.7 str"); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 123.5 456.7 str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(19) "123 123.5 456.7 str" +ok diff --git a/ext/soap/tests/schema/schema022.phpt b/ext/soap/tests/schema/schema022.phpt new file mode 100644 index 0000000..a8f5bb9 --- /dev/null +++ b/ext/soap/tests/schema/schema022.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP XML Schema 22: list of unions +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <simpleType name="testType"> + <list> + <simpleType> + <union memberTypes="int float str"/> + </simpleType> + </list> + </simpleType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5,'str')); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 123.5 str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +string(13) "123 123.5 str" +ok diff --git a/ext/soap/tests/schema/schema023.phpt b/ext/soap/tests/schema/schema023.phpt new file mode 100644 index 0000000..550bacf --- /dev/null +++ b/ext/soap/tests/schema/schema023.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 23: SOAP 1.1 Array +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5)); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns1:testType"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema024.phpt b/ext/soap/tests/schema/schema024.phpt new file mode 100644 index 0000000..af836d1 --- /dev/null +++ b/ext/soap/tests/schema/schema024.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP XML Schema 24: SOAP 1.1 Array (second way) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <all> + <element name="x_item" type="int" maxOccurs="unbounded"/> + </all> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5)); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns1:testType"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema025.phpt b/ext/soap/tests/schema/schema025.phpt new file mode 100644 index 0000000..748e458 --- /dev/null +++ b/ext/soap/tests/schema/schema025.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP XML Schema 25: SOAP 1.2 Array +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <attribute ref="enc12:itemType" wsdl:itemType="int"/> + <attribute ref="enc12:arraySize" wsdl:arraySize="*"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5)); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns1:testType"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema026.phpt b/ext/soap/tests/schema/schema026.phpt new file mode 100644 index 0000000..e17b5ac --- /dev/null +++ b/ext/soap/tests/schema/schema026.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP XML Schema 26: SOAP 1.2 Array (second way) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <all> + <element name="x_item" type="int" maxOccurs="unbounded"/> + </all> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5)); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="ns1:testType"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema027.phpt b/ext/soap/tests/schema/schema027.phpt new file mode 100644 index 0000000..e3b382e --- /dev/null +++ b/ext/soap/tests/schema/schema027.phpt @@ -0,0 +1,35 @@ +--TEST-- +SOAP XML Schema 27: SOAP 1.1 Multidimensional array +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[,]"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(array(123),array(123.5))); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2,1]" xsi:type="ns1:testType"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + array(1) { + [0]=> + int(123) + } + [1]=> + array(1) { + [0]=> + int(123) + } +} +ok diff --git a/ext/soap/tests/schema/schema028.phpt b/ext/soap/tests/schema/schema028.phpt new file mode 100644 index 0000000..7cc4ba5 --- /dev/null +++ b/ext/soap/tests/schema/schema028.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP XML Schema 28: SOAP 1.2 Multidimensional array +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <attribute ref="enc12:itemType" wsdl:itemType="int"/> + <attribute ref="enc12:arraySize" wsdl:arraySize="* 1"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(array(123),array(123.5))); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2,1]" xsi:type="ns1:testType"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + array(1) { + [0]=> + int(123) + } + [1]=> + array(1) { + [0]=> + int(123) + } +} +ok diff --git a/ext/soap/tests/schema/schema029.phpt b/ext/soap/tests/schema/schema029.phpt new file mode 100644 index 0000000..2081aff --- /dev/null +++ b/ext/soap/tests/schema/schema029.phpt @@ -0,0 +1,38 @@ +--TEST-- +SOAP XML Schema 29: SOAP 1.2 Multidimensional array (second way) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <all> + <element name="x_item" type="int" maxOccurs="unbounded"/> + </all> + <attribute ref="enc12:arraySize" wsdl:arraySize="* 1"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(array(123),array(123.5))); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2,1]" xsi:type="ns1:testType"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + array(1) { + [0]=> + int(123) + } + [1]=> + array(1) { + [0]=> + int(123) + } +} +ok diff --git a/ext/soap/tests/schema/schema030.phpt b/ext/soap/tests/schema/schema030.phpt new file mode 100644 index 0000000..e468613 --- /dev/null +++ b/ext/soap/tests/schema/schema030.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP XML Schema 30: Structure (sequence) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="int" type="int"/> + <element name="str" type="string"/> + </sequence> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5)); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["str"]=> + string(3) "str" +} +ok diff --git a/ext/soap/tests/schema/schema031.phpt b/ext/soap/tests/schema/schema031.phpt new file mode 100644 index 0000000..479abfe --- /dev/null +++ b/ext/soap/tests/schema/schema031.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP XML Schema 31: Structure (all) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <all> + <element name="int" type="int"/> + <element name="str" type="string"/> + </all> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5)); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["str"]=> + string(3) "str" +} +ok diff --git a/ext/soap/tests/schema/schema032.phpt b/ext/soap/tests/schema/schema032.phpt new file mode 100644 index 0000000..47b4af1 --- /dev/null +++ b/ext/soap/tests/schema/schema032.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP XML Schema 32: Structure (choice) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <choice> + <element name="int" type="int"/> + <element name="str" type="string"/> + </choice> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5)); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (1) { + ["int"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema033.phpt b/ext/soap/tests/schema/schema033.phpt new file mode 100644 index 0000000..b504bc0 --- /dev/null +++ b/ext/soap/tests/schema/schema033.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP XML Schema 33: Nested complex types +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType2"> + <sequence> + <element name="int" type="int"/> + </sequence> + </complexType> + <complexType name="testType"> + <sequence> + <element name="int" type="int"/> + <element name="nest" type="tns:testType2"/> + </sequence> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"nest"=>array("int"=>123.5))); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><nest xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></nest></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["nest"]=> + object(stdClass)#%d (1) { + ["int"]=> + int(123) + } +} +ok diff --git a/ext/soap/tests/schema/schema034.phpt b/ext/soap/tests/schema/schema034.phpt new file mode 100644 index 0000000..a83d6ea --- /dev/null +++ b/ext/soap/tests/schema/schema034.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP XML Schema 34: Nested complex types (element ref) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <element name="testType2" type="tns:testType2"/> + <complexType name="testType2"> + <sequence> + <element name="int" type="int"/> + </sequence> + </complexType> + <complexType name="testType"> + <sequence> + <element name="int" type="int"/> + <element ref="tns:testType2"/> + </sequence> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"testType2"=>array("int"=>123.5))); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><testType2 xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></testType2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["testType2"]=> + object(stdClass)#%d (1) { + ["int"]=> + int(123) + } +} +ok diff --git a/ext/soap/tests/schema/schema035.phpt b/ext/soap/tests/schema/schema035.phpt new file mode 100644 index 0000000..8974ed0 --- /dev/null +++ b/ext/soap/tests/schema/schema035.phpt @@ -0,0 +1,38 @@ +--TEST-- +SOAP XML Schema 35: Nested complex types (element ref + anonymous type) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <element name="testType2"> + <complexType> + <sequence> + <element name="int" type="int"/> + </sequence> + </complexType> + </element> + <complexType name="testType"> + <sequence> + <element name="int" type="int"/> + <element ref="tns:testType2"/> + </sequence> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"testType2"=>array("int"=>123.5))); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><testType2 xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></testType2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["testType2"]=> + object(stdClass)#%d (1) { + ["int"]=> + int(123) + } +} +ok diff --git a/ext/soap/tests/schema/schema036.phpt b/ext/soap/tests/schema/schema036.phpt new file mode 100644 index 0000000..9d6dac4 --- /dev/null +++ b/ext/soap/tests/schema/schema036.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP XML Schema 36: Nested complex types (inline) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="int" type="int"/> + <element name="testType2"> + <complexType> + <sequence> + <element name="int" type="int"/> + </sequence> + </complexType> + </element> + </sequence> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"testType2"=>array("int"=>123.5))); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><testType2 xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></testType2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["testType2"]=> + object(stdClass)#%d (1) { + ["int"]=> + int(123) + } +} +ok diff --git a/ext/soap/tests/schema/schema037.phpt b/ext/soap/tests/schema/schema037.phpt new file mode 100644 index 0000000..4e59981 --- /dev/null +++ b/ext/soap/tests/schema/schema037.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP XML Schema 37: Structure with attributes +--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)); +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 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 diff --git a/ext/soap/tests/schema/schema038.phpt b/ext/soap/tests/schema/schema038.phpt new file mode 100644 index 0000000..2d37e89 --- /dev/null +++ b/ext/soap/tests/schema/schema038.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 38: Structure with attributes (ref) +--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 ref="tns:int"/> + </complexType> + <attribute name="int" type="int"/> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5)); +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 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 diff --git a/ext/soap/tests/schema/schema039.phpt b/ext/soap/tests/schema/schema039.phpt new file mode 100644 index 0000000..0b7ef5a --- /dev/null +++ b/ext/soap/tests/schema/schema039.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP XML Schema 39: Structure with attributes (attributeGroup) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="str" type="string"/> + </sequence> + <attributeGroup ref="tns:intGroup"/> + </complexType> + <attributeGroup name="intGroup"> + <attribute name="int" type="int"/> + </attributeGroup> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5)); +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 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 diff --git a/ext/soap/tests/schema/schema040.phpt b/ext/soap/tests/schema/schema040.phpt new file mode 100644 index 0000000..f7ddc04 --- /dev/null +++ b/ext/soap/tests/schema/schema040.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP XML Schema 40: Structure with attributes (inline types) +--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"> + <simpleType> + <restriction base="int"/> + </simpleType> + </attribute> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5)); +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 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 diff --git a/ext/soap/tests/schema/schema041.phpt b/ext/soap/tests/schema/schema041.phpt new file mode 100644 index 0000000..1264cf5 --- /dev/null +++ b/ext/soap/tests/schema/schema041.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP XML Schema 41: Structure (group) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <group ref="tns:testGroup"/> + </complexType> + <group name="testGroup"> + <sequence> + <element name="int" type="int"/> + <element name="str" type="string"/> + </sequence> + </group> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>123.5)); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["str"]=> + string(3) "str" +} +ok diff --git a/ext/soap/tests/schema/schema042.phpt b/ext/soap/tests/schema/schema042.phpt new file mode 100644 index 0000000..a8aa885 --- /dev/null +++ b/ext/soap/tests/schema/schema042.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 42: Extension of simple type +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <simpleContent> + <extension base="int"> + <attribute name="int" type="int"/> + </extension> + </simpleContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5)); +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 xsi:type="ns1:testType" int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["_"]=> + int(123) + ["int"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema043.phpt b/ext/soap/tests/schema/schema043.phpt new file mode 100644 index 0000000..08c2996 --- /dev/null +++ b/ext/soap/tests/schema/schema043.phpt @@ -0,0 +1,38 @@ +--TEST-- +SOAP XML Schema 43: Extension of simple type (2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType2"> + <simpleContent> + <extension base="int"> + <attribute name="int" type="int"/> + </extension> + </simpleContent> + </complexType> + <complexType name="testType"> + <simpleContent> + <extension base="tns:testType2"> + <attribute name="int2" type="int"/> + </extension> + </simpleContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5)); +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 xsi:type="ns1:testType" int="123" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["_"]=> + int(123) + ["int"]=> + int(123) + ["int2"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema044.phpt b/ext/soap/tests/schema/schema044.phpt new file mode 100644 index 0000000..8fc0705 --- /dev/null +++ b/ext/soap/tests/schema/schema044.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 44: Restriction of simple type +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <simpleContent> + <restriction base="int"> + <attribute name="int" type="int"/> + </restriction> + </simpleContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5)); +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 xsi:type="ns1:testType" int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["_"]=> + int(123) + ["int"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema045.phpt b/ext/soap/tests/schema/schema045.phpt new file mode 100644 index 0000000..346a929 --- /dev/null +++ b/ext/soap/tests/schema/schema045.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP XML Schema 45: Restriction of simple type (2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType2"> + <simpleContent> + <extension base="int"> + <attribute name="int" type="int"/> + </extension> + </simpleContent> + </complexType> + <complexType name="testType"> + <simpleContent> + <restriction base="tns:testType2"> + <attribute name="int2" type="int"/> + </restriction> + </simpleContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5)); +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 xsi:type="ns1:testType" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["_"]=> + int(123) + ["int2"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema046.phpt b/ext/soap/tests/schema/schema046.phpt new file mode 100644 index 0000000..3f9d03a --- /dev/null +++ b/ext/soap/tests/schema/schema046.phpt @@ -0,0 +1,38 @@ +--TEST-- +SOAP XML Schema 46: Extension of complex type +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType2"> + <simpleContent> + <extension base="int"> + <attribute name="int" type="int"/> + </extension> + </simpleContent> + </complexType> + <complexType name="testType"> + <complexContent> + <extension base="tns:testType2"> + <attribute name="int2" type="int"/> + </extension> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5)); +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 xsi:type="ns1:testType" int="123" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["_"]=> + int(123) + ["int"]=> + int(123) + ["int2"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema047.phpt b/ext/soap/tests/schema/schema047.phpt new file mode 100644 index 0000000..1265cfd --- /dev/null +++ b/ext/soap/tests/schema/schema047.phpt @@ -0,0 +1,34 @@ +--TEST-- +SOAP XML Schema 47: Extension of complex type (2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType2"> + <sequence> + <element name="int" type="int"/> + </sequence> + </complexType> + <complexType name="testType"> + <complexContent> + <extension base="tns:testType2"> + <attribute name="int2" type="int"/> + </extension> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5)); +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 xsi:type="ns1:testType" int2="123"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["int2"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema048.phpt b/ext/soap/tests/schema/schema048.phpt new file mode 100644 index 0000000..98d4d4b --- /dev/null +++ b/ext/soap/tests/schema/schema048.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP XML Schema 48: Restriction of complex type +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType2"> + <simpleContent> + <extension base="int"> + <attribute name="int" type="int"/> + </extension> + </simpleContent> + </complexType> + <complexType name="testType"> + <complexContent> + <restriction base="tns:testType2"> + <attribute name="int2" type="int"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5)); +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 xsi:type="ns1:testType" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["_"]=> + int(123) + ["int2"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema049.phpt b/ext/soap/tests/schema/schema049.phpt new file mode 100644 index 0000000..7268a4b --- /dev/null +++ b/ext/soap/tests/schema/schema049.phpt @@ -0,0 +1,35 @@ +--TEST-- +SOAP XML Schema 49: Restriction of complex type (2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType2"> + <sequence> + <element name="int" type="int"/> + <element name="int2" type="int"/> + </sequence> + </complexType> + <complexType name="testType"> + <complexContent> + <restriction base="tns:testType2"> + <sequence> + <element name="int2" type="int"/> + </sequence> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("_"=>123.5,"int"=>123.5,"int2"=>123.5)); +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 xsi:type="ns1:testType"><int2 xsi:type="xsd:int">123</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (1) { + ["int2"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema050.phpt b/ext/soap/tests/schema/schema050.phpt new file mode 100644 index 0000000..6c73512 --- /dev/null +++ b/ext/soap/tests/schema/schema050.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP XML Schema 50: Array in complex type (maxOccurs > 1, one value) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="int" type="int"/> + <element name="int2" type="int" maxOccurs="unbounded"/> + </sequence> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"int2"=>123.5)); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><int2 xsi:type="xsd:int">123</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["int2"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema051.phpt b/ext/soap/tests/schema/schema051.phpt new file mode 100644 index 0000000..9636399 --- /dev/null +++ b/ext/soap/tests/schema/schema051.phpt @@ -0,0 +1,33 @@ +--TEST-- +SOAP XML Schema 51: Array in complex type (maxOccurs > 1, array) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="int" type="int"/> + <element name="int2" type="int" maxOccurs="unbounded"/> + </sequence> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"int2"=>array(123.5,456.7))); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><int2 xsi:type="xsd:int">123</int2><int2 xsi:type="xsd:int">456</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["int2"]=> + array(2) { + [0]=> + int(123) + [1]=> + int(456) + } +} +ok diff --git a/ext/soap/tests/schema/schema052.phpt b/ext/soap/tests/schema/schema052.phpt new file mode 100644 index 0000000..8e7121a --- /dev/null +++ b/ext/soap/tests/schema/schema052.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP XML Schema 52: Array in complex type (maxOccurs > 1, array with one value) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="int" type="int"/> + <element name="int2" type="int" maxOccurs="unbounded"/> + </sequence> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"int2"=>array(123.5))); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><int2 xsi:type="xsd:int">123</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["int"]=> + int(123) + ["int2"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema053.phpt b/ext/soap/tests/schema/schema053.phpt new file mode 100644 index 0000000..8893bf5 --- /dev/null +++ b/ext/soap/tests/schema/schema053.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP XML Schema 52: Array in complex type (maxOccurs > 1, empty array) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="int" type="int"/> + <element name="int2" type="int" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("int"=>123.5,"int2"=>array())); +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 xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (1) { + ["int"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema054.phpt b/ext/soap/tests/schema/schema054.phpt new file mode 100644 index 0000000..5adf2f5 --- /dev/null +++ b/ext/soap/tests/schema/schema054.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP XML Schema 54: Apache Map +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +include "test_schema.inc"; +$schema = ''; +test_schema($schema,'type="apache:Map" xmlns:apache="http://xml.apache.org/xml-soap"',array('a'=>123,'b'=>123.5)); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns2:Map"><item><key xsi:type="xsd:string">a</key><value xsi:type="xsd:int">123</value></item><item><key xsi:type="xsd:string">b</key><value xsi:type="xsd:float">123.5</value></item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + ["a"]=> + int(123) + ["b"]=> + float(123.5) +} +ok diff --git a/ext/soap/tests/schema/schema055.phpt b/ext/soap/tests/schema/schema055.phpt new file mode 100644 index 0000000..14dbdb7 --- /dev/null +++ b/ext/soap/tests/schema/schema055.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP XML Schema 55: Apache Map (extension) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <extension base="apache:Map" xmlns:apache="http://xml.apache.org/xml-soap"> + </extension> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="testType"',array('a'=>123,'b'=>123.5)); +echo "ok"; +?> +--EXPECT-- +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns2:Map"><item><key xsi:type="xsd:string">a</key><value xsi:type="xsd:int">123</value></item><item><key xsi:type="xsd:string">b</key><value xsi:type="xsd:float">123.5</value></item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + ["a"]=> + int(123) + ["b"]=> + float(123.5) +} +ok diff --git a/ext/soap/tests/schema/schema056.phpt b/ext/soap/tests/schema/schema056.phpt new file mode 100644 index 0000000..1ada78e --- /dev/null +++ b/ext/soap/tests/schema/schema056.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 56: SOAP 1.1 Array (literal encoding) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5),'rpc','literal'); +echo "ok"; +?> +--EXPECT-- +<?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"><SOAP-ENV:Body><ns1:test><testParam><xsd:int>123</xsd:int><xsd:int>123</xsd:int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema057.phpt b/ext/soap/tests/schema/schema057.phpt new file mode 100644 index 0000000..1848b9c --- /dev/null +++ b/ext/soap/tests/schema/schema057.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP XML Schema 57: SOAP 1.1 Array (second way, literal encoding) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <all> + <element name="x_item" type="int" maxOccurs="unbounded"/> + </all> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5),'rpc','literal'); +echo "ok"; +?> +--EXPECT-- +<?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"><SOAP-ENV:Body><ns1:test><testParam><x_item>123</x_item><x_item>123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema058.phpt b/ext/soap/tests/schema/schema058.phpt new file mode 100644 index 0000000..b96fc9f --- /dev/null +++ b/ext/soap/tests/schema/schema058.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP XML Schema 58: SOAP 1.2 Array (literal encoding) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <attribute ref="enc12:itemType" wsdl:itemType="int"/> + <attribute ref="enc12:arraySize" wsdl:arraySize="*"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5),'rpc','literal'); +echo "ok"; +?> +--EXPECT-- +<?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"><SOAP-ENV:Body><ns1:test><testParam><xsd:int>123</xsd:int><xsd:int>123</xsd:int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema059.phpt b/ext/soap/tests/schema/schema059.phpt new file mode 100644 index 0000000..875bae9 --- /dev/null +++ b/ext/soap/tests/schema/schema059.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP XML Schema 59: SOAP 1.2 Array (second way, literal encoding) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <all> + <element name="x_item" type="int" maxOccurs="unbounded"/> + </all> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5),'rpc','literal'); +echo "ok"; +?> +--EXPECT-- +<?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"><SOAP-ENV:Body><ns1:test><testParam><x_item>123</x_item><x_item>123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema060.phpt b/ext/soap/tests/schema/schema060.phpt new file mode 100644 index 0000000..4daa83c --- /dev/null +++ b/ext/soap/tests/schema/schema060.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP XML Schema 60: SOAP 1.2 Multidimensional array (literal encoding) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <attribute ref="enc12:itemType" wsdl:itemType="int"/> + <attribute ref="enc12:arraySize" wsdl:arraySize="* 1"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(array(123),array(123.5)),'rpc','literal'); +echo "ok"; +?> +--EXPECT-- +<?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"><SOAP-ENV:Body><ns1:test><testParam><xsd:int>123</xsd:int><xsd:int>123</xsd:int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + array(1) { + [0]=> + int(123) + } + [1]=> + array(1) { + [0]=> + int(123) + } +} +ok diff --git a/ext/soap/tests/schema/schema061.phpt b/ext/soap/tests/schema/schema061.phpt new file mode 100644 index 0000000..bbd2aa6 --- /dev/null +++ b/ext/soap/tests/schema/schema061.phpt @@ -0,0 +1,38 @@ +--TEST-- +SOAP XML Schema 61: SOAP 1.2 Multidimensional array (second way, literal encoding) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <all> + <element name="x_item" type="int" maxOccurs="unbounded"/> + </all> + <attribute ref="enc12:arraySize" wsdl:arraySize="* 1"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(array(123),array(123.5)),'rpc','literal'); +echo "ok"; +?> +--EXPECT-- +<?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"><SOAP-ENV:Body><ns1:test><testParam><x_item>123</x_item><x_item>123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + array(1) { + [0]=> + int(123) + } + [1]=> + array(1) { + [0]=> + int(123) + } +} +ok diff --git a/ext/soap/tests/schema/schema062.phpt b/ext/soap/tests/schema/schema062.phpt new file mode 100644 index 0000000..60b0656 --- /dev/null +++ b/ext/soap/tests/schema/schema062.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 62: NULL with attributes +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <simpleContent> + <restriction base="int"> + <attribute name="int" type="int"/> + </restriction> + </simpleContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("_"=>NULL,"int"=>123.5)); +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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:nil="true" int="123" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["_"]=> + NULL + ["int"]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema063.phpt b/ext/soap/tests/schema/schema063.phpt new file mode 100644 index 0000000..7fda578 --- /dev/null +++ b/ext/soap/tests/schema/schema063.phpt @@ -0,0 +1,18 @@ +--TEST-- +SOAP XML Schema 63: standard unsignedLong type +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +include "test_schema.inc"; +$schema = ''; +test_schema($schema,'type="xsd:unsignedLong"',0xffffffff); +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 xsi:type="xsd:unsignedLong">4294967295</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +%s(4294967295) +ok diff --git a/ext/soap/tests/schema/schema064.phpt b/ext/soap/tests/schema/schema064.phpt new file mode 100644 index 0000000..899a293 --- /dev/null +++ b/ext/soap/tests/schema/schema064.phpt @@ -0,0 +1,61 @@ +--TEST-- +SOAP XML Schema 64: standard date/time types +--SKIPIF-- +<?php +if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + die('skip, windows has different TZ format'); +} +require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="dateTime" type="dateTime"/> + <element name="time" type="time"/> + <element name="date" type="date"/> + <element name="gYearMonth" type="gYearMonth"/> + <element name="gYear" type="gYear"/> + <element name="gMonthDay" type="gMonthDay"/> + <element name="gDay" type="gDay"/> + <element name="gMonth" type="gMonth"/> + </sequence> + </complexType> +EOF; +$date = gmmktime(1,2,3,4,5,1976); +putenv('TZ=GMT'); +test_schema($schema,'type="tns:testType"',array( + 'dateTime' => $date, + 'time' => $date, + 'date' => $date, + 'gYearMonth' => $date, + 'gYear' => $date, + 'gMonthDay' => $date, + 'gDay' => $date, + 'gMonth' => $date +)); +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 xsi:type="ns1:testType"><dateTime xsi:type="xsd:dateTime">1976-04-05T01:02:03Z</dateTime><time xsi:type="xsd:time">01:02:03Z</time><date xsi:type="xsd:date">1976-04-05Z</date><gYearMonth xsi:type="xsd:gYearMonth">1976-04Z</gYearMonth><gYear xsi:type="xsd:gYear">1976Z</gYear><gMonthDay xsi:type="xsd:gMonthDay">--04-05Z</gMonthDay><gDay xsi:type="xsd:gDay">---05Z</gDay><gMonth xsi:type="xsd:gMonth">--04--Z</gMonth></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (8) { + ["dateTime"]=> + string(20) "1976-04-05T01:02:03Z" + ["time"]=> + string(9) "01:02:03Z" + ["date"]=> + string(11) "1976-04-05Z" + ["gYearMonth"]=> + string(8) "1976-04Z" + ["gYear"]=> + string(5) "1976Z" + ["gMonthDay"]=> + string(8) "--04-05Z" + ["gDay"]=> + string(6) "---05Z" + ["gMonth"]=> + string(7) "--04--Z" +} +ok diff --git a/ext/soap/tests/schema/schema065.phpt b/ext/soap/tests/schema/schema065.phpt new file mode 100644 index 0000000..3199a6b --- /dev/null +++ b/ext/soap/tests/schema/schema065.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP XML Schema 65: Attribute with default value +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <attribute name="str" type="string"/> + <attribute name="int" type="int" default="5"/> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str")); +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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["str"]=> + string(3) "str" + ["int"]=> + int(5) +} +ok diff --git a/ext/soap/tests/schema/schema066.phpt b/ext/soap/tests/schema/schema066.phpt new file mode 100644 index 0000000..7fe47bb --- /dev/null +++ b/ext/soap/tests/schema/schema066.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP XML Schema 66: Attribute with fixed value (1) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <attribute name="str" type="string"/> + <attribute name="int" type="int" fixed="5"/> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str")); +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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["str"]=> + string(3) "str" + ["int"]=> + int(5) +} +ok diff --git a/ext/soap/tests/schema/schema067.phpt b/ext/soap/tests/schema/schema067.phpt new file mode 100644 index 0000000..5ee0036 --- /dev/null +++ b/ext/soap/tests/schema/schema067.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP XML Schema 67: Attribute with fixed value (2) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <attribute name="str" type="string"/> + <attribute name="int" type="int" fixed="5"/> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>5)); +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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" int="5" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["str"]=> + string(3) "str" + ["int"]=> + int(5) +} +ok diff --git a/ext/soap/tests/schema/schema068.phpt b/ext/soap/tests/schema/schema068.phpt new file mode 100644 index 0000000..88fdac3 --- /dev/null +++ b/ext/soap/tests/schema/schema068.phpt @@ -0,0 +1,18 @@ +--TEST-- +SOAP XML Schema 68: Attribute with fixed value (3) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <attribute name="str" type="string"/> + <attribute name="int" type="int" fixed="5"/> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>4)); +echo "ok"; +?> +--EXPECTF-- +Fatal error: SOAP-ERROR: Encoding: Attribute 'int' has fixed value '5' (value '4' is not allowed) in %stest_schema.inc on line %d
\ No newline at end of file diff --git a/ext/soap/tests/schema/schema069.phpt b/ext/soap/tests/schema/schema069.phpt new file mode 100644 index 0000000..ccaa342 --- /dev/null +++ b/ext/soap/tests/schema/schema069.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP XML Schema 69: Attribute with default value (reference) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <attribute name="str" type="string"/> + <attribute ref="tns:int"/> + </complexType> + <attribute name="int" type="int" default="5"/> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str")); +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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["str"]=> + string(3) "str" + ["int"]=> + int(5) +} +ok diff --git a/ext/soap/tests/schema/schema070.phpt b/ext/soap/tests/schema/schema070.phpt new file mode 100644 index 0000000..0c1e249 --- /dev/null +++ b/ext/soap/tests/schema/schema070.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 70: Attribute with default value (attributeGroup) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <attribute name="str" type="string"/> + <attributeGroup ref="tns:int_group"/> + </complexType> + <attributeGroup name="int_group"> + <attribute name="int" type="int" default="5"/> + </attributeGroup> +EOF; +test_schema($schema,'type="tns:testType"',(object)array("str"=>"str")); +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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (2) { + ["str"]=> + string(3) "str" + ["int"]=> + int(5) +} +ok diff --git a/ext/soap/tests/schema/schema071.phpt b/ext/soap/tests/schema/schema071.phpt new file mode 100644 index 0000000..1991f7a --- /dev/null +++ b/ext/soap/tests/schema/schema071.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP XML Schema 71: SOAP 1.1 Array (document style) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5),'document','literal'); +echo "ok"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><testParam><xsd:int>123</xsd:int><xsd:int>123</xsd:int></testParam></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/schema/schema072.phpt b/ext/soap/tests/schema/schema072.phpt new file mode 100644 index 0000000..89a0ed3 --- /dev/null +++ b/ext/soap/tests/schema/schema072.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP XML Schema 72: SOAP 1.1 Array (document style, element with inline type) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <element name="testElement"> + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/> + </restriction> + </complexContent> + </complexType> + </element> +EOF; +test_schema($schema,'element="tns:testElement"',array(123,123.5),'document','literal'); +echo "ok"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:testElement><xsd:int>123</xsd:int><xsd:int>123</xsd:int></ns1:testElement></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/schema/schema073.phpt b/ext/soap/tests/schema/schema073.phpt new file mode 100644 index 0000000..22dd9e2 --- /dev/null +++ b/ext/soap/tests/schema/schema073.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP XML Schema 73: SOAP 1.1 Array (document style, element with type ref) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <element name="testElement" type="tns:testType"/> + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'element="tns:testElement"',array(123,123.5),'document','literal'); +echo "ok"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:testElement><xsd:int>123</xsd:int><xsd:int>123</xsd:int></ns1:testElement></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/schema/schema074.phpt b/ext/soap/tests/schema/schema074.phpt new file mode 100644 index 0000000..3dbba0c --- /dev/null +++ b/ext/soap/tests/schema/schema074.phpt @@ -0,0 +1,29 @@ +--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 diff --git a/ext/soap/tests/schema/schema075.phpt b/ext/soap/tests/schema/schema075.phpt new file mode 100644 index 0000000..5867e55 --- /dev/null +++ b/ext/soap/tests/schema/schema075.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP XML Schema 75: Attributes form qualified/unqualified (attributeFormDefault="qualified") +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <attribute name="int1" type="int"/> + <attribute name="int2" type="int" form="qualified"/> + <attribute name="int3" type="int" form="unqualified"/> + </complexType> +EOF; + +test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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:int1="1" ns1:int2="2" int3="3" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["int1"]=> + int(1) + ["int2"]=> + int(2) + ["int3"]=> + int(3) +} +ok diff --git a/ext/soap/tests/schema/schema076.phpt b/ext/soap/tests/schema/schema076.phpt new file mode 100644 index 0000000..3ad2eae --- /dev/null +++ b/ext/soap/tests/schema/schema076.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP XML Schema 76: Attributes form qualified/unqualified (attributeFormDefault="unqualified") +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <attribute name="int1" type="int"/> + <attribute name="int2" type="int" form="qualified"/> + <attribute name="int3" type="int" form="unqualified"/> + </complexType> +EOF; + +test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "encoded", 'attributeFormDefault="unqualified"'); +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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int1="1" ns1:int2="2" int3="3" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["int1"]=> + int(1) + ["int2"]=> + int(2) + ["int3"]=> + int(3) +} +ok diff --git a/ext/soap/tests/schema/schema077.phpt b/ext/soap/tests/schema/schema077.phpt new file mode 100644 index 0000000..16057cf --- /dev/null +++ b/ext/soap/tests/schema/schema077.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP XML Schema 77: Attributes form qualified/unqualified (attributeFormDefault - default) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <attribute name="int1" type="int"/> + <attribute name="int2" type="int" form="qualified"/> + <attribute name="int3" type="int" form="unqualified"/> + </complexType> +EOF; + +test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "encoded"); +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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int1="1" ns1:int2="2" int3="3" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["int1"]=> + int(1) + ["int2"]=> + int(2) + ["int3"]=> + int(3) +} +ok diff --git a/ext/soap/tests/schema/schema078.phpt b/ext/soap/tests/schema/schema078.phpt new file mode 100644 index 0000000..7636a78 --- /dev/null +++ b/ext/soap/tests/schema/schema078.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP XML Schema 78: Element form qualified/unqualified (elementFormDefault="qualified") +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="int1" type="int"/> + <element name="int2" type="int" form="qualified"/> + <element name="int3" type="int" form="unqualified"/> + </sequence> + </complexType> +EOF; + +test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "literal", 'elementFormDefault="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/"><SOAP-ENV:Body><ns1:test><testParam><ns1:int1>1</ns1:int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["int1"]=> + int(1) + ["int2"]=> + int(2) + ["int3"]=> + int(3) +} +ok diff --git a/ext/soap/tests/schema/schema079.phpt b/ext/soap/tests/schema/schema079.phpt new file mode 100644 index 0000000..34dcd9b --- /dev/null +++ b/ext/soap/tests/schema/schema079.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP XML Schema 79: Element form qualified/unqualified (elementFormDefault="unqualified") +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="int1" type="int"/> + <element name="int2" type="int" form="qualified"/> + <element name="int3" type="int" form="unqualified"/> + </sequence> + </complexType> +EOF; + +test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "literal", 'elementFormDefault="unqualified"'); +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/"><SOAP-ENV:Body><ns1:test><testParam><int1>1</int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["int1"]=> + int(1) + ["int2"]=> + int(2) + ["int3"]=> + int(3) +} +ok diff --git a/ext/soap/tests/schema/schema080.phpt b/ext/soap/tests/schema/schema080.phpt new file mode 100644 index 0000000..7519d6a --- /dev/null +++ b/ext/soap/tests/schema/schema080.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP XML Schema 80: Element form qualified/unqualified (elementFormDefault - default) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <sequence> + <element name="int1" type="int"/> + <element name="int2" type="int" form="qualified"/> + <element name="int3" type="int" form="unqualified"/> + </sequence> + </complexType> +EOF; + +test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "literal"); +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/"><SOAP-ENV:Body><ns1:test><testParam><int1>1</int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#%d (3) { + ["int1"]=> + int(1) + ["int2"]=> + int(2) + ["int3"]=> + int(3) +} +ok diff --git a/ext/soap/tests/schema/schema081.phpt b/ext/soap/tests/schema/schema081.phpt new file mode 100644 index 0000000..337f081 --- /dev/null +++ b/ext/soap/tests/schema/schema081.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP XML Schema 81: SOAP 1.1 Array with SOAP_USE_XSI_ARRAY_TYPE +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5),"rpc","encoded",'',SOAP_USE_XSI_ARRAY_TYPE); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema082.phpt b/ext/soap/tests/schema/schema082.phpt new file mode 100644 index 0000000..34c4c76 --- /dev/null +++ b/ext/soap/tests/schema/schema082.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP XML Schema 82: SOAP 1.1 Array with SOAP_USE_XSI_ARRAY_TYPE (second way) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="SOAP-ENC:Array"> + <all> + <element name="x_item" type="int" maxOccurs="unbounded"/> + </all> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5),"rpc","encoded",'',SOAP_USE_XSI_ARRAY_TYPE); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema083.phpt b/ext/soap/tests/schema/schema083.phpt new file mode 100644 index 0000000..854c4f9 --- /dev/null +++ b/ext/soap/tests/schema/schema083.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP XML Schema 83: SOAP 1.2 Array with SOAP_USE_XSI_ARRAY_TYPE +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <attribute ref="enc12:itemType" wsdl:itemType="int"/> + <attribute ref="enc12:arraySize" wsdl:arraySize="*"/> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5),"rpc","encoded",'',SOAP_USE_XSI_ARRAY_TYPE); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:int">123</item><item xsi:type="xsd:int">123</item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema084.phpt b/ext/soap/tests/schema/schema084.phpt new file mode 100644 index 0000000..94a9551 --- /dev/null +++ b/ext/soap/tests/schema/schema084.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP XML Schema 84: SOAP 1.2 Array with SOAP_USE_XSI_ARRAY_TYPE (second way) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType"> + <complexContent> + <restriction base="enc12:Array" xmlns:enc12="http://www.w3.org/2003/05/soap-encoding"> + <all> + <element name="x_item" type="int" maxOccurs="unbounded"/> + </all> + </restriction> + </complexContent> + </complexType> +EOF; +test_schema($schema,'type="tns:testType"',array(123,123.5),"rpc","encoded",'',SOAP_USE_XSI_ARRAY_TYPE); +echo "ok"; +?> +--EXPECT-- +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"><x_item xsi:type="xsd:int">123</x_item><x_item xsi:type="xsd:int">123</x_item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +array(2) { + [0]=> + int(123) + [1]=> + int(123) +} +ok diff --git a/ext/soap/tests/schema/schema085.phpt b/ext/soap/tests/schema/schema085.phpt new file mode 100644 index 0000000..9a93ac7 --- /dev/null +++ b/ext/soap/tests/schema/schema085.phpt @@ -0,0 +1,45 @@ +--TEST-- +SOAP XML Schema 85: Extension of complex type (elements order) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "test_schema.inc"; +$schema = <<<EOF + <complexType name="testType2"> + <sequence> + <element name="int" type="int"/> + </sequence> + </complexType> + <complexType name="testType"> + <complexContent> + <extension base="tns:testType2"> + <sequence> + <element name="int2" type="int"/> + </sequence> + </extension> + </complexContent> + </complexType> +EOF; +class A { + public $int = 1; +} + +class B extends A { + public $int2 = 2; +} + + +test_schema($schema,'type="tns:testType"',new B()); +echo "ok"; +?> +--EXPECT-- +<?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 xsi:type="ns1:testType"><int xsi:type="xsd:int">1</int><int2 xsi:type="xsd:int">2</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +object(stdClass)#5 (2) { + ["int"]=> + int(1) + ["int2"]=> + int(2) +} +ok diff --git a/ext/soap/tests/schema/skipif.inc b/ext/soap/tests/schema/skipif.inc new file mode 100644 index 0000000..8780887 --- /dev/null +++ b/ext/soap/tests/schema/skipif.inc @@ -0,0 +1,5 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); + /* xml parser is required by test_schema.inc */ + if (!extension_loaded('xml')) die('skip xml extension not available'); +?> diff --git a/ext/soap/tests/schema/test_schema.inc b/ext/soap/tests/schema/test_schema.inc new file mode 100644 index 0000000..bfc4ce0 --- /dev/null +++ b/ext/soap/tests/schema/test_schema.inc @@ -0,0 +1,77 @@ +<?php +$val = null; + +function test($input) { + global $val; + $val = $input; +} + +function test_schema($schema,$type,$param,$style="rpc",$use="encoded", $attributeFormDefault='',$features=0) { + global $HTTP_RAW_POST_DATA, $val; +$wsdl = <<<EOF +<definitions name="InteropTest" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:tns="http://test-uri/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://test-uri/" + > + <types> + <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test-uri/" $attributeFormDefault> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> + $schema + </schema> + </types> + <message name="testMessage"> + <part name="testParam" $type/> + </message> + <portType name="testPortType"> + <operation name="test"> + <input message="testMessage"/> + </operation> + </portType> + <binding name="testBinding" type="testPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="test"> + <soap:operation soapAction="#test" style="$style"/> + <input> + <soap:body use="$use" namespace="http://test-uri/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + </operation> + </binding> + <service name="testService"> + <port name="testPort" binding="tns:testBinding"> + <soap:address location="test://" /> + </port> + </service> +</definitions> +EOF; + + $fname = tempnam ("./", "wsdl"); + $f = fopen($fname,"w"); + fwrite($f,$wsdl); + fclose($f); + ini_set("soap.wsdl_cache_enabled",0); + $x = new SoapClient($fname, array("trace"=>1,"exceptions"=>0,"features"=>$features)); + $y = new SoapServer($fname, array("features"=>$features)); + $y->addfunction("test"); + unlink($fname); + + $x->test($param); + $xml = xml_parser_create(); + $req = $x->__getlastrequest(); + if ($style == "rpc") { + $HTTP_RAW_POST_DATA = $req; + ob_start(); + $y->handle($HTTP_RAW_POST_DATA); + ob_end_clean(); + echo $req; + var_dump($val); + } else { + echo $req; + } +} +?> diff --git a/ext/soap/tests/server001.phpt b/ext/soap/tests/server001.phpt new file mode 100644 index 0000000..649e013 --- /dev/null +++ b/ext/soap/tests/server001.phpt @@ -0,0 +1,33 @@ +--TEST-- +SOAP Server 1: new/addfunction/handle +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test() { + return "Hello World"; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server002.phpt b/ext/soap/tests/server002.phpt new file mode 100644 index 0000000..d0a53b8 --- /dev/null +++ b/ext/soap/tests/server002.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Server 2: function with parameters and result +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Add($x,$y) { + return $x+$y; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("Add"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Add xmlns:ns1="http://testuri.org"> + <x xsi:type="xsd:int">22</x> + <y xsi:type="xsd:int">33</y> + </ns1:Add> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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><return xsi:type="xsd:int">55</return></ns1:AddResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server003.phpt b/ext/soap/tests/server003.phpt new file mode 100644 index 0000000..a808c6f --- /dev/null +++ b/ext/soap/tests/server003.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP Server 3: all functions +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction(SOAP_FUNCTIONS_ALL); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:strlen xmlns:ns1="http://testuri.org"> + <x xsi:type="xsd:string">Hello World</x> + </ns1:strlen> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:strlenResponse><return xsi:type="xsd:int">11</return></ns1:strlenResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server004.phpt b/ext/soap/tests/server004.phpt new file mode 100644 index 0000000..5d98d3f --- /dev/null +++ b/ext/soap/tests/server004.phpt @@ -0,0 +1,40 @@ +--TEST-- +SOAP Server 4: addfunctions +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Add($x,$y) { + return $x+$y; +} +function Sub($x,$y) { + return $x-$y; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction(array("Sub","Add")); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Add xmlns:ns1="http://testuri.org"> + <x xsi:type="xsd:int">22</x> + <y xsi:type="xsd:int">33</y> + </ns1:Add> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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><return xsi:type="xsd:int">55</return></ns1:AddResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server005.phpt b/ext/soap/tests/server005.phpt new file mode 100644 index 0000000..9536771 --- /dev/null +++ b/ext/soap/tests/server005.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP Server 5: setclass +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class Foo { + function test() { + return "Hello World"; + } +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->setclass("Foo"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server006.phpt b/ext/soap/tests/server006.phpt new file mode 100644 index 0000000..da328eb --- /dev/null +++ b/ext/soap/tests/server006.phpt @@ -0,0 +1,42 @@ +--TEST-- +SOAP Server 6: setclass with constructor +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class Foo { + private $str = ""; + + function Foo($str) { + $this->str = $str . " World"; + } + + function test() { + return $this->str; + } +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->setclass("Foo","Hello"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server007.phpt b/ext/soap/tests/server007.phpt new file mode 100644 index 0000000..676aa56 --- /dev/null +++ b/ext/soap/tests/server007.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP Server 7: addfunction and getfunctions +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Add($x,$y) { + return $x+$y; +} +function Sub($x,$y) { + return $x-$y; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction(array("Sub","Add")); +var_dump($server->getfunctions()); +echo "ok\n"; +?> +--EXPECT-- +array(2) { + [0]=> + string(3) "Sub" + [1]=> + string(3) "Add" +} +ok diff --git a/ext/soap/tests/server008.phpt b/ext/soap/tests/server008.phpt new file mode 100644 index 0000000..87fb69d --- /dev/null +++ b/ext/soap/tests/server008.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP Server 8: setclass and getfunctions +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class Foo { + + function Foo() { + } + + function test() { + return $this->str; + } +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->setclass("Foo"); +var_dump($server->getfunctions()); +echo "ok\n"; +?> +--EXPECT-- +array(2) { + [0]=> + string(3) "Foo" + [1]=> + string(4) "test" +} +ok diff --git a/ext/soap/tests/server009.phpt b/ext/soap/tests/server009.phpt new file mode 100644 index 0000000..28d195a --- /dev/null +++ b/ext/soap/tests/server009.phpt @@ -0,0 +1,69 @@ +--TEST-- +SOAP Server 9: setclass and setpersistence(SOAP_PERSISTENCE_SESSION) +--SKIPIF-- +<?php + require_once('skipif.inc'); + if (!extension_loaded('session')) { + die('skip this test needs session extension'); + } +?> +--INI-- +session.auto_start=1 +session.save_handler=files +--FILE-- +<?php +class foo { + private $sum = 0; + + function Sum($num) { + return $this->sum += $num; + } +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->setclass("foo"); +$server->setpersistence(SOAP_PERSISTENCE_SESSION); + +ob_start(); +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Sum xmlns:ns1="http://testuri.org"> + <num xsi:type="xsd:int">5</num> + </ns1:Sum> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle($HTTP_RAW_POST_DATA); +ob_clean(); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Sum xmlns:ns1="http://testuri.org"> + <num xsi:type="xsd:int">3</num> + </ns1:Sum> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle($HTTP_RAW_POST_DATA); +ob_end_flush(); + +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://testuri.org" 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:SumResponse><return xsi:type="xsd:int">8</return></ns1:SumResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server010.phpt b/ext/soap/tests/server010.phpt new file mode 100644 index 0000000..bac16d2 --- /dev/null +++ b/ext/soap/tests/server010.phpt @@ -0,0 +1,61 @@ +--TEST-- +SOAP Server 10: setclass and setpersistence(SOAP_PERSISTENCE_REQUEST) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class foo { + private $sum = 0; + + function Sum($num) { + return $this->sum += $num; + } +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->setclass("foo"); +$server->setpersistence(SOAP_PERSISTENCE_REQUEST); + + +ob_start(); +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Sum xmlns:ns1="http://testuri.org"> + <num xsi:type="xsd:int">5</num> + </ns1:Sum> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle($HTTP_RAW_POST_DATA); +ob_clean(); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Sum xmlns:ns1="http://testuri.org"> + <num xsi:type="xsd:int">3</num> + </ns1:Sum> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle($HTTP_RAW_POST_DATA); +ob_end_flush(); +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://testuri.org" 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:SumResponse><return xsi:type="xsd:int">3</return></ns1:SumResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server011.phpt b/ext/soap/tests/server011.phpt new file mode 100644 index 0000000..5b76a81 --- /dev/null +++ b/ext/soap/tests/server011.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP Server 11: bind +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--GET-- +wsdl +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +function Add($x,$y) { + return $x+$y; +} + +$server = new soapserver(dirname(__FILE__)."/test.wsdl"); +ob_start(); +$server->handle(); +$wsdl = ob_get_contents(); +ob_end_clean(); +if ($wsdl == file_get_contents(dirname(__FILE__)."/test.wsdl")) { + echo "ok\n"; +} else { + echo "fail\n"; +} +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/server012.phpt b/ext/soap/tests/server012.phpt new file mode 100644 index 0000000..9a41de9 --- /dev/null +++ b/ext/soap/tests/server012.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP Server 12: WSDL generation +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--GET-- +WSDL +--FILE-- +<?php +function Add($x,$y) { + return $x+$y; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("Add"); +$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/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>WSDL generation is not supported yet</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/server013.phpt b/ext/soap/tests/server013.phpt new file mode 100644 index 0000000..68c4801 --- /dev/null +++ b/ext/soap/tests/server013.phpt @@ -0,0 +1,44 @@ +--TEST-- +SOAP Server 13: array handling +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Sum($a) { + $sum = 0; + if (is_array($a)) { + foreach($a as $val) { + $sum += $val; + } + } + return $sum; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("Sum"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <SOAP-ENV:Body xmlns:ns1="http://linuxsrv.home/~dmitry/soap/"> + <ns1:sum> + <param0 SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"> + <val xsi:type="xsd:int">3</val> + <val xsi:type="xsd:int">5</val> + </param0> + </ns1:sum> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:sumResponse><return xsi:type="xsd:int">8</return></ns1:sumResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server014.phpt b/ext/soap/tests/server014.phpt new file mode 100644 index 0000000..fcb62a5 --- /dev/null +++ b/ext/soap/tests/server014.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Server 14: fault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Add($x,$y) { + undefined_function_x(); + return $x+$y; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("Add"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Add xmlns:ns1="http://testuri.org"> + <x xsi:type="xsd:int">22</x> + <y xsi:type="xsd:int">33</y> + </ns1:Add> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Call to undefined function undefined_function_x()</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/server015.phpt b/ext/soap/tests/server015.phpt new file mode 100644 index 0000000..ea538e8 --- /dev/null +++ b/ext/soap/tests/server015.phpt @@ -0,0 +1,33 @@ +--TEST-- +SOAP Server 15: passing request to handle() +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test() { + return "Hello World"; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); + +$envelope = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle($envelope); +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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server016.phpt b/ext/soap/tests/server016.phpt new file mode 100644 index 0000000..8934f46 --- /dev/null +++ b/ext/soap/tests/server016.phpt @@ -0,0 +1,34 @@ +--TEST-- +SOAP Server 16: user fault +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test() { + global $server; + $server->fault("MyFault","My fault string"); +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org"/> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>MyFault</faultcode><faultstring>My fault string</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/server017.phpt b/ext/soap/tests/server017.phpt new file mode 100644 index 0000000..3ff0acb --- /dev/null +++ b/ext/soap/tests/server017.phpt @@ -0,0 +1,34 @@ +--TEST-- +SOAP Server 17: user fault (through return) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test() { + return new SoapFault("MyFault","My fault string"); +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org"/> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>MyFault</faultcode><faultstring>My fault string</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server018.phpt b/ext/soap/tests/server018.phpt new file mode 100644 index 0000000..b033ed9 --- /dev/null +++ b/ext/soap/tests/server018.phpt @@ -0,0 +1,34 @@ +--TEST-- +SOAP Server 18: user fault (through throw) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test() { + throw new SoapFault("MyFault","My fault string"); +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org"/> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>MyFault</faultcode><faultstring>My fault string</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server019.phpt b/ext/soap/tests/server019.phpt new file mode 100644 index 0000000..d36cff0 --- /dev/null +++ b/ext/soap/tests/server019.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP Server 19: compressed request (gzip) +--SKIPIF-- +<?php + if (php_sapi_name()=='cli') echo 'skip'; + require_once('skipif.inc'); + if (!extension_loaded('zlib')) die('skip zlib extension not available'); +?> +--INI-- +precision=14 +--GZIP_POST-- +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +--FILE-- +<?php +function test() { + return "Hello World"; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server020.phpt b/ext/soap/tests/server020.phpt new file mode 100644 index 0000000..b14978f --- /dev/null +++ b/ext/soap/tests/server020.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Server 20: compressed request (deflate) +--SKIPIF-- +<?php + if (php_sapi_name()=='cli') echo 'skip'; + require_once('skipif.inc'); + if (!extension_loaded('zlib')) die('skip zlib extension not available'); +?> +--INI-- +precision=14 +--DEFLATE_POST-- +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +--FILE-- +<?php +function test() { + return "Hello World"; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server021.phpt b/ext/soap/tests/server021.phpt new file mode 100644 index 0000000..245c464 --- /dev/null +++ b/ext/soap/tests/server021.phpt @@ -0,0 +1,40 @@ +--TEST-- +SOAP Server 21: SoapServer::setClass and __call() +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class Foo { + function __call($name, $args) { + if ($name == "test") { + return "Hello World"; + } else { + return new SoapFault("Server","Function $name doesn't exist"); + } + } +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->setclass("Foo"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server022.phpt b/ext/soap/tests/server022.phpt new file mode 100644 index 0000000..ff79a15 --- /dev/null +++ b/ext/soap/tests/server022.phpt @@ -0,0 +1,41 @@ +--TEST-- +SOAP Server 22: user fault (through throw of subclass) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class MyFault extends SoapFault { + function __construct() { + parent::__construct("MyFault","My fault string"); + } +} + + +function test() { + throw new MyFault; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org"/> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>MyFault</faultcode><faultstring>My fault string</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server023.phpt b/ext/soap/tests/server023.phpt new file mode 100644 index 0000000..5614599 --- /dev/null +++ b/ext/soap/tests/server023.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Server 23: Send SOAP headers those were not received +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test() { + global $server; + $server->addSoapHeader(new SoapHeader("http://testuri.org", "Test1", "Hello Header!")); + $server->addSoapHeader(new SoapHeader("http://testuri.org", "Test2", "Hello Header!")); + return "Hello Body!"; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org"/> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:Header><ns1:Test1>Hello Header!</ns1:Test1><ns1:Test2>Hello Header!</ns1:Test2></SOAP-ENV:Header><SOAP-ENV:Body><ns1:testResponse><return xsi:type="xsd:string">Hello Body!</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server024.phpt b/ext/soap/tests/server024.phpt new file mode 100644 index 0000000..7db3062 --- /dev/null +++ b/ext/soap/tests/server024.phpt @@ -0,0 +1,49 @@ +--TEST-- +SOAP Server 24: Send SOAP headers those were not received +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class TestHeader1 extends SoapHeader { + function __construct($data) { + parent::__construct("http://testuri.org", "Test1", $data); + } +} + +class TestHeader2 extends SoapHeader { + function __construct($data) { + parent::__construct("http://testuri.org", "Test2", $data); + } +} + +function test() { + global $server; + $server->addSoapHeader(new TestHeader1("Hello Header!")); + $server->addSoapHeader(new TestHeader2("Hello Header!")); + return "Hello Body!"; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org"/> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:Header><ns1:Test1>Hello Header!</ns1:Test1><ns1:Test2>Hello Header!</ns1:Test2></SOAP-ENV:Header><SOAP-ENV:Body><ns1:testResponse><return xsi:type="xsd:string">Hello Body!</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server025.phpt b/ext/soap/tests/server025.phpt new file mode 100644 index 0000000..ed56750 --- /dev/null +++ b/ext/soap/tests/server025.phpt @@ -0,0 +1,48 @@ +--TEST-- +SOAP Server 25: One-way SOAP headers encoding using WSDL +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestHeader1 extends SoapHeader { + function __construct($data) { + parent::__construct("http://testuri.org", "Test1", $data); + } +} + +class TestHeader2 extends SoapHeader { + function __construct($data) { + parent::__construct("http://testuri.org", "Test2", $data); + } +} + +function test() { + global $server; + $server->addSoapHeader(new TestHeader1("Hello Header!")); + $server->addSoapHeader(new TestHeader2("Hello Header!")); + return "Hello Body!"; +} + +$server = new soapserver(dirname(__FILE__)."/server025.wsdl"); +$server->addfunction("test"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org"/> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://testuri.org"><SOAP-ENV:Header><ns1:Test1 xsi:type="xsd:string">Hello Header!</ns1:Test1><ns1:Test2 xsi:type="xsd:string">Hello Header!</ns1:Test2></SOAP-ENV:Header><SOAP-ENV:Body><ns1:testResponse><result>Hello Body!</result></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server025.wsdl b/ext/soap/tests/server025.wsdl new file mode 100755 index 0000000..2870f4e --- /dev/null +++ b/ext/soap/tests/server025.wsdl @@ -0,0 +1,55 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://testuri.org"> + + <message name="TestHeader1"> + <part name="Test1" type="xsd:string" /> + </message> + <message name="TestHeader2"> + <part name="Test2" type="xsd:string" /> + </message> + + <message name="TestRequest"> + </message> + <message name="TestResponse"> + <part name="result" type="xsd:string" /> + </message> + + <portType name="TestServicePortType"> + <operation name="test"> + <input message="tns:TestRequest" /> + <output message="tns:TestResponse" /> + </operation> + </portType> + + <binding name="TestServiceBinding" type="tns:TestServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> + <operation name="test"> + <soap:operation soapAction="Test" style="rpc" /> + <input> + <soap:body namespace="http://testuri.org" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </input> + <output> + <soap:body namespace="http://testuri.org" use="literal" /> + <soap:header namespace="http://testuri.org" message="tns:TestHeader1" part="Test1" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + <soap:header namespace="http://testuri.org" message="tns:TestHeader2" part="Test2" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </output> + </operation> + </binding> + + <service name="TestService"> + <port name="TestServicePort" binding="tns:TestServiceBinding"> + <soap:address location="http://linuxsrv.home/~dmitry/soap/soap_server.php" /> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/server026.phpt b/ext/soap/tests/server026.phpt new file mode 100644 index 0000000..720ade8 --- /dev/null +++ b/ext/soap/tests/server026.phpt @@ -0,0 +1,37 @@ +--TEST-- +SOAP Server 26: setObject +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class Foo { + function test() { + return "Hello World"; + } +} + +$foo = new Foo(); +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->setObject($foo); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server027.phpt b/ext/soap/tests/server027.phpt new file mode 100644 index 0000000..9fee4a6 --- /dev/null +++ b/ext/soap/tests/server027.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP Server 27: setObject and getFunctions +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class Foo { + + function Foo() { + } + + function test() { + return $this->str; + } +} + +$foo = new Foo(); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->setObject($foo); +var_dump($server->getfunctions()); +echo "ok\n"; +?> +--EXPECT-- +array(2) { + [0]=> + string(3) "Foo" + [1]=> + string(4) "test" +} +ok diff --git a/ext/soap/tests/server028.phpt b/ext/soap/tests/server028.phpt new file mode 100644 index 0000000..4bea8eb --- /dev/null +++ b/ext/soap/tests/server028.phpt @@ -0,0 +1,41 @@ +--TEST-- +SOAP Server 28: SoapServer::setObject and __call() +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class Foo { + function __call($name, $args) { + if ($name == "test") { + return "Hello World"; + } else { + return SoapFault("Server","Function $name doesn't exist"); + } + } +} + +$foo = new Foo(); +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->setObject($foo); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server029.phpt b/ext/soap/tests/server029.phpt new file mode 100644 index 0000000..26db9fd --- /dev/null +++ b/ext/soap/tests/server029.phpt @@ -0,0 +1,55 @@ +--TEST-- +SOAP Server 29-CGI: new/addfunction/handle +--POST-- +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +--SKIPIF-- +<?php + if (php_sapi_name()=='cli') echo 'skip'; + require_once('skipif.inc'); +?> +--FILE-- +<?php + +echo "INPUT: \n"; +echo file_get_contents("php://input") . "\n"; +echo "\n\n-----------\n\n"; + +function test() { + return "Hello World"; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); +$server->handle(); +echo "ok\n"; +?> +--EXPECT-- +INPUT: +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> + + +----------- + +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok
\ No newline at end of file diff --git a/ext/soap/tests/server030.phpt b/ext/soap/tests/server030.phpt new file mode 100644 index 0000000..ed5aad8 --- /dev/null +++ b/ext/soap/tests/server030.phpt @@ -0,0 +1,53 @@ +--TEST-- +SOAP Server 30: Handling classes which extend the SPL ArrayObject or ArrayIterator as arrays in wsdl mode +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class ItemArray extends ArrayObject { + +} + +class Item { + public $text; +} + +class handlerClass { + public function getItems() + { + $items = new ItemArray(array()); + + for ($i = 0; $i < 10; $i++) { + $item = new Item(); + $item->text = 'text'.$i; + + $items[] = $item; + } + + return $items; + } +} + +$server = new SoapServer(dirname(__FILE__)."/server030.wsdl"); +$server->setClass('handlerClass'); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> + <SOAP-ENV:Body> + <getItems/> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getItemsResponse><getItemsReturn SOAP-ENC:arrayType="ns1:Item[10]" xsi:type="ns1:ItemArray"><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text0</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text1</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text2</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text3</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text4</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text5</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text6</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text7</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text8</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text9</text></item></getItemsReturn></ns1:getItemsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/server030.wsdl b/ext/soap/tests/server030.wsdl new file mode 100644 index 0000000..2139c78 --- /dev/null +++ b/ext/soap/tests/server030.wsdl @@ -0,0 +1,59 @@ +<?xml version='1.0' encoding='UTF-8'?> +<definitions + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://testuri.org" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://testuri.org"> + + <types> + <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://testuri.org"> + <xsd:complexType name="ItemArray"> + <xsd:complexContent> + <xsd:extension base="SOAP-ENC:Array"> + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Item[]"/> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + <xsd:complexType name="Item"> + <xsd:sequence> + <xsd:element name="text" type="string"/> + </xsd:sequence> + </xsd:complexType> + </xsd:schema> + </types> + + <message name="getItems"/> + <message name="getItemsResponse"> + <part name="getItemsReturn" type="tns:ItemArray"/> + </message> + + <portType name="TestServicePortType"> + <operation name="getItems"> + <input message="tns:getItems"/> + <output message="tns:getItemsResponse"/> + </operation> + </portType> + + <binding name="TestServiceBinding" type="tns:TestServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="getItems"> + <soap:operation soapAction="http://testuri.orgTestServiceAction"/> + <input/> + <output> + <soap:body namespace="http://testuri.org" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + </binding> + + <service name="TestServiceService"> + <port name="TestServicePort" binding="tns:TestServiceBinding"> + <soap:address location="http://linuxsrv.home/~dmitry/soap/soap_server.php"/> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/server031.phpt b/ext/soap/tests/server031.phpt new file mode 100644 index 0000000..2327579 --- /dev/null +++ b/ext/soap/tests/server031.phpt @@ -0,0 +1,69 @@ +--TEST-- +SOAP Server 31: Handling classes which implements Iterator +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class ItemArray implements Iterator { + private $a = array(); + + public function __construct(array $a) { + $this->a = $a; + } + + public function rewind() { return reset($this->a); } + public function current() { return current($this->a); } + public function key() { return key($this->a); } + public function next() { return next($this->a); } + public function valid() { return (current($this->a) !== false); } +} + +class Item { + public $text; + + public function __construct($n) { + $this->text = 'text'.$n; + } +} + +class handlerClass { + public function getItems() + { + return new ItemArray(array( + new Item(0), + new Item(1), + new Item(2), + new Item(3), + new Item(4), + new Item(5), + new Item(6), + new Item(7), + new Item(8), + new Item(9) + )); + } +} + +$server = new SoapServer(dirname(__FILE__)."/server030.wsdl"); +$server->setClass('handlerClass'); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> + <SOAP-ENV:Body> + <getItems/> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle($HTTP_RAW_POST_DATA); +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://testuri.org" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getItemsResponse><getItemsReturn SOAP-ENC:arrayType="ns1:Item[10]" xsi:type="ns1:ItemArray"><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text0</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text1</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text2</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text3</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text4</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text5</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text6</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text7</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text8</text></item><item xsi:type="ns1:Item"><text xsi:type="xsd:string">text9</text></item></getItemsReturn></ns1:getItemsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/setheaders.phpt b/ext/soap/tests/setheaders.phpt new file mode 100644 index 0000000..cb90d37 --- /dev/null +++ b/ext/soap/tests/setheaders.phpt @@ -0,0 +1,38 @@ +--TEST-- +SOAP: SoapClient::__setHeaders +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(NULL, array("location"=>"test://","uri"=>"test://", + "exceptions"=>0,"trace"=>1)); +$client->test(); +echo $client->__getLastRequest(); +$client->__setSoapHeaders(new SoapHeader("test://","HDR1")); +$client->test(); +echo $client->__getLastRequest(); +$client->test(); +echo $client->__getLastRequest(); +$client->__setSoapHeaders(); +$client->test(); +echo $client->__getLastRequest(); +$client->__setSoapHeaders(array(new SoapHeader("test://","HDR1"),new SoapHeader("test://","HDR2"))); +$client->test(); +echo $client->__getLastRequest(); +$h = array(new SoapHeader("test://","HDR0")); +$client->__soapCall("test", array(), null, $h); +echo $client->__getLastRequest(); +?> +--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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header><ns1:HDR1/></SOAP-ENV:Header><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header><ns1:HDR1/></SOAP-ENV:Header><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header><ns1:HDR1/><ns1:HDR2/></SOAP-ENV:Header><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope> +<?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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header><ns1:HDR0/><ns1:HDR1/><ns1:HDR2/></SOAP-ENV:Header><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/skipif.inc b/ext/soap/tests/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/soap12/T01.phpt b/ext/soap/tests/soap12/T01.phpt new file mode 100644 index 0000000..d584812 --- /dev/null +++ b/ext/soap/tests/soap12/T01.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T01 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/next">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T02.phpt b/ext/soap/tests/soap12/T02.phpt new file mode 100644 index 0000000..db2c260 --- /dev/null +++ b/ext/soap/tests/soap12/T02.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T02 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://example.org/ts-tests/C">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T03.phpt b/ext/soap/tests/soap12/T03.phpt new file mode 100644 index 0000000..19c29dd --- /dev/null +++ b/ext/soap/tests/soap12/T03.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T03 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T04.phpt b/ext/soap/tests/soap12/T04.phpt new file mode 100644 index 0000000..7445cae --- /dev/null +++ b/ext/soap/tests/soap12/T04.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T04 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T05.phpt b/ext/soap/tests/soap12/T05.phpt new file mode 100644 index 0000000..187eb2e --- /dev/null +++ b/ext/soap/tests/soap12/T05.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T05 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://example.org/ts-tests/B">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T10.phpt b/ext/soap/tests/soap12/T10.phpt new file mode 100644 index 0000000..54186f6 --- /dev/null +++ b/ext/soap/tests/soap12/T10.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T10 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver">foo</test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T11.phpt b/ext/soap/tests/soap12/T11.phpt new file mode 100644 index 0000000..3423d54 --- /dev/null +++ b/ext/soap/tests/soap12/T11.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T11 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver" + env:mustUnderstand="false">foo</test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T12.phpt b/ext/soap/tests/soap12/T12.phpt new file mode 100644 index 0000000..c67917f --- /dev/null +++ b/ext/soap/tests/soap12/T12.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T12 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver" + env:mustUnderstand="1">foo</test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:MustUnderstand</env:Value></env:Code><env:Reason><env:Text>Header not understood</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T13.phpt b/ext/soap/tests/soap12/T13.phpt new file mode 100644 index 0000000..95e1c8a --- /dev/null +++ b/ext/soap/tests/soap12/T13.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T13 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver" + env:mustUnderstand="true">foo</test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:MustUnderstand</env:Value></env:Code><env:Reason><env:Text>Header not understood</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T14.phpt b/ext/soap/tests/soap12/T14.phpt new file mode 100644 index 0000000..dbf4e1b --- /dev/null +++ b/ext/soap/tests/soap12/T14.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T14 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver" + env:mustUnderstand="wrong">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text>mustUnderstand value is not boolean</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T15.phpt b/ext/soap/tests/soap12/T15.phpt new file mode 100644 index 0000000..546f942 --- /dev/null +++ b/ext/soap/tests/soap12/T15.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T15 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:role="http://example.org/ts-tests/B" + env:mustUnderstand="1">foo</test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T19.phpt b/ext/soap/tests/soap12/T19.phpt new file mode 100644 index 0000000..8ddb5b4 --- /dev/null +++ b/ext/soap/tests/soap12/T19.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T19 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/none" + env:mustUnderstand="true">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T22.phpt b/ext/soap/tests/soap12/T22.phpt new file mode 100644 index 0000000..5844550 --- /dev/null +++ b/ext/soap/tests/soap12/T22.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T22 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:mustUnderstand = "1">foo</test:echoOk> + </env:Header> + <env:Body> + <test:echoOk xmlns:test="http://example.org/ts-tests">foo</test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body><ns1:responseOk>foo</ns1:responseOk></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T23.phpt b/ext/soap/tests/soap12/T23.phpt new file mode 100644 index 0000000..c676fb1 --- /dev/null +++ b/ext/soap/tests/soap12/T23.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T23 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="1">foo</test:Unknown> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="wrong">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text>mustUnderstand value is not boolean</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T24.phpt b/ext/soap/tests/soap12/T24.phpt new file mode 100644 index 0000000..ebee3b7 --- /dev/null +++ b/ext/soap/tests/soap12/T24.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP 1.2: T24 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://wrong-version/"> + <env:Body> + <test:echoOk xmlns:test="http://example.org/ts-tests"> + foo + </test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:VersionMismatch</env:Value></env:Code><env:Reason><env:Text>Wrong Version</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T25.phpt b/ext/soap/tests/soap12/T25.phpt new file mode 100644 index 0000000..ac45e9c --- /dev/null +++ b/ext/soap/tests/soap12/T25.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T25 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<!DOCTYPE env:Envelope SYSTEM "env.dtd"[]> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Body> + <test:echoOk xmlns:test="http://example.org/ts-tests"> + foo + </test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>DTD are not supported by SOAP</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T26.phpt b/ext/soap/tests/soap12/T26.phpt new file mode 100644 index 0000000..53c8cec --- /dev/null +++ b/ext/soap/tests/soap12/T26.phpt @@ -0,0 +1,21 @@ +--TEST-- +SOAP 1.2: T26 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> +<?xml-stylesheet href="http://example.org/ts-tests/sub.xsl" type = "text/xsl"?> + <env:Body> + <test:echoOk xmlns:test="http://example.org/ts-tests">foo</test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Body><ns1:responseOk>foo</ns1:responseOk></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T27.phpt b/ext/soap/tests/soap12/T27.phpt new file mode 100644 index 0000000..6371113 --- /dev/null +++ b/ext/soap/tests/soap12/T27.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T27 echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <env:Body> + <test:echoStringArray xmlns:test="http://example.org/ts-tests" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <test:array enc:itemType="xs:string" enc:arraySize="1"> + <a> + <b>1</b> + </a> + </test:array> + </test:echoStringArray> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>SOAP-ERROR: Encoding: Violation of encoding rules</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> + diff --git a/ext/soap/tests/soap12/T28.phpt b/ext/soap/tests/soap12/T28.phpt new file mode 100644 index 0000000..6118b47 --- /dev/null +++ b/ext/soap/tests/soap12/T28.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T28 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Body env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <test:echoOk xmlns:test="http://example.org/ts-tests" > + foo + </test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text>encodingStyle cannot be specified on the Body</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> + diff --git a/ext/soap/tests/soap12/T29.phpt b/ext/soap/tests/soap12/T29.phpt new file mode 100644 index 0000000..3784da4 --- /dev/null +++ b/ext/soap/tests/soap12/T29.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T29 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://example.org/ts-tests/Czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T30.phpt b/ext/soap/tests/soap12/T30.phpt new file mode 100644 index 0000000..c2e008e --- /dev/null +++ b/ext/soap/tests/soap12/T30.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP 1.2: T30 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> + <env:Body> + <test:echoOk xmlns:test="http://example.org/ts-tests">foo</test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://example.org/ts-tests"><SOAP-ENV:Body><ns1:responseOk>foo</ns1:responseOk></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/soap12/T31.phpt b/ext/soap/tests/soap12/T31.phpt new file mode 100644 index 0000000..04f0353 --- /dev/null +++ b/ext/soap/tests/soap12/T31.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T31 returnVoid +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Body> + <test:returnVoid xmlns:test="http://example.org/ts-tests"> + </test:returnVoid> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body><ns1:returnVoidResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"/></env:Body></env:Envelope> +ok + diff --git a/ext/soap/tests/soap12/T32.phpt b/ext/soap/tests/soap12/T32.phpt new file mode 100644 index 0000000..8f77873 --- /dev/null +++ b/ext/soap/tests/soap12/T32.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T32 echoHeader +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:requiredHeader xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="true">foo</test:requiredHeader> + </env:Header> + <env:Body> + <test:echoHeader xmlns:test="http://example.org/ts-tests"> + </test:echoHeader> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Body><ns1:echoHeaderResponse>foo</ns1:echoHeaderResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T33.phpt b/ext/soap/tests/soap12/T33.phpt new file mode 100644 index 0000000..00ded87 --- /dev/null +++ b/ext/soap/tests/soap12/T33.phpt @@ -0,0 +1,20 @@ +--TEST-- +SOAP 1.2: T33 nonexistentMethod +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Body> + <test:DoesNotExist xmlns:test="http://example.org/ts-tests"> + </test:DoesNotExist> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>rpc:ProcedureNotPresent</env:Value></env:Code><env:Reason><env:Text>Procedure not present</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T34.phpt b/ext/soap/tests/soap12/T34.phpt new file mode 100644 index 0000000..39e0095 --- /dev/null +++ b/ext/soap/tests/soap12/T34.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T34 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + xmlns:env1="http://schemas.xmlsoap.org/soap/envelope/" + env1:mustUnderstand="true">foo</test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T35.phpt b/ext/soap/tests/soap12/T35.phpt new file mode 100644 index 0000000..a736010 --- /dev/null +++ b/ext/soap/tests/soap12/T35.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T35 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="1"> + foo + </test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:MustUnderstand</env:Value></env:Code><env:Reason><env:Text>Header not understood</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T36.phpt b/ext/soap/tests/soap12/T36.phpt new file mode 100644 index 0000000..d625813 --- /dev/null +++ b/ext/soap/tests/soap12/T36.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T36 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="1" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver">foo</test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:MustUnderstand</env:Value></env:Code><env:Reason><env:Text>Header not understood</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T37.phpt b/ext/soap/tests/soap12/T37.phpt new file mode 100644 index 0000000..cdce8a4 --- /dev/null +++ b/ext/soap/tests/soap12/T37.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T37 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver">foo</test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T38_1.phpt b/ext/soap/tests/soap12/T38_1.phpt new file mode 100644 index 0000000..30007e5 --- /dev/null +++ b/ext/soap/tests/soap12/T38_1.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP 1.2: T38.1 doubleHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="false" + env:role="http://example.org/ts-tests/C">foo</test:Unknown> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="0" + env:role="http://example.org/ts-tests/C">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T38_2.phpt b/ext/soap/tests/soap12/T38_2.phpt new file mode 100644 index 0000000..efff2f4 --- /dev/null +++ b/ext/soap/tests/soap12/T38_2.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP 1.2: T38.2 doubleHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="true" + env:role="http://example.org/ts-tests/C">foo</test:echoOk> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="1" + env:role="http://example.org/ts-tests/C">bar</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk><ns1:responseOk>bar</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T39.phpt b/ext/soap/tests/soap12/T39.phpt new file mode 100644 index 0000000..2b29562 --- /dev/null +++ b/ext/soap/tests/soap12/T39.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T39 unknownHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://example.org/ts-tests" + env:mustUnderstand="9">foo</test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text>mustUnderstand value is not boolean</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T40.phpt b/ext/soap/tests/soap12/T40.phpt new file mode 100644 index 0000000..27b4a21 --- /dev/null +++ b/ext/soap/tests/soap12/T40.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP 1.2: T40 echoOK +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:Unknown xmlns:test="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver" + env:mustUnderstand="false"> + foo + </test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body/></env:Envelope> +ok
\ No newline at end of file diff --git a/ext/soap/tests/soap12/T41.phpt b/ext/soap/tests/soap12/T41.phpt new file mode 100644 index 0000000..f874adc --- /dev/null +++ b/ext/soap/tests/soap12/T41.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP 1.2: T41 echoStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoStruct xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStruct xsi:type="ns1:SOAPStruct" + xmlns:ns1="http://example.org/ts-tests/xsd"> + <varInt xsi:type="xsd:int">42</varInt> + <varFloat xsi:type="xsd:float">0.005</varFloat> + <varString xsi:type="xsd:string">hello world</varString> + </inputStruct> + </test:echoStruct> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://example.org/ts-tests/xsd" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoStructResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">hello world</varString><varInt xsi:type="xsd:int">42</varInt><varFloat xsi:type="xsd:float">0.005</varFloat></return></ns1:echoStructResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T42.phpt b/ext/soap/tests/soap12/T42.phpt new file mode 100644 index 0000000..e45d42b --- /dev/null +++ b/ext/soap/tests/soap12/T42.phpt @@ -0,0 +1,41 @@ +--TEST-- +SOAP 1.2: T42 echoStructArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoStructArray xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStructArray enc:itemType="ns1:SOAPStruct" + enc:arraySize="2" + xmlns:ns1="http://example.org/ts-tests/xsd" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <item xsi:type="ns1:SOAPStruct"> + <varInt xsi:type="xsd:int">42</varInt> + <varFloat xsi:type="xsd:float">0.005</varFloat> + <varString xsi:type="xsd:string">hello world</varString> + </item> + <item xsi:type="ns1:SOAPStruct"> + <varInt xsi:type="xsd:int">43</varInt> + <varFloat xsi:type="xsd:float">0.123</varFloat> + <varString xsi:type="xsd:string">bye world</varString> + </item> + </inputStructArray> + </test:echoStructArray> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:ns2="http://example.org/ts-tests/xsd" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoStructArrayResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return enc:itemType="ns2:SOAPStruct" enc:arraySize="2" xsi:type="ns2:ArrayOfSOAPStruct"><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">hello world</varString><varInt xsi:type="xsd:int">42</varInt><varFloat xsi:type="xsd:float">0.005</varFloat></item><item xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">bye world</varString><varInt xsi:type="xsd:int">43</varInt><varFloat xsi:type="xsd:float">0.123</varFloat></item></return></ns1:echoStructArrayResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T43.phpt b/ext/soap/tests/soap12/T43.phpt new file mode 100644 index 0000000..7dd6316 --- /dev/null +++ b/ext/soap/tests/soap12/T43.phpt @@ -0,0 +1,30 @@ +--TEST-- +SOAP 1.2: T43 echoStructAsSimpleTypes +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoStructAsSimpleTypes xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStruct xsi:type="ns1:SOAPStruct" + xmlns:ns1="http://example.org/ts-tests/xsd"> + <varInt xsi:type="xsd:int">42</varInt> + <varFloat xsi:type="xsd:float">0.005</varFloat> + <varString xsi:type="xsd:string">hello world</varString> + </inputStruct> + </test:echoStructAsSimpleTypes> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body><ns1:echoStructAsSimpleTypesResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><outputString xsi:type="xsd:string">hello world</outputString><outputInteger xsi:type="xsd:int">42</outputInteger><outputFloat xsi:type="xsd:float">0.005</outputFloat></ns1:echoStructAsSimpleTypesResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T44.phpt b/ext/soap/tests/soap12/T44.phpt new file mode 100644 index 0000000..3e307c1 --- /dev/null +++ b/ext/soap/tests/soap12/T44.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP 1.2: T44 echoSimpleTypesAsStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoSimpleTypesAsStruct xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputInt xsi:type="xsd:int">42</inputInt> + <inputFloat xsi:type="xsd:float">0.005</inputFloat> + <inputString xsi:type="xsd:string">hello world</inputString> + </test:echoSimpleTypesAsStruct> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://example.org/ts-tests/xsd" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoSimpleTypesAsStructResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">hello world</varString><varInt xsi:type="xsd:int">42</varInt><varFloat xsi:type="xsd:float">0.005</varFloat></return></ns1:echoSimpleTypesAsStructResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T45.phpt b/ext/soap/tests/soap12/T45.phpt new file mode 100644 index 0000000..24db941 --- /dev/null +++ b/ext/soap/tests/soap12/T45.phpt @@ -0,0 +1,35 @@ +--TEST-- +SOAP 1.2: T45 echoNestedStruct +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoNestedStruct xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStruct xsi:type="ns1:SOAPStructStruct" + xmlns:ns1="http://example.org/ts-tests/xsd"> + <varInt xsi:type="xsd:int">42</varInt> + <varFloat xsi:type="xsd:float">0.005</varFloat> + <varString xsi:type="xsd:string">hello world</varString> + <varStruct xsi:type="ns1:SOAPStruct"> + <varInt xsi:type="xsd:int">99</varInt> + <varFloat xsi:type="xsd:float">5.5</varFloat> + <varString xsi:type="xsd:string">nested struct</varString> + </varStruct> + </inputStruct> + </test:echoNestedStruct> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://example.org/ts-tests/xsd" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoNestedStructResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="ns2:SOAPStructStruct"><varString xsi:type="xsd:string">hello world</varString><varInt xsi:type="xsd:int">42</varInt><varFloat xsi:type="xsd:float">0.005</varFloat><varStruct xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">nested struct</varString><varInt xsi:type="xsd:int">99</varInt><varFloat xsi:type="xsd:float">5.5</varFloat></varStruct></return></ns1:echoNestedStructResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T46.phpt b/ext/soap/tests/soap12/T46.phpt new file mode 100644 index 0000000..8098ef7 --- /dev/null +++ b/ext/soap/tests/soap12/T46.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP 1.2: T46 echoNestedArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoNestedArray xmlns:test="http://exaple.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStruct xsi:type="ns1:SOAPArrayStruct" + xmlns:ns1="http://example.org/ts-tests/xsd"> + <varInt xsi:type="xsd:int">42</varInt> + <varFloat xsi:type="xsd:float">0.005</varFloat> + <varString xsi:type="xsd:string">hello world</varString> + <varArray enc:itemType="xsd:string" enc:arraySize="3" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <item xsi:type="xsd:string">red</item> + <item xsi:type="xsd:string">blue</item> + <item xsi:type="xsd:string">green</item> + </varArray> + </inputStruct> + </test:echoNestedArray> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:ns2="http://example.org/ts-tests/xsd"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoNestedArrayResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="ns2:SOAPArrayStruct"><varString xsi:type="xsd:string">hello world</varString><varInt xsi:type="xsd:int">42</varInt><varFloat xsi:type="xsd:float">0.005</varFloat><varArray enc:itemType="xsd:string" enc:arraySize="3" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">red</item><item xsi:type="xsd:string">blue</item><item xsi:type="xsd:string">green</item></varArray></return></ns1:echoNestedArrayResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T47.phpt b/ext/soap/tests/soap12/T47.phpt new file mode 100644 index 0000000..a449d20 --- /dev/null +++ b/ext/soap/tests/soap12/T47.phpt @@ -0,0 +1,31 @@ +--TEST-- +SOAP 1.2: T47 echoFloatArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +precision=14 +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoFloatArray xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputFloatArray enc:itemType="xsd:float" enc:arraySize="2" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <item xsi:type="xsd:float">5.5</item> + <item xsi:type="xsd:float">12999.9</item> + </inputFloatArray> + </test:echoFloatArray> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://example.org/ts-tests/xsd"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoFloatArrayResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return enc:itemType="xsd:float" enc:arraySize="2" xsi:type="ns2:ArrayOffloat"><item xsi:type="xsd:float">5.5</item><item xsi:type="xsd:float">12999.9</item></return></ns1:echoFloatArrayResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T48.phpt b/ext/soap/tests/soap12/T48.phpt new file mode 100644 index 0000000..f7cf0fe --- /dev/null +++ b/ext/soap/tests/soap12/T48.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T48 echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoStringArray xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStringArray enc:itemType="xsd:string" enc:arraySize="2" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <item xsi:type="xsd:string">hello</item> + <item xsi:type="xsd:string">world</item> + </inputStringArray> + </test:echoStringArray> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://example.org/ts-tests/xsd"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoStringArrayResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return enc:itemType="xsd:string" enc:arraySize="2" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">hello</item><item xsi:type="xsd:string">world</item></return></ns1:echoStringArrayResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T49.phpt b/ext/soap/tests/soap12/T49.phpt new file mode 100644 index 0000000..9687d03 --- /dev/null +++ b/ext/soap/tests/soap12/T49.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T49 echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoStringArray xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStringArray enc:arraySize="2" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <item xsi:type="xsd:string">hello</item> + <item xsi:type="xsd:string">world</item> + </inputStringArray> + </test:echoStringArray> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://example.org/ts-tests/xsd"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoStringArrayResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return enc:itemType="xsd:string" enc:arraySize="2" xsi:type="ns2:ArrayOfstring"><item xsi:type="xsd:string">hello</item><item xsi:type="xsd:string">world</item></return></ns1:echoStringArrayResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T50.phpt b/ext/soap/tests/soap12/T50.phpt new file mode 100644 index 0000000..e3fcc0c --- /dev/null +++ b/ext/soap/tests/soap12/T50.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T50 echoIntegerArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoIntegerArray xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputIntegerArray enc:itemType="xsd:int" enc:arraySize="2" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <item xsi:type="xsd:int">100</item> + <item xsi:type="xsd:int">200</item> + </inputIntegerArray> + </test:echoIntegerArray> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://example.org/ts-tests/xsd"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoIntegerArrayResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return enc:itemType="xsd:int" enc:arraySize="2" xsi:type="ns2:ArrayOfint"><item xsi:type="xsd:int">100</item><item xsi:type="xsd:int">200</item></return></ns1:echoIntegerArrayResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T51.phpt b/ext/soap/tests/soap12/T51.phpt new file mode 100644 index 0000000..9776576 --- /dev/null +++ b/ext/soap/tests/soap12/T51.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP 1.2: T51 echoBase64 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <env:Body> + <test:echoBase64 xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputBase64 xsi:type="xsd:base64Binary"> + YUdWc2JHOGdkMjl5YkdRPQ== + </inputBase64> + </test:echoBase64> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoBase64Response env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:base64Binary">YUdWc2JHOGdkMjl5YkdRPQ==</return></ns1:echoBase64Response></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T52.phpt b/ext/soap/tests/soap12/T52.phpt new file mode 100644 index 0000000..9d75fb9 --- /dev/null +++ b/ext/soap/tests/soap12/T52.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T52 echoBoolean +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoBoolean xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputBoolean xsi:type="xsd:boolean">1</inputBoolean> + </test:echoBoolean> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoBooleanResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:boolean">true</return></ns1:echoBooleanResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T53.phpt b/ext/soap/tests/soap12/T53.phpt new file mode 100644 index 0000000..c1c8fe6 --- /dev/null +++ b/ext/soap/tests/soap12/T53.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T53 echoDate +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoDate xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputDate xsi:type="xsd:date">1956-10-18T22:20:00-07:00</inputDate> + </test:echoDate> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoDateResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:dateTime">1956-10-18T22:20:00-07:00</return></ns1:echoDateResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T54.phpt b/ext/soap/tests/soap12/T54.phpt new file mode 100644 index 0000000..ba3ed35 --- /dev/null +++ b/ext/soap/tests/soap12/T54.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T54 echoDecimal +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoDecimal xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputDecimal xsi:type="xsd:decimal">123.45678901234567890</inputDecimal> + </test:echoDecimal> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoDecimalResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:decimal">123.45678901234567890</return></ns1:echoDecimalResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T55.phpt b/ext/soap/tests/soap12/T55.phpt new file mode 100644 index 0000000..1c12e50 --- /dev/null +++ b/ext/soap/tests/soap12/T55.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T55 echoFloat +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoFloat xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputFloat xsi:type="xsd:float">0.005</inputFloat> + </test:echoFloat> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoFloatResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:float">0.005</return></ns1:echoFloatResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T56.phpt b/ext/soap/tests/soap12/T56.phpt new file mode 100644 index 0000000..ca13427 --- /dev/null +++ b/ext/soap/tests/soap12/T56.phpt @@ -0,0 +1,34 @@ +--TEST-- +SOAP 1.2: T56 echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <env:Header> + <test:DataHolder xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <test:Data enc:id="data-1" xsi:type="xsd:string"> + hello world + </test:Data> + </test:DataHolder> + </env:Header> + <env:Body> + <test:echoString xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputString enc:ref="#data-2" xsi:type="xsd:string" /> + </test:echoString> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>SOAP-ERROR: Encoding: Unresolved reference '#data-2'</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> + diff --git a/ext/soap/tests/soap12/T57.phpt b/ext/soap/tests/soap12/T57.phpt new file mode 100644 index 0000000..ad3e9ef --- /dev/null +++ b/ext/soap/tests/soap12/T57.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP 1.2: T57 echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <env:Header> + <test:DataHolder xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <test:Data enc:id="data" xsi:type="xsd:string">hello world</test:Data> + </test:DataHolder> + </env:Header> + <env:Body> + <test:echoString xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <test:inputString enc:ref="#data" xsi:type="xsd:string" /> + </test:echoString> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoStringResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:string">hello world</return></ns1:echoStringResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T58.phpt b/ext/soap/tests/soap12/T58.phpt new file mode 100644 index 0000000..1c3e8ba --- /dev/null +++ b/ext/soap/tests/soap12/T58.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP 1.2: T58 echoIntegerArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoIntegerArray xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputIntegerArray enc:itemType="xsd:int" enc:arraySize="1" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <a><b>1</b></a> + </inputIntegerArray> + </test:echoIntegerArray> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>SOAP-ERROR: Encoding: Violation of encoding rules</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> + diff --git a/ext/soap/tests/soap12/T59.phpt b/ext/soap/tests/soap12/T59.phpt new file mode 100644 index 0000000..2ceef32 --- /dev/null +++ b/ext/soap/tests/soap12/T59.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP 1.2: T59 echoStringArray +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoStringArray xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStringArray enc:itemType="xsd:string" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <item enc:id="data" xsi:type="xsd:string" enc:ref="#data">hello</item> + <item>world</item> + </inputStringArray> + </test:echoStringArray> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>SOAP-ERROR: Encoding: Violation of id and ref information items '#data'</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T60.phpt b/ext/soap/tests/soap12/T60.phpt new file mode 100644 index 0000000..234ef4c --- /dev/null +++ b/ext/soap/tests/soap12/T60.phpt @@ -0,0 +1,29 @@ +--TEST-- +SOAP 1.2: T60 countItems +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:countItems xmlns:test="http://example.org/ts-tests" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStringArray enc:itemType="xsd:string" enc:arraySize="*"> + <item xsi:type="xsd:string">hello</item> + <item xsi:type="xsd:string">world</item> + </inputStringArray> + </test:countItems> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:countItemsResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:int">2</return></ns1:countItemsResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T61.phpt b/ext/soap/tests/soap12/T61.phpt new file mode 100644 index 0000000..b688a79 --- /dev/null +++ b/ext/soap/tests/soap12/T61.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP 1.2: T61 countItems +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:countItems xmlns:test="http://example.org/ts-tests" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputStringArray enc:itemType="xsd:string" enc:arraySize="2 *"> + <item xsi:type="xsd:string">hello</item> + <item xsi:type="xsd:string">world</item> + </inputStringArray> + </test:countItems> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>SOAP-ERROR: Encoding: '*' may only be first arraySize value in list</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T63.phpt b/ext/soap/tests/soap12/T63.phpt new file mode 100644 index 0000000..5a41ef0 --- /dev/null +++ b/ext/soap/tests/soap12/T63.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T63 validateCountryCode +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:validateCountryCode xmlns:test="http://example.org/ts-tests" + env:role="http://example.org/ts-tests/C" + env:mustUnderstand="1">ABCD</test:validateCountryCode> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> + +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:validateCountryCodeFault>Country code must be 2 letters.</ns1:validateCountryCodeFault></env:Header><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text>Not a valid country code</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T64.phpt b/ext/soap/tests/soap12/T64.phpt new file mode 100644 index 0000000..24e62ec --- /dev/null +++ b/ext/soap/tests/soap12/T64.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T64 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<!DOCTYPE DOC [ +<!NOTATION application_xml SYSTEM 'http://www.isi.edu/in-notes/iana/assignments/media-types/application/xml'> +]> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Body> + <test:echoOk xmlns:test="http://example.org/ts-tests"> + foo + </test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>DTD are not supported by SOAP</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T65.phpt b/ext/soap/tests/soap12/T65.phpt new file mode 100644 index 0000000..cd96d4a --- /dev/null +++ b/ext/soap/tests/soap12/T65.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP 1.2: T65 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<!DOCTYPE DOC [ +<!ELEMENT Envelope (Body) > +<!ELEMENT Body (echoOk) > +<!ELEMENT echoOk (#PCDATA) > +]> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Body> + <test:echoOk xmlns:test="http://example.org/ts-tests"> + foo + </test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value></env:Code><env:Reason><env:Text>DTD are not supported by SOAP</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T66.phpt b/ext/soap/tests/soap12/T66.phpt new file mode 100644 index 0000000..cc7cc2e --- /dev/null +++ b/ext/soap/tests/soap12/T66.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T66 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' encoding='UTF8'?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/next">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T67.phpt b/ext/soap/tests/soap12/T67.phpt new file mode 100644 index 0000000..ddc527a --- /dev/null +++ b/ext/soap/tests/soap12/T67.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T67 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' standalone='yes'?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/next">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T68.phpt b/ext/soap/tests/soap12/T68.phpt new file mode 100644 index 0000000..a791519 --- /dev/null +++ b/ext/soap/tests/soap12/T68.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP 1.2: T68 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + + + <env:Header > + + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/next" >foo</test:echoOk> + + + </env:Header> + <env:Body> + + + </env:Body> + + + +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T69.phpt b/ext/soap/tests/soap12/T69.phpt new file mode 100644 index 0000000..0fb02de --- /dev/null +++ b/ext/soap/tests/soap12/T69.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP 1.2: T69 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests">foo</test:echoOk> + </env:Header> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text>Body must be present in a SOAP envelope</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T70.phpt b/ext/soap/tests/soap12/T70.phpt new file mode 100644 index 0000000..3622c32 --- /dev/null +++ b/ext/soap/tests/soap12/T70.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T70 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> + <Trailer> + </Trailer> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text>A SOAP 1.2 envelope can contain only Header and Body</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T71.phpt b/ext/soap/tests/soap12/T71.phpt new file mode 100644 index 0000000..fdb5b8d --- /dev/null +++ b/ext/soap/tests/soap12/T71.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T71 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + attr1="a-value"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests"> + foo + </test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text>A SOAP Envelope element cannot have non Namespace qualified attributes</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T72.phpt b/ext/soap/tests/soap12/T72.phpt new file mode 100644 index 0000000..b8f5060 --- /dev/null +++ b/ext/soap/tests/soap12/T72.phpt @@ -0,0 +1,22 @@ +--TEST-- +SOAP 1.2: T72 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <env:Body> + <test:echoOk xmlns:test="http://example.org/ts-tests"> + foo + </test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text>encodingStyle cannot be specified on the Envelope</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/T73.phpt b/ext/soap/tests/soap12/T73.phpt new file mode 100644 index 0000000..9143e58 --- /dev/null +++ b/ext/soap/tests/soap12/T73.phpt @@ -0,0 +1,26 @@ +--TEST-- +SOAP 1.2: T73 echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoString xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <test:inputString xsi:type="xsd:string" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">hello world</test:inputString> + </test:echoString> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoStringResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:string">hello world</return></ns1:echoStringResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T74.phpt b/ext/soap/tests/soap12/T74.phpt new file mode 100644 index 0000000..703e187 --- /dev/null +++ b/ext/soap/tests/soap12/T74.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP 1.2: T74 doubleHdr +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/next">foo</test:echoOk> + <test:Unknown xmlns:test="http://example.org/ts-tests"> + <test:raiseFault env:mustUnderstand="1" + env:role="http://www.w3.org/2003/05/soap-envelope/role/next"> + </test:raiseFault> + </test:Unknown> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T75.phpt b/ext/soap/tests/soap12/T75.phpt new file mode 100644 index 0000000..3e2166d --- /dev/null +++ b/ext/soap/tests/soap12/T75.phpt @@ -0,0 +1,28 @@ +--TEST-- +SOAP 1.2: T75 echoResolvedRef +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoResolvedRef xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/next" + env:mustUnderstand="1"> + <test:RelativeReference xml:base="http://example.org/today/" + xlink:href="new.xml" + xmlns:xlink="http://www.w3.org/1999/xlink" /> + </test:echoResolvedRef> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseResolvedRef>http://example.org/today/new.xml</ns1:responseResolvedRef></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T76_1.phpt b/ext/soap/tests/soap12/T76_1.phpt new file mode 100644 index 0000000..e97c179 --- /dev/null +++ b/ext/soap/tests/soap12/T76_1.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T76.1 echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:echoString xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputString xsi:type="xsd:string">hello world</inputString> + </test:echoString> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoStringResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:string">hello world</return></ns1:echoStringResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T76_2.phpt b/ext/soap/tests/soap12/T76_2.phpt new file mode 100644 index 0000000..cc6ea0d --- /dev/null +++ b/ext/soap/tests/soap12/T76_2.phpt @@ -0,0 +1,32 @@ +--TEST-- +SOAP 1.2: T76.2 echoString +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> + <env:Header> + <test:DataHolder xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <test:Data enc:id="data" xsi:type="xsd:string">hello world</test:Data> + </test:DataHolder> + </env:Header> + <env:Body> + <test:echoString xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputString enc:ref="data" xsi:type="xsd:string" /> + </test:echoString> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoStringResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:string">hello world</return></ns1:echoStringResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T77_1.phpt b/ext/soap/tests/soap12/T77_1.phpt new file mode 100644 index 0000000..d847b6c --- /dev/null +++ b/ext/soap/tests/soap12/T77_1.phpt @@ -0,0 +1,25 @@ +--TEST-- +SOAP 1.2: T77.1 isNil +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:isNil xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputString xsi:nil="1" /> + </test:isNil> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:isNilResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:boolean">true</return></ns1:isNilResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T77_2.phpt b/ext/soap/tests/soap12/T77_2.phpt new file mode 100644 index 0000000..c829b57 --- /dev/null +++ b/ext/soap/tests/soap12/T77_2.phpt @@ -0,0 +1,24 @@ +--TEST-- +SOAP 1.2: T77.2 isNil +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:isNil xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + </test:isNil> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:isNilResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:boolean">true</return></ns1:isNilResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T77_3.phpt b/ext/soap/tests/soap12/T77_3.phpt new file mode 100644 index 0000000..0e1355a --- /dev/null +++ b/ext/soap/tests/soap12/T77_3.phpt @@ -0,0 +1,27 @@ +--TEST-- +SOAP 1.2: T77.3 isNul +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <env:Body> + <test:isNil xmlns:test="http://example.org/ts-tests" + env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> + <inputString xsi:type="xsd:string"> + This is a string + </inputString> + </test:isNil> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:isNilResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:boolean">false</return></ns1:isNilResponse></env:Body></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T78.phpt b/ext/soap/tests/soap12/T78.phpt new file mode 100644 index 0000000..63d13c7 --- /dev/null +++ b/ext/soap/tests/soap12/T78.phpt @@ -0,0 +1,23 @@ +--TEST-- +SOAP 1.2: T78 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version='1.0' ?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Header> + <test:echoOk xmlns:test="http://example.org/ts-tests" + env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver">foo</test:echoOk> + </env:Header> + <env:Body> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests"><env:Header><ns1:responseOk>foo</ns1:responseOk></env:Header><env:Body/></env:Envelope> +ok diff --git a/ext/soap/tests/soap12/T80.phpt b/ext/soap/tests/soap12/T80.phpt new file mode 100644 index 0000000..1ac114b --- /dev/null +++ b/ext/soap/tests/soap12/T80.phpt @@ -0,0 +1,19 @@ +--TEST-- +SOAP 1.2: T80 echoOk +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> + <env:Body> + <test:echoOk xmlns:test="http://example.org/ts-tests" env:encodingStyle="http://example.org/PoisonEncoding">foo</test:echoOk> + </env:Body> +</env:Envelope> +EOF; +include "soap12-test.inc"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:DataEncodingUnknown</env:Value></env:Code><env:Reason><env:Text>Unknown Data Encoding Style</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> diff --git a/ext/soap/tests/soap12/skipif.inc b/ext/soap/tests/soap12/skipif.inc new file mode 100644 index 0000000..fa8574e --- /dev/null +++ b/ext/soap/tests/soap12/skipif.inc @@ -0,0 +1,3 @@ +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> diff --git a/ext/soap/tests/soap12/soap12-test.inc b/ext/soap/tests/soap12/soap12-test.inc new file mode 100644 index 0000000..fbdc855 --- /dev/null +++ b/ext/soap/tests/soap12/soap12-test.inc @@ -0,0 +1,131 @@ +<?php +class Soap12test { + public $header; + + function echoOk($x) { + return $x; + } + + function echoString($inputString) { + return $inputString; + } + + function echoStringArray($inputStringArray) { + return $inputStringArray; + } + + function echoInteger($inputInteger) { + return $inputInteger; + } + + function echoIntegerArray($inputIntegerArray) { + return $inputIntegerArray; + } + + function echoFloat($inputFloat) { + return $inputFloat; + } + + function echoFloatArray($inputFloatArray) { + return $inputFloatArray; + } + + function echoStruct($x) { + return $x; + } + + function echoStructArray($x) { + return $x; + } + + function echoVoid() { + return NULL; + } + + function echoBase64($b_encoded) { + return $b_encoded; + } + + function echoDate($timeInstant) { + return $timeInstant; + } + + function echoHexBinary($hb) { + return $hb; + } + + function echoDecimal($dec) { + return $dec; + } + + function echoBoolean($boolean) { + return $boolean; + } + + function echoStructAsSimpleTypes ($struct) { + return array('outputString' => $struct->varString, + 'outputInteger' => $struct->varInt, + 'outputFloat' => $struct->varFloat); + } + + function echoSimpleTypesAsStruct($string, $int, $float) { + return (object)array("varString" => $string, + "varInt" => $int, + "varFloat" => $float); + } + + function echoNestedStruct($struct) { + return $struct; + } + + function echo2DStringArray($ary) { + return $ary; + } + + function echoNestedArray($ary) { + return $ary; + } + + function countItems($input) { + return count($input); + } + + function isNil($input) { + return is_null($input); + } + + function returnVoid() { + } + + function emptyBody() { + } + + function requiredHeader($x) { + $this->header = $x; + } + + function echoHeader() { + return $this->header; + } + + function echoResolvedRef($ref) { + return $ref->RelativeReference->base.$ref->RelativeReference->href; + } + + function validateCountryCode($code) { + if (strlen($code) != 2) { + return new SoapFault("Client", "Not a valid country code", NULL, NULL, NULL, new SoapHeader("http://example.org/ts-tests", "validateCountryCodeFault", "Country code must be 2 letters.")); + } else { + return "OK"; + } + } + +} + +ini_set("soap.wsdl_cache_enabled",0); +$server = new soapserver(dirname(__FILE__)."/soap12-test.wsdl", array('soap_version'=>SOAP_1_2,'actor'=>"http://example.org/ts-tests/C")); +$server->setClass("Soap12test"); + +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> diff --git a/ext/soap/tests/soap12/soap12-test.wsdl b/ext/soap/tests/soap12/soap12-test.wsdl new file mode 100644 index 0000000..d1679b4 --- /dev/null +++ b/ext/soap/tests/soap12/soap12-test.wsdl @@ -0,0 +1,771 @@ +<?xml version="1.0"?>
+
+<definitions name="SOAP-12-TestDefinitions"
+ targetNamespace="http://whitemesa.net/wsdl/soap12-test"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:enc="http://www.w3.org/2003/05/soap-encoding"
+ xmlns:tns="http://whitemesa.net/wsdl/soap12-test"
+ xmlns:types="http://example.org/ts-tests/xsd"
+ xmlns:test="http://example.org/ts-tests"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:enc11="http://schemas.xmlsoap.org/soap/encoding/">
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.org/ts-tests/xsd">
+
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
+
+ <complexType name="ArrayOfstring">
+ <complexContent>
+ <restriction base="enc11:Array">
+ <attribute ref="enc11:arrayType" wsdl:arrayType="xsd:string[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ArrayOfint">
+ <complexContent>
+ <restriction base="enc11:Array">
+ <attribute ref="enc11:arrayType" wsdl:arrayType="xsd:int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ArrayOffloat">
+ <complexContent>
+ <restriction base="enc11:Array">
+ <attribute ref="enc11:arrayType" wsdl:arrayType="xsd:float[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ArrayOfSOAPStruct">
+ <complexContent>
+ <restriction base="enc11:Array">
+ <attribute ref="enc11:arrayType" wsdl:arrayType="types:SOAPStruct[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="SOAPStruct">
+ <all>
+ <element name="varString" type="xsd:string"/>
+ <element name="varInt" type="xsd:int"/>
+ <element name="varFloat" type="xsd:float"/>
+ </all>
+ </complexType>
+ <complexType name="SOAPStructStruct">
+ <all>
+ <element name="varString" type="xsd:string"/>
+ <element name="varInt" type="xsd:int"/>
+ <element name="varFloat" type="xsd:float"/>
+ <element name="varStruct" type="types:SOAPStruct"/>
+ </all>
+ </complexType>
+
+ <complexType name="SOAPArrayStruct">
+ <all>
+ <element name="varString" type="xsd:string"/>
+ <element name="varInt" type="xsd:int"/>
+ <element name="varFloat" type="xsd:float"/>
+ <element name="varArray" type="types:ArrayOfstring"/>
+ </all>
+ </complexType>
+
+ <!-- unknown header block type -->
+ <complexType name="UnknownType">
+ <sequence>
+ <element minOccurs="0" maxOccurs="1" name="stringValue" type="xsd:string" />
+ </sequence>
+ </complexType>
+
+ </schema>
+
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ targetNamespace="http://example.org/ts-tests">
+
+ <import namespace="http://www.w3.org/1999/xlink" />
+ <import namespace="http://example.org/ts-tests/xsd" />
+
+ <!-- 3.2.1 echoOk -->
+ <element name="echoOk" type="xsd:string"/>
+
+ <!-- 3.2.2 responseOk -->
+ <element name="responseOk" type="xsd:string"/>
+
+ <!-- 3.2.3 Ignore -->
+ <element name="Ignore" type="xsd:string"/>
+
+ <!-- 3.2.4 requiredHeader -->
+ <element name="requiredHeader" type="xsd:string"/>
+
+ <element name="echoHeader" type="xsd:string"/>
+ <element name="echoHeaderResponse" type="xsd:string"/>
+
+ <!-- 3.2.5 DataHolder -->
+ <element name="DataHolder" type="test:DataHolder_t"/>
+ <complexType name="DataHolder_t">
+ <sequence>
+ <element name="Data" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <!-- 3.2.6 concatAndForwardEchoOk -->
+ <element name="concatAndForwardEchoOk"/>
+
+ <!-- 3.2.7 concatAndForwardEchoOkArg1 -->
+ <element name="concatAndForwardEchoOkArg1" type="xsd:string"/>
+
+ <!-- 3.2.8 concatAndForwardEchoOkArg2 -->
+ <element name="concatAndForwardEchoOkArg2" type="xsd:string"/>
+
+ <!-- 3.2.9 validateCountryCode -->
+ <element name="validateCountryCode" type="xsd:string"/>
+
+ <element name="validateCountryCodeResponse" type="xsd:string"/>
+
+ <!-- 3.2.10 validateCountryCodeFault -->
+ <element name="validateCountryCodeFault" type="xsd:string"/>
+
+ <!-- 3.2.11 echoResolvedRef -->
+ <element name="RelativeReference" type="test:RelativeReference_t"/>
+ <complexType name="RelativeReference_t">
+ <attribute ref="xml:base"/>
+ <attribute ref="xlink:href"/>
+ </complexType>
+
+ <element name="echoResolvedRef" type="test:echoResolvedRef_t"/>
+ <complexType name="echoResolvedRef_t">
+ <sequence>
+ <element ref="test:RelativeReference" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+
+ <!-- 3.2.12 responseResolvedRef -->
+ <element name="responseResolvedRef" type="xsd:string"/>
+
+ <!-- echoOkUltimateReceiver added to support testing of "relay" -->
+ <element name="echoOkUltimateReceiver" type="xsd:string"/>
+
+ <!-- responseOkUltimateReceiver added to support testing of "relay" -->
+ <element name="responseOkUltimateReceiver" type="xsd:string"/>
+
+ <element name="Unknown" type="types:UnknownType" />
+
+ </schema>
+
+ </types>
+
+ <!-- 3.4.1 returnVoid rpc operation -->
+ <message name="returnVoidRequest"/>
+ <message name="returnVoidResponse"/>
+
+ <!-- 3.4.2 echoStruct rpc operation -->
+ <message name="echoStructRequest">
+ <part name="inputStruct" type="types:SOAPStruct"/>
+ </message>
+ <message name="echoStructResponse">
+ <part name="return" type="types:SOAPStruct"/>
+ </message>
+
+ <!-- 3.4.3 echoStructArray rpc operation -->
+ <message name="echoStructArrayRequest">
+ <part name="inputStructArray" type="types:ArrayOfSOAPStruct"/>
+ </message>
+ <message name="echoStructArrayResponse">
+ <part name="return" type="types:ArrayOfSOAPStruct"/>
+ </message>
+
+ <!-- 3.4.4 echoStructAsSimpleTypes rpc operation -->
+ <message name="echoStructAsSimpleTypesRequest">
+ <part name="inputStruct" type="types:SOAPStruct"/>
+ </message>
+ <message name="echoStructAsSimpleTypesResponse">
+ <part name="outputString" type="xsd:string"/>
+ <part name="outputInteger" type="xsd:int"/>
+ <part name="outputFloat" type="xsd:float"/>
+ </message>
+
+ <!-- 3.4.5 echoSimpleTypesAsStruct rpc operation -->
+ <message name="echoSimpleTypesAsStructRequest">
+ <part name="inputString" type="xsd:string"/>
+ <part name="inputInt" type="xsd:int"/>
+ <part name="inputFloat" type="xsd:float"/>
+ </message>
+ <message name="echoSimpleTypesAsStructResponse">
+ <part name="return" type="types:SOAPStruct"/>
+ </message>
+
+ <!-- 3.4.6 echoNestedStruct rpc operation -->
+ <message name="echoNestedStructRequest">
+ <part name="inputStruct" type="types:SOAPStructStruct"/>
+ </message>
+ <message name="echoNestedStructResponse">
+ <part name="return" type="types:SOAPStructStruct"/>
+ </message>
+
+ <!-- 3.4.7 echoNestedArray rpc operation -->
+ <message name="echoNestedArrayRequest">
+ <part name="inputStruct" type="types:SOAPArrayStruct"/>
+ </message>
+ <message name="echoNestedArrayResponse">
+ <part name="return" type="types:SOAPArrayStruct"/>
+ </message>
+
+ <!-- 3.4.8 echoFloatArray rpc operation -->
+ <message name="echoFloatArrayRequest">
+ <part name="inputFloatArray" type="types:ArrayOffloat"/>
+ </message>
+ <message name="echoFloatArrayResponse">
+ <part name="return" type="types:ArrayOffloat"/>
+ </message>
+
+ <!-- 3.4.9 echoStringArray rpc operation -->
+ <message name="echoStringArrayRequest">
+ <part name="inputStringArray" type="types:ArrayOfstring"/>
+ </message>
+ <message name="echoStringArrayResponse">
+ <part name="return" type="types:ArrayOfstring"/>
+ </message>
+
+ <!-- 3.4.10 echoIntegerArray rpc operation -->
+ <message name="echoIntegerArrayRequest">
+ <part name="inputIntegerArray" type="types:ArrayOfint"/>
+ </message>
+ <message name="echoIntegerArrayResponse">
+ <part name="return" type="types:ArrayOfint"/>
+ </message>
+
+ <!-- 3.4.11 echoBase64 rpc operation -->
+ <message name="echoBase64Request">
+ <part name="inputBase64" type="xsd:base64Binary"/>
+ </message>
+ <message name="echoBase64Response">
+ <part name="return" type="xsd:base64Binary"/>
+ </message>
+
+ <!-- 3.4.12 echoBoolean rpc operation -->
+ <message name="echoBooleanRequest">
+ <part name="inputBoolean" type="xsd:boolean"/>
+ </message>
+ <message name="echoBooleanResponse">
+ <part name="return" type="xsd:boolean"/>
+ </message>
+
+ <!-- 3.4.13 echoDate rpc operation -->
+ <message name="echoDateRequest">
+ <part name="inputDate" type="xsd:dateTime"/>
+ </message>
+ <message name="echoDateResponse">
+ <part name="return" type="xsd:dateTime"/>
+ </message>
+
+ <!-- 3.4.14 echoDecimal rpc operation -->
+ <message name="echoDecimalRequest">
+ <part name="inputDecimal" type="xsd:decimal"/>
+ </message>
+ <message name="echoDecimalResponse">
+ <part name="return" type="xsd:decimal"/>
+ </message>
+
+ <!-- 3.4.15 echoFloat rpc operation -->
+ <message name="echoFloatRequest">
+ <part name="inputFloat" type="xsd:float"/>
+ </message>
+ <message name="echoFloatResponse">
+ <part name="return" type="xsd:float"/>
+ </message>
+
+ <!-- 3.4.16 echoString rpc operation -->
+ <message name="echoStringRequest">
+ <part name="inputString" type="xsd:string"/>
+ </message>
+ <message name="echoStringResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+
+ <!-- 3.4.17 countItems rpc operation -->
+ <message name="countItemsRequest">
+ <part name="inputStringArray" type="types:ArrayOfstring"/>
+ </message>
+ <message name="countItemsResponse">
+ <part name="return" type="xsd:int"/>
+ </message>
+
+ <!-- 3.4.18 isNil rpc operation -->
+ <message name="isNilRequest">
+ <part name="inputString" type="xsd:string"/>
+ </message>
+ <message name="isNilResponse">
+ <part name="return" type="xsd:boolean"/>
+ </message>
+
+ <!-- DataHolder header block -->
+ <message name="DataHolderRequest">
+ <part name="DataHolder" type="test:DataHolder_t"/>
+ </message>
+ <message name="DataHolderResponse">
+ <part name="DataHolder" type="test:DataHolder_t"/>
+ </message>
+
+ <!-- empty message for doc/literal testing -->
+ <message name="emptyBodyRequest"/>
+ <message name="emptyBodyResponse"/>
+
+ <!-- echoOk body/header block -->
+ <message name="echoOkRequest">
+ <part name="echoOk" element="test:echoOk"/>
+ </message>
+ <message name="echoOkResponse">
+ <part name="responseOk" element="test:responseOk"/>
+ </message>
+
+ <message name="requiredHeaderRequest">
+ <part name="requiredHeader" element="test:requiredHeader"/>
+ </message>
+ <message name="echoHeaderRequest">
+ <part name="responseHeader" element="test:echoHeader"/>
+ </message>
+ <message name="echoHeaderResponse">
+ <part name="responseHeader" element="test:echoHeaderResponse"/>
+ </message>
+
+ <message name="echoResolvedRefRequest">
+ <part name="responseHeader" element="test:echoResolvedRef"/>
+ </message>
+ <message name="echoResolvedRefResponse">
+ <part name="responseHeader" element="test:responseResolvedRef"/>
+ </message>
+
+ <!-- "unknown" header block -->
+ <message name="UnknownHdrBlockLit">
+ <part name="Unknown" element="test:Unknown" />
+ </message>
+ <message name="UnknownHdrBlockEnc">
+ <part name="Unknown" type="types:UnknownType" />
+ </message>
+
+ <message name="validateCountryCodeRequest">
+ <part name="validateCountryCode" element="test:validateCountryCode" />
+ </message>
+ <message name="validateCountryCodeFault">
+ <part name="validateCountryCodeFault" element="test:validateCountryCodeFault" />
+ </message>
+ <message name="validateCountryCodeResponse">
+ <part name="validateCountryCodeResponse" element="test:validateCountryCodeResponse" />
+ </message>
+
+
+ <portType name="Soap12TestPortTypeDoc">
+ <operation name="emptyBody">
+ <input message="tns:emptyBodyRequest" />
+ <output message="tns:emptyBodyResponse" />
+ </operation>
+ <operation name="echoOk">
+ <input message="tns:echoOkRequest" />
+ <output message="tns:echoOkResponse" />
+ </operation>
+ <operation name="requiredHeader">
+ <input message="tns:requiredHeaderRequest" />
+ </operation>
+ <operation name="echoHeader">
+ <input message="tns:echoHeaderRequest" />
+ <output message="tns:echoHeaderResponse" />
+ </operation>
+ <operation name="echoResolvedRef">
+ <input message="tns:echoResolvedRefRequest" />
+ <output message="tns:echoResolvedRefResponse" />
+ </operation>
+ </portType>
+
+ <portType name="Soap12TestPortTypeRpc">
+
+ <!-- 3.4.1 returnVoid rpc operation -->
+ <operation name="returnVoid">
+ <input message="tns:returnVoidRequest"/>
+ <output message="tns:returnVoidResponse"/>
+ </operation>
+
+ <!-- 3.4.2 echoStruct rpc operation -->
+ <operation name="echoStruct" parameterOrder="inputStruct">
+ <input message="tns:echoStructRequest"/>
+ <output message="tns:echoStructResponse"/>
+ </operation>
+
+ <!-- 3.4.3 echoStructArray rpc operation -->
+ <operation name="echoStructArray" parameterOrder="inputStructArray">
+ <input message="tns:echoStructArrayRequest"/>
+ <output message="tns:echoStructArrayResponse"/>
+ </operation>
+
+ <!-- 3.4.4 echoStructAsSimpleTypes rpc operation -->
+ <operation name="echoStructAsSimpleTypes" parameterOrder="inputStruct outputString outputInteger outputFloat">
+ <input message="tns:echoStructAsSimpleTypesRequest"/>
+ <output message="tns:echoStructAsSimpleTypesResponse"/>
+ </operation>
+
+ <!-- 3.4.5 echoSimpleTypesAsStruct rpc operation -->
+ <operation name="echoSimpleTypesAsStruct" parameterOrder="inputString inputInteger inputFloat">
+ <input message="tns:echoSimpleTypesAsStructRequest"/>
+ <output message="tns:echoSimpleTypesAsStructResponse"/>
+ </operation>
+
+ <!-- 3.4.6 echoNestedStruct rpc operation -->
+ <operation name="echoNestedStruct" parameterOrder="inputStruct">
+ <input message="tns:echoNestedStructRequest"/>
+ <output message="tns:echoNestedStructResponse"/>
+ </operation>
+
+ <!-- 3.4.7 echoNestedArray rpc operation -->
+ <operation name="echoNestedArray" parameterOrder="inputStruct">
+ <input message="tns:echoNestedArrayRequest"/>
+ <output message="tns:echoNestedArrayResponse"/>
+ </operation>
+
+ <!-- 3.4.8 echoFloatArray rpc operation -->
+ <operation name="echoFloatArray" parameterOrder="inputFloatArray">
+ <input message="tns:echoFloatArrayRequest"/>
+ <output message="tns:echoFloatArrayResponse"/>
+ </operation>
+
+ <!-- 3.4.9 echoStringArray rpc operation -->
+ <operation name="echoStringArray" parameterOrder="inputStringArray">
+ <input message="tns:echoStringArrayRequest"/>
+ <output message="tns:echoStringArrayResponse"/>
+ </operation>
+
+ <!-- 3.4.10 echoIntegerArray rpc operation -->
+ <operation name="echoIntegerArray" parameterOrder="inputIntegerArray">
+ <input message="tns:echoIntegerArrayRequest"/>
+ <output message="tns:echoIntegerArrayResponse"/>
+ </operation>
+
+ <!-- 3.4.11 echoBase64 rpc operation -->
+ <operation name="echoBase64" parameterOrder="inputBase64">
+ <input message="tns:echoBase64Request"/>
+ <output message="tns:echoBase64Response"/>
+ </operation>
+
+ <!-- 3.4.12 echoBoolean rpc operation -->
+ <operation name="echoBoolean" parameterOrder="inputBoolean">
+ <input message="tns:echoBooleanRequest"/>
+ <output message="tns:echoBooleanResponse"/>
+ </operation>
+
+ <!-- 3.4.13 echoDate rpc operation -->
+ <operation name="echoDate" parameterOrder="inputDate">
+ <input message="tns:echoDateRequest"/>
+ <output message="tns:echoDateResponse"/>
+ </operation>
+
+ <!-- 3.4.14 echoDecimal rpc operation -->
+ <operation name="echoDecimal" parameterOrder="inputDecimal">
+ <input message="tns:echoDecimalRequest"/>
+ <output message="tns:echoDecimalResponse"/>
+ </operation>
+
+ <!-- 3.4.15 echoFloat rpc operation -->
+ <operation name="echoFloat" parameterOrder="inputFloat">
+ <input message="tns:echoFloatRequest"/>
+ <output message="tns:echoFloatResponse"/>
+ </operation>
+
+ <!-- 3.4.16 echoString rpc operation -->
+ <operation name="echoString" parameterOrder="inputString">
+ <input message="tns:echoStringRequest"/>
+ <output message="tns:echoStringResponse"/>
+ </operation>
+
+ <!-- 3.4.17 countItems rpc operation -->
+ <operation name="countItems" parameterOrder="inputStringArray">
+ <input message="tns:countItemsRequest"/>
+ <output message="tns:countItemsResponse"/>
+ </operation>
+
+ <!-- 3.4.18 isNil rpc operation -->
+ <operation name="isNil" parameterOrder="inputString">
+ <input message="tns:isNilRequest"/>
+ <output message="tns:isNilResponse"/>
+ </operation>
+
+ </portType>
+
+ <binding name="Soap12TestDocBinding" type="tns:Soap12TestPortTypeDoc">
+ <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="emptyBody">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="literal" />
+ <soap12:header message="tns:echoOkRequest" part="echoOk" use="literal" />
+ <soap12:header message="tns:UnknownHdrBlockLit" part="Unknown" use="literal" />
+ <soap12:header message="tns:validateCountryCodeRequest" part="validateCountryCode" use="literal">
+ <soap12:headerfault message="tns:validateCountryCodeFault" part="validateCountryCodeFault" use="literal"/>
+ </soap12:header>
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ <soap12:header message="tns:echoOkResponse" part="responseOk" use="literal" />
+ <soap12:header message="tns:validateCountryCodeResponse" part="validateCountryCodeResponse" use="literal"/>
+ </output>
+ </operation>
+ <operation name="echoOk">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="literal" />
+ <soap12:header message="tns:echoOkRequest" part="echoOk" use="literal" />
+ <soap12:header message="tns:UnknownHdrBlockLit" part="Unknown" use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ <soap12:header message="tns:echoOkResponse" part="responseOk" use="literal" />
+ </output>
+ </operation>
+ <operation name="requiredHeader">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ </operation>
+ <operation name="echoHeader">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="literal" />
+ <soap12:header message="tns:echoOkRequest" part="echoOk" use="literal" />
+ <soap12:header message="tns:UnknownHdrBlockLit" part="Unknown" use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ <soap12:header message="tns:echoOkResponse" part="responseOk" use="literal" />
+ </output>
+ </operation>
+ <operation name="echoResolvedRef">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+
+ <binding name="Soap12TestRpcBinding" type="tns:Soap12TestPortTypeRpc">
+ <soap12:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <!-- 3.4.1 returnVoid rpc operation -->
+ <operation name="returnVoid">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.2 echoStruct rpc operation -->
+ <operation name="echoStruct">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.3 echoStructArray rpc operation -->
+ <operation name="echoStructArray">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.4 echoStructAsSimpleTypes rpc operation -->
+ <operation name="echoStructAsSimpleTypes">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.5 echoSimpleTypesAsStruct rpc operation -->
+ <operation name="echoSimpleTypesAsStruct">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.6 echoNestedStruct rpc operation -->
+ <operation name="echoNestedStruct">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.7 echoNestedArray rpc operation -->
+ <operation name="echoNestedArray">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.8 echoFloatArray rpc operation -->
+ <operation name="echoFloatArray">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.9 echoStringArray rpc operation -->
+ <operation name="echoStringArray">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.10 echoIntegerArray rpc operation -->
+ <operation name="echoIntegerArray">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.11 echoBase64 rpc operation -->
+ <operation name="echoBase64">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.12 echoBoolean rpc operation -->
+ <operation name="echoBoolean">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.13 echoDate rpc operation -->
+ <operation name="echoDate">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.14 echoDecimal rpc operation -->
+ <operation name="echoDecimal">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.15 echoFloat rpc operation -->
+ <operation name="echoFloat">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.16 echoString rpc operation -->
+ <operation name="echoString">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ <soap12:header use="encoded" message="tns:DataHolderRequest" part="DataHolder" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ <soap12:header use="encoded" message="tns:DataHolderResponse" part="DataHolder" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.17 countItems rpc operation -->
+ <operation name="countItems">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ <!-- 3.4.18 isNil rpc operation -->
+ <operation name="isNil">
+ <soap12:operation/>
+ <input>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </input>
+ <output>
+ <soap12:body use="encoded" namespace="http://example.org/ts-tests" encodingStyle="http://www.w3.org/2003/05/soap-encoding"/>
+ </output>
+ </operation>
+
+ </binding>
+
+
+ <service name="WhiteMesaSoap12TestSvc">
+ <port name="Soap12TestDocPort" binding="tns:Soap12TestDocBinding">
+ <soap12:address location="http://localhost/soap12/test-doc"/>
+ </port>
+ <port name="Soap12TestRpcPort" binding="tns:Soap12TestRpcBinding">
+ <soap12:address location="http://localhost/soap12/test-rpc"/>
+ </port>
+
+ </service>
+
+</definitions>
diff --git a/ext/soap/tests/test.wsdl b/ext/soap/tests/test.wsdl new file mode 100644 index 0000000..0740b7d --- /dev/null +++ b/ext/soap/tests/test.wsdl @@ -0,0 +1,55 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + + <types> + <xsd:schema targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> + </xsd:schema> + </types> + + <message name="AddRequest"> + <part name="x" type="xsd:double" /> + <part name="y" type="xsd:double" /> + </message> + <message name="AddResponse"> + <part name="result" type="xsd:double" /> + </message> + + <portType name="TestServicePortType"> + <operation name="Add"> + <input message="tns:AddRequest" /> + <output message="tns:AddResponse" /> + </operation> + </portType> + + <binding name="TestServiceBinding" type="tns:TestServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> + <operation name="Add"> + <soap:operation soapAction="Add" style="rpc" /> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </output> + </operation> + </binding> + + <service name="TestService"> + <port name="TestServicePort" binding="tns:TestServiceBinding"> + <soap:address location="http://linuxsrv.home/~dmitry/soap/soap_server.php" /> + </port> + </service> + +</definitions> diff --git a/ext/soap/tests/transport001.phpt b/ext/soap/tests/transport001.phpt new file mode 100644 index 0000000..9ab0d3d --- /dev/null +++ b/ext/soap/tests/transport001.phpt @@ -0,0 +1,36 @@ +--TEST-- +SOAP Transport 1: Local transport using SoapClient::__doRequest +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Add($x,$y) { + return $x+$y; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('Add'); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$x = new LocalSoapClient(NULL,array('location'=>'test://', + 'uri'=>'http://testuri.org')); +var_dump($x->Add(3,4)); +echo "ok\n"; +?> +--EXPECT-- +int(7) +ok diff --git a/ext/soap/tests/typemap001.phpt b/ext/soap/tests/typemap001.phpt new file mode 100644 index 0000000..b5ed31d --- /dev/null +++ b/ext/soap/tests/typemap001.phpt @@ -0,0 +1,63 @@ +--TEST-- +SOAP typemap 1: SoapServer support for typemap's from_xml() +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +<?php if (!extension_loaded('simplexml')) die("skip simplexml extension not available"); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--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> + <ns1:dotest> + <book xsi:type=\"ns1:book\"> + <a xsi:type=\"xsd:string\">foo</a> + <b xsi:type=\"xsd:string\">bar</b> +</book> +</ns1:dotest> + </env:Body> +<env:Header/> +</env:Envelope>"; + +function book_from_xml($xml) { + $sxe = simplexml_load_string($xml); + $obj = new book; + $obj->a = (string)$sxe->a; + $obj->b = (string)$sxe->b; + return $obj; +} + +class test{ + function dotest($book){ + $classname=get_class($book); + return "Object: ".$classname. "(".$book->a.",".$book->b.")"; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "from_xml" => "book_from_xml")) + ); + +$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server->setClass("test"); +$server->handle($HTTP_RAW_POST_DATA); +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">Object: book(foo,bar)</res></ns1:dotestResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/typemap002.phpt b/ext/soap/tests/typemap002.phpt new file mode 100644 index 0000000..ceb00f1 --- /dev/null +++ b/ext/soap/tests/typemap002.phpt @@ -0,0 +1,58 @@ +--TEST-- +SOAP typemap 2: SoapServer support for typemap's to_xml() +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--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> +<ns1:dotest2> +<dotest2 xsi:type=\"xsd:string\">???</dotest2> +</ns1:dotest2> + </env:Body> +<env:Header/> +</env:Envelope>"; + +function book_to_xml($book) { + return '<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><a xsi:type="xsd:string">'.$book->a.'!</a><b xsi:type="xsd:string">'.$book->b.'!</b></book>'; +} + +class test{ + function dotest2($str){ + $book = new book; + $book->a = "foo"; + $book->b = "bar"; + return $book; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "to_xml" => "book_to_xml")) + ); + +$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server->setClass("test"); +$server->handle($HTTP_RAW_POST_DATA); +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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:dotest2Response><book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:book"><a xsi:type="xsd:string">foo!</a><b xsi:type="xsd:string">bar!</b></book></ns1:dotest2Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/typemap003.phpt b/ext/soap/tests/typemap003.phpt new file mode 100644 index 0000000..63bb76c --- /dev/null +++ b/ext/soap/tests/typemap003.phpt @@ -0,0 +1,57 @@ +--TEST-- +SOAP Typemap 3: SoapClient support for typemap's from_xml() +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +<?php if (!extension_loaded('simplexml')) die("skip simplexml extension not available"); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestSoapClient extends SoapClient{ + function __doRequest($request, $location, $action, $version, $one_way = 0) { + 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">foo</a> + <b xsi:type="xsd:string">bar</b> +</res> +</ns1:dotest2Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +function book_from_xml($xml) { + $sxe = simplexml_load_string($xml); + $obj = new book; + $obj->a = (string)$sxe->a; + $obj->b = (string)$sxe->b; + return $obj; +} + +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "from_xml" => "book_from_xml")) + ); + +$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +$ret = $client->dotest2("???"); +var_dump($ret); +echo "ok\n"; +?> +--EXPECTF-- +object(book)#%d (2) { + ["a"]=> + string(3) "foo" + ["b"]=> + string(3) "bar" +} +ok diff --git a/ext/soap/tests/typemap004.phpt b/ext/soap/tests/typemap004.phpt new file mode 100644 index 0000000..4fe15f7 --- /dev/null +++ b/ext/soap/tests/typemap004.phpt @@ -0,0 +1,43 @@ +--TEST-- +SOAP Typemap 4: SoapClient support for typemap's to_xml() +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestSoapClient extends SoapClient{ + function __doRequest($request, $location, $action, $version, $one_way = 0) { + echo $request; + exit; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +function book_to_xml($book) { + return '<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><a xsi:type="xsd:string">'.$book->a.'!</a><b xsi:type="xsd:string">'.$book->b.'!</b></book>'; +} + +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "to_xml" => "book_to_xml")) + ); + +$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +$book = new book(); +$book->a = "foo"; +$book->b = "bar"; +$ret = $client->dotest($book); +var_dump($ret); +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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:dotest><book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:book"><a xsi:type="xsd:string">foo!</a><b xsi:type="xsd:string">bar!</b></book></ns1:dotest></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/typemap005.phpt b/ext/soap/tests/typemap005.phpt new file mode 100644 index 0000000..369d026 --- /dev/null +++ b/ext/soap/tests/typemap005.phpt @@ -0,0 +1,64 @@ +--TEST-- +SOAP typemap 5: SoapServer support for typemap's from_xml() (without WSDL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +<?php if (!extension_loaded('simplexml')) die("skip simplexml extension not available"); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--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> + <ns1:dotest> + <book xsi:type=\"ns1:book\"> + <a xsi:type=\"xsd:string\">foo</a> + <b xsi:type=\"xsd:string\">bar</b> +</book> +</ns1:dotest> + </env:Body> +<env:Header/> +</env:Envelope>"; + +function book_from_xml($xml) { + $sxe = simplexml_load_string($xml); + $obj = new book; + $obj->a = (string)$sxe->a; + $obj->b = (string)$sxe->b; + return $obj; +} + +class test{ + function dotest($book){ + $classname=get_class($book); + return "Object: ".$classname. "(".$book->a.",".$book->b.")"; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} +$options=Array( + 'uri' => "http://schemas.nothing.com", + 'actor' => 'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "from_xml" => "book_from_xml")) + ); + +$server = new SoapServer(NULL,$options); +$server->setClass("test"); +$server->handle($HTTP_RAW_POST_DATA); +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><return xsi:type="xsd:string">Object: book(foo,bar)</return></ns1:dotestResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/typemap006.phpt b/ext/soap/tests/typemap006.phpt new file mode 100644 index 0000000..7ecf410 --- /dev/null +++ b/ext/soap/tests/typemap006.phpt @@ -0,0 +1,59 @@ +--TEST-- +SOAP typemap 6: SoapServer support for typemap's to_xml() (without WSDL, using SoapVar) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--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> +<ns1:dotest2> +<dotest2 xsi:type=\"xsd:string\">???</dotest2> +</ns1:dotest2> + </env:Body> +<env:Header/> +</env:Envelope>"; + +function book_to_xml($book) { + return '<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><a xsi:type="xsd:string">'.$book->a.'!</a><b xsi:type="xsd:string">'.$book->b.'!</b></book>'; +} + +class test{ + function dotest2($str){ + $book = new book; + $book->a = "foo"; + $book->b = "bar"; + return new SoapVar($book, null, "book", "http://schemas.nothing.com"); + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +$options=Array( + 'uri' => "http://schemas.nothing.com", + 'actor' => 'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "to_xml" => "book_to_xml")) + ); + +$server = new SoapServer(NULL,$options); +$server->setClass("test"); +$server->handle($HTTP_RAW_POST_DATA); +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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:dotest2Response><book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:book"><a xsi:type="xsd:string">foo!</a><b xsi:type="xsd:string">bar!</b></book></ns1:dotest2Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/typemap007.phpt b/ext/soap/tests/typemap007.phpt new file mode 100644 index 0000000..b3451f1 --- /dev/null +++ b/ext/soap/tests/typemap007.phpt @@ -0,0 +1,59 @@ +--TEST-- +SOAP Typemap 7: SoapClient support for typemap's from_xml() (without WSDL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +<?php if (!extension_loaded('simplexml')) die("skip simplexml extension not available"); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestSoapClient extends SoapClient{ + function __doRequest($request, $location, $action, $version, $one_way = 0) { + 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">foo</a> + <b xsi:type="xsd:string">bar</b> +</res> +</ns1:dotest2Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +function book_from_xml($xml) { + $sxe = simplexml_load_string($xml); + $obj = new book; + $obj->a = (string)$sxe->a; + $obj->b = (string)$sxe->b; + return $obj; +} + +$options=Array( + 'uri' => 'http://schemas.nothing.com', + 'location' => 'test://', + 'actor' => 'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "from_xml" => "book_from_xml")) + ); + +$client = new TestSoapClient(NULL, $options); +$ret = $client->dotest2("???"); +var_dump($ret); +echo "ok\n"; +?> +--EXPECTF-- +object(book)#%d (2) { + ["a"]=> + string(3) "foo" + ["b"]=> + string(3) "bar" +} +ok diff --git a/ext/soap/tests/typemap008.phpt b/ext/soap/tests/typemap008.phpt new file mode 100644 index 0000000..192f6dc --- /dev/null +++ b/ext/soap/tests/typemap008.phpt @@ -0,0 +1,45 @@ +--TEST-- +SOAP Typemap 8: SoapClient support for typemap's to_xml() (without WSDL, using SoapVar) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestSoapClient extends SoapClient{ + function __doRequest($request, $location, $action, $version, $one_way = 0) { + echo $request; + exit; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +function book_to_xml($book) { + return '<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><a xsi:type="xsd:string">'.$book->a.'!</a><b xsi:type="xsd:string">'.$book->b.'!</b></book>'; +} + +$options=Array( + 'uri' => 'http://schemas.nothing.com', + 'location' => 'test://', + 'actor' => 'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "to_xml" => "book_to_xml")) + ); + +$client = new TestSoapClient(NULL, $options); +$book = new book(); +$book->a = "foo"; +$book->b = "bar"; +$ret = $client->dotest(new SoapVar($book, null, "book", "http://schemas.nothing.com")); +var_dump($ret); +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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:dotest><book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:book"><a xsi:type="xsd:string">foo!</a><b xsi:type="xsd:string">bar!</b></book></ns1:dotest></SOAP-ENV:Body></SOAP-ENV:Envelope> diff --git a/ext/soap/tests/typemap009.phpt b/ext/soap/tests/typemap009.phpt new file mode 100644 index 0000000..ec5c38d --- /dev/null +++ b/ext/soap/tests/typemap009.phpt @@ -0,0 +1,58 @@ +--TEST-- +SOAP typemap 9: SoapServer support for typemap's from_xml() (SoapFault) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--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> + <ns1:dotest> + <book xsi:type=\"ns1:book\"> + <a xsi:type=\"xsd:string\">foo</a> + <b xsi:type=\"xsd:string\">bar</b> +</book> +</ns1:dotest> + </env:Body> +<env:Header/> +</env:Envelope>"; + +function book_from_xml($xml) { + throw new SoapFault("Server", "Conversion Failed"); +} + +class test{ + function dotest($book){ + $classname=get_class($book); + return "Object: ".$classname. "(".$book->a.",".$book->b.")"; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "from_xml" => "book_from_xml")) + ); + +$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server->setClass("test"); +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Conversion Failed</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/typemap010.phpt b/ext/soap/tests/typemap010.phpt new file mode 100644 index 0000000..4eba634 --- /dev/null +++ b/ext/soap/tests/typemap010.phpt @@ -0,0 +1,58 @@ +--TEST-- +SOAP typemap 10: SoapServer support for typemap's to_xml() (SoapFault) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--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> +<ns1:dotest2> +<dotest2 xsi:type=\"xsd:string\">???</dotest2> +</ns1:dotest2> + </env:Body> +<env:Header/> +</env:Envelope>"; + +function book_to_xml($book) { + throw new SoapFault("Server", "Conversion Fault"); +} + +class test{ + function dotest2($str){ + $book = new book; + $book->a = "foo"; + $book->b = "bar"; + return $book; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "to_xml" => "book_to_xml")) + ); + +$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server->setClass("test"); +$server->handle($HTTP_RAW_POST_DATA); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Conversion Fault</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok diff --git a/ext/soap/tests/typemap011.phpt b/ext/soap/tests/typemap011.phpt new file mode 100644 index 0000000..1e2addc --- /dev/null +++ b/ext/soap/tests/typemap011.phpt @@ -0,0 +1,51 @@ +--TEST-- +SOAP Typemap 11: SoapClient support for typemap's from_xml() (SoapFault) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestSoapClient extends SoapClient{ + function __doRequest($request, $location, $action, $version, $one_way = 0) { + 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">foo</a> + <b xsi:type="xsd:string">bar</b> +</res> +</ns1:dotest2Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +function book_from_xml($xml) { + throw new SoapFault("Client", "Conversion Error"); +} + +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "from_xml" => "book_from_xml")) + ); + +$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +try { + $ret = $client->dotest2("???"); +} catch (SoapFault $e) { + $ret = "SoapFault = " . $e->faultcode . " - " . $e->faultstring; +} +var_dump($ret); +echo "ok\n"; +?> +--EXPECT-- +string(37) "SoapFault = Client - Conversion Error" +ok diff --git a/ext/soap/tests/typemap012.phpt b/ext/soap/tests/typemap012.phpt new file mode 100644 index 0000000..847957a --- /dev/null +++ b/ext/soap/tests/typemap012.phpt @@ -0,0 +1,47 @@ +--TEST-- +SOAP Typemap 12: SoapClient support for typemap's to_xml() (SoapFault) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class TestSoapClient extends SoapClient{ + function __doRequest($request, $location, $action, $version, $one_way = 0) { + echo $request; + exit; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +function book_to_xml($book) { + throw new SoapFault("Client", "Conversion Error"); +} + +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "to_xml" => "book_to_xml")) + ); + +$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +$book = new book(); +$book->a = "foo"; +$book->b = "bar"; +try { + $ret = $client->dotest($book); +} catch (SoapFault $e) { + $ret = "SoapFault = " . $e->faultcode . " - " . $e->faultstring; +} +var_dump($ret); +echo "ok\n"; +?> +--EXPECT-- +string(37) "SoapFault = Client - Conversion Error" +ok diff --git a/ext/soap/tests/typemap013.phpt b/ext/soap/tests/typemap013.phpt new file mode 100644 index 0000000..d873eb4 --- /dev/null +++ b/ext/soap/tests/typemap013.phpt @@ -0,0 +1,58 @@ +--TEST-- +SOAP typemap 13: SoapServer support for typemap's to_xml() with default ns +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--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> +<ns1:dotest2> +<dotest2 xsi:type=\"xsd:string\">???</dotest2> +</ns1:dotest2> + </env:Body> +<env:Header/> +</env:Envelope>"; + +function book_to_xml($book) { + return '<book xmlns="http://schemas.nothing.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><a xsi:type="xsd:string">'.$book->a.'!</a><b xsi:type="xsd:string">'.$book->b.'!</b></book>'; +} + +class test{ + function dotest2($str){ + $book = new book; + $book->a = "foo"; + $book->b = "bar"; + return $book; + } +} + +class book{ + public $a="a"; + public $b="c"; + +} + +$options=Array( + 'actor' =>'http://schemas.nothing.com', + 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", + "type_name" => "book", + "to_xml" => "book_to_xml")) + ); + +$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server->setClass("test"); +$server->handle($HTTP_RAW_POST_DATA); +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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:dotest2Response><book xmlns="http://schemas.nothing.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:book"><a xsi:type="xsd:string">foo!</a><b xsi:type="xsd:string">bar!</b></book></ns1:dotest2Response></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok |