Add 'src/BeSimple/SoapBundle/' from commit 'e99f707b105c0a0472260d8d42a5a14a7fb7a211'

git-subtree-dir: src/BeSimple/SoapBundle
git-subtree-mainline: 9a8d23fa23
git-subtree-split: e99f707b10
This commit is contained in:
Francis Besset
2013-07-19 17:00:11 +02:00
94 changed files with 5786 additions and 0 deletions

View File

@ -0,0 +1,280 @@
<?php
/*
* This file is part of the BeSimpleSoapBundle.
*
* (c) Christian Kerl <christian-kerl@web.de>
* (c) Francis Besset <francis.besset@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace BeSimple\SoapBundle\Tests\ServiceBinding;
use BeSimple\SoapBundle\ServiceBinding\RpcLiteralRequestMessageBinder;
use BeSimple\SoapBundle\ServiceDefinition as Definition;
use BeSimple\SoapBundle\Tests\fixtures\ServiceBinding as Fixtures;
use BeSimple\SoapBundle\Util\Collection;
class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
{
/**
* @dataProvider messageProvider
*/
public function testProcessMessage(Definition\Method $method, $message, $assert)
{
$messageBinder = new RpcLiteralRequestMessageBinder();
$result = $messageBinder->processMessage($method, $message);
$this->assertSame($assert, $result);
}
public function testProcessMessageWithComplexType()
{
$messageBinder = new RpcLiteralRequestMessageBinder();
$foo = new Fixtures\Foo('foobar', 19395);
$result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array(
new Definition\Argument('foo', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo')),
)),
array($foo),
$this->getDefinitionComplexTypes()
);
$this->assertEquals(array('foo' => $foo), $result);
$foo1 = new Fixtures\Foo('foobar', 29291);
$foo2 = new Fixtures\Foo('barfoo', 39392);
$foos = new \stdClass();
$foos->item = array($foo1, $foo2);
$result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array(
new Definition\Argument('foos', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]')),
)),
array($foos),
$this->getDefinitionComplexTypes()
);
$this->assertEquals(array('foos' => array($foo1, $foo2)), $result);
}
/**
* @expectedException SoapFault
*/
public function testProcessMessageSoapFault()
{
$messageBinder = new RpcLiteralRequestMessageBinder();
$foo = new Fixtures\Foo('foo', null);
$result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array(
new Definition\Argument('foo', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo')),
)),
array($foo),
$this->getDefinitionComplexTypes()
);
}
public function testProcessMessageWithComplexTypeReference()
{
$messageBinder = new RpcLiteralRequestMessageBinder();
$foo = new Fixtures\Foo('foo', 2499104);
$foos = new \stdClass();
$foos->item = array($foo, $foo);
$result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array(
new Definition\Argument('foos', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]')),
)),
array($foos),
$this->getDefinitionComplexTypes()
);
$this->assertEquals(array('foos' => array($foo, $foo)), $result);
}
public function testProcessMessageWithComplexTypeIntoComplexType()
{
$messageBinder = new RpcLiteralRequestMessageBinder();
$foo = new Fixtures\Foo('foo', 38845);
$bar = new Fixtures\Bar('bar', null);
$fooBar = new Fixtures\FooBar($foo, $bar);
$result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array(
new Definition\Argument('fooBar', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar')),
)),
array($fooBar),
$this->getDefinitionComplexTypes()
);
$this->assertEquals(array('fooBar' => $fooBar), $result);
}
public function testProcessMessageComplexTypeWithArrays()
{
$messageBinder = new RpcLiteralRequestMessageBinder();
$array = array(1, 2, 3, 4);
$stdClass = new \stdClass();
$stdClass->item = $array;
$simpleArrays = new Fixtures\SimpleArrays(null, new \stdClass(), $stdClass);
$result = $messageBinder->processMessage(
new Definition\Method('complextype_with_array', null, array(), array(
new Definition\Argument('simple_arrays', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays')),
)),
array($simpleArrays),
$this->getDefinitionComplexTypes()
);
$result = $result['simple_arrays'];
$this->assertEquals(null, $result->array1);
$this->assertEquals(array(), $result->getArray2());
$this->assertEquals($array, $result->getArray3());
}
public function testProcessMessageWithEmptyArrayComplexType()
{
$messageBinder = new RpcLiteralRequestMessageBinder();
$result = $messageBinder->processMessage(
new Definition\Method('empty_array_complex_type', null, array(), array(
new Definition\Argument('foo', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]')),
)),
array(new \stdClass()),
$this->getDefinitionComplexTypes()
);
$this->assertEquals(array('foo' => array()), $result);
}
public function testProccessMessagePreventInfiniteRecursion()
{
$messageBinder = new RpcLiteralRequestMessageBinder();
$foo = new Fixtures\FooRecursive('foo', '');
$bar = new Fixtures\BarRecursive($foo, 10394);
$foo->bar = $bar;
$result = $messageBinder->processMessage(
new Definition\Method('prevent_infinite_recursion', null, array(), array(
new Definition\Argument('foo_recursive', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive')),
)),
array($foo),
$this->getDefinitionComplexTypes()
);
$this->assertEquals(array('foo_recursive' => $foo), $result);
}
public function messageProvider()
{
$messages = array();
$messages[] = array(
new Definition\Method('no_argument'),
array(),
array(),
);
$messages[] = array(
new Definition\Method('string_argument', null, array(), array(
new Definition\Argument('foo', new Definition\Type('string')),
)),
array('bar'),
array('foo' => 'bar'),
);
$messages[] = array(
new Definition\Method('string_int_arguments', null, array(), array(
new Definition\Argument('foo', new Definition\Type('string')),
new Definition\Argument('bar', new Definition\Type('int')),
)),
array('test', 20),
array('foo' => 'test', 'bar' => 20),
);
$strings = new \stdClass();
$strings->item = array('foo', 'bar', 'barfoo');
$messages[] = array(
new Definition\Method('array_string_arguments', null, array(), array(
new Definition\Argument('foo', new Definition\Type('string[]')),
new Definition\Argument('bar', new Definition\Type('int')),
)),
array($strings, 4),
array('foo' => array('foo', 'bar', 'barfoo'), 'bar' => 4),
);
$messages[] = array(
new Definition\Method('empty_array', null, array(), array(
new Definition\Argument('foo', new Definition\Type('string[]')),
)),
array(new \stdClass()),
array('foo' => array()),
);
return $messages;
}
private function getDefinitionComplexTypes()
{
$definitionComplexTypes = array();
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo'] = $this->createComplexTypeCollection(array(
array('foo', 'string'),
array('bar', 'int'),
));
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar'] = $this->createComplexTypeCollection(array(
array('foo', 'string'),
array('bar', 'int', true),
));
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar'] = $this->createComplexTypeCollection(array(
array('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo'),
array('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar'),
));
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays'] = $this->createComplexTypeCollection(array(
array('array1', 'string[]', true),
array('array2', 'string[]'),
array('array3', 'string[]'),
));
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive'] = $this->createComplexTypeCollection(array(
array('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive'),
));
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive'] = $this->createComplexTypeCollection(array(
array('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive'),
));
return $definitionComplexTypes;
}
private function createComplexTypeCollection(array $properties)
{
$collection = new Collection('getName', 'BeSimple\SoapBundle\ServiceDefinition\ComplexType');
foreach ($properties as $property) {
$complexType = new Definition\ComplexType();
$complexType->setName($property[0]);
$complexType->setValue($property[1]);
if (isset($property[2])) {
$complexType->setNillable($property[2]);
}
$collection->add($complexType);
}
return $collection;
}
}

View File

@ -0,0 +1,10 @@
<?php
namespace BeSimple\SoapBundle\Tests\ServiceBinding\fixtures;
class Attributes
{
public $foo;
public $bar;
}

View File

@ -0,0 +1,20 @@
<?php
namespace BeSimple\SoapBundle\Tests\ServiceBinding\fixtures;
class ComplexType
{
public $bar;
private $foo;
public function getFoo()
{
return $this->foo;
}
public function setFoo($foo)
{
$this->foo = $foo;
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace BeSimple\SoapBundle\Tests\ServiceBinding\fixtures;
class Setters
{
private $foo;
private $bar;
public function getFoo()
{
return $this->foo;
}
public function setFoo($foo)
{
$this->foo = $foo;
}
public function getBar()
{
return $this->bar;
}
public function setBar($bar)
{
$this->bar = $bar;
}
}

View File

@ -0,0 +1,47 @@
<?php
/*
* This file is part of the BeSimpleSoapBundle.
*
* (c) Christian Kerl <christian-kerl@web.de>
* (c) Francis Besset <francis.besset@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace BeSimple\SoapBundle\Tests\Soap;
use BeSimple\SoapBundle\Soap\SoapRequest;
/**
* UnitTest for \BeSimple\SoapBundle\Soap\SoapRequest.
*
* @author Christian Kerl <christian-kerl@web.de>
*/
class SoapRequestTest extends \PHPUnit_Framework_TestCase
{
public function testMtomMessage()
{
$content = $this->loadRequestContentFixture('mtom/simple.txt');
$request = new SoapRequest(array(), array(), array(), array(), array(), array(), $content);
$request->server->set('CONTENT_TYPE', 'multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:0ca0e16e-feb1-426c-97d8-c4508ada5e82+id=7";start-info="application/soap+xml"');
$message = $request->getSoapMessage();
$this->assertEquals(735, strlen(trim($message)));
$this->assertEquals(1, count($request->getSoapAttachments()));
$attachment = $request->getSoapAttachments()->get('http://tempuri.org/1/632618206527087310');
$this->assertNotNull($attachment);
$this->assertEquals('application/octet-stream', $attachment->getType());
$this->assertEquals(767, strlen(trim($attachment->getContent())));
}
private function loadRequestContentFixture($name)
{
return file_get_contents(__DIR__.'/../fixtures/Soap/'.$name);
}
}

View File

@ -0,0 +1,16 @@
<?php
namespace BeSimple\SoapBundle\Tests\fixtures\ServiceBinding;
class Bar
{
private $foo;
private $bar;
public function __construct($foo, $bar)
{
$this->foo = $foo;
$this->bar = $bar;
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace BeSimple\SoapBundle\Tests\fixtures\ServiceBinding;
class BarRecursive
{
private $foo;
public function __construct(FooRecursive $foo)
{
$this->foo = $foo;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace BeSimple\SoapBundle\Tests\fixtures\ServiceBinding;
class Foo
{
public $foo;
public $bar;
public function __construct($foo, $bar)
{
$this->foo = $foo;
$this->bar = $bar;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace BeSimple\SoapBundle\Tests\fixtures\ServiceBinding;
class FooBar
{
protected $foo;
protected $bar;
public function __construct(Foo $foo, Bar $bar)
{
$this->foo = $foo;
$this->bar = $bar;
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace BeSimple\SoapBundle\Tests\fixtures\ServiceBinding;
class FooRecursive
{
public $bar;
}

View File

@ -0,0 +1,29 @@
<?php
namespace BeSimple\SoapBundle\Tests\fixtures\ServiceBinding;
class SimpleArrays
{
public $array1;
private $array2;
private $array3;
public function __construct($array1, $array2, $array3)
{
$this->array1 = $array1;
$this->array2 = $array2;
$this->array3 = $array3;
}
public function getArray2()
{
return $this->array2;
}
public function getArray3()
{
return $this->array3;
}
}

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>

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>

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--