The bundle is back!

The definition of service has changed, read the README.
This commit is contained in:
Francis Besset
2011-07-17 10:46:54 +02:00
parent 81118f8d47
commit 1c608ccf20
48 changed files with 641 additions and 535 deletions

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<webservice name="api" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns="http://christiankerl.github.com/WebServiceBundle/servicedefinition/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://christiankerl.github.com/WebServiceBundle/servicedefinition/1.0/ ./../../ServiceDefinition/Loader/schema/servicedefinition-1.0.xsd ">
<method name="math_multiply" controller="">
<argument name="a">
<type xml-type="xs:double" php-type="float"/>
</argument>
<argument name="b">
<type xml-type="xs:double" php-type="float"/>
</argument>
<return>
<type xml-type="xs:double" php-type="float"/>
</return>
</method>
</webservice>

145
Tests/fixtures/Soap/api.wsdl vendored Normal file
View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="MathApi" targetNamespace="http://localhost/" xmlns:tns="http://localhost/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<wsdl:types xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://localhost/">
<xsd:complexType name="AuthHeader">
<xsd:sequence>
<xsd:element name="username" type="xsd:string"/>
<xsd:element name="password" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="AuthHeaderElement" type="tns:AuthHeader"/>
<xsd:complexType name="DoubleArray">
<xsd:sequence>
<xsd:element name="item" type="xsd:double" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="DoubleArrayElement" type="tns:DoubleArray"/>
<xsd:complexType name="ComplexNumber">
<xsd:sequence>
<xsd:element name="realPart" type="xsd:double"/>
<xsd:element name="imaginaryPart" type="xsd:double"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ComplexNumberElement" type="tns:ComplexNumber"/>
<xsd:complexType name="ComplexNumberArray">
<xsd:sequence>
<xsd:element name="item" type="tns:ComplexNumber" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ComplexNumberArrayElement" type="tns:ComplexNumberArray"/>
</xsd:schema>
</wsdl:types>
<wsdl:portType name="MathApiPortType">
<wsdl:operation name="math_multiply" parameterOrder="a b">
<wsdl:input message="tns:math_multiplyRequest"/>
<wsdl:output message="tns:math_multiplyResponse"/>
</wsdl:operation>
<wsdl:operation name="SimpleMultiply" parameterOrder="a b">
<wsdl:input message="tns:SimpleMultiplyRequest"/>
<wsdl:output message="tns:SimpleMultiplyResponse"/>
</wsdl:operation>
<wsdl:operation name="SimpleMultiplyWithHeader" parameterOrder="AuthHeader a b">
<wsdl:input message="tns:SimpleMultiplyWithHeaderRequest"/>
<wsdl:output message="tns:SimpleMultiplyWithHeaderResponse"/>
</wsdl:operation>
<wsdl:operation name="ArrayMultiply" parameterOrder="factors">
<wsdl:input message="tns:ArrayMultiplyRequest"/>
<wsdl:output message="tns:ArrayMultiplyResponse"/>
</wsdl:operation>
<wsdl:operation name="ComplexMultiply" parameterOrder="input">
<wsdl:input message="tns:ComplexMultiplyRequest"/>
<wsdl:output message="tns:ComplexMultiplyResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="MathApiBinding" type="tns:MathApiPortType">
<soap:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="math_multiply">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://localhost/math_multiply" style="rpc"/>
<wsdl:input xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="a b" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:input>
<wsdl:output xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="result" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="SimpleMultiply">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://localhost/SimpleMultiply" style="rpc"/>
<wsdl:input xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="a b" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:input>
<wsdl:output xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="result" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="SimpleMultiplyWithHeader">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://localhost/SimpleMultiplyWithHeader" style="rpc"/>
<wsdl:input xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="a b" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<soap:header xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" message="tns:SimpleMultiplyWithHeaderRequest" part="AuthHeader" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:input>
<wsdl:output xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="result" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<soap:header xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" message="tns:SimpleMultiplyWithHeaderResponse" part="AuthHeader" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="ArrayMultiply">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://localhost/ArrayMultiply" style="rpc"/>
<wsdl:input xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="factors" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:input>
<wsdl:output xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="result" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="ComplexMultiply">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://localhost/ComplexMultiply" style="rpc"/>
<wsdl:input xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="input" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:input>
<wsdl:output xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" parts="result" use="literal" namespace="http://localhost/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:message name="math_multiplyRequest">
<wsdl:part name="a" type="xsd:double"/>
<wsdl:part name="b" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="math_multiplyResponse">
<wsdl:part name="result" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="SimpleMultiplyRequest">
<wsdl:part name="a" type="xsd:double"/>
<wsdl:part name="b" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="SimpleMultiplyResponse">
<wsdl:part name="result" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="SimpleMultiplyWithHeaderRequest">
<wsdl:part name="AuthHeader" element="tns:AuthHeaderElement"/>
<wsdl:part name="a" type="xsd:double"/>
<wsdl:part name="b" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="SimpleMultiplyWithHeaderResponse">
<wsdl:part name="AuthHeader" element="tns:AuthHeaderElement"/>
<wsdl:part name="result" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="ArrayMultiplyRequest">
<wsdl:part name="factors" type="tns:DoubleArray"/>
</wsdl:message>
<wsdl:message name="ArrayMultiplyResponse">
<wsdl:part name="result" type="xsd:double"/>
</wsdl:message>
<wsdl:message name="ComplexMultiplyRequest">
<wsdl:part name="input" type="tns:ComplexNumberArray"/>
</wsdl:message>
<wsdl:message name="ComplexMultiplyResponse">
<wsdl:part name="result" type="tns:ComplexNumber"/>
</wsdl:message>
<wsdl:service xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="MathApiService">
<wsdl:port xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="MathApiPort" binding="tns:MathApiBinding">
<soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://localhost/MathApi.php"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

16
Tests/fixtures/Soap/mtom/simple.txt vendored Normal file
View File

@ -0,0 +1,16 @@
--uuid:0ca0e16e-feb1-426c-97d8-c4508ada5e82+id=7
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://xmlsoap.org/echoBinaryAsString</a:Action><a:MessageID>urn:uuid:1bf061d6-d532-4b0c-930b-8b8202c38b8a</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://131.107.72.15/Mtom/svc/service.svc/Soap12MtomUTF8</a:To></s:Header><s:Body><EchoBinaryAsString xmlns="http://xmlsoap.org/Ping"><array><xop:Include href="cid:http%3A%2F%2Ftempuri.org%2F1%2F632618206527087310" xmlns:xop="http://www.w3.org/2004/08/xop/include"/></array></EchoBinaryAsString></s:Body></s:Envelope>
--uuid:0ca0e16e-feb1-426c-97d8-c4508ada5e82+id=7
Content-ID: <http://tempuri.org/1/632618206527087310>
Content-Transfer-Encoding: binary
Content-Type: application/octet-stream
H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d ! H e l l o W o r l d !
--uuid:0ca0e16e-feb1-426c-97d8-c4508ada5e82+id=7--