summaryrefslogtreecommitdiff
path: root/ext/soap/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/tests/bugs')
-rw-r--r--ext/soap/tests/bugs/bug27722.phpt15
-rw-r--r--ext/soap/tests/bugs/bug27722.wsdl92
-rw-r--r--ext/soap/tests/bugs/bug27742.phpt15
-rw-r--r--ext/soap/tests/bugs/bug27742.wsdl854
-rw-r--r--ext/soap/tests/bugs/bug28751.phpt38
-rw-r--r--ext/soap/tests/bugs/bug28969.phpt38
-rw-r--r--ext/soap/tests/bugs/bug28985.phpt206
-rw-r--r--ext/soap/tests/bugs/bug28985.wsdl683
-rw-r--r--ext/soap/tests/bugs/bug29061.phpt14
-rw-r--r--ext/soap/tests/bugs/bug29061.wsdl41
-rw-r--r--ext/soap/tests/bugs/bug29109.phpt16
-rw-r--r--ext/soap/tests/bugs/bug29109.wsdl121
-rw-r--r--ext/soap/tests/bugs/bug29236.phpt22
-rw-r--r--ext/soap/tests/bugs/bug29236.wsdl287
-rw-r--r--ext/soap/tests/bugs/bug29795.phpt34
-rw-r--r--ext/soap/tests/bugs/bug29795.wsdl40
-rw-r--r--ext/soap/tests/bugs/bug29830.phpt25
-rw-r--r--ext/soap/tests/bugs/bug29839.phpt43
-rw-r--r--ext/soap/tests/bugs/bug29839.wsdl42
-rw-r--r--ext/soap/tests/bugs/bug29844.phpt38
-rw-r--r--ext/soap/tests/bugs/bug29844.wsdl66
-rw-r--r--ext/soap/tests/bugs/bug30045.phpt173
-rw-r--r--ext/soap/tests/bugs/bug30106.phpt72
-rw-r--r--ext/soap/tests/bugs/bug30106.wsdl59
-rw-r--r--ext/soap/tests/bugs/bug30175.phpt47
-rw-r--r--ext/soap/tests/bugs/bug30175.wsdl126
-rw-r--r--ext/soap/tests/bugs/bug30799.phpt25
-rw-r--r--ext/soap/tests/bugs/bug30928.phpt63
-rw-r--r--ext/soap/tests/bugs/bug30928.wsdl49
-rw-r--r--ext/soap/tests/bugs/bug30994.phpt47
-rw-r--r--ext/soap/tests/bugs/bug31422-win.phpt47
-rw-r--r--ext/soap/tests/bugs/bug31422.phpt48
-rw-r--r--ext/soap/tests/bugs/bug31695.phpt62
-rw-r--r--ext/soap/tests/bugs/bug31695.wsdl47
-rw-r--r--ext/soap/tests/bugs/bug31755.phpt19
-rw-r--r--ext/soap/tests/bugs/bug32776.phpt49
-rw-r--r--ext/soap/tests/bugs/bug32776.wsdl47
-rw-r--r--ext/soap/tests/bugs/bug32941.phpt41
-rwxr-xr-xext/soap/tests/bugs/bug32941.wsdl141
-rw-r--r--ext/soap/tests/bugs/bug34449.phpt20
-rw-r--r--ext/soap/tests/bugs/bug34453.phpt43
-rwxr-xr-xext/soap/tests/bugs/bug34453.wsdl42
-rw-r--r--ext/soap/tests/bugs/bug34643.phpt48
-rwxr-xr-xext/soap/tests/bugs/bug34643.wsdl42
-rw-r--r--ext/soap/tests/bugs/bug34657.phpt35
-rw-r--r--ext/soap/tests/bugs/bug35142.phpt135
-rwxr-xr-xext/soap/tests/bugs/bug35142.wsdl543
-rw-r--r--ext/soap/tests/bugs/bug35273.phpt23
-rw-r--r--ext/soap/tests/bugs/bug36226-2.phpt123
-rwxr-xr-xext/soap/tests/bugs/bug36226-2.wsdl543
-rw-r--r--ext/soap/tests/bugs/bug36226.phpt139
-rw-r--r--ext/soap/tests/bugs/bug36575.phpt52
-rwxr-xr-xext/soap/tests/bugs/bug36575.wsdl87
-rw-r--r--ext/soap/tests/bugs/bug36614.phpt13
-rwxr-xr-xext/soap/tests/bugs/bug36614.wsdl204
-rw-r--r--ext/soap/tests/bugs/bug36629.phpt53
-rw-r--r--ext/soap/tests/bugs/bug36908.phpt46
-rwxr-xr-xext/soap/tests/bugs/bug36908.wsdl51
-rw-r--r--ext/soap/tests/bugs/bug36999.phpt50
-rwxr-xr-xext/soap/tests/bugs/bug36999.wsdl48
-rw-r--r--ext/soap/tests/bugs/bug37013.phpt58
-rwxr-xr-xext/soap/tests/bugs/bug37013.wsdl67
-rw-r--r--ext/soap/tests/bugs/bug37083.phpt58
-rwxr-xr-xext/soap/tests/bugs/bug37083.wsdl99
-rw-r--r--ext/soap/tests/bugs/bug37278.phpt24
-rw-r--r--ext/soap/tests/bugs/bug38004.phpt42
-rwxr-xr-xext/soap/tests/bugs/bug38004.wsdl51
-rw-r--r--ext/soap/tests/bugs/bug38005.phpt43
-rw-r--r--ext/soap/tests/bugs/bug38055.phpt41
-rwxr-xr-xext/soap/tests/bugs/bug38055.wsdl49
-rw-r--r--ext/soap/tests/bugs/bug38067.phpt42
-rwxr-xr-xext/soap/tests/bugs/bug38067.wsdl48
-rw-r--r--ext/soap/tests/bugs/bug38536.phpt52
-rwxr-xr-xext/soap/tests/bugs/bug38536.wsdl57
-rw-r--r--ext/soap/tests/bugs/bug39121.phpt73
-rw-r--r--ext/soap/tests/bugs/bug39815.phpt50
-rw-r--r--ext/soap/tests/bugs/bug39832.phpt29
-rwxr-xr-xext/soap/tests/bugs/bug39832.wsdl55
-rw-r--r--ext/soap/tests/bugs/bug40609.phpt21
-rwxr-xr-xext/soap/tests/bugs/bug40609.wsdl26
-rw-r--r--ext/soap/tests/bugs/bug41004.phpt36
-rwxr-xr-xext/soap/tests/bugs/bug41004.wsdl69
-rw-r--r--ext/soap/tests/bugs/bug41097.phpt27
-rw-r--r--ext/soap/tests/bugs/bug41337.phpt12
-rwxr-xr-xext/soap/tests/bugs/bug41337.wsdl63
-rw-r--r--ext/soap/tests/bugs/bug41337_2.phpt12
-rwxr-xr-xext/soap/tests/bugs/bug41337_2.wsdl36
-rwxr-xr-xext/soap/tests/bugs/bug41337_2_1.wsdl47
-rw-r--r--ext/soap/tests/bugs/bug41477.phpt20
-rw-r--r--ext/soap/tests/bugs/bug41566.phpt65
-rw-r--r--ext/soap/tests/bugs/bug42086.phpt31
-rwxr-xr-xext/soap/tests/bugs/bug42086.wsdl141
-rw-r--r--ext/soap/tests/bugs/bug42151.phpt32
-rw-r--r--ext/soap/tests/bugs/bug42183.phpt27
-rw-r--r--ext/soap/tests/bugs/bug42214.phpt24
-rw-r--r--ext/soap/tests/bugs/bug42326.phpt49
-rwxr-xr-xext/soap/tests/bugs/bug42326.wsdl82
-rw-r--r--ext/soap/tests/bugs/bug42359.phpt20
-rwxr-xr-xext/soap/tests/bugs/bug42359.wsdl58
-rw-r--r--ext/soap/tests/bugs/bug42488.phpt22
-rw-r--r--ext/soap/tests/bugs/bug42692.phpt39
-rwxr-xr-xext/soap/tests/bugs/bug42692.wsdl40
-rw-r--r--ext/soap/tests/bugs/bug43045.phpt52
-rw-r--r--ext/soap/tests/bugs/bug44686.phpt14
-rw-r--r--ext/soap/tests/bugs/bug44686.wsdl193
-rw-r--r--ext/soap/tests/bugs/bug44811.phpt19
-rw-r--r--ext/soap/tests/bugs/bug44882.phpt64
-rw-r--r--ext/soap/tests/bugs/bug44882.wsdl75
-rw-r--r--ext/soap/tests/bugs/bug46419.phpt43
-rw-r--r--ext/soap/tests/bugs/bug46427.phpt22
-rw-r--r--ext/soap/tests/bugs/bug47049.phpt19
-rw-r--r--ext/soap/tests/bugs/bug47049.wsdl80
-rw-r--r--ext/soap/tests/bugs/bug47273.phpt53
-rw-r--r--ext/soap/tests/bugs/bug50698_1.phpt13
-rw-r--r--ext/soap/tests/bugs/bug50698_1.wsdl228
-rw-r--r--ext/soap/tests/bugs/bug50698_2.phpt22
-rw-r--r--ext/soap/tests/bugs/bug50698_2.wsdl422
-rw-r--r--ext/soap/tests/bugs/bug50698_3.phpt22
-rw-r--r--ext/soap/tests/bugs/bug50698_3.wsdl312
-rw-r--r--ext/soap/tests/bugs/bug50698_4.phpt13
-rw-r--r--ext/soap/tests/bugs/bug50698_4.wsdl228
-rw-r--r--ext/soap/tests/bugs/bug50762.phpt47
-rw-r--r--ext/soap/tests/bugs/bug50762.wsdl36
-rw-r--r--ext/soap/tests/bugs/bug50997.phpt16
-rw-r--r--ext/soap/tests/bugs/bug50997.wsdl54
-rw-r--r--ext/soap/tests/bugs/bug54911.phpt22
-rw-r--r--ext/soap/tests/bugs/bug55323.phpt45
-rw-r--r--ext/soap/tests/bugs/bug55323.wsdl50
-rw-r--r--ext/soap/tests/bugs/multiport.phpt16
-rw-r--r--ext/soap/tests/bugs/multiport.wsdl88
-rw-r--r--ext/soap/tests/bugs/skipif.inc3
-rw-r--r--ext/soap/tests/bugs/xml.xsd34
-rwxr-xr-xext/soap/tests/bugs/xml2.xsd146
133 files changed, 10620 insertions, 0 deletions
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 &amp; W ...).</documentation>
+ </annotation>
+ <restriction base="xsd:string">
+ <enumeration value="B &amp; 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 &amp; 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 &amp; test';
+$strB = 'test & test';
+$res = $client->Test(array('strA'=>$strA, 'strB'=>$strB));
+print_r($res);
+print_r($g);
+?>
+--EXPECT--
+test &amp; test
+test & test
+test &amp; 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:
+ &lt;schema . . .>
+ . . .
+ &lt;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.
+
+ &lt;type . . .>
+ . . .
+ &lt;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>