import SOAP-WSDL 2.00_16 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 2.00_16 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_16.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
2347a88353
commit
30be0da3dc
38
t/001_use.t
Normal file
38
t/001_use.t
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More; # TODO: change to tests => N;
|
||||
use lib '../lib';
|
||||
|
||||
my @modules = qw(
|
||||
SOAP::WSDL
|
||||
SOAP::WSDL::Client
|
||||
SOAP::WSDL::Serializer::SOAP11
|
||||
SOAP::WSDL::Deserializer::SOAP11
|
||||
SOAP::WSDL::Transport::HTTP
|
||||
SOAP::WSDL::Definitions
|
||||
SOAP::WSDL::Message
|
||||
SOAP::WSDL::Operation
|
||||
SOAP::WSDL::OpMessage
|
||||
SOAP::WSDL::SOAP::Address
|
||||
SOAP::WSDL::SOAP::Body
|
||||
SOAP::WSDL::SOAP::Header
|
||||
SOAP::WSDL::SOAP::Operation
|
||||
SOAP::WSDL::Binding
|
||||
SOAP::WSDL::Port
|
||||
SOAP::WSDL::PortType
|
||||
SOAP::WSDL::Types
|
||||
SOAP::WSDL::XSD::Builtin
|
||||
SOAP::WSDL::XSD::ComplexType
|
||||
SOAP::WSDL::XSD::SimpleType
|
||||
SOAP::WSDL::XSD::Element
|
||||
SOAP::WSDL::XSD::Schema
|
||||
);
|
||||
|
||||
plan tests => 2* scalar @modules;
|
||||
|
||||
for my $module (@modules)
|
||||
{
|
||||
use_ok($module);
|
||||
ok($module->new(), "Object creation");
|
||||
}
|
||||
332
t/002_parse_wsdl.t
Normal file
332
t/002_parse_wsdl.t
Normal file
@@ -0,0 +1,332 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 17;
|
||||
use lib '../lib';
|
||||
|
||||
eval {
|
||||
require Test::XML;
|
||||
import Test::XML;
|
||||
};
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||
|
||||
my $filter;
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
|
||||
$parser->parse_string( xml() );
|
||||
|
||||
my $wsdl;
|
||||
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||
|
||||
my $types = $wsdl->first_types();
|
||||
|
||||
is $types->get_parent(), $wsdl , 'types parent';
|
||||
|
||||
my $serializer_options = {
|
||||
readable => 1,
|
||||
autotype => 1,
|
||||
namespace => { 'urn:myNamespace' => 'tns',
|
||||
"http://www.w3.org/2001/XMLSchema" => 'xsd' },
|
||||
typelib => $wsdl->first_types(),
|
||||
indent => "\t",
|
||||
};
|
||||
|
||||
my $xml;
|
||||
my $type = $types->find_type( 'urn:myNamespace', 'testSimpleType1' );
|
||||
|
||||
|
||||
ok($xml = $type->serialize( 'test', 1 , $serializer_options ),
|
||||
"serialize simple Type"
|
||||
);
|
||||
|
||||
# print $xml;
|
||||
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
is_xml( $xml, '<test type="tns:testSimpleType1">1</test>',
|
||||
"content compare" );
|
||||
};
|
||||
|
||||
$type = $types->find_type( 'urn:myNamespace', 'testSimpleList' );
|
||||
ok($xml = $type->serialize( 'testList', [ 1, 2, 3 ] , $serializer_options ),
|
||||
"serialize simple list type"
|
||||
);
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
is_xml( $xml, '<testList type="tns:testSimpleList">1 2 3</testList>',
|
||||
"content compare" );
|
||||
};
|
||||
|
||||
$type = $types->find_element( 'urn:myNamespace', 'TestElement' );
|
||||
|
||||
ok($xml = $type->serialize( undef, 1 , $serializer_options ),
|
||||
"serialize simple element");
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
is_xml( $xml, '<TestElement type="xsd:int">1</TestElement>',
|
||||
"content compare" );
|
||||
};
|
||||
|
||||
ok( $xml = $types->find_type( 'urn:myNamespace', 'length3')->serialize(
|
||||
'TestComplex', { size => -13, unit => 'BLA' } ,
|
||||
$serializer_options
|
||||
),
|
||||
"serialize complex type");
|
||||
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
is_xml( $xml, q{
|
||||
<TestComplex type="tns:length3">
|
||||
<size type="xsd:nonPositiveInteger">-13</size>
|
||||
<unit type="xsd:NMTOKEN">BLA</unit>
|
||||
</TestComplex>},
|
||||
"content compare" );
|
||||
};
|
||||
|
||||
ok($xml = $types->find_element( 'urn:myNamespace', 'TestElementComplexType')
|
||||
->serialize(
|
||||
undef, { size => -13, unit => 'BLA' } , $serializer_options ),
|
||||
"serialize element with complex type"
|
||||
);
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
is_xml( $xml, q{
|
||||
<TestElementComplexType type="tns:length3">
|
||||
<size type="xsd:nonPositiveInteger">-13</size>
|
||||
<unit type="xsd:NMTOKEN">BLA</unit>
|
||||
</TestElementComplexType>
|
||||
},
|
||||
"content compare" );
|
||||
};
|
||||
|
||||
|
||||
ok($xml = $types->find_type( 'urn:myNamespace', 'complex')->serialize(
|
||||
'complexComplex',
|
||||
{ 'length' => { size => -13, unit => 'BLA' }, 'int' => 1 },
|
||||
$serializer_options ),
|
||||
"serialize complex type with complex content"
|
||||
);
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
is_xml( $xml, q{
|
||||
<complexComplex type="tns:complex">
|
||||
<length type="tns:length3">
|
||||
<size type="xsd:nonPositiveInteger">-13</size>
|
||||
<unit type="xsd:NMTOKEN">BLA</unit>
|
||||
</length>
|
||||
<int type="xsd:int">1</int>
|
||||
</complexComplex>
|
||||
},
|
||||
"content compare" );
|
||||
}
|
||||
ok($xml = $wsdl->find_message('urn:myNamespace', 'testRequest')
|
||||
->get_part()->[0]->serialize(
|
||||
undef,
|
||||
{ test => { length => { size => -13, unit => 'BLA' } , int => 3 } },
|
||||
$serializer_options ),
|
||||
"serialize part"
|
||||
);
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
is_xml( $xml, q{
|
||||
<test type="tns:complex">
|
||||
<length type="tns:length3">
|
||||
<size type="xsd:nonPositiveInteger">-13</size>
|
||||
<unit type="xsd:NMTOKEN">BLA</unit>
|
||||
</length>
|
||||
<int type="xsd:int">3</int>
|
||||
</test>
|
||||
},
|
||||
"content compare")
|
||||
};
|
||||
|
||||
my $opt = {
|
||||
typelib => $types,
|
||||
readable => 1,
|
||||
autotype => 0,
|
||||
namespace => { 'urn:myNamespace' => 'tns',
|
||||
'http://www.w3.org/2001/XMLSchema' => 'xsd',
|
||||
'http://schemas.xmlsoap.org/wsdl/' => 'wsdl',
|
||||
},
|
||||
indent => "",
|
||||
wsdl => $wsdl,
|
||||
};
|
||||
|
||||
# ok $wsdl->explain($opt) =~ m/#optional/m;
|
||||
|
||||
sub skip_without_test_xml {
|
||||
skip("Test::XML not available", 1) if (not $Test::XML::VERSION);
|
||||
}
|
||||
|
||||
sub xml
|
||||
{
|
||||
return q{<?xml version="1.0"?>
|
||||
<definitions name="simpleType"
|
||||
targetNamespace="urn:myNamespace"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="urn:myNamespace"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:myNamespace">
|
||||
<xsd:complexType name="length3">
|
||||
<xsd:all>
|
||||
<xsd:element name="size" type="xsd:nonPositiveInteger"/>
|
||||
<xsd:element name="unit" type="xsd:NMTOKEN"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="complex">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="length" type="tns:length3"/>
|
||||
<xsd:element name="int" type="xsd:int"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="mixed" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="length" type="tns:length3"/>
|
||||
<xsd:element name="int" type="xsd:int"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:element name="TestElement" type="xsd:int"/>
|
||||
<xsd:element name="TestElementComplexType" type="tns:length3"/>
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:restriction base="int">
|
||||
<xsd:enumeration value="1"/>
|
||||
<xsd:enumeration value="2"/>
|
||||
<xsd:enumeration value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testSimpleList">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="int">
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="testSimpleUnion">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType Union test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union memberTypes="int float">
|
||||
</xsd:union>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="test" type="tns:complex"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testRequest2">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse2">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
<operation name="test2">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest2"/>
|
||||
<output message="tns:testResponse2"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort2">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort3">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort2" name="testBinding2">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort3" name="testBinding3">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
<port name="testPort2" binding="tns:testBinding2">
|
||||
<soap:address location="http://127.0.0.1/testPort2" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="testService2">
|
||||
<port name="testPort3" binding="tns:testBinding3">
|
||||
<soap:address location="http://127.0.0.1/testPort3" />
|
||||
</port>
|
||||
|
||||
</service>
|
||||
</definitions>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
96
t/003_wsdl_based_serializer.t
Normal file
96
t/003_wsdl_based_serializer.t
Normal file
@@ -0,0 +1,96 @@
|
||||
use Test::More tests => 11;
|
||||
use lib '../lib';
|
||||
use File::Basename qw(dirname);
|
||||
use Cwd;
|
||||
|
||||
my $path = dirname __FILE__;
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||
|
||||
my $filter;
|
||||
|
||||
my $parser;
|
||||
|
||||
ok($parser = SOAP::WSDL::Expat::WSDLParser->new() );
|
||||
|
||||
eval { $parser->parse_file( "$path/test.wsdl" ) };
|
||||
if ($@)
|
||||
{
|
||||
fail("parsing WSDL: $@");
|
||||
die "Can't test without parsed WSDL";
|
||||
}
|
||||
else
|
||||
{
|
||||
pass("parsing XML");
|
||||
}
|
||||
|
||||
my $wsdl;
|
||||
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||
|
||||
my $schema = $wsdl->first_types();
|
||||
|
||||
my $opt = {
|
||||
readable => 0,
|
||||
autotype => 1,
|
||||
namespace => $wsdl->get_xmlns(),
|
||||
indent => "\t",
|
||||
typelib => $schema,
|
||||
};
|
||||
|
||||
is( $schema->find_type( 'urn:myNamespace', 'testSimpleType1' )->serialize(
|
||||
'test', 1 , $opt ),
|
||||
q{<test type="tns:testSimpleType1">1</test>} , "serialize simple type");
|
||||
|
||||
is( $schema->find_type( 'urn:myNamespace', 'testSimpleList' )->serialize(
|
||||
'testList', [ 1, 2, 3 ] , $opt),
|
||||
q{<testList type="tns:testSimpleList">1 2 3</testList>},
|
||||
"serialize simple list type"
|
||||
);
|
||||
|
||||
is( $schema->find_element( 'urn:myNamespace', 'TestElement' )->serialize(
|
||||
undef, 1 , $opt),
|
||||
q{<TestElement type="xsd:int">1</TestElement>}, "Serialize element"
|
||||
);
|
||||
|
||||
$opt->{ readable } = 0;
|
||||
|
||||
is( $schema->find_type( 'urn:myNamespace', 'length3')->serialize(
|
||||
'TestComplex', { size => -13, unit => 'BLA' } ,
|
||||
$opt ),
|
||||
q{<TestComplex type="tns:length3" >}
|
||||
. q{<size type="xsd:nonPositiveInteger">-13</size>}
|
||||
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestComplex>}
|
||||
, "serialize complex type" );
|
||||
|
||||
is( $schema->find_element( 'urn:myNamespace', 'TestElementComplexType')->serialize(
|
||||
undef, { size => -13, unit => 'BLA' } ,
|
||||
$opt ),
|
||||
q{<TestElementComplexType type="tns:length3" >}
|
||||
. q{<size type="xsd:nonPositiveInteger">-13</size>}
|
||||
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestElementComplexType>},
|
||||
"element with complex type"
|
||||
);
|
||||
|
||||
is( $schema->find_type( 'urn:myNamespace', 'complex')->serialize(
|
||||
'complexComplex',
|
||||
{ 'length' => { size => -13, unit => 'BLA' }, 'int' => 1 },
|
||||
$opt ),
|
||||
q{<complexComplex type="tns:complex" >}
|
||||
. q{<length type="tns:length3" >}
|
||||
. q{<size type="xsd:nonPositiveInteger">-13</size>}
|
||||
. q{<unit type="xsd:NMTOKEN">BLA</unit></length>}
|
||||
. q{<int type="xsd:int">1</int></complexComplex>},
|
||||
"nested complex type"
|
||||
);
|
||||
|
||||
is( $wsdl->find_message('urn:myNamespace', 'testRequest')->first_part()->serialize(
|
||||
undef, { test => { length => { size => -13, unit => 'BLA' } , int => 3 } },
|
||||
$opt ),
|
||||
q{<test type="tns:complex" >}
|
||||
. q{<length type="tns:length3" >}
|
||||
. q{<size type="xsd:nonPositiveInteger">-13</size>}
|
||||
. q{<unit type="xsd:NMTOKEN">BLA</unit>}
|
||||
. q{</length><int type="xsd:int">3</int></test>}
|
||||
, "Message part"
|
||||
);
|
||||
|
||||
398
t/004_parse_wsdl.t
Normal file
398
t/004_parse_wsdl.t
Normal file
@@ -0,0 +1,398 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 5;
|
||||
use lib '../lib';
|
||||
|
||||
eval {
|
||||
require Test::XML;
|
||||
import Test::XML;
|
||||
};
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||
|
||||
my $parser;
|
||||
|
||||
ok($parser = SOAP::WSDL::Expat::WSDLParser->new(), "Object creation");
|
||||
|
||||
eval { $parser->parse_string( xml() ) };
|
||||
if ($@)
|
||||
{
|
||||
fail("parsing WSDL");
|
||||
die "Can't test without parsed WSDL: $@";
|
||||
}
|
||||
else
|
||||
{
|
||||
pass("parsing XML");
|
||||
}
|
||||
|
||||
my $wsdl;
|
||||
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||
|
||||
my $schema = $wsdl->get_types()->[0]->get_schema()->[0] || die "No schema !";
|
||||
|
||||
my $opt = {
|
||||
typelib => $wsdl->first_types,
|
||||
readable => 1,
|
||||
autotype => 0,
|
||||
namespace => { 'http://www.example.org/MessageGateway2/' => 'tns',
|
||||
'http://www.w3.org/2001/XMLSchema' => 'xsd',
|
||||
'http://schemas.xmlsoap.org/wsdl/' => 'wsdl',
|
||||
},
|
||||
indent => "",
|
||||
};
|
||||
|
||||
my $data = { EnqueueMessage => {
|
||||
MMessage => {
|
||||
MRecipientURI => 'anyURI',
|
||||
MSenderAddress => 'a string',
|
||||
MMessageContent => 'a string',
|
||||
MSubject => 'a string',
|
||||
MDeliveryReportRecipientURI => 'anyURI',
|
||||
MKeepalive => {
|
||||
MKeepaliveTimeout => 1234567,
|
||||
MKeepaliveErrorPolicy => ' ( suppress | report ) ',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
SKIP: { skip_without_test_xml();
|
||||
is_xml( $wsdl->find_message(
|
||||
"http://www.example.org/MessageGateway2/" ,'EnqueueMessageRequest'
|
||||
)->first_part()->serialize( 'test', $data, $opt ),
|
||||
xml_message()
|
||||
, "Serialized message part"
|
||||
);
|
||||
}
|
||||
|
||||
sub skip_without_test_xml {
|
||||
skip("Test::XML not available", 1) if (not $Test::XML::VERSION);
|
||||
}
|
||||
|
||||
sub xml_message {
|
||||
return
|
||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||
<MMessage>
|
||||
<MRecipientURI>anyURI</MRecipientURI>
|
||||
<MSenderAddress>a string</MSenderAddress>
|
||||
<MMessageContent>a string</MMessageContent>
|
||||
<MSubject>a string</MSubject>
|
||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||
<MKeepalive>
|
||||
<MKeepaliveTimeout>1234567</MKeepaliveTimeout>
|
||||
<MKeepaliveErrorPolicy> ( suppress | report ) </MKeepaliveErrorPolicy>
|
||||
</MKeepalive>
|
||||
</MMessage>
|
||||
</EnqueueMessage>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
sub xml {
|
||||
return q{<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions name="MessageGateway"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
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/MessageGateway2/">
|
||||
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A type containing all elements of a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MRecipientURI" type="xsd:anyURI" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
The recipient in URI notaitions. Valid URI schemas are: mailto:, sms:,
|
||||
phone:. Not all URI schemas need to be implemented at the current
|
||||
implementation stage.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSenderAddress" type="xsd:string" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
E-Mail sender address. Ignored for all but mailto: recipient URIs.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MMessageContent" type="xsd:string" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Message Content.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSubject" type="xsd:string" minOccurs="0" maxOccurs="1">
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Message Subject. Ignored for all but mailto: URIs
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MDeliveryReportRecipientURI" type="xsd:anyURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
||||
URI to send a delivery report to. May be of one of the following schemes:
|
||||
mailto:, http:, https:. Reports to mailto: URIs are sent as plaintext,
|
||||
reports to http(s) URIs are sent as SOAP requests following the
|
||||
MessageGatewayClient service definition.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepalive" type="tns:TKeepalive" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Container for keepalive information. May be missing.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepalive">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing keeplive information.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
|
||||
<xsd:element name="MKeepaliveTimeout" type="xsd:double">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Keepalive timeout. The keepalive timeout spezifies how long the sending of
|
||||
a message will be delayed waiting for keepalive updates. If a keepalive
|
||||
update is received during this period, the timeout will be reset. If not,
|
||||
the message will be sent after the timeout has expired.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepaliveErrorPolicy" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
Policy to comply to in case of system errors. Valid values are "suppress"
|
||||
and "report". If the policy is set to "suppress", keepalive messages will
|
||||
not be sent to their recipients in case of partial system failure, even if
|
||||
the keepalive has expired. This may result in "false negatives", i.e.
|
||||
messages may not be sent, even though their keepalive has expired. If the
|
||||
value is "report", keepalive messages will be sent from any cluster node.
|
||||
This may result in "false positive" alerts.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="suppress"></xsd:enumeration>
|
||||
<xsd:enumeration value="report"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing a message ID.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Type containing all elements of a keppalive update / remove request.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The ID for the message to update / remove
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="MAction" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The action to perform. Valid values are: "remove", "update". On "remove",
|
||||
the message with the ID specified will be removed from the queue, thus it
|
||||
will never be sent, even if it's timeout expires. On "update" the
|
||||
keepalive timeout of the corresponding message will be reset.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="remove"></xsd:enumeration>
|
||||
<xsd:enumeration value="update"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="KeepaliveMessage" type="tns:TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Keepalive message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="KeepaliveMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Response element for a keepalive request</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="EnqueueMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message response element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:complexType name="TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessage" type="tns:TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The keepalive message to process.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MKeepaliveMessage" type="tns:TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a keepalive message to process.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="EnqueueMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessage">
|
||||
<wsdl:documentation>inputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
|
||||
</wsdl:message>
|
||||
<wsdl:message name="EnqueueMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessageResponse">
|
||||
<wsdl:documentation>outputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessage">
|
||||
|
||||
<wsdl:documentation>input parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessageResponse">
|
||||
<wsdl:documentation>output parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="MGWPortType">
|
||||
<wsdl:documentation>
|
||||
generic port type for all methods required for sending messages over the mosaic
|
||||
message gatewa
|
||||
</wsdl:documentation>
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to enqueue a normal (immediate send) or a delayed message with
|
||||
keepalive functionality.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:EnqueueMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:EnqueueMessageResponse"></wsdl:output>
|
||||
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to update or remove a
|
||||
keepalive message.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:KeepaliveMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:KeepaliveMessageResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="MGWBinding" type="tns:MGWPortType">
|
||||
<wsdl:documentation>Generic binding for all (SOAP) port</wsdl:documentation>
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<soap:operation soapAction="http://www.example.org/MessageGateway2/EnqueueMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<soap:operation
|
||||
soapAction="http://www.example.org/MessageGateway2/KeepaliveMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="MessageGateway">
|
||||
<wsdl:documentation>
|
||||
Web Service for sending messages over the mosaic message gatewa
|
||||
</wsdl:documentation>
|
||||
|
||||
<wsdl:port name="HTTPPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the mosaic message gatewa</wsdl:documentation>
|
||||
<soap:address location="https://www.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>};
|
||||
}
|
||||
24
t/005_parse_contributed.t
Normal file
24
t/005_parse_contributed.t
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw(no_plan);
|
||||
use lib '../lib';
|
||||
use File::Basename qw(dirname);
|
||||
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||
|
||||
my $parser;
|
||||
|
||||
ok($parser = SOAP::WSDL::Expat::WSDLParser->new(), "Object creation");
|
||||
eval { $parser->parse_file( dirname(__FILE__) .'/contributed.wsdl' ) };
|
||||
if ($@)
|
||||
{
|
||||
fail("parsing WSDL");
|
||||
die "Can't test without parsed WSDL: $@";
|
||||
}
|
||||
else
|
||||
{
|
||||
pass("parsing XML");
|
||||
}
|
||||
|
||||
my $wsdl;
|
||||
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||
52
t/006_client.t
Normal file
52
t/006_client.t
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Test::More tests => 3; # qw/no_plan/; # TODO: change to tests => N;
|
||||
use lib '../lib';
|
||||
|
||||
eval {
|
||||
require Test::XML;
|
||||
import Test::XML
|
||||
};
|
||||
|
||||
use Cwd;
|
||||
|
||||
my $path = cwd;
|
||||
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
||||
readable => 1,
|
||||
outputxml => 1, # required, if not set ::SOM serializer will be loaded on
|
||||
# call
|
||||
)->wsdlinit();
|
||||
|
||||
$soap->servicename('MessageGateway');
|
||||
|
||||
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
||||
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
is_xml( $soap->call( 'EnqueueMessage' , EnqueueMessage => {
|
||||
'MMessage' => {
|
||||
'MRecipientURI' => 'mailto:test@example.com' ,
|
||||
'MMessageContent' => 'TestContent for Message' ,
|
||||
}
|
||||
}
|
||||
)
|
||||
, q{<SOAP-ENV:Envelope
|
||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body ><EnqueueMessage xmlns="http://www.example.org/MessageGateway2/"><MMessage>
|
||||
<MRecipientURI>mailto:test@example.com</MRecipientURI>
|
||||
<MMessageContent>TestContent for Message</MMessageContent>
|
||||
</MMessage></EnqueueMessage></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
||||
, "content comparison with optional elements");
|
||||
}
|
||||
|
||||
sub skip_without_test_xml {
|
||||
my $number = shift || 1;
|
||||
skip("Test::XML not available", $number) if (not $Test::XML::VERSION);
|
||||
}
|
||||
36
t/007_envelope.t
Normal file
36
t/007_envelope.t
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More qw/no_plan/;
|
||||
use lib '../lib';
|
||||
|
||||
eval {
|
||||
require Test::XML;
|
||||
import Test::XML;
|
||||
};
|
||||
|
||||
use_ok qw/SOAP::WSDL::Serializer::SOAP11/;
|
||||
|
||||
my $opt = {
|
||||
readable => 1,
|
||||
namespace => {
|
||||
},
|
||||
};
|
||||
my $xml;
|
||||
ok( $xml = SOAP::WSDL::Serializer::SOAP11->serialize(
|
||||
undef, undef, $opt
|
||||
),
|
||||
"serialize empty envelope"
|
||||
);
|
||||
|
||||
SKIP: {
|
||||
skip 'Cannot test XML content without Test::XML', 1
|
||||
if (not $Test::XML::VERSION);
|
||||
is_xml( $xml, q{<SOAP-ENV:Envelope
|
||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body >
|
||||
</SOAP-ENV:Body>
|
||||
</SOAP-ENV:Envelope>}
|
||||
, 'Content comparison' );
|
||||
}
|
||||
30
t/008_client_wsdl_complexType.t
Normal file
30
t/008_client_wsdl_complexType.t
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use lib '../lib';
|
||||
|
||||
use Cwd;
|
||||
|
||||
my $path = cwd;
|
||||
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/008_complexType.wsdl'
|
||||
)->wsdlinit();
|
||||
|
||||
my $wsdl = $soap->get_definitions;
|
||||
my $schema = $wsdl->first_types();
|
||||
my $type = $schema->find_type('Test' , 'testComplexTypeAll');
|
||||
my $element = $type->get_element()->[0];
|
||||
|
||||
is $element->get_minOccurs() , 0, "minOccurs default for all";
|
||||
is $element->get_maxOccurs() , 1, "maxOccurs default for all";
|
||||
|
||||
$type = $schema->find_type('Test' , 'testComplexTypeSequence');
|
||||
$element = $type->get_element()->[0];
|
||||
|
||||
is $element->get_minOccurs() , 1, "minOccurs default for sequence";
|
||||
is $element->get_maxOccurs() , 1, "maxOccurs default for sequence";
|
||||
87
t/009_data_classes.t
Normal file
87
t/009_data_classes.t
Normal file
@@ -0,0 +1,87 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 4;
|
||||
use lib 't/lib';
|
||||
use lib '../lib';
|
||||
use lib 'lib';
|
||||
|
||||
use SOAP::WSDL::Expat::MessageParser;
|
||||
use Cwd;
|
||||
|
||||
|
||||
use SOAP::WSDL;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
my $path = cwd;
|
||||
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
||||
|
||||
|
||||
my $parser;
|
||||
|
||||
ok $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => FakeResolver->new(),
|
||||
}), "Object creation";
|
||||
|
||||
# TODO factor out into bool test
|
||||
|
||||
$parser->parse( xml() );
|
||||
|
||||
if($parser->get_data()->get_MMessage()->get_MDeliveryReportRecipientURI()) {
|
||||
pass "bool context overloading";
|
||||
}
|
||||
else
|
||||
{
|
||||
fail "bool context overloading"
|
||||
}
|
||||
|
||||
# TODO factor out into different test
|
||||
|
||||
my $soap = SOAP::WSDL->new(
|
||||
readable => 1,
|
||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
||||
)->wsdlinit();
|
||||
|
||||
$soap->servicename('MessageGateway');
|
||||
|
||||
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
||||
ok( $soap->readable( 0 ) , "Set readable");
|
||||
|
||||
sub xml {
|
||||
q{<SOAP-ENV:Envelope
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body ><EnqueueMessage><MMessage>
|
||||
<MRecipientURI>mailto:test@example.com</MRecipientURI>
|
||||
<MMessageContent>TestContent for Message</MMessageContent>
|
||||
<MMessageContent>TestContent for Message 2</MMessageContent>
|
||||
<MSenderAddress>martin.kutter@example.com</MSenderAddress>
|
||||
<MDeliveryReportRecipientURI>mailto:test@example.com</MDeliveryReportRecipientURI>
|
||||
</MMessage></EnqueueMessage></SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
||||
}
|
||||
|
||||
# data classes reside in t/lib/Typelib/
|
||||
BEGIN {
|
||||
package FakeResolver;
|
||||
{
|
||||
my %class_list = (
|
||||
'EnqueueMessage' => 'Typelib::TEnqueueMessage',
|
||||
'EnqueueMessage/MMessage' => 'Typelib::TMessage',
|
||||
'EnqueueMessage/MMessage/MRecipientURI' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI',
|
||||
'EnqueueMessage/MMessage/MMessageContent' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'EnqueueMessage/MMessage/MSenderAddress' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'EnqueueMessage/MMessage/MMessageContent' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'EnqueueMessage/MMessage/MDeliveryReportRecipientURI' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI',
|
||||
);
|
||||
|
||||
sub new { return bless {}, 'FakeResolver' };
|
||||
|
||||
sub get_class {
|
||||
my $name = join('/', @{ $_[1] });
|
||||
return ($class_list{ $name }) ? $class_list{ $name }
|
||||
: warn "no class found for $name";
|
||||
};
|
||||
};
|
||||
};
|
||||
36
t/011_simpleType.t
Normal file
36
t/011_simpleType.t
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/perl
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
use lib 'lib/';
|
||||
use lib 't/lib/';
|
||||
use lib '../lib/';
|
||||
|
||||
use_ok qw(MySimpleType);
|
||||
|
||||
# simple type derived from builtin via restriction
|
||||
my $obj = MySimpleType->new({ value => 'test'});
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType')
|
||||
, 'inherited class';
|
||||
is $obj, 'test', 'stringification';
|
||||
|
||||
# simple type derived from builtin via list
|
||||
$obj = MySimpleListType->new({ value => [ 'test', 'test2' ]});
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType')
|
||||
, 'inherited class';
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::list')
|
||||
, 'inherited class';
|
||||
is $obj, 'test test2', 'stringification';
|
||||
|
||||
# simple type derived from atomic simple type (restriction)
|
||||
$obj = MyAtomicSimpleType->new({ value => 'test' });
|
||||
ok $obj->isa('MySimpleType') , 'inherited class';
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::SimpleType::restriction')
|
||||
, 'inherited class';
|
||||
is $obj, 'test', 'stringification';
|
||||
|
||||
# simple type derived from atomic simple type (list)
|
||||
$obj = MyAtomicSimpleListType->new({ value => [ 'test', 'test2' ] });
|
||||
ok $obj->isa('MySimpleListType') , 'inherited class';
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::SimpleType::restriction')
|
||||
, 'inherited class';
|
||||
is $obj, 'test test2', 'stringification';
|
||||
68
t/012_element.t
Normal file
68
t/012_element.t
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/perl
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
use lib 'lib/';
|
||||
use lib '../lib/';
|
||||
use lib 't/lib';
|
||||
|
||||
use_ok qw(SOAP::WSDL::XSD::Typelib::Element);
|
||||
use_ok qw( MyElement );
|
||||
|
||||
# simple type derived from builtin via restriction
|
||||
my $obj = MyElement->new({ value => 'test'});
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType')
|
||||
, 'inherited class';
|
||||
is $obj, '<MyElementName xmlns="urn:Test" >test</MyElementName>', 'stringification';
|
||||
|
||||
$obj = MyAtomicComplexTypeElement->new({ test=> 'Test', test2 => 'Test2'});
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||
, 'inherited class';
|
||||
|
||||
ok $obj->get_test->isa('SOAP::WSDL::XSD::Typelib::Builtin::string')
|
||||
, 'element isa';
|
||||
|
||||
is $obj, '<MyAtomicComplexTypeElement xmlns="urn:Test" ><test >Test</test>'
|
||||
. '<test2 >Test2</test2></MyAtomicComplexTypeElement>'
|
||||
, 'stringification';
|
||||
|
||||
$obj = MyElement->new({ value => undef});
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType')
|
||||
, 'inherited class';
|
||||
|
||||
# is $obj, '<MyElementName xmlns="urn:Test" xsi:nil="true" />', 'nillable stringification';
|
||||
|
||||
$obj = MyAtomicComplexTypeElement->new({ test=> 'Test', test2 => [ 'Test2', 'Test3' ]});
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||
, 'inherited class';
|
||||
is $obj, '<MyAtomicComplexTypeElement xmlns="urn:Test" ><test >Test</test>'
|
||||
. '<test2 >Test2</test2>'
|
||||
. '<test2 >Test3</test2>'
|
||||
. '</MyAtomicComplexTypeElement>'
|
||||
, 'multi value stringification';
|
||||
|
||||
ok $obj = MyComplexTypeElement->new({ MyTestName => 'test' });
|
||||
is $obj, '<MyComplexTypeElement xmlns="urn:Test" ><MyTestName >test</MyTestName ></MyComplexTypeElement>';
|
||||
|
||||
__END__
|
||||
|
||||
# simple type derived from builtin via list
|
||||
$obj = MySimpleListType->new({ value => [ 'test', 'test2' ]});
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType')
|
||||
, 'inherited class';
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::list')
|
||||
, 'inherited class';
|
||||
is $obj, 'test test2', 'stringification';
|
||||
|
||||
# simple type derived from atomic simple type (restriction)
|
||||
$obj = MyAtomicSimpleType->new({ value => 'test' });
|
||||
ok $obj->isa('MySimpleType') , 'inherited class';
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::SimpleType::restriction')
|
||||
, 'inherited class';
|
||||
is $obj, 'test', 'stringification';
|
||||
|
||||
# simple type derived from atomic simple type (list)
|
||||
$obj = MyAtomicSimpleListType->new({ value => [ 'test', 'test2' ] });
|
||||
ok $obj->isa('MySimpleListType') , 'inherited class';
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::SimpleType::restriction')
|
||||
, 'inherited class';
|
||||
is $obj, 'test test2', 'stringification';
|
||||
44
t/013_complexType.t
Normal file
44
t/013_complexType.t
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/perl
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
use lib 'lib/';
|
||||
use lib '../lib/';
|
||||
use lib 't/lib';
|
||||
|
||||
use_ok qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
use_ok qw( MyComplexType );
|
||||
# simple type derived from builtin via restriction
|
||||
my $obj = MyComplexType->new({ MyTestName => 'test' });
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||
, 'inherited class';
|
||||
is $obj, '<MyTestName >test</MyTestName >', 'stringification';
|
||||
|
||||
$obj = MyComplexType->new({ MyTestName => [ 'test', 'test2' ] });
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||
, 'inherited class';
|
||||
is $obj, '<MyTestName >test</MyTestName ><MyTestName >test2</MyTestName >',
|
||||
'stringification';
|
||||
|
||||
# try on the fly factory
|
||||
@MyComplexType2::ISA = ('SOAP::WSDL::XSD::Typelib::ComplexType');
|
||||
{
|
||||
use Class::Std::Storable;
|
||||
my %MyTestName_of;
|
||||
|
||||
MyComplexType2->_factory(
|
||||
[ qw(MyTestName) ], # order
|
||||
{ MyTestName => \%MyTestName_of }, # attribute lookup map
|
||||
{ MyTestName => 'MyElement' } # class name lookup map
|
||||
);
|
||||
}
|
||||
|
||||
$obj = MyComplexType2->new({ MyTestName => [ 'test', 'test2' ] });
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||
, 'inherited class (on the fly-factory object)';
|
||||
is $obj, '<MyTestName >test</MyTestName><MyTestName >test2</MyTestName>',
|
||||
'stringification (on the fly-factory object)';
|
||||
# print Dumper $obj->get_MyTestName();
|
||||
|
||||
|
||||
__END__
|
||||
|
||||
63
t/016_client_object.t
Normal file
63
t/016_client_object.t
Normal file
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/perl
|
||||
use Test::More tests => 9;
|
||||
use strict;
|
||||
use lib 'lib/';
|
||||
use lib '../lib/';
|
||||
use lib 't/lib';
|
||||
|
||||
use_ok qw(SOAP::WSDL::SOAP::Typelib::Fault11);
|
||||
use_ok qw(SOAP::WSDL::XSD::Typelib::Element);
|
||||
use_ok qw( MyElement );
|
||||
use_ok qw( SOAP::WSDL::Client );
|
||||
# simple type derived from builtin via restriction
|
||||
|
||||
my $obj = MyAtomicComplexTypeElement->new({ test=> 'Test', test2 => 'Test2'});
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||
, 'inherited class';
|
||||
|
||||
# print $obj->get_test;
|
||||
|
||||
ok $obj->get_test->isa('SOAP::WSDL::XSD::Typelib::Builtin::string')
|
||||
, 'element isa';
|
||||
|
||||
is $obj, '<MyAtomicComplexTypeElement xmlns="urn:Test" ><test >Test</test>'
|
||||
. '<test2 >Test2</test2></MyAtomicComplexTypeElement>'
|
||||
, 'stringification';
|
||||
|
||||
my $soap = SOAP::WSDL::Client->new( {
|
||||
class_resolver => 'FakeResolver',
|
||||
} )
|
||||
->proxy('http://bla')
|
||||
->no_dispatch(1);
|
||||
|
||||
# TODO: use Test::XML for testing and re-integrate
|
||||
|
||||
# is $soap->call('Test', $obj), q{<SOAP-ENV:Envelope }
|
||||
# . q{xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" }
|
||||
# . q{xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >}
|
||||
# . q{<SOAP-ENV:Body><MyAtomicComplexTypeElement xmlns="urn:Test" >}
|
||||
# . q{<test >Test</test>}
|
||||
# . q{<test2 >Test2</test2>}
|
||||
# . q{</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
||||
# , 'SOAP Envelope generation with objects';
|
||||
|
||||
my $result = $soap->proxy('http://bla')
|
||||
->no_dispatch(0)
|
||||
->call('Test', $obj);
|
||||
ok $result->isa('SOAP::WSDL::SOAP::Typelib::Fault11'),
|
||||
'return fault on impossible call';
|
||||
ok ! $result, 'fault is false in boolean context';
|
||||
|
||||
package FakeResolver;
|
||||
|
||||
sub get_class {
|
||||
my %class_list = (
|
||||
'Fault' => 'SOAP::WSDL::SOAP::Typelib::Fault11',
|
||||
'Fault/faultactor' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'Fault/faultcode' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI',
|
||||
'Fault/faultstring' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'Fault/detail' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyType',
|
||||
);
|
||||
return $class_list{ $_[1] };
|
||||
}
|
||||
|
||||
442
t/017_generator.t
Normal file
442
t/017_generator.t
Normal file
@@ -0,0 +1,442 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 22;
|
||||
use lib '../lib';
|
||||
use SOAP::WSDL::Expat::WSDLParser;
|
||||
use SOAP::WSDL::Expat::MessageParser;
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
use Carp qw(confess);
|
||||
|
||||
use_ok qw(SOAP::WSDL::Generator::Template::XSD);
|
||||
|
||||
my $path = dirname __FILE__;
|
||||
|
||||
my $wsdl;
|
||||
ok( $wsdl = SOAP::WSDL::Expat::WSDLParser->new()
|
||||
->parse_string( xml() ) , "get object tree");
|
||||
|
||||
my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
definitions => $wsdl,
|
||||
OUTPUT_PATH => "$path/testlib",
|
||||
typemap_prefix => "Test::Typemap",
|
||||
type_prefix => "Test::Type",
|
||||
element_prefix => "Test::Element",
|
||||
interface_prefix => "Test::Interface",
|
||||
});
|
||||
# local $SIG{__WARN__} = sub { confess @_};
|
||||
$generator->generate_interface();
|
||||
$generator->generate_typemap();
|
||||
{
|
||||
local $SIG{__WARN__} = sub {};
|
||||
$generator->generate_typelib();
|
||||
}
|
||||
|
||||
eval "use lib '$path/testlib'";
|
||||
|
||||
use_ok qw(Test::Element::EnqueueMessage);
|
||||
use_ok qw(Test::Type::TMessage);
|
||||
use_ok qw(Test::Typemap::MessageGateway);
|
||||
|
||||
my $data = {
|
||||
MMessage => {
|
||||
MRecipientURI => 'anyURI',
|
||||
MSenderAddress => 'a string',
|
||||
MMessageContent => 'a string',
|
||||
MSubject => 'a string',
|
||||
MDeliveryReportRecipientURI => 'anyURI',
|
||||
MKeepalive => {
|
||||
MKeepaliveTimeout => 1234567,
|
||||
MKeepaliveErrorPolicy => ' ( suppress | report ) ',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ok Test::Element::EnqueueMessage->new( $data ) , '(generated) object constructor';
|
||||
|
||||
my $message_parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'Test::Typemap::MessageGateway',
|
||||
strict => 0,
|
||||
});
|
||||
|
||||
eval { $message_parser->parse_string( xml_message2() ) };
|
||||
ok ( !$@, 'parse XML message: ' . $@);
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO = 'support embedded atomic simpleType/complexType definitions';
|
||||
eval { $message_parser->parse_string( xml_message() ) };
|
||||
ok ( !$@, 'parse XML message using atomic type definitions');
|
||||
};
|
||||
|
||||
SKIP: {
|
||||
eval "require Test::Pod; ";
|
||||
skip 'Cannot test generated POD without Test::POD' , 12 if $@;
|
||||
|
||||
foreach my $module (Test::Pod::all_pod_files( "$path/testlib")) {
|
||||
Test::Pod::pod_file_ok( $module )
|
||||
}
|
||||
}
|
||||
|
||||
use_ok qw(Test::Interface::MessageGateway::HTTPPort);
|
||||
|
||||
my $interface =
|
||||
Test::Interface::MessageGateway::HTTPPort->new( { no_dispatch => 1, } );
|
||||
|
||||
ok $interface->EnqueueMessage(
|
||||
{
|
||||
MMessage => { #Test::Type::TMessage
|
||||
MRecipientURI => 'mailto:recipient@example.org',
|
||||
MSenderAddress => 'mailto:sender@example.org',
|
||||
MMessageContent => 'content',
|
||||
MSubject => 'subject',
|
||||
MDeliveryReportRecipientURI => 'mailto:report.recipient@example.org',
|
||||
}
|
||||
}),
|
||||
'interface operation call (no_dispatch set)';
|
||||
|
||||
|
||||
# cleanup
|
||||
rmtree "$path/testlib";
|
||||
|
||||
# print $wsdl->explain();
|
||||
|
||||
sub xml_message {
|
||||
return
|
||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||
<MMessage>
|
||||
<MRecipientURI>anyURI</MRecipientURI>
|
||||
<MSenderAddress>a string</MSenderAddress>
|
||||
<MMessageContent>a string</MMessageContent>
|
||||
<MSubject>a string</MSubject>
|
||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||
<MKeepalive>
|
||||
<MKeepaliveTimeout>1234567</MKeepaliveTimeout>
|
||||
<MKeepaliveErrorPolicy> ( suppress | report ) </MKeepaliveErrorPolicy>
|
||||
</MKeepalive>
|
||||
</MMessage>
|
||||
</EnqueueMessage>
|
||||
};
|
||||
}
|
||||
|
||||
sub xml_message2 {
|
||||
return
|
||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||
<MMessage>
|
||||
<MRecipientURI>anyURI</MRecipientURI>
|
||||
<MSenderAddress>a string</MSenderAddress>
|
||||
<MMessageContent>a string</MMessageContent>
|
||||
<MSubject>a string</MSubject>
|
||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||
</MMessage>
|
||||
</EnqueueMessage>
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
sub xml {
|
||||
return q{<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions name="MessageGateway"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
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/MessageGateway2/">
|
||||
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A type containing all elements of a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MRecipientURI" type="xsd:anyURI" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
The recipient in URI notaitions. Valid URI schemas are: mailto:, sms:,
|
||||
phone:. Not all URI schemas need to be implemented at the current
|
||||
implementation stage.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSenderAddress" type="xsd:string" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
E-Mail sender address. Ignored for all but mailto: recipient URIs.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MMessageContent" type="xsd:string" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Message Content.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSubject" type="xsd:string" minOccurs="0" maxOccurs="1">
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Message Subject. Ignored for all but mailto: URIs
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MDeliveryReportRecipientURI" type="xsd:anyURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
||||
URI to send a delivery report to. May be of one of the following schemes:
|
||||
mailto:, http:, https:. Reports to mailto: URIs are sent as plaintext,
|
||||
reports to http(s) URIs are sent as SOAP requests following the
|
||||
MessageGatewayClient service definition.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepalive" type="tns:TKeepalive" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Container for keepalive information. May be missing.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepalive">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing keeplive information.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
|
||||
<xsd:element name="MKeepaliveTimeout" type="xsd:double">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Keepalive timeout. The keepalive timeout spezifies how long the sending of
|
||||
a message will be delayed waiting for keepalive updates. If a keepalive
|
||||
update is received during this period, the timeout will be reset. If not,
|
||||
the message will be sent after the timeout has expired.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepaliveErrorPolicy" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
Policy to comply to in case of system errors. Valid values are "suppress"
|
||||
and "report". If the policy is set to "suppress", keepalive messages will
|
||||
not be sent to their recipients in case of partial system failure, even if
|
||||
the keepalive has expired. This may result in "false negatives", i.e.
|
||||
messages may not be sent, even though their keepalive has expired. If the
|
||||
value is "report", keepalive messages will be sent from any cluster node.
|
||||
This may result in "false positive" alerts.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="suppress"></xsd:enumeration>
|
||||
<xsd:enumeration value="report"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing a message ID.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Type containing all elements of a keppalive update / remove request.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The ID for the message to update / remove
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="MAction" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The action to perform. Valid values are: "remove", "update". On "remove",
|
||||
the message with the ID specified will be removed from the queue, thus it
|
||||
will never be sent, even if it's timeout expires. On "update" the
|
||||
keepalive timeout of the corresponding message will be reset.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="remove"></xsd:enumeration>
|
||||
<xsd:enumeration value="update"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="KeepaliveMessage" type="tns:TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Keepalive message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="KeepaliveMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Response element for a keepalive request</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="EnqueueMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message response element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:complexType name="TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessage" type="tns:TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The keepalive message to process.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MKeepaliveMessage" type="tns:TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a keepalive message to process.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="EnqueueMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessage">
|
||||
<wsdl:documentation>inputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
|
||||
</wsdl:message>
|
||||
<wsdl:message name="EnqueueMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessageResponse">
|
||||
<wsdl:documentation>outputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessage">
|
||||
|
||||
<wsdl:documentation>input parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessageResponse">
|
||||
<wsdl:documentation>output parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="MGWPortType">
|
||||
<wsdl:documentation>
|
||||
generic port type for all methods required for sending messages over the mosaic
|
||||
message gatewa
|
||||
</wsdl:documentation>
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to enqueue a normal (immediate send) or a delayed message with
|
||||
keepalive functionality.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:EnqueueMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:EnqueueMessageResponse"></wsdl:output>
|
||||
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to update or remove a
|
||||
keepalive message.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:KeepaliveMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:KeepaliveMessageResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="MGWBinding" type="tns:MGWPortType">
|
||||
<wsdl:documentation>Generic binding for all (SOAP) port</wsdl:documentation>
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<soap:operation soapAction="http://www.example.org/MessageGateway2/EnqueueMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<soap:operation
|
||||
soapAction="http://www.example.org/MessageGateway2/KeepaliveMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="MessageGateway">
|
||||
<wsdl:documentation>
|
||||
Web Service for sending messages over the message gatewa
|
||||
</wsdl:documentation>
|
||||
|
||||
<wsdl:port name="HTTPPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the message gateway</wsdl:documentation>
|
||||
<soap:address location="https://www.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>};
|
||||
}
|
||||
10
t/020_storable.t
Normal file
10
t/020_storable.t
Normal file
@@ -0,0 +1,10 @@
|
||||
use Test::More tests => 1;
|
||||
use lib '../lib';
|
||||
eval "require SOAP::WSDL::XSD::Typelib::Builtin";
|
||||
use Storable;
|
||||
|
||||
my $long = SOAP::WSDL::XSD::Typelib::Builtin::long->new();
|
||||
$long->set_value( 9 );
|
||||
my $clone = Storable::thaw( Storable::freeze( $long ) );
|
||||
|
||||
is $clone->serialize, 9 , 'clone via freeze/thaw';
|
||||
19
t/098_pod.t
Normal file
19
t/098_pod.t
Normal file
@@ -0,0 +1,19 @@
|
||||
use Test::More;
|
||||
eval "use Test::Pod 1.00";
|
||||
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
|
||||
|
||||
# perl Build test or make test run from top-level dir.
|
||||
if ( -d '../t/' ) {
|
||||
@directories = ('../lib/');
|
||||
}
|
||||
else {
|
||||
@directories = (); # empty - will work automatically
|
||||
}
|
||||
|
||||
my @files = all_pod_files(@directories);
|
||||
|
||||
plan tests => scalar(@files);
|
||||
|
||||
foreach my $module (@files){
|
||||
pod_file_ok( $module )
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use Test;
|
||||
plan tests=> 11;
|
||||
use Time::HiRes qw( gettimeofday tv_interval );
|
||||
use lib '../lib';
|
||||
use Data::Dumper;
|
||||
use Cwd;
|
||||
|
||||
use SOAP::WSDL;
|
||||
|
||||
ok 1; # if we made it this far, we're ok
|
||||
### test vars END
|
||||
|
||||
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||
print "# Performance test with WSDL file\n";
|
||||
|
||||
my $data = { name => 'Mein Name',
|
||||
givenName => 'Vorname' };
|
||||
|
||||
my $dir = cwd;
|
||||
|
||||
# chomp /t/ to allow running the script from t/ directory
|
||||
$dir=~s|/t/?||;
|
||||
|
||||
my $t0 = [gettimeofday];
|
||||
|
||||
{
|
||||
ok( my $soap=SOAP::WSDL->new(
|
||||
wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
||||
no_dispatch => 1
|
||||
) );
|
||||
|
||||
print "# Test with NO caching\n";
|
||||
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
||||
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
eval{ $soap->wsdlinit(caching => 0) };
|
||||
unless ($@) {
|
||||
ok(1);
|
||||
} else {
|
||||
ok 0;
|
||||
print STDERR $@;
|
||||
}
|
||||
print "# wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
||||
|
||||
$soap->readable(1);
|
||||
$soap->wsdl_cache_store();
|
||||
$soap->servicename("Service1");
|
||||
$soap->portname("Service1Soap");
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok( $soap->call("sayHello" , %{ $data }));
|
||||
print "# NO cache first call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok($soap->call(sayHello => %{ $data }) );
|
||||
print "# NO cache second call (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
for (1..10) {
|
||||
$soap->call(sayHello => %{ $data });
|
||||
}
|
||||
ok(1);
|
||||
print "# NO cache: 10 x call (".tv_interval ( $t0, [gettimeofday]) ."s)\n";
|
||||
}
|
||||
{
|
||||
print "# Test with caching ENABLED\n";
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok(my $soap=SOAP::WSDL->new(
|
||||
wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
||||
no_dispatch => 1
|
||||
) );
|
||||
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
||||
-e "$dir/t/cache" or mkdir "$dir/t/cache";
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
eval{ $soap->wsdlinit(caching => 1,cache_directory =>"$dir/t/cache") };
|
||||
unless ($@) {
|
||||
ok(1);
|
||||
} else {
|
||||
ok 0;
|
||||
print STDERR $@;
|
||||
}
|
||||
print "# wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
||||
$soap->readable(1);
|
||||
$soap->servicename("Service1");
|
||||
$soap->portname("Service1Soap");
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok( $soap->call("sayHello" , %{ $data }));
|
||||
print "# CACHE first call (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok($soap->call(sayHello => %{ $data }) );
|
||||
print "# CACHE second call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
for (1..10) {
|
||||
$soap->call(sayHello => %{ $data });
|
||||
}
|
||||
ok(1);
|
||||
print "# CACHE: 10 x call (".tv_interval ( $t0, [gettimeofday]) ."s)\n";
|
||||
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
#######################################################################################
|
||||
#
|
||||
# 2_helloworld.t
|
||||
#
|
||||
# Acceptance test for message encoding, based on .NET wsdl and example code.
|
||||
# SOAP::WSDL's encoding doesn't I<exactly> match the .NET example, because
|
||||
# .NET doesn't always specify types (SOAP::WSDL does), and the namespace
|
||||
# prefixes chosen are different (maybe the encoding style, too ? this would be a bug !)
|
||||
#
|
||||
########################################################################################
|
||||
|
||||
use strict;
|
||||
use diagnostics;
|
||||
use Test;
|
||||
plan tests => 5;
|
||||
use Time::HiRes qw( gettimeofday tv_interval );
|
||||
use lib '../lib';
|
||||
use Cwd;
|
||||
use SOAP::WSDL;
|
||||
ok 1; # if we made it this far, we're ok
|
||||
### test vars END
|
||||
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||
print "# Acceptance test against sample output with simple WSDL\n";
|
||||
|
||||
my $data = {
|
||||
name => 'test',
|
||||
givenName => 'GIVENNAME',
|
||||
test => {
|
||||
name => 'TESTNAME',
|
||||
givenName => 'GIVENNAME',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
my $dir= cwd;
|
||||
$dir=~s/\/t\/?//;
|
||||
|
||||
my $t0 = [gettimeofday];
|
||||
ok( my $soap=SOAP::WSDL->new(wsdl => 'file:///'.$dir.'/t/acceptance/test.wsdl.xml',
|
||||
no_dispatch => 1 ) );
|
||||
|
||||
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
eval{ $soap->wsdlinit() };
|
||||
unless ($@) {
|
||||
ok(1);
|
||||
} else {
|
||||
ok 0;
|
||||
print STDERR $@;
|
||||
}
|
||||
|
||||
print "# WSDL init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
$soap->servicename("Service1");
|
||||
$soap->portname("Service1Soap");
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
do {
|
||||
my $xml = $soap->serializer->method( $soap->call(sayHello => %{ $data }) );
|
||||
|
||||
open (FILE, "acceptance/helloworld.xml")
|
||||
|| open (FILE, "t/acceptance/helloworld.xml") || die "can't open acceptance file";
|
||||
my $xml_test=<FILE>;
|
||||
close FILE;
|
||||
$xml=~s/^.+\<([^\/]+?)\:Body\>//;
|
||||
$xml=~s/\<\/$1\:Body\>.*//;
|
||||
|
||||
$xml_test=~s/^.+\<([^\/]+?)\:Body\>//;
|
||||
$xml_test=~s/\<\/$1\:Body\>.*//;
|
||||
|
||||
if ( ($xml) && ($xml eq $xml_test) ) {
|
||||
ok 1;
|
||||
print "# Message encoding (" .tv_interval ( $t0, [gettimeofday]) ."s)\n"
|
||||
} else {
|
||||
ok 0;
|
||||
print "# Message encoding (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
print "$xml\n$xml_test\n"; };
|
||||
};
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
do {
|
||||
my $xml = $soap->serializer->method( $soap->call(sayHello => %{ $data }) );
|
||||
|
||||
open (FILE, "acceptance/helloworld.xml")
|
||||
|| open FILE, ("t/acceptance/helloworld.xml") || die "can't open acceptance file";
|
||||
my $xml_test=<FILE>;
|
||||
close FILE;
|
||||
$xml=~s/^.+\<([^\/]+?)\:Body\>//;
|
||||
$xml=~s/\<\/$1\:Body\>.*//;
|
||||
|
||||
$xml_test=~s/^.+\<([^\/]+?)\:Body\>//;
|
||||
$xml_test=~s/\<\/$1\:Body\>.*//;
|
||||
|
||||
if ( ($xml) && ($xml eq $xml_test) ) {
|
||||
ok 1;
|
||||
print "# Message encoding (" .tv_interval ( $t0, [gettimeofday]) ."s)\n";
|
||||
} else {
|
||||
ok 0;
|
||||
print "# Message encoding (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
print "$xml\n$xml_test\n";
|
||||
};
|
||||
};
|
||||
|
||||
109
t/3_various.t
109
t/3_various.t
@@ -1,109 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Test::More tests=> 9;
|
||||
use Time::HiRes qw( gettimeofday tv_interval );
|
||||
use lib '../lib';
|
||||
use Data::Dumper;
|
||||
use Cwd;
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||
print "# Various Features Test with WSDL file \n";
|
||||
|
||||
my $data = {name => 'Mein Name',
|
||||
givenName => 'Vorname'};
|
||||
|
||||
my $dir = cwd;
|
||||
|
||||
# chomp /t/ to allow running the script from t/ directory
|
||||
$dir=~s|/t/?||;
|
||||
|
||||
my $t0 = [gettimeofday];
|
||||
ok( my $soap=SOAP::WSDL->new(wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
||||
no_dispatch => 1
|
||||
));
|
||||
|
||||
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
eval{ $soap->wsdlinit(caching => 0) };
|
||||
if ($@) {
|
||||
fail("wsdlinit");
|
||||
print STDERR $@;
|
||||
} else {
|
||||
pass("wsdlinit");
|
||||
}
|
||||
print "# wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
||||
|
||||
$soap->readable(1);
|
||||
$soap->servicename("Service1");
|
||||
$soap->portname("Service1Soap");
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok( $soap->call("sayHello" , %{ $data }), "call sayHello");
|
||||
print "# Normal Call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$soap->servicename("Service2");
|
||||
is( $soap->portname("Service2Soap"), 'Service2Soap' );
|
||||
|
||||
$data = {name => 'Mein Name',
|
||||
givenName => 'Vorname'};
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok($soap->call(sayGoodBye => %{ $data }), "Multiple Services/Port Call" );
|
||||
print "# Multiple Services/Port Call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$soap->servicename("Service2");
|
||||
$soap->portname("Service2Soap");
|
||||
$data = {name => 'Mein Name',
|
||||
givenName => 'Vorname',
|
||||
wsdl_input_name => 'firstOverload'
|
||||
};
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
|
||||
my $xml = $soap->serializer->method( $soap->call(sayGoodByeOverload => %{ $data }) );
|
||||
like($xml , qr/<name/, 'serialized overloaded method');
|
||||
|
||||
$data = {
|
||||
name => 'Mein Name',
|
||||
givenName => 'Vorname',
|
||||
wsdl_input_name => 'secondOverload'
|
||||
};
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
$xml = $soap->serializer->method( $soap->call(sayGoodByeOverload => %{ $data }) );
|
||||
unlike($xml , qr/<name/ , 'Overloaded calls');
|
||||
|
||||
print "# Overloaded Calls: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$soap->servicename("Service2");
|
||||
$soap->portname("Service2Soap");
|
||||
$data = { name => 'Mein Name',
|
||||
'recipients' => [
|
||||
{user_name => 'Adam', last_name => "Eden"},
|
||||
{user_name => 'Eve',last_name => 'Apple'},
|
||||
],
|
||||
wsdl_input_name => 'thirdOverload'
|
||||
};
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
$xml = $soap->serializer->method( $soap->call(sayGoodByeOverload => %{ $data }) );
|
||||
|
||||
my $xpath = new XML::XPath->new(xml=>$xml);
|
||||
|
||||
my @recipients = $xpath->findnodes('//recipients');
|
||||
if($recipients[0]->findvalue("user_name") eq "Adam" and
|
||||
$recipients[0]->findvalue("last_name") eq "Eden" and
|
||||
$recipients[1]->findvalue("user_name") eq "Eve" and
|
||||
$recipients[1]->findvalue("last_name") eq "Apple"){
|
||||
ok(1);
|
||||
}else{
|
||||
ok(0);
|
||||
}
|
||||
print "# Restricted Arrays: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
print "#End\n";
|
||||
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
#######################################################################################
|
||||
#
|
||||
# 2_helloworld.t
|
||||
#
|
||||
# Acceptance test for message encoding, based on .NET wsdl and example code.
|
||||
# SOAP::WSDL's encoding doesn't I<exactly> match the .NET example, because
|
||||
# .NET doesn't always specify types (SOAP::WSDL does), and the namespace
|
||||
# prefixes chosen are different (maybe the encoding style, too ? this would be a bug !)
|
||||
#
|
||||
########################################################################################
|
||||
|
||||
use strict;
|
||||
use diagnostics;
|
||||
use Test::More tests => 6;
|
||||
use Time::HiRes qw( gettimeofday tv_interval );
|
||||
use lib '../lib';
|
||||
use Cwd;
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
### test vars END
|
||||
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||
print "# Acceptance test against sample output with simple WSDL\n";
|
||||
|
||||
my $data = {
|
||||
name => 'test',
|
||||
givenName => 'GIVENNAME',
|
||||
test => {
|
||||
name => 'TESTNAME',
|
||||
givenName => 'GIVENNAME',
|
||||
},
|
||||
};
|
||||
|
||||
my $dir= cwd;
|
||||
$dir=~s/\/t\/?//;
|
||||
|
||||
# print $dir;
|
||||
my $url = $dir . '/t/acceptance/test.wsdl.xml';
|
||||
die "no wsdl found" if (not -e $url);
|
||||
ok( my $soap=SOAP::WSDL->new( wsdl => 'file:///'. $url ), "Create SOAP::WSDL object");
|
||||
$soap->no_dispatch( 1 );
|
||||
|
||||
eval{ $soap->wsdlinit() };
|
||||
unless ($@) {
|
||||
pass "wsdlinit";
|
||||
} else {
|
||||
fail "wsdlinit - $@";
|
||||
}
|
||||
|
||||
|
||||
ok( $soap->call(sayHello => %{ $data }) , "SOAP call");
|
||||
|
||||
is( $soap->servicename() , 'Service1', "Auto-detected servicename");
|
||||
is( $soap->portname() , 'Service1Soap', "Auto-detected portname");
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# Addresses issue reported by David Bussenschutt
|
||||
use Test::More tests => 1;
|
||||
use lib '../lib';
|
||||
use SOAP::Lite;
|
||||
use SOAP::WSDL;
|
||||
use File::Spec;
|
||||
use File::Basename qw(dirname);
|
||||
|
||||
my $path = File::Spec->rel2abs( dirname __FILE__);
|
||||
|
||||
my $soap = SOAP::WSDL->new(
|
||||
wsdl => "file://$path/acceptance/helloworld.asmx.xml"
|
||||
);
|
||||
my $transport = $soap->schema()->useragent()->protocols_forbidden(['file']);
|
||||
|
||||
# If it dies with 500 Access to 'file'..., wsdlinit uses the same UA...
|
||||
eval { $soap->wsdlinit()};
|
||||
ok index( $@, q{500 Access to 'file}) > 0;
|
||||
|
||||
27
t/97_pod.t
27
t/97_pod.t
@@ -1,27 +0,0 @@
|
||||
use Test::More;
|
||||
eval "use Test::Pod 1.00";
|
||||
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
|
||||
|
||||
use Cwd;
|
||||
|
||||
my $dir = cwd;
|
||||
|
||||
if ( $dir =~ /t$/ )
|
||||
{
|
||||
@directories = ('../lib/');
|
||||
}
|
||||
else
|
||||
{
|
||||
@directories = ();
|
||||
}
|
||||
|
||||
my @files = all_pod_files(
|
||||
@directories
|
||||
);
|
||||
|
||||
plan tests => scalar(@files);
|
||||
|
||||
foreach my $module (@files)
|
||||
{
|
||||
pod_file_ok( $module )
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
use Test::More;
|
||||
eval { use Test::Pod::Coverage 1.08 };
|
||||
plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD" if $@;
|
||||
|
||||
|
||||
BEGIN
|
||||
{
|
||||
if (-d 't/') # we're not in the test dir - probably using
|
||||
{ # Build test
|
||||
@dirs = ('blib/lib')
|
||||
}
|
||||
else
|
||||
{
|
||||
@dirs = '../lib';
|
||||
use lib '../lib'; # use our lib if we are in t/ (if we are, we're)
|
||||
# not run from "make test" / "Build test"
|
||||
}
|
||||
}
|
||||
|
||||
@files = all_modules( @dirs );
|
||||
plan tests => scalar @files;
|
||||
foreach (@files)
|
||||
{
|
||||
s/^\.\.::blib::lib:://;
|
||||
s/^\.\.::lib:://;
|
||||
pod_coverage_ok( $_ );
|
||||
}
|
||||
52
t/Expat/01_expat.t
Normal file
52
t/Expat/01_expat.t
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use lib 'lib';
|
||||
use lib 't/lib';
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Expat::MessageParser/);
|
||||
|
||||
use MyComplexType;
|
||||
use MyElement;
|
||||
use MySimpleType;
|
||||
|
||||
my $xml = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body><MyAtomicComplexTypeElement xmlns="urn:Test" >
|
||||
<test>Test</test>
|
||||
<test2 >Test2</test2>
|
||||
</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'FakeResolver'
|
||||
});
|
||||
|
||||
$parser->parse( $xml );
|
||||
|
||||
is $parser->get_data(), q{<MyAtomicComplexTypeElement xmlns="urn:Test" >}
|
||||
. q{<test >Test</test><test2 >Test2</test2></MyAtomicComplexTypeElement>}
|
||||
, 'Content comparison';
|
||||
|
||||
# data classes reside in t/lib/Typelib/
|
||||
BEGIN {
|
||||
package FakeResolver;
|
||||
{
|
||||
my %class_list = (
|
||||
'MyAtomicComplexTypeElement' => 'MyAtomicComplexTypeElement',
|
||||
'MyAtomicComplexTypeElement/test' => 'MyTestElement',
|
||||
'MyAtomicComplexTypeElement/test2' => 'MyTestElement2',
|
||||
);
|
||||
|
||||
sub new { return bless {}, 'FakeResolver' };
|
||||
|
||||
sub get_class {
|
||||
my $name = join('/', @{ $_[1] });
|
||||
return ($class_list{ $name }) ? $class_list{ $name }
|
||||
: warn "no class found for $name";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
335
t/Expat/02_sub_parser.t
Normal file
335
t/Expat/02_sub_parser.t
Normal file
@@ -0,0 +1,335 @@
|
||||
package TopElement;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||
use Memoize;
|
||||
|
||||
memoize('_get_handlers');
|
||||
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
{
|
||||
my %TestElement_of :ATTR();
|
||||
my $CLASS_OF_REF = { TestElement => 'TestElement' };
|
||||
|
||||
__PACKAGE__->_factory( [ 'TestElement' ],
|
||||
{ 'TestElement' => \%TestElement_of, },
|
||||
{ TestElement => 'TestElement' },
|
||||
);
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
__PACKAGE__->__set_name('TopElement');
|
||||
__PACKAGE__->__set_nillable(1);
|
||||
|
||||
sub _get_handlers {
|
||||
my $self = shift;
|
||||
my $parser = shift;
|
||||
|
||||
return {
|
||||
Start => $parser->start_tag({
|
||||
class_of => $CLASS_OF_REF,
|
||||
handler_of => {
|
||||
TestElement => TestElement->_get_handlers( $parser ),
|
||||
}
|
||||
}),
|
||||
End => $parser->end_top_tag( ),
|
||||
Char => undef,
|
||||
};
|
||||
}
|
||||
}
|
||||
1;
|
||||
|
||||
package TestElement;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||
|
||||
use Memoize;
|
||||
memoize('_get_handlers');
|
||||
|
||||
use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
{
|
||||
my %test_of :ATTR();
|
||||
my %test2_of :ATTR();
|
||||
|
||||
my $CLASS_OF_REF = {
|
||||
test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string'
|
||||
};
|
||||
|
||||
__PACKAGE__->_factory( [ 'test', 'test2' ],
|
||||
{ test => \%test_of, test2 => \%test2_of, },
|
||||
$CLASS_OF_REF,
|
||||
);
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
__PACKAGE__->__set_name('TestElement');
|
||||
__PACKAGE__->__set_nillable(1);
|
||||
|
||||
sub _get_handlers {
|
||||
my $self = shift;
|
||||
my $parser = shift;
|
||||
|
||||
return {
|
||||
Start => $parser->start_tag({
|
||||
class_of => $CLASS_OF_REF,
|
||||
handler_of =>
|
||||
{
|
||||
map { ( $_ => $CLASS_OF_REF->{$_}->_get_handlers( $parser ) )}
|
||||
keys %{ $CLASS_OF_REF }
|
||||
},
|
||||
}),
|
||||
End => $parser->end_tag(),
|
||||
Char => undef,
|
||||
};
|
||||
}
|
||||
}
|
||||
1;
|
||||
|
||||
package TestResolver;
|
||||
|
||||
sub get_class {
|
||||
my $path = join('/', @{ $_[1] });
|
||||
my $class = {
|
||||
'TestElement' => 'TestElement',
|
||||
'TestElement/test' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'TestElement/test2' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'TopElement' => 'TopElement',
|
||||
'TopElement/TestElement' => 'TestElement',
|
||||
'TopElement/TestElement/test' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'TopElement/TestElement/test2' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
};
|
||||
return $class->{ $path };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
package main;
|
||||
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../../lib';
|
||||
|
||||
use_ok('SOAP::WSDL::Expat::MessageParser');
|
||||
use_ok('SOAP::WSDL::Expat::MessageSubParser');
|
||||
my $obj;
|
||||
|
||||
ok($obj = SOAP::WSDL::Expat::MessageSubParser->new(), "Object creation");
|
||||
|
||||
#my $test = $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# },
|
||||
# handler_of => {
|
||||
# test => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# test2 => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# }
|
||||
#});
|
||||
#
|
||||
#my $handlers = {
|
||||
# Start => $test,
|
||||
# End => $obj->end_tag(),
|
||||
#};
|
||||
#
|
||||
#my $parser = $obj->initialize( $handlers );
|
||||
#
|
||||
#$parser->parsestring('<test>Test</test>');
|
||||
#is $obj->get_data(), 'Test', 'Parse simple XML';
|
||||
#
|
||||
#my $element = $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# TestElement => 'TestElement',
|
||||
# },
|
||||
# handler_of => {
|
||||
# TestElement => {
|
||||
# Start => $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# },
|
||||
# handler_of => {
|
||||
# test => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# test2 => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# }
|
||||
# }),
|
||||
# End => $obj->end_tag(),
|
||||
# Char => undef,
|
||||
# }
|
||||
# }
|
||||
#});
|
||||
#
|
||||
#
|
||||
#$handlers = {
|
||||
# Start => $element,
|
||||
# End => $obj->end_tag(),
|
||||
# Char => undef,
|
||||
#};
|
||||
#
|
||||
#$parser = $obj->initialize( TestElement->_get_parser( $obj ) );
|
||||
#
|
||||
#my $xml = '<TestElement xmlns="urn:Test">
|
||||
# <test>Test</test>
|
||||
# <test2>Test2</test2>
|
||||
#</TestElement>';
|
||||
#
|
||||
#$parser->parsestring($xml);
|
||||
#
|
||||
#is $obj->get_data()
|
||||
# , '<TestElement xmlns="urn:Test" ><test >Test</test ><test2 >Test2</test2 ></TestElement>'
|
||||
# , 'Parse && serialize ComplexType Element';
|
||||
#
|
||||
|
||||
#my $mp = SOAP::WSDL::Expat::MessageParser->new({
|
||||
# class_resolver => 'TestResolver',
|
||||
#});
|
||||
#
|
||||
#$mp->parse( $xml );
|
||||
|
||||
#use Benchmark;
|
||||
#
|
||||
#timethese 1000 , {
|
||||
# mp => sub { $mp->parse($xml) },
|
||||
# 'sub_p' => sub { $obj->initialize( $handlers )->parse( $xml ) },
|
||||
#
|
||||
#};
|
||||
|
||||
#my $top = $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# TopElement => 'TopElement',
|
||||
# },
|
||||
# handler_of => {
|
||||
# TopElement => {
|
||||
# Start => $obj->start_tag({
|
||||
# order => [ 'TestElement', ],
|
||||
# class_of => {
|
||||
# TestElement => 'TestElement',
|
||||
# },
|
||||
# handler_of => {
|
||||
# TestElement => {
|
||||
# Start => $obj->start_tag({
|
||||
# order => ['test', 'test2'],
|
||||
# class_of => {
|
||||
# test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# },
|
||||
# handler_of => {
|
||||
# test => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# test2 => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# },
|
||||
# occurs_of => {
|
||||
# test => { max => 1 },
|
||||
# }
|
||||
# }),
|
||||
# End => $obj->end_tag(),
|
||||
# Char => undef,
|
||||
# }
|
||||
# }
|
||||
# })
|
||||
# }
|
||||
# }
|
||||
#});
|
||||
|
||||
my $top = $obj->start_tag({
|
||||
class_of => {
|
||||
TopElement => 'TopElement',
|
||||
},
|
||||
handler_of => {
|
||||
TopElement => TopElement->_get_handlers( $obj ),
|
||||
}
|
||||
});
|
||||
|
||||
my $parser = $obj->initialize( { Start => $top , End => $obj->end_tag() , Char => undef } );
|
||||
|
||||
my $xml = '
|
||||
<TopElement xmlns="urn:Test">
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
</TopElement>';
|
||||
|
||||
$parser->parsestring($xml);
|
||||
|
||||
# print $obj->get_data();
|
||||
|
||||
__END__
|
||||
|
||||
# TODO factor out into benchmark suite
|
||||
|
||||
use XML::Simple;
|
||||
use Benchmark;
|
||||
|
||||
my $mp = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'TestResolver',
|
||||
});
|
||||
$mp->parse( $xml );
|
||||
|
||||
$top = $obj->start_tag({
|
||||
class_of => {
|
||||
TopElement => 'TopElement',
|
||||
},
|
||||
handler_of => {
|
||||
TopElement => TopElement->_get_handlers( $obj ),
|
||||
}
|
||||
});
|
||||
my $top_end = $obj->end_top_tag();
|
||||
$parser = $obj->initialize( { Start => $top , End => $top_end, , Char => undef } );
|
||||
$parser->parse( $xml ),
|
||||
|
||||
print "DATA:" . $obj->get_data(), "\n";
|
||||
|
||||
|
||||
# $XML::Simple::PREFERRED_PARSER = 'XML::SAX::Expat';
|
||||
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
|
||||
|
||||
timethese 500 , {
|
||||
'typemap' => sub { $mp->parse($xml) },
|
||||
'sub_tree' => sub {
|
||||
my $parser = $obj->initialize( { Start => $top , End => $top_end, , Char => undef } );
|
||||
$parser->parse( $xml ),
|
||||
},
|
||||
'XML::Simple' => sub { XMLin( $xml ); }
|
||||
};
|
||||
411
t/Expat/03_wsdl.t
Normal file
411
t/Expat/03_wsdl.t
Normal file
@@ -0,0 +1,411 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Test::More tests => 7;
|
||||
use Data::Dumper;
|
||||
use lib '../lib';
|
||||
|
||||
eval {
|
||||
require Test::XML;
|
||||
import Test::XML;
|
||||
};
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||
|
||||
my $parser;
|
||||
ok $parser = SOAP::WSDL::Expat::WSDLParser->new(), "Object creation";
|
||||
|
||||
$parser->parse( xml() );
|
||||
|
||||
eval { $parser->parse( xml() ) };
|
||||
if ($@)
|
||||
{
|
||||
fail("parsing WSDL");
|
||||
die "Can't test without parsed WSDL: " , Dumper $@;
|
||||
}
|
||||
else
|
||||
{
|
||||
pass("parsing XML");
|
||||
}
|
||||
|
||||
my $wsdl;
|
||||
ok $wsdl = $parser->get_data() , "get object tree";
|
||||
|
||||
my $schema = $wsdl->first_types()->get_schema()->[1] || die "No schema !";
|
||||
|
||||
my $element = $schema->find_element(
|
||||
'http://www.example.org/MessageGateway2/'
|
||||
, 'EnqueueMessage'
|
||||
);
|
||||
|
||||
ok $element, 'find element';
|
||||
is $element->get_xmlns()->{ 'http://www.example.org/MessageGateway2/' }, 'tns', 'Namespace definition';
|
||||
|
||||
|
||||
my $opt = {
|
||||
typelib => $wsdl->first_types,
|
||||
readable => 1,
|
||||
autotype => 0,
|
||||
namespace => { 'http://www.example.org/MessageGateway2/' => 'tns',
|
||||
'http://www.w3.org/2001/XMLSchema' => 'xsd',
|
||||
'http://schemas.xmlsoap.org/wsdl/' => 'wsdl',
|
||||
},
|
||||
indent => "",
|
||||
};
|
||||
|
||||
my $data = { EnqueueMessage => {
|
||||
MMessage => {
|
||||
MRecipientURI => 'anyURI',
|
||||
MSenderAddress => 'a string',
|
||||
MMessageContent => 'a string',
|
||||
MSubject => 'a string',
|
||||
MDeliveryReportRecipientURI => 'anyURI',
|
||||
MKeepalive => {
|
||||
MKeepaliveTimeout => 1234567,
|
||||
MKeepaliveErrorPolicy => ' ( suppress | report ) ',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
SKIP: { skip_without_test_xml();
|
||||
is_xml( $wsdl->find_message(
|
||||
"http://www.example.org/MessageGateway2/" ,'EnqueueMessageRequest'
|
||||
)->first_part()->serialize( 'test', $data, $opt ),
|
||||
xml_message()
|
||||
, "Serialized message part"
|
||||
);
|
||||
}
|
||||
|
||||
sub skip_without_test_xml {
|
||||
skip("Test::XML not available", 1) if (not $Test::XML::VERSION);
|
||||
}
|
||||
|
||||
sub xml_message {
|
||||
return
|
||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||
<MMessage>
|
||||
<MRecipientURI>anyURI</MRecipientURI>
|
||||
<MSenderAddress>a string</MSenderAddress>
|
||||
<MMessageContent>a string</MMessageContent>
|
||||
<MSubject>a string</MSubject>
|
||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||
<MKeepalive>
|
||||
<MKeepaliveTimeout>1234567</MKeepaliveTimeout>
|
||||
<MKeepaliveErrorPolicy> ( suppress | report ) </MKeepaliveErrorPolicy>
|
||||
</MKeepalive>
|
||||
</MMessage>
|
||||
</EnqueueMessage>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
sub xml {
|
||||
return q{<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions name="MessageGateway"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
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/MessageGateway2/">
|
||||
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A type containing all elements of a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MRecipientURI" type="xsd:anyURI" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
The recipient in URI notaitions. Valid URI schemas are: mailto:, sms:,
|
||||
phone:. Not all URI schemas need to be implemented at the current
|
||||
implementation stage.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSenderAddress" type="xsd:string" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
E-Mail sender address. Ignored for all but mailto: recipient URIs.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MMessageContent" type="xsd:string" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Message Content.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSubject" type="xsd:string" minOccurs="0" maxOccurs="1">
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Message Subject. Ignored for all but mailto: URIs
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MDeliveryReportRecipientURI" type="xsd:anyURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
||||
URI to send a delivery report to. May be of one of the following schemes:
|
||||
mailto:, http:, https:. Reports to mailto: URIs are sent as plaintext,
|
||||
reports to http(s) URIs are sent as SOAP requests following the
|
||||
MessageGatewayClient service definition.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepalive" type="tns:TKeepalive" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Container for keepalive information. May be missing.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepalive">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing keeplive information.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
|
||||
<xsd:element name="MKeepaliveTimeout" type="xsd:double">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Keepalive timeout. The keepalive timeout spezifies how long the sending of
|
||||
a message will be delayed waiting for keepalive updates. If a keepalive
|
||||
update is received during this period, the timeout will be reset. If not,
|
||||
the message will be sent after the timeout has expired.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepaliveErrorPolicy" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
Policy to comply to in case of system errors. Valid values are "suppress"
|
||||
and "report". If the policy is set to "suppress", keepalive messages will
|
||||
not be sent to their recipients in case of partial system failure, even if
|
||||
the keepalive has expired. This may result in "false negatives", i.e.
|
||||
messages may not be sent, even though their keepalive has expired. If the
|
||||
value is "report", keepalive messages will be sent from any cluster node.
|
||||
This may result in "false positive" alerts.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="suppress"></xsd:enumeration>
|
||||
<xsd:enumeration value="report"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing a message ID.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Type containing all elements of a keppalive update / remove request.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The ID for the message to update / remove
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="MAction" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The action to perform. Valid values are: "remove", "update". On "remove",
|
||||
the message with the ID specified will be removed from the queue, thus it
|
||||
will never be sent, even if it's timeout expires. On "update" the
|
||||
keepalive timeout of the corresponding message will be reset.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="remove"></xsd:enumeration>
|
||||
<xsd:enumeration value="update"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="KeepaliveMessage" type="tns:TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Keepalive message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="KeepaliveMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Response element for a keepalive request</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="EnqueueMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message response element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:complexType name="TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessage" type="tns:TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The keepalive message to process.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MKeepaliveMessage" type="tns:TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a keepalive message to process.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="EnqueueMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessage">
|
||||
<wsdl:documentation>inputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
|
||||
</wsdl:message>
|
||||
<wsdl:message name="EnqueueMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessageResponse">
|
||||
<wsdl:documentation>outputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessage">
|
||||
|
||||
<wsdl:documentation>input parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessageResponse">
|
||||
<wsdl:documentation>output parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="MGWPortType">
|
||||
<wsdl:documentation>
|
||||
generic port type for all methods required for sending messages over the mosaic
|
||||
message gatewa
|
||||
</wsdl:documentation>
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to enqueue a normal (immediate send) or a delayed message with
|
||||
keepalive functionality.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:EnqueueMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:EnqueueMessageResponse"></wsdl:output>
|
||||
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to update or remove a
|
||||
keepalive message.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:KeepaliveMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:KeepaliveMessageResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="MGWBinding" type="tns:MGWPortType">
|
||||
<wsdl:documentation>Generic binding for all (SOAP) port</wsdl:documentation>
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<soap:operation soapAction="http://www.example.org/MessageGateway2/EnqueueMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<soap:operation
|
||||
soapAction="http://www.example.org/MessageGateway2/KeepaliveMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="MessageGateway">
|
||||
<wsdl:documentation>
|
||||
Web Service for sending messages over the mosaic message gatewa
|
||||
</wsdl:documentation>
|
||||
|
||||
<wsdl:port name="HTTPPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the mosaic message gatewa</wsdl:documentation>
|
||||
<soap:address location="https://www.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>};
|
||||
}
|
||||
4
t/SOAP/WSDL/01_use.t
Normal file
4
t/SOAP/WSDL/01_use.t
Normal file
@@ -0,0 +1,4 @@
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
ok( SOAP::WSDL->new(), 'Instantiated object' );
|
||||
35
t/SOAP/WSDL/02_port.t
Normal file
35
t/SOAP/WSDL/02_port.t
Normal file
@@ -0,0 +1,35 @@
|
||||
use Test::More tests => 7;
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use Data::Dumper;
|
||||
use lib '../lib';
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
# chdir to my location
|
||||
my $cwd = cwd;
|
||||
my $path = dirname( $0 );
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
chdir $path;
|
||||
|
||||
$path = cwd;
|
||||
|
||||
$path =~s{/SOAP/WSDL}{}xms;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
ok( ($soap->servicename('testService') ), 'set service' );
|
||||
ok( ($soap->portname('testPort2') ) ,'set portname');
|
||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||
|
||||
ok( $soap->wsdlinit( servicename => 'testService', portname => 'testPort'), 'parsed WSDL' );
|
||||
|
||||
ok( ($soap->portname() eq 'testPort' ), 'found port passed to wsdlinit');
|
||||
87
t/SOAP/WSDL/03_complexType-all.t
Normal file
87
t/SOAP/WSDL/03_complexType-all.t
Normal file
@@ -0,0 +1,87 @@
|
||||
use Test::More tests => 7;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
$SKIP = "Test::Differences required for testing. ";
|
||||
}
|
||||
|
||||
my $path = cwd();
|
||||
my $name = basename $0;
|
||||
$name =~s/\.t$//;
|
||||
$name =~s/^t\///;
|
||||
|
||||
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
print "# SOAP::WSDL Version: $SOAP::WSDL::VERSION\n";
|
||||
|
||||
my $xml;
|
||||
my $soap;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file://' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl',
|
||||
readable =>1,
|
||||
), 'Instantiated object' );
|
||||
|
||||
|
||||
#3
|
||||
ok $soap->wsdlinit(
|
||||
checkoccurs => 1,
|
||||
servicename => 'testService',
|
||||
), 'parse WSDL';
|
||||
ok $soap->no_dispatch(1), 'set no dispatch';
|
||||
|
||||
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||
# which requires SOAP::Lite
|
||||
$soap->outputxml(1);
|
||||
|
||||
ok ($xml = $soap->call('test',
|
||||
testAll => {
|
||||
Test1 => 'Test 1',
|
||||
Test2 => [ 'Test 2', 'Test 3' ]
|
||||
}
|
||||
), 'Serialized complexType' );
|
||||
|
||||
|
||||
# print $xml;
|
||||
|
||||
# $soap->wsdl_checkoccurs(1);
|
||||
|
||||
TODO: {
|
||||
local $TODO = "not implemented yet";
|
||||
|
||||
eval
|
||||
{
|
||||
$xml = $soap->call('test',
|
||||
testAll => {
|
||||
Test1 => 'Test 1',
|
||||
Test2 => [ 'Test 2', 'Test 3' ]
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
ok( ($@ =~m/illegal\snumber\sof\selements/),
|
||||
"Died on illegal number of elements (too many)"
|
||||
);
|
||||
|
||||
eval {
|
||||
$xml = $soap->call('test',
|
||||
testAll => {
|
||||
Test1 => 'Test 1',
|
||||
}
|
||||
);
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
|
||||
}
|
||||
12
t/SOAP/WSDL/03_complexType-choice.t
Normal file
12
t/SOAP/WSDL/03_complexType-choice.t
Normal file
@@ -0,0 +1,12 @@
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <choice> support";
|
||||
fail "serialize choice element";
|
||||
}
|
||||
22
t/SOAP/WSDL/03_complexType-complexContent.t
Normal file
22
t/SOAP/WSDL/03_complexType-complexContent.t
Normal file
@@ -0,0 +1,22 @@
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <complexContent> support";
|
||||
fail "serialize complexContent element";
|
||||
}
|
||||
47
t/SOAP/WSDL/03_complexType-element-ref.t
Normal file
47
t/SOAP/WSDL/03_complexType-element-ref.t
Normal file
@@ -0,0 +1,47 @@
|
||||
use Test::More tests => 4;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
my $path = cwd();
|
||||
my $name = basename $0;
|
||||
$name =~s/\.t$//;
|
||||
$name =~s/^t\///;
|
||||
|
||||
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
print "# SOAP::WSDL Version: $SOAP::WSDL::VERSION\n";
|
||||
|
||||
my $xml;
|
||||
my $soap;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file://' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl',
|
||||
readable => 1,
|
||||
no_dispatch => 1,
|
||||
), 'Instantiated object' );
|
||||
|
||||
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||
# which requires SOAP::Lite
|
||||
$soap->outputxml(1);
|
||||
|
||||
ok ($xml = $soap->call('test',
|
||||
testAll => {
|
||||
Test2 => 'Test2',
|
||||
TestRef => 'TestRef'
|
||||
}
|
||||
), 'Serialized complexType' );
|
||||
|
||||
is $xml, q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ><SOAP-ENV:Body><testAll>
|
||||
<TestRef>TestRef</TestRef>
|
||||
<Test2>Test2</Test2>
|
||||
</testAll>
|
||||
</SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
||||
, 'element ref="" serialization';
|
||||
22
t/SOAP/WSDL/03_complexType-group.t
Normal file
22
t/SOAP/WSDL/03_complexType-group.t
Normal file
@@ -0,0 +1,22 @@
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <group> support";
|
||||
fail "serialize group element";
|
||||
}
|
||||
80
t/SOAP/WSDL/03_complexType-sequence.t
Normal file
80
t/SOAP/WSDL/03_complexType-sequence.t
Normal file
@@ -0,0 +1,80 @@
|
||||
BEGIN {
|
||||
use Test::More tests => 6;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
}
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $xml;
|
||||
|
||||
my $path = cwd();
|
||||
my $name = basename $0;
|
||||
$name =~s/\.t$//;
|
||||
|
||||
$path=~s{(/t)?/SOAP/WSDL}{}xms;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file://' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
#3
|
||||
ok( $soap->wsdlinit(
|
||||
checkoccurs => 1,
|
||||
servicename => 'testService',
|
||||
), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
|
||||
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||
# which requires SOAP::Lite
|
||||
$soap->outputxml(1);
|
||||
|
||||
|
||||
#4
|
||||
ok $xml = $soap->call('test',
|
||||
testSequence => {
|
||||
Test1 => 'Test 1',
|
||||
Test2 => 'Test 2',
|
||||
}
|
||||
), 'Serialized complexType';
|
||||
|
||||
TODO: {
|
||||
local $TODO = "not implemented yet";
|
||||
#5
|
||||
eval
|
||||
{
|
||||
$xml = $soap->call('test',
|
||||
testSequence => {
|
||||
Test1 => 'Test 1',
|
||||
}
|
||||
);
|
||||
};
|
||||
ok( ($@),
|
||||
"Died on illegal number of elements"
|
||||
);
|
||||
|
||||
#6
|
||||
eval
|
||||
{
|
||||
$xml = $soap->call('test',
|
||||
testSequence => {
|
||||
Test1 => 'Test 1',
|
||||
Test2 => [ 1, 2, 3, ]
|
||||
}
|
||||
);
|
||||
};
|
||||
ok( ($@),
|
||||
"Died on illegal number of elements"
|
||||
);
|
||||
};
|
||||
22
t/SOAP/WSDL/03_complexType-simpleContent.t
Normal file
22
t/SOAP/WSDL/03_complexType-simpleContent.t
Normal file
@@ -0,0 +1,22 @@
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <simpleContent> support";
|
||||
fail "serialize simpleContent element";
|
||||
}
|
||||
4
t/SOAP/WSDL/04_element-complexType.t
Normal file
4
t/SOAP/WSDL/04_element-complexType.t
Normal file
@@ -0,0 +1,4 @@
|
||||
use Test::More skip_all => 'TODO: implement tests';
|
||||
use lib '../lib';
|
||||
|
||||
|
||||
53
t/SOAP/WSDL/04_element-simpleType.t
Normal file
53
t/SOAP/WSDL/04_element-simpleType.t
Normal file
@@ -0,0 +1,53 @@
|
||||
use Test::More tests => 6;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $xml;
|
||||
|
||||
my $soap = undef;
|
||||
my $name = basename $0;
|
||||
$name =~s/\.(t|pl)$//;
|
||||
|
||||
my $path = cwd;
|
||||
|
||||
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
#3
|
||||
$soap->readable(1);
|
||||
|
||||
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||
# which requires SOAP::Lite
|
||||
$soap->outputxml(1);
|
||||
|
||||
ok( $soap->wsdlinit(
|
||||
servicename => 'testService',
|
||||
), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
|
||||
ok ( $xml = $soap->call('test', testElement1 => 1 ) ,
|
||||
'Serialized (simpler) element' );
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement min/maxOccurs checks";
|
||||
|
||||
eval { $soap->call('test', testAll => [ 2, 3 ] ); };
|
||||
|
||||
like $@, qr{illegal\snumber\sof\selements}, "Died on illegal number of elements (too many)";
|
||||
|
||||
eval { $soap->call('test', testAll => undef ) };
|
||||
ok $@, 'Died on illegal number of elements (not enough)';
|
||||
}
|
||||
|
||||
72
t/SOAP/WSDL/04_element.t
Normal file
72
t/SOAP/WSDL/04_element.t
Normal file
@@ -0,0 +1,72 @@
|
||||
use Test::More tests => 8;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing.";
|
||||
}
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $soap;
|
||||
my $xml;
|
||||
my $path = cwd();
|
||||
my $name = basename $0;
|
||||
$name =~s/\.t$//;
|
||||
|
||||
$path =~s{(/t)?/SOAP/WSDL}{}xsm;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file://' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
#3
|
||||
$soap->readable(1);
|
||||
$soap->outputxml(1);
|
||||
|
||||
ok( $soap->wsdlinit(
|
||||
servicename => 'testService',
|
||||
), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
|
||||
ok ($xml = $soap->call('test',
|
||||
testElement1 => 'Test'
|
||||
), 'Serialized (simple) element' );
|
||||
|
||||
ok ($xml = $soap->call('testRef',
|
||||
testElementRef => 'Test'
|
||||
), 'Serialized (simple) element' );
|
||||
|
||||
is $xml
|
||||
, q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ><SOAP-ENV:Body><testElementRef xmlns="urn:Test">Test</testElementRef>
|
||||
</SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
||||
, 'element ref serialization result'
|
||||
;
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement min/maxOccurs checks";
|
||||
|
||||
eval {
|
||||
$xml = $soap->call('test',
|
||||
testAll => [ 'Test 2', 'Test 3' ]
|
||||
);
|
||||
};
|
||||
|
||||
ok( ($@ =~m/illegal\snumber\sof\selements/),
|
||||
"Died on illegal number of elements (too many)"
|
||||
);
|
||||
|
||||
eval {
|
||||
$xml = $soap->call('test', testAll => undef );
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
}
|
||||
|
||||
56
t/SOAP/WSDL/05_simpleType-list.t
Normal file
56
t/SOAP/WSDL/05_simpleType-list.t
Normal file
@@ -0,0 +1,56 @@
|
||||
use Test::More tests => 8;
|
||||
use strict;
|
||||
use lib '../lib';
|
||||
use lib 'lib';
|
||||
use lib 't/lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my ($soap, $xml, $xml2);
|
||||
|
||||
# chdir to my location
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
|
||||
my $path = cwd;
|
||||
$path =~s{(/t)/SOAP/WSDL}{}xms;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
$soap->readable(1);
|
||||
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||
# which requires SOAP::Lite
|
||||
$soap->outputxml(1);
|
||||
|
||||
#3
|
||||
ok( $soap->wsdlinit(
|
||||
servicename => 'testService',
|
||||
), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
|
||||
#4
|
||||
ok $xml = $soap->call('test', testAll => [ 1, 2 ] ), 'Serialize list call';
|
||||
|
||||
#5
|
||||
ok ( $xml2 = $soap->call('test', testAll => "1 2" ) , 'Serialized scalar call' );
|
||||
#6
|
||||
ok( $xml eq $xml2, 'Got expected result');
|
||||
|
||||
#7
|
||||
TODO: {
|
||||
local $TODO = "implement minLength check";
|
||||
eval { $xml = $soap->call('test', testAll => undef ) };
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
}
|
||||
|
||||
#8
|
||||
TODO: {
|
||||
local $TODO = "maxLength test not implemented";
|
||||
eval { $xml = $soap->call('test', testAll => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ] ) };
|
||||
ok($@, 'Died on illegal number of elements (more than maxLength)');
|
||||
}
|
||||
62
t/SOAP/WSDL/05_simpleType-restriction.t
Normal file
62
t/SOAP/WSDL/05_simpleType-restriction.t
Normal file
@@ -0,0 +1,62 @@
|
||||
use Test::More tests => 8;
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use lib '../lib';
|
||||
use lib 'lib';
|
||||
use lib 't/lib';
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $xml;
|
||||
|
||||
my $name = basename $0;
|
||||
$name =~s/\.(t|pl)$//;
|
||||
|
||||
my $path = cwd;
|
||||
$path =~s{(/t)/SOAP/WSDL}{}xms;
|
||||
|
||||
my $soap;
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
#3
|
||||
$soap->readable(1);
|
||||
ok( $soap->wsdlinit(
|
||||
servicename => 'testService',
|
||||
), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
$soap->autotype(0);
|
||||
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||
# which requires SOAP::Lite
|
||||
$soap->outputxml(1);
|
||||
|
||||
#4
|
||||
ok $xml = $soap->call('test', testAll => [ 1, 2 ] ) , 'Serialize list call';
|
||||
|
||||
# print $xml, "\n";
|
||||
|
||||
TODO: {
|
||||
local $TODO = "implement minLength/maxLength checks";
|
||||
eval { $soap->call('test', testAll => [ 1, 2, 3 ] ) };
|
||||
ok($@, 'Died on illegal number of elements (too many)');
|
||||
|
||||
eval { $soap->call('test', testAll => [] ) };
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
}
|
||||
|
||||
TODO: {
|
||||
local $TODO = "minValue check not implemented ";
|
||||
eval { $xml = $soap->call('test', testAll => 0 ) };
|
||||
ok($@, 'Died on illegal value');
|
||||
}
|
||||
|
||||
TODO: {
|
||||
local $TODO = "maxValue check not implemented ";
|
||||
eval { $xml = $soap->call('test', testAll => 100 ) };
|
||||
ok($@, 'Died on illegal value');
|
||||
}
|
||||
69
t/SOAP/WSDL/05_simpleType-union.t
Normal file
69
t/SOAP/WSDL/05_simpleType-union.t
Normal file
@@ -0,0 +1,69 @@
|
||||
use Test::More skip_all => 'Not supported yet';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use lib '../lib';
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $xml;
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
|
||||
my $path = cwd;
|
||||
|
||||
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||
|
||||
#2
|
||||
ok $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object';
|
||||
|
||||
#3
|
||||
$soap->readable(1);
|
||||
ok $soap->wsdlinit(), 'parsed WSDL';
|
||||
$soap->no_dispatch(1);
|
||||
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||
# which requires SOAP::Lite
|
||||
$soap->outputxml(1);
|
||||
|
||||
#4
|
||||
ok $xml = $soap->call('test', testAll => 1 ) , 'Serialized call';
|
||||
|
||||
# 6
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => [ 1 , 'union']
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => undef
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
|
||||
#8
|
||||
ok ( $xml = $soap->serializer->method( $soap->call('test2',
|
||||
testAll => 1 )
|
||||
),
|
||||
'Serialized (simple) call (list)' );
|
||||
|
||||
#9
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => [ 1 , 'union']
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
58
t/SOAP/WSDL/11_helloworld.NET.t
Normal file
58
t/SOAP/WSDL/11_helloworld.NET.t
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/perl -w
|
||||
#######################################################################################
|
||||
#
|
||||
# 2_helloworld.t
|
||||
#
|
||||
# Acceptance test for message encoding, based on .NET wsdl and example code.
|
||||
# SOAP::WSDL's encoding doesn't I<exactly> match the .NET example, because
|
||||
# .NET doesn't always specify types (SOAP::WSDL does), and the namespace
|
||||
# prefixes chosen are different (maybe the encoding style, too ? this would be a bug !)
|
||||
#
|
||||
########################################################################################
|
||||
|
||||
use strict;
|
||||
use Test::More tests => 4;
|
||||
use lib '../../../lib/';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
|
||||
use_ok q/SOAP::WSDL/;
|
||||
|
||||
### test vars END
|
||||
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||
print "# Acceptance test against sample output with simple WSDL\n";
|
||||
|
||||
|
||||
|
||||
my $data = {
|
||||
name => 'test',
|
||||
givenName => 'test',
|
||||
};
|
||||
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
|
||||
my $path = cwd;
|
||||
|
||||
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||
|
||||
ok $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///'.$path.'/t/acceptance/wsdl/11_helloworld.wsdl',
|
||||
no_dispatch => 1
|
||||
), 'Create SOAP::WSDL object';
|
||||
|
||||
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||
# which requires SOAP::Lite
|
||||
$soap->outputxml(1);
|
||||
|
||||
$soap->proxy('http://helloworld/helloworld.asmx');
|
||||
|
||||
ok $soap->wsdlinit(
|
||||
servicename => 'Service1',
|
||||
), 'wsdlinit';
|
||||
|
||||
|
||||
ok $soap->call('sayHello', 'sayHello' => $data), 'soap call';
|
||||
|
||||
29
t/SOAP/WSDL/12_binding.pl
Normal file
29
t/SOAP/WSDL/12_binding.pl
Normal file
@@ -0,0 +1,29 @@
|
||||
use strict;
|
||||
use lib '../lib';
|
||||
use Test::More tests => 4;
|
||||
use SOAP::WSDL;
|
||||
use Cwd;
|
||||
use Data::Dumper;
|
||||
use File::Basename;
|
||||
|
||||
print "# Using SOAP::WSDL Version $SOAP::WSDL::VERSION\n";
|
||||
|
||||
my $name = '02_port';
|
||||
|
||||
# chdir to my location
|
||||
my $soap = undef;
|
||||
|
||||
my $path = cwd;
|
||||
|
||||
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||
|
||||
my $url = 'http://127.0.0.1/testPort';
|
||||
|
||||
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||
) );
|
||||
|
||||
ok $soap->wsdlinit( url => $url );
|
||||
ok $soap->servicename('testService');
|
||||
ok $soap->portname('testPort');
|
||||
17
t/SOAP/WSDL/Deserializer/Hash.t
Normal file
17
t/SOAP/WSDL/Deserializer/Hash.t
Normal file
@@ -0,0 +1,17 @@
|
||||
use Test::More qw(no_plan);
|
||||
use lib '../../../lib';
|
||||
use_ok qw(SOAP::WSDL::Deserializer::Hash);
|
||||
|
||||
ok my $deserializer = SOAP::WSDL::Deserializer::Hash->new();
|
||||
|
||||
ok my $data = $deserializer->deserialize(q{<a><b>1</b><b>2</b><c>3</c></a>});
|
||||
is $data->{a}->{b}->[0], 1;
|
||||
is $data->{a}->{b}->[1], 2;
|
||||
is $data->{a}->{c}, 3;
|
||||
|
||||
ok $data = $deserializer->deserialize(q{<a><b><c>1</c></b><b><c>2</c></b></a>});
|
||||
is $data->{a}->{b}->[0]->{c}, 1;
|
||||
is $data->{a}->{b}->[1]->{c}, 2;
|
||||
|
||||
eval { $deserializer->deserialize('grzlmpfh') };
|
||||
ok $@->isa('SOAP::WSDL::SOAP::Typelib::Fault11');
|
||||
63
t/SOAP/WSDL/Generator/Template.t
Normal file
63
t/SOAP/WSDL/Generator/Template.t
Normal file
@@ -0,0 +1,63 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw(no_plan);
|
||||
use Template;
|
||||
use File::Basename;
|
||||
use File::Spec;
|
||||
use SOAP::WSDL::Expat::WSDLParser;
|
||||
use SOAP::WSDL::Generator::Template::XSD;
|
||||
|
||||
my $path = dirname __FILE__;
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
|
||||
$parser->parse_file("$path/../../../acceptance/wsdl/006_sax_client.wsdl");
|
||||
#"$path/../../../../example/wsdl/globalweather.xml");
|
||||
my $definitions = $parser->get_data();
|
||||
|
||||
my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
definitions => $definitions,
|
||||
});
|
||||
my $output = q{};
|
||||
$generator->generate_interface({
|
||||
NO_POD => 1,
|
||||
output => \$output,
|
||||
});
|
||||
|
||||
ok eval $output;
|
||||
|
||||
$output = q{};
|
||||
$generator->generate_typemap({
|
||||
NO_POD => 1,
|
||||
output => \$output,
|
||||
});
|
||||
|
||||
ok eval $output;
|
||||
print $@ if $@;
|
||||
|
||||
print $output;
|
||||
__END__
|
||||
|
||||
my $tt = Template->new(
|
||||
DEBUG => 1,
|
||||
EVAL_PERL => 1,
|
||||
RECURSION => 1,
|
||||
INCLUDE_PATH => "$path/../../../../lib/SOAP/WSDL/Template",
|
||||
);
|
||||
|
||||
foreach my $service (@{ $definitions->get_service }) {
|
||||
my $output;
|
||||
$tt->process( 'Interface.tt', {
|
||||
definitions => $definitions,
|
||||
service => $service,
|
||||
interface_prefix => 'MyInterface',
|
||||
type_prefix => 'MyTypes',
|
||||
TYPE_PREFIX => 'MyTypes',
|
||||
element_prefix => 'MyElement',
|
||||
}, \$output);
|
||||
die $tt->error if $tt->error();
|
||||
|
||||
ok eval $output, 'eval output';
|
||||
|
||||
print $output;
|
||||
};
|
||||
144
t/SOAP/WSDL/Generator/Visitor/Typemap.t
Normal file
144
t/SOAP/WSDL/Generator/Visitor/Typemap.t
Normal file
@@ -0,0 +1,144 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 5;
|
||||
use File::Basename;
|
||||
use File::Spec;
|
||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||
|
||||
use_ok qw(SOAP::WSDL::Generator::Visitor::Typemap);
|
||||
|
||||
my $visitor;
|
||||
ok $visitor = SOAP::WSDL::Generator::Visitor::Typemap->new(), 'constructor';
|
||||
|
||||
use SOAP::WSDL::Expat::WSDLParser;
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
|
||||
$parser->parse_file(
|
||||
$path . '/../../../../acceptance/wsdl/'
|
||||
#. '04_element.wsdl'
|
||||
#. '11_helloworld.wsdl'
|
||||
#. '008_complexType.wsdl'
|
||||
. '006_sax_client.wsdl'
|
||||
);
|
||||
|
||||
my $definitions = $parser->get_data();
|
||||
|
||||
$definitions->_accept( $visitor );
|
||||
|
||||
#use Data::Dumper;
|
||||
#print Dumper $visitor->get_typemap();
|
||||
|
||||
my $typemap = $visitor->get_typemap();
|
||||
is $typemap->{'EnqueueMessage/MMessage/MKeepalive'}, 'MyTypes::TKeepalive', 'content';
|
||||
is $typemap->{'EnqueueMessageResponse'}, 'MyTypes::TMessageID', 'content';
|
||||
is $typemap->{'KeepaliveMessageResponse'}, 'MyTypes::TMessageID', 'content';
|
||||
|
||||
|
||||
sub wsdl {
|
||||
q{<?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="urn:HelloWorld"
|
||||
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="urn:HelloWorld"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<s:schema elementFormDefault="qualified"
|
||||
targetNamespace="urn:HelloWorld">
|
||||
<s:element name="sayHello">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||
type="s:string" />
|
||||
|
||||
<s:element minOccurs="0" maxOccurs="1" name="givenName"
|
||||
type="s:string" nillable="1"/>
|
||||
|
||||
<!-- <s:element minOccurs="0" maxOccurs="1" name="test"
|
||||
type="s0:test2" /> //-->
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:element name="sayHelloResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1"
|
||||
name="sayHelloResult" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:complexType name="test2">
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||
type="s:string" />
|
||||
|
||||
<s:element minOccurs="0" maxOccurs="1" name="givenName"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
|
||||
<s:complexType name="testExtended">
|
||||
<s:extension base="s0:test2">
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="extend"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:extension>
|
||||
</s:complexType>
|
||||
</s:schema>
|
||||
</types>
|
||||
|
||||
<message name="sayHelloSoapIn">
|
||||
<part name="parameters" element="s0:sayHello" />
|
||||
|
||||
<!-- <part name="test1" type="s0:testExtended" />
|
||||
|
||||
<part name="test2" type="s0:test2"
|
||||
targetNamespace="urn:test2" /> //-->
|
||||
</message>
|
||||
|
||||
<message name="sayHelloSoapOut">
|
||||
<part name="parameters" element="s0:sayHelloResponse" />
|
||||
</message>
|
||||
|
||||
<portType name="Service1Soap">
|
||||
<operation name="sayHello">
|
||||
<input message="s0:sayHelloSoapIn" />
|
||||
|
||||
<output message="s0:sayHelloSoapOut" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="Service1Soap" type="s0:Service1Soap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
||||
style="document" />
|
||||
|
||||
<operation name="sayHello">
|
||||
<soap:operation soapAction="urn:HelloWorld#sayHello"
|
||||
style="document" />
|
||||
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<service name="Service1">
|
||||
<port name="Service1Soap" binding="s0:Service1Soap">
|
||||
<soap:address
|
||||
location="http://helloworld/helloworld.asmx" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
}
|
||||
}
|
||||
28
t/SOAP/WSDL/Generator/XSD.t
Normal file
28
t/SOAP/WSDL/Generator/XSD.t
Normal file
@@ -0,0 +1,28 @@
|
||||
use Test::More qw(no_plan);
|
||||
use File::Basename qw(dirname);
|
||||
use File::Spec;
|
||||
|
||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||
|
||||
use_ok qw(SOAP::WSDL::Generator::Visitor::Typelib);
|
||||
use_ok qw(SOAP::WSDL::Generator::Template::XSD);
|
||||
|
||||
use SOAP::WSDL::Expat::WSDLParser;
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
my $definitions = $parser->parse_file(
|
||||
"$path/../../../acceptance/wsdl/generator_test.wsdl"
|
||||
#"$path/../../../acceptance/wsdl/elementAtomicComplexType.xml"
|
||||
);
|
||||
|
||||
my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
definitions => $definitions,
|
||||
});
|
||||
|
||||
my $code = "";
|
||||
$generator->set_output(\$code);
|
||||
$generator->generate_typelib();
|
||||
eval $code;
|
||||
ok !$@;
|
||||
print $@ if $@;
|
||||
#print $code;
|
||||
24
t/SOAP/WSDL/Generator/XSD_unsupported.t
Normal file
24
t/SOAP/WSDL/Generator/XSD_unsupported.t
Normal file
@@ -0,0 +1,24 @@
|
||||
use Test::More tests => 3;
|
||||
use File::Basename qw(dirname);
|
||||
use File::Spec;
|
||||
|
||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||
|
||||
use_ok qw(SOAP::WSDL::Generator::Visitor::Typelib);
|
||||
use_ok qw(SOAP::WSDL::Generator::Template::XSD);
|
||||
|
||||
use SOAP::WSDL::Expat::WSDLParser;
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
my $definitions = $parser->parse_file(
|
||||
"$path/../../../acceptance/wsdl/generator_unsupported_test.wsdl"
|
||||
);
|
||||
|
||||
my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
definitions => $definitions,
|
||||
});
|
||||
|
||||
{
|
||||
eval { $generator->generate_typelib() };
|
||||
}
|
||||
ok $@;
|
||||
47
t/SOAP/WSDL/Transport/01_Test.t
Normal file
47
t/SOAP/WSDL/Transport/01_Test.t
Normal file
@@ -0,0 +1,47 @@
|
||||
use Test::More tests => 9;
|
||||
use strict;
|
||||
use warnings;
|
||||
use File::Basename;
|
||||
use SOAP::WSDL::Client;
|
||||
|
||||
my $soap;
|
||||
my $base_dir = dirname( __FILE__ );
|
||||
use_ok(qw/SOAP::WSDL::Transport::Test/);
|
||||
|
||||
$soap = SOAP::WSDL::Client->new();
|
||||
$soap->set_proxy('http://somewhere.over.the.rainbow');
|
||||
|
||||
ok( $soap->get_transport->set_base_dir( join '/', $base_dir, 'acceptance' ) );
|
||||
|
||||
{
|
||||
local $SIG{__WARN__} = sub {};
|
||||
my $response = $soap->call({ operation => 'test', soap_action => 'http://test' }, {});
|
||||
ok ! $response, 'Returned fault on error';
|
||||
is $response->get_faultcode(), 'soap:Server', 'faultcode';
|
||||
is $response->get_faultactor(), 'urn:localhost', 'faultactor';
|
||||
|
||||
$soap->outputxml(1);
|
||||
$response = $soap->call({ operation => 'test', soap_action => 'http://test2' }, {});
|
||||
is $response, 'test2', 'Returned file content';
|
||||
}
|
||||
|
||||
SKIP: {
|
||||
eval { require SOAP::WSDL::Deserializer::SOM; }
|
||||
or skip 'SOAP::WSDL::Deserializer::SOM required', 3;
|
||||
# requre SOAP::WSDL::Factory::Deserializer;
|
||||
SOAP::WSDL::Factory::Deserializer->register('1.1', 'SOAP::WSDL::Deserializer::SOM');
|
||||
|
||||
my $soap_som = SOAP::WSDL::Client->new();
|
||||
$soap_som->set_proxy('http://somewhere.over.the.rainbow');
|
||||
$soap_som->get_transport->set_base_dir( join '/', $base_dir, 'acceptance' );
|
||||
|
||||
my $som;
|
||||
ok $som = $soap_som->call({ operation => 'test', soap_action => 'http://test3' }, {})
|
||||
, 'Call with SOAP::WSDL::Deserializer::SOM';
|
||||
|
||||
# In the somewhat weird logic of SOAP::Lite, the first node inside the root element
|
||||
# is the reault, all others are output parameters (and may be accessed via "paramsout")
|
||||
is $som->result(), 'Munich', 'Result match';
|
||||
is $som->paramsout(), 'Germany' , 'Output parameter match';
|
||||
}
|
||||
|
||||
1
t/SOAP/WSDL/Transport/acceptance/test2.xml
Normal file
1
t/SOAP/WSDL/Transport/acceptance/test2.xml
Normal file
@@ -0,0 +1 @@
|
||||
test2
|
||||
1
t/SOAP/WSDL/Transport/acceptance/test3.xml
Normal file
1
t/SOAP/WSDL/Transport/acceptance/test3.xml
Normal file
@@ -0,0 +1 @@
|
||||
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ><SOAP-ENV:Body><GetWeatherResponse xmlns="http://www.webserviceX.NET"><CityName>Munich</CityName><CountryName>Germany</CountryName></GetWeatherResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
20
t/SOAP/WSDL/XSD/Typelib/Builtin/001_anyType.t
Normal file
20
t/SOAP/WSDL/XSD/Typelib/Builtin/001_anyType.t
Normal file
@@ -0,0 +1,20 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw(no_plan);
|
||||
use Scalar::Util qw(blessed);
|
||||
use lib '../../../../../../lib';
|
||||
use_ok qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
|
||||
|
||||
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::anyType->new({
|
||||
xmlns => 'urn:Siemens.mosaic'
|
||||
});
|
||||
|
||||
ok blessed $obj, 'constructor returned blessed reference';
|
||||
|
||||
ok $obj->set_xmlns('urn:SOAP-WSDL'), 'set_xmlns';
|
||||
is $obj->get_xmlns(), 'urn:SOAP-WSDL', 'get_xmlns';
|
||||
|
||||
is $obj->start_tag({ name => 'test' }), '<test >', 'start_tag';
|
||||
is $obj->end_tag({ name => 'test' }), '</test >', 'end_tag';
|
||||
|
||||
is "$obj", q{}, 'serialize overloading';
|
||||
44
t/SOAP/WSDL/XSD/Typelib/Builtin/002_anySimpleType.t
Normal file
44
t/SOAP/WSDL/XSD/Typelib/Builtin/002_anySimpleType.t
Normal file
@@ -0,0 +1,44 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw(no_plan);
|
||||
use Scalar::Util qw(blessed);
|
||||
use lib '../../../../../../lib';
|
||||
use_ok qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||
|
||||
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({});
|
||||
|
||||
ok $obj->set_xmlns('urn:SOAP-WSDL'), 'set_xmlns';
|
||||
is $obj->get_xmlns(), 'urn:SOAP-WSDL', 'get_xmlns';
|
||||
|
||||
ok blessed $obj, 'constructor returned blessed reference';
|
||||
|
||||
is $obj->start_tag({ name => 'test' }), '<test >', 'start_tag';
|
||||
is $obj->end_tag({ name => 'test' }), '</test >', 'end_tag';
|
||||
|
||||
ok $obj->set_value('test'), 'set_value';
|
||||
is $obj->get_value(), 'test', 'get_value';
|
||||
|
||||
is "$obj", q{test}, 'serialize overloading';
|
||||
|
||||
ok ($obj)
|
||||
? pass 'boolean overloading'
|
||||
: fail 'boolean overloading';
|
||||
|
||||
ok ! $obj->set_value(undef), 'set_value with explicit undef';
|
||||
is $obj->get_value(), undef, 'get_value';
|
||||
|
||||
is "$obj", q{}, 'stringification overloading';
|
||||
|
||||
ok $obj = SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({
|
||||
xmlns => 'urn:XSD',
|
||||
value => 'test2',
|
||||
});
|
||||
|
||||
is $obj->get_xmlns(), 'urn:XSD', 'get_xmlns on attr value';
|
||||
is $obj->get_value(), 'test2', 'get_value on attr value';
|
||||
|
||||
$obj->set_value(undef);
|
||||
|
||||
is $obj->serialize({ name => 'foo' }), '<foo ></foo >'
|
||||
, 'serialize undef value with name';
|
||||
is $obj->serialize(), q{}, 'serialize undef value without name'
|
||||
74
t/SOAP/WSDL/XSD/Typelib/Builtin/003_date.t
Normal file
74
t/SOAP/WSDL/XSD/Typelib/Builtin/003_date.t
Normal file
@@ -0,0 +1,74 @@
|
||||
use Test::More tests => 30;
|
||||
use strict;
|
||||
use Carp qw(cluck);
|
||||
|
||||
$SIG{__WARN__} = sub { cluck @_ };
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
use Date::Format;
|
||||
use Date::Parse;
|
||||
use_ok('SOAP::WSDL::XSD::Typelib::Builtin::date');
|
||||
my $obj;
|
||||
|
||||
sub timezone {
|
||||
my @time = map { defined $_ ? $_ : 0 } strptime shift;
|
||||
my $tz = strftime('%z', @time);
|
||||
substr $tz, -2, 0, ':';
|
||||
return $tz;
|
||||
}
|
||||
|
||||
my %dates = (
|
||||
'2007/12/31' => '2007-12-31',
|
||||
'2007:08:31' => '2007-08-31',
|
||||
'30 Aug 2007' => '2007-08-30',
|
||||
);
|
||||
|
||||
my %localized_date_of = (
|
||||
'2007-12-31T00:00:00.0000000+0000' => '2007-12-31+00:00',
|
||||
'2007-12-31T00:00:00.0000000+0130' => '2007-12-31+01:30',
|
||||
'2007-12-31T00:00:00.0000000+0200' => '2007-12-31+02:00',
|
||||
'2007-12-31T00:00:00.0000000+0300' => '2007-12-31+03:00',
|
||||
'2007-12-31T00:00:00.0000000+0400' => '2007-12-31+04:00',
|
||||
'2007-12-31T00:00:00.0000000+0500' => '2007-12-31+05:00',
|
||||
'2007-12-31T00:00:00.0000000+0600' => '2007-12-31+06:00',
|
||||
'2007-12-31T00:00:00.0000000+0700' => '2007-12-31+07:00',
|
||||
'2007-12-31T00:00:00.0000000+0800' => '2007-12-31+08:00',
|
||||
'2007-12-31T00:00:00.0000000+0900' => '2007-12-31+09:00',
|
||||
'2007-12-31T00:00:00.0000000+1000' => '2007-12-31+10:00',
|
||||
'2007-12-31T00:00:00.0000000+1100' => '2007-12-31+11:00',
|
||||
'2007-12-31T00:00:00.0000000+1200' => '2007-12-31+12:00',
|
||||
'2007-12-31T00:00:00.0000000-0100' => '2007-12-31-01:00',
|
||||
'2007-12-31T00:00:00.0000000-0200' => '2007-12-31-02:00',
|
||||
'2007-12-31T00:00:00.0000000-0300' => '2007-12-31-03:00',
|
||||
'2007-12-31T00:00:00.0000000-0400' => '2007-12-31-04:00',
|
||||
'2007-12-31T00:00:00.0000000-0500' => '2007-12-31-05:00',
|
||||
'2007-12-31T00:00:00.0000000-0600' => '2007-12-31-06:00',
|
||||
'2007-12-31T00:00:00.0000000-0700' => '2007-12-31-07:00',
|
||||
'2007-12-31T00:00:00.0000000-0800' => '2007-12-31-08:00',
|
||||
'2007-12-31T00:00:00.0000000-0900' => '2007-12-31-09:00',
|
||||
'2007-12-31T00:00:00.0000000-1000' => '2007-12-31-10:00',
|
||||
'2007-12-31T00:00:00.0000000-1100' => '2007-12-31-11:00',
|
||||
'2007-12-31T00:00:00.0000000-1200' => '2007-12-31-12:00',
|
||||
|
||||
|
||||
);
|
||||
|
||||
while (my ($date, $converted) = each %localized_date_of ) {
|
||||
|
||||
$obj = SOAP::WSDL::XSD::Typelib::Builtin::date->new();
|
||||
$obj->set_value( $date );
|
||||
|
||||
is $obj->get_value() , $converted , 'conversion';
|
||||
}
|
||||
|
||||
while (my ($date, $converted) = each %dates ) {
|
||||
|
||||
$obj = SOAP::WSDL::XSD::Typelib::Builtin::date->new();
|
||||
$obj->set_value( $date );
|
||||
|
||||
is $obj->get_value() , $converted . timezone($date), 'conversion';
|
||||
}
|
||||
|
||||
$obj->set_value( '2037-12-31+12:00' );
|
||||
is $obj->get_value() , '2037-12-31+12:00', 'no conversion on match';
|
||||
|
||||
25
t/SOAP/WSDL/XSD/Typelib/Builtin/004_time.t
Normal file
25
t/SOAP/WSDL/XSD/Typelib/Builtin/004_time.t
Normal file
@@ -0,0 +1,25 @@
|
||||
use Test::More tests => 3;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
|
||||
use_ok('SOAP::WSDL::XSD::Typelib::Builtin::time');
|
||||
my $obj;
|
||||
|
||||
$obj = SOAP::WSDL::XSD::Typelib::Builtin::time->new();
|
||||
|
||||
$obj->set_value( '12:23:03' );
|
||||
is $obj->get_value() , '12:23:03+01:00', 'conversion';
|
||||
|
||||
$obj->set_value( '12:23:03.12345+01:00' ), ;
|
||||
is $obj->get_value() , '12:23:03.12345+01:00', 'no conversion';
|
||||
|
||||
|
||||
|
||||
# exit;
|
||||
|
||||
#~ use Benchmark;
|
||||
#~ timethese 10000, {
|
||||
#~ xml => sub { $obj->set_value('2037-12-31T00:00:00.0000000+01:00') },
|
||||
#~ string => sub { $obj->set_value('2037-12-31') },
|
||||
#~ }
|
||||
32
t/SOAP/WSDL/XSD/Typelib/Builtin/005_dateTime.t
Normal file
32
t/SOAP/WSDL/XSD/Typelib/Builtin/005_dateTime.t
Normal file
@@ -0,0 +1,32 @@
|
||||
use Test::More tests => 4;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
use Date::Parse;
|
||||
use Date::Format;
|
||||
|
||||
sub timezone {
|
||||
my @time = strptime shift;
|
||||
my $tz = strftime('%z', @time);
|
||||
substr $tz, -2, 0, ':';
|
||||
return $tz;
|
||||
}
|
||||
|
||||
use_ok('SOAP::WSDL::XSD::Typelib::Builtin::dateTime');
|
||||
|
||||
print "# timezone is " . timezone( scalar localtime(time) ) . "\n";
|
||||
my $obj;
|
||||
my %dates = (
|
||||
'2007-12-31 12:32' => '2007-12-31T12:32:00',
|
||||
'2007-08-31 00:32' => '2007-08-31T00:32:00',
|
||||
'30 Aug 2007' => '2007-08-30T00:00:00',
|
||||
);
|
||||
|
||||
while (my ($date, $converted) = each %dates ) {
|
||||
|
||||
$obj = SOAP::WSDL::XSD::Typelib::Builtin::dateTime->new();
|
||||
$obj->set_value( $date );
|
||||
|
||||
is $obj->get_value() , $converted . timezone($date), 'conversion with timezone';
|
||||
}
|
||||
$obj->set_value('2007-12-31T00:00:00.0000000+01:00');
|
||||
19
t/SOAP/WSDL/XSD/Typelib/Builtin/006_string.t
Normal file
19
t/SOAP/WSDL/XSD/Typelib/Builtin/006_string.t
Normal file
@@ -0,0 +1,19 @@
|
||||
use Test::More tests => 4;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
|
||||
use_ok('SOAP::WSDL::XSD::Typelib::Builtin::string');
|
||||
my $obj;
|
||||
|
||||
$obj = SOAP::WSDL::XSD::Typelib::Builtin::string->new();
|
||||
|
||||
$obj->set_value( '& "Aber" <test>');
|
||||
is $obj->get_value() , '& "Aber" <test>';
|
||||
|
||||
is $obj, '& &qout;Aber&qout; <test>'
|
||||
, 'escape text on serialization';
|
||||
|
||||
is $obj->serialize({ name => 'test'})
|
||||
, '<test >& &qout;Aber&qout; <test></test >'
|
||||
, 'Serialization with name';
|
||||
@@ -1,180 +0,0 @@
|
||||
<?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="urn:HelloWorld"
|
||||
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="urn:HelloWorld"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<s:schema elementFormDefault="qualified"
|
||||
targetNamespace="urn:HelloWorld">
|
||||
<s:element name="sayHello">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:element name="sayGoodBye">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:element name="sayHelloResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="sayHelloResult" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:element name="sayGoodByeResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="sayGoodByeResult" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:complexType name="contact_detail_list">
|
||||
<s:complexContent>
|
||||
<s:restriction base="soapenc:Array">
|
||||
<s:attribute ref="soapenc:arrayType" wsdl:arrayType="s0:person_detail[]"/>
|
||||
</s:restriction>
|
||||
</s:complexContent>
|
||||
</s:complexType>
|
||||
<s:complexType name="person_detail">
|
||||
<s:all>
|
||||
<s:element name="email_address" type="s:string"/>
|
||||
<s:element name="user_name" type="s:string"/>
|
||||
<s:element name="first_name" type="s:string"/>
|
||||
<s:element name="last_name" type="s:string"/>
|
||||
<s:element name="department" type="s:string"/>
|
||||
<s:element name="id" type="s:string"/>
|
||||
<s:element name="title" type="s:string"/>
|
||||
</s:all>
|
||||
</s:complexType>
|
||||
</s:schema>
|
||||
</types>
|
||||
|
||||
<message name="sayHelloSoapIn">
|
||||
<part name="parameters" element="s0:sayHello" />
|
||||
</message>
|
||||
|
||||
<message name="sayGoodByeSoapIn">
|
||||
<part name="parameters" element="s0:sayHello" />
|
||||
</message>
|
||||
|
||||
<message name="sayGoodByeSoapInSecond">
|
||||
</message>
|
||||
|
||||
<message name="sayGoodByeSoapInThird">
|
||||
<part name="name" type="s:string" />
|
||||
<part name="recipients" type="s0:contact_detail_list" />
|
||||
</message>
|
||||
|
||||
|
||||
<message name="sayHelloSoapOut">
|
||||
<part name="parameters" element="s0:sayGoodByeResponse" />
|
||||
</message>
|
||||
|
||||
<message name="sayGoodByeSoapOut">
|
||||
<part name="parameters" element="s0:sayGoodByeResponse" />
|
||||
</message>
|
||||
|
||||
<portType name="Service1Soap">
|
||||
<operation name="sayHello">
|
||||
<input message="s0:sayHelloSoapIn" />
|
||||
|
||||
<output message="s0:sayHelloSoapOut" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
|
||||
<portType name="Service2Soap">
|
||||
|
||||
<operation name="sayGoodBye">
|
||||
<input message="s0:sayGoodByeSoapIn" />
|
||||
<output message="s0:sayGoodByeSoapOut" />
|
||||
</operation>
|
||||
|
||||
<operation name="sayGoodByeOverload">
|
||||
<input message="s0:sayGoodByeSoapIn" name="firstOverload" />
|
||||
<output message="s0:sayGoodByeSoapOut" />
|
||||
</operation>
|
||||
|
||||
<operation name="sayGoodByeOverload">
|
||||
<input message="s0:sayGoodByeSoapInSecond" name="secondOverload" />
|
||||
<output message="s0:sayGoodByeSoapOut" />
|
||||
</operation>
|
||||
|
||||
<operation name="sayGoodByeOverload">
|
||||
<input message="s0:sayGoodByeSoapInThird" name="thirdOverload" />
|
||||
<output message="s0:sayGoodByeSoapOut" />
|
||||
</operation>
|
||||
|
||||
|
||||
</portType>
|
||||
<binding name="Service1Soap" type="s0:Service1Soap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
||||
style="document" />
|
||||
|
||||
<operation name="sayHello">
|
||||
<soap:operation soapAction="urn:HelloWorld#sayHello"
|
||||
style="document" />
|
||||
<input>
|
||||
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
</input>
|
||||
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="Service2Soap" type="s0:Service2Soap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
||||
style="document" />
|
||||
<operation name="sayGoodBye">
|
||||
<soap:operation soapAction="urn:HelloWorld#sayGoodBye" style="document" />
|
||||
<input>
|
||||
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
</input>
|
||||
|
||||
<output>
|
||||
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="sayGoodByeOverload">
|
||||
<soap:operation soapAction="urn:HelloWorld#sayGoodBye" style="document" />
|
||||
<input>
|
||||
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
</input>
|
||||
|
||||
<output>
|
||||
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="Service1">
|
||||
<port name="Service1Soap" binding="s0:Service1Soap">
|
||||
<soap:address
|
||||
location="http://helloworld/helloworld.asmx" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="Service2">
|
||||
<port name="Service2Soap" binding="s0:Service2Soap">
|
||||
<soap:address
|
||||
location="http://helloworld/helloworld.asmx" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
1
t/acceptance/results/03_complexType-all.xml
Normal file
1
t/acceptance/results/03_complexType-all.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd-WSDL="http://www.w3.org/1999/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="Test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><test xmlns="Test"><testAll xsi:type="tns:testComplexType1"><Test1 xsi:type="xsd:string">Test 1</Test1><Test2 xsi:type="xsd:string">Test 2</Test2></testAll></test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
1
t/acceptance/results/03_complexType-sequence.xml
Normal file
1
t/acceptance/results/03_complexType-sequence.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd-WSDL="http://www.w3.org/1999/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="Test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><test xmlns="Test"><testSequence xsi:type="tns:testComplexType1"><Test1 xsi:type="xsd:string">Test 1</Test1><Test2 xsi:type="xsd:string">Test 2</Test2></testSequence></test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
1
t/acceptance/results/04_element-simpleType.xml
Normal file
1
t/acceptance/results/04_element-simpleType.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd-WSDL="http://www.w3.org/1999/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="Test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><test xmlns="Test"><testAll xsi:type="xsd:string">Test</testAll></test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
1
t/acceptance/results/04_element.xml
Normal file
1
t/acceptance/results/04_element.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd-WSDL="http://www.w3.org/1999/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="Test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><test xmlns="Test"><testAll xsi:type="xsd:string">Test</testAll></test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
1
t/acceptance/results/05_simpleType-list.xml
Normal file
1
t/acceptance/results/05_simpleType-list.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd-WSDL="http://www.w3.org/1999/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="Test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><test xmlns="Test"><testAll xsi:type="tns:testSimpleType1">1 2</testAll></test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
1
t/acceptance/results/05_simpleType-restriction.xml
Normal file
1
t/acceptance/results/05_simpleType-restriction.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd-WSDL="http://www.w3.org/1999/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="Test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><test xmlns="Test"><testAll xsi:type="tns:testSimpleType1">1</testAll></test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
1
t/acceptance/results/05_simpleType-union.xml
Normal file
1
t/acceptance/results/05_simpleType-union.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd-WSDL="http://www.w3.org/1999/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="Test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><test xmlns="Test"><testAll xsi:type="tns:testSimpleType1">1</testAll></test></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><sayHello xmlns="urn:HelloWorld"><name xsi:type="xsd:string">test</name><givenName xsi:type="xsd:string">GIVENNAME</givenName><test><name xsi:type="xsd:string">TESTNAME</name><givenName xsi:type="xsd:string">GIVENNAME</givenName></test></sayHello></soap:Body></soap:Envelope>
|
||||
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><sayHello xmlns="urn:HelloWorld"><name xsi:type="xsd:string">test</name><givenName xsi:type="xsd:string">test</givenName></sayHello></soap:Body></soap:Envelope>
|
||||
323
t/acceptance/wsdl/006_sax_client.wsdl
Normal file
323
t/acceptance/wsdl/006_sax_client.wsdl
Normal file
@@ -0,0 +1,323 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions name="MessageGateway"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/"
|
||||
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<wsdl:types>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/">
|
||||
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="AuthMessage">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Username" xsd:type="xsd:string"/>
|
||||
<xsd:element name="Password" xsd:type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A type containing all elements of a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MRecipientURI" type="xsd:anyURI" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
The recipient in URI notaitions. Valid URI schemas are: mailto:, sms:,
|
||||
phone:. Not all URI schemas need to be implemented at the current
|
||||
implementation stage.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSenderAddress" type="xsd:string" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
E-Mail sender address. Ignored for all but mailto: recipient URIs.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MMessageContent" type="xsd:string" minOccurs="1"
|
||||
maxOccurs="3">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Message Content.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSubject" type="xsd:string" minOccurs="0" maxOccurs="1">
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Message Subject. Ignored for all but mailto: URIs
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MDeliveryReportRecipientURI" type="xsd:anyURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
||||
URI to send a delivery report to. May be of one of the following schemes:
|
||||
mailto:, http:, https:. Reports to mailto: URIs are sent as plaintext,
|
||||
reports to http(s) URIs are sent as SOAP requests following the
|
||||
MessageGatewayClient service definition.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepalive" type="tns:TKeepalive" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Container for keepalive information. May be missing.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepalive">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing keeplive information.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
|
||||
<xsd:element name="MKeepaliveTimeout" type="xsd:double">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Keepalive timeout. The keepalive timeout spezifies how long the sending of
|
||||
a message will be delayed waiting for keepalive updates. If a keepalive
|
||||
update is received during this period, the timeout will be reset. If not,
|
||||
the message will be sent after the timeout has expired.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepaliveErrorPolicy" minOccurs="0"
|
||||
maxOccurs="1" default="suppress">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
Policy to comply to in case of system errors. Valid values are "suppress"
|
||||
and "report". If the policy is set to "suppress", keepalive messages will
|
||||
not be sent to their recipients in case of partial system failure, even if
|
||||
the keepalive has expired. This may result in "false negatives", i.e.
|
||||
messages may not be sent, even though their keepalive has expired. If the
|
||||
value is "report", keepalive messages will be sent from any cluster node.
|
||||
This may result in "false positive" alerts.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="suppress"></xsd:enumeration>
|
||||
<xsd:enumeration value="report"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing a message ID.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Type containing all elements of a keppalive update / remove request.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
|
||||
The ID for the message to update / remove
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="MAction" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The action to perform. Valid values are: "remove", "update". On "remove",
|
||||
the message with the ID specified will be removed from the queue, thus it
|
||||
will never be sent, even if it's timeout expires. On "update" the
|
||||
keepalive timeout of the corresponding message will be reset.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="remove"></xsd:enumeration>
|
||||
<xsd:enumeration value="update"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="KeepaliveMessage" type="tns:TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Keepalive message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="KeepaliveMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Response element for a keepalive request</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="EnqueueMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message response element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:complexType name="TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessage" type="tns:TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The keepalive message to process.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MKeepaliveMessage" type="tns:TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a keepalive message to process.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="EnqueueMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessage">
|
||||
<wsdl:documentation>inputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
<wsdl:part name="auth" element="tns:AuthMessage">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="EnqueueMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessageResponse">
|
||||
<wsdl:documentation>outputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessage">
|
||||
|
||||
<wsdl:documentation>input parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessageResponse">
|
||||
<wsdl:documentation>output parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="MGWPortType">
|
||||
<wsdl:documentation>
|
||||
generic port type for all methods required for sending messages over the mosaic
|
||||
message gatewa
|
||||
</wsdl:documentation>
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to enqueue a normal (immediate send) or a delayed message with
|
||||
keepalive functionality.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:EnqueueMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:EnqueueMessageResponse"></wsdl:output>
|
||||
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to update or remove a
|
||||
keepalive message.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:KeepaliveMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:KeepaliveMessageResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="MGWBinding" type="tns:MGWPortType">
|
||||
<wsdl:documentation>Generic binding for all (SOAP) port</wsdl:documentation>
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<soap:operation soapAction="http://www.example.org/MessageGateway2/EnqueueMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" namespace="http://www.example.org/" parts="tns:parameters"/>
|
||||
<soap:header use="literal" namespace="http://www.example.org/"
|
||||
message="tns:EnqueueMessageRequest" part="tns:auth"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<soap:operation
|
||||
soapAction="http://www.example.org/MessageGateway2/KeepaliveMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="MessageGateway">
|
||||
<wsdl:documentation>
|
||||
Web Service for sending messages over the message gateway
|
||||
</wsdl:documentation>
|
||||
<wsdl:port name="HTTPPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the message gateway</wsdl:documentation>
|
||||
<soap:address location="http://test.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
|
||||
<wsdl:port name="HTTPSPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the message gateway</wsdl:documentation>
|
||||
<soap:address location="https://test.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
|
||||
<wsdl:port name="HTTP" binding="tns:MGWBinding">
|
||||
<http:address location="http://www.webservicex.net/globalweather.asmx" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
71
t/acceptance/wsdl/008_complexType.wsdl
Normal file
71
t/acceptance/wsdl/008_complexType.wsdl
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="Test"
|
||||
xmlns:tns="Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="Test">
|
||||
<xsd:complexType name="testComplexTypeAll">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="Test1" type="xsd:string"/>
|
||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSequence">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test2" type="xsd:string" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testComplexTypeAll"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexTypeSequence"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
108
t/acceptance/wsdl/02_port.wsdl
Normal file
108
t/acceptance/wsdl/02_port.wsdl
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:simpleType"
|
||||
targetNamespace="urn:simpleType"
|
||||
xmlns:tns="urn:simpleType"
|
||||
xmlns:xsd="http://www.w3c.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="simpleType">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="int">
|
||||
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort2">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort3">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort2" name="testBinding2">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort3" name="testBinding3">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
<port name="testPort2" binding="tns:testBinding2">
|
||||
<soap:address location="http://127.0.0.1/testPort2" />
|
||||
</port>
|
||||
<port name="testPort3" binding="tns:testBinding3">
|
||||
<soap:address location="http://127.0.0.1/testPort3" />
|
||||
</port>
|
||||
|
||||
</service>
|
||||
</definitions>
|
||||
62
t/acceptance/wsdl/03_complexType-all.wsdl
Normal file
62
t/acceptance/wsdl/03_complexType-all.wsdl
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test" targetNamespace="urn:Test" xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:complexType name="testComplexTypeAll">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="Test1" type="xsd:string" />
|
||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1" />
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSequence">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1" />
|
||||
<xsd:element name="Test2" type="xsd:string" maxOccurs="1" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testComplexTypeAll" />
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexTypeAll" />
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>Test-Methode</documentation>
|
||||
|
||||
<input message="tns:testRequest" />
|
||||
<output message="tns:testResponse" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
52
t/acceptance/wsdl/03_complexType-element-ref.wsdl
Normal file
52
t/acceptance/wsdl/03_complexType-element-ref.wsdl
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test" targetNamespace="urn:Test" xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:element name="TestElement" type="xsd:string" />
|
||||
<xsd:element name="TestRef" ref="tns:TestElement" />
|
||||
<xsd:complexType name="testComplexTypeRef">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="TestRef" ref="tns:TestElement" />
|
||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1" />
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testComplexTypeRef" />
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexTypeRef" />
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>Test-Methode</documentation>
|
||||
<input message="tns:testRequest" />
|
||||
<output message="tns:testResponse" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
103
t/acceptance/wsdl/03_complexType-sequence.wsdl
Normal file
103
t/acceptance/wsdl/03_complexType-sequence.wsdl
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="Test"
|
||||
xmlns:tns="Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="Test">
|
||||
<xsd:complexType name="testComplexType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test2" type="xsd:string" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testSequence" type="tns:testComplexType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testSequence" type="tns:testComplexType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort2">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort2">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort2" name="testBinding2">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort3" name="testBinding3">
|
||||
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
57
t/acceptance/wsdl/04_element-simpleType.wsdl
Normal file
57
t/acceptance/wsdl/04_element-simpleType.wsdl
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:element name="testElement1">
|
||||
<xsd:simpleType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int" minInclusive="1"
|
||||
maxInclusive="9"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testElement1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
72
t/acceptance/wsdl/04_element.wsdl
Normal file
72
t/acceptance/wsdl/04_element.wsdl
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:element name="testElement1" type="xsd:string" />
|
||||
<xsd:element name="testElement2" type="xsd:int" />
|
||||
<xsd:element name="testElementRef" ref="tns:testElement1" />
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
</message>
|
||||
<message name="testRefRequest">
|
||||
<part name="testAll" element="tns:testElementRef"/>
|
||||
</message>
|
||||
|
||||
<message name="testResponse">
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
<operation name="testRef">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRefRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testRef">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="testRef"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
69
t/acceptance/wsdl/05_simpleType-list.wsdl
Normal file
69
t/acceptance/wsdl/05_simpleType-list.wsdl
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2-4)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="xsd:int">
|
||||
<xsd:minLength value="2"/>
|
||||
<xsd:maxLength value="4"/>
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testSimpleType1" itemType="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="xsd:int">
|
||||
<xsd:length value="2"/>
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
58
t/acceptance/wsdl/05_simpleType-restriction.wsdl
Normal file
58
t/acceptance/wsdl/05_simpleType-restriction.wsdl
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: Integer between 1 and 9 (Exclusive constrains)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0"/>
|
||||
<xsd:maxExclusive value="10"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tnstestResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
103
t/acceptance/wsdl/05_simpleType-union.wsdl
Normal file
103
t/acceptance/wsdl/05_simpleType-union.wsdl
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union memberTypes="xsd:int xsd:string"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="testSimpleType2">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minInclusive value="1"/>
|
||||
<xsd:maxInclusive value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="union"/>
|
||||
<xsd:enumeration value="test"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:union>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexType1"/>
|
||||
</message>
|
||||
<message name="testRequest2">
|
||||
<part name="testAll" type="tns:testSimpleType2"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexType2"/>
|
||||
</message>
|
||||
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
<operation name="test2">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest2"/>
|
||||
<output message="tns:testResponse2"/>
|
||||
</operation>
|
||||
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
<operation name="test2">
|
||||
<soap:operation soapAction="test2">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
75
t/acceptance/wsdl/10_helloworld.asmx.xml
Normal file
75
t/acceptance/wsdl/10_helloworld.asmx.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?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="urn:HelloWorld"
|
||||
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="urn:HelloWorld"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<s:schema elementFormDefault="qualified"
|
||||
targetNamespace="urn:HelloWorld">
|
||||
<s:element name="sayHello">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:element name="sayHelloResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1"
|
||||
name="sayHelloResult" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
</s:schema>
|
||||
</types>
|
||||
|
||||
<message name="sayHelloSoapIn">
|
||||
<part name="parameters" element="s0:sayHello" />
|
||||
</message>
|
||||
|
||||
<message name="sayHelloSoapOut">
|
||||
<part name="parameters" element="s0:sayHelloResponse" />
|
||||
</message>
|
||||
|
||||
<portType name="Service1Soap">
|
||||
<operation name="sayHello">
|
||||
<input message="s0:sayHelloSoapIn" />
|
||||
|
||||
<output message="s0:sayHelloSoapOut" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="Service1Soap" type="s0:Service1Soap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
||||
style="document" />
|
||||
|
||||
<operation name="sayHello">
|
||||
<soap:operation soapAction="urn:HelloWorld#sayHello"
|
||||
style="document" />
|
||||
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<service name="Service1">
|
||||
<port name="Service1Soap" binding="s0:Service1Soap">
|
||||
<soap:address
|
||||
location="http://helloworld/helloworld.asmx" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
@@ -1,105 +1,105 @@
|
||||
<?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="urn:HelloWorld"
|
||||
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="urn:HelloWorld"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<s:schema elementFormDefault="qualified"
|
||||
targetNamespace="urn:HelloWorld">
|
||||
<s:element name="sayHello">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||
type="s:string" />
|
||||
|
||||
<s:element minOccurs="0" maxOccurs="1" name="givenName"
|
||||
type="s:string" />
|
||||
|
||||
<s:element minOccurs="0" maxOccurs="1" name="test"
|
||||
type="s0:test2" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:element name="sayHelloResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1"
|
||||
name="sayHelloResult" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:complexType name="test2">
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||
type="s:string" />
|
||||
|
||||
<s:element minOccurs="0" maxOccurs="1" name="givenName"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
|
||||
<s:complexType name="testExtended">
|
||||
<s:extension base="s0:test2">
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="extend"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:extension>
|
||||
</s:complexType>
|
||||
</s:schema>
|
||||
</types>
|
||||
|
||||
<message name="sayHelloSoapIn">
|
||||
<part name="parameters" element="s0:sayHello" />
|
||||
|
||||
<part name="test1" type="s0:testExtended" />
|
||||
|
||||
<part name="test2" type="s0:test2"
|
||||
targetNamespace="urn:test2" />
|
||||
</message>
|
||||
|
||||
<message name="sayHelloSoapOut">
|
||||
<part name="parameters" element="s0:sayHelloResponse" />
|
||||
</message>
|
||||
|
||||
<portType name="Service1Soap">
|
||||
<operation name="sayHello">
|
||||
<input message="s0:sayHelloSoapIn" />
|
||||
|
||||
<output message="s0:sayHelloSoapOut" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="Service1Soap" type="s0:Service1Soap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
||||
style="document" />
|
||||
|
||||
<operation name="sayHello">
|
||||
<soap:operation soapAction="urn:HelloWorld#sayHello"
|
||||
style="document" />
|
||||
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<service name="Service1">
|
||||
<port name="Service1Soap" binding="s0:Service1Soap">
|
||||
<soap:address
|
||||
location="http://helloworld/helloworld.asmx" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
<?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="urn:HelloWorld"
|
||||
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="urn:HelloWorld"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<s:schema elementFormDefault="qualified"
|
||||
targetNamespace="urn:HelloWorld">
|
||||
<s:element name="sayHello">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||
type="s:string" />
|
||||
|
||||
<s:element minOccurs="0" maxOccurs="1" name="givenName"
|
||||
type="s:string" nillable="1"/>
|
||||
|
||||
<!-- <s:element minOccurs="0" maxOccurs="1" name="test"
|
||||
type="s0:test2" /> //-->
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:element name="sayHelloResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1"
|
||||
name="sayHelloResult" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
<s:complexType name="test2">
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||
type="s:string" />
|
||||
|
||||
<s:element minOccurs="0" maxOccurs="1" name="givenName"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
|
||||
<s:complexType name="testExtended">
|
||||
<s:extension base="s0:test2">
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="extend"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:extension>
|
||||
</s:complexType>
|
||||
</s:schema>
|
||||
</types>
|
||||
|
||||
<message name="sayHelloSoapIn">
|
||||
<part name="parameters" element="s0:sayHello" />
|
||||
|
||||
<!-- <part name="test1" type="s0:testExtended" />
|
||||
|
||||
<part name="test2" type="s0:test2"
|
||||
targetNamespace="urn:test2" /> //-->
|
||||
</message>
|
||||
|
||||
<message name="sayHelloSoapOut">
|
||||
<part name="parameters" element="s0:sayHelloResponse" />
|
||||
</message>
|
||||
|
||||
<portType name="Service1Soap">
|
||||
<operation name="sayHello">
|
||||
<input message="s0:sayHelloSoapIn" />
|
||||
|
||||
<output message="s0:sayHelloSoapOut" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="Service1Soap" type="s0:Service1Soap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
||||
style="document" />
|
||||
|
||||
<operation name="sayHello">
|
||||
<soap:operation soapAction="urn:HelloWorld#sayHello"
|
||||
style="document" />
|
||||
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<service name="Service1">
|
||||
<port name="Service1Soap" binding="s0:Service1Soap">
|
||||
<soap:address
|
||||
location="http://helloworld/helloworld.asmx" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
81
t/acceptance/wsdl/contributed/Axis.wsdl
Normal file
81
t/acceptance/wsdl/contributed/Axis.wsdl
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions targetNamespace="http://order.soap.services"
|
||||
xmlns:impl="http://order.soap.services" xmlns:intf="http://order.soap.services"
|
||||
xmlns:apachesoap="http://xml.apache.org/xml-soap"
|
||||
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns1="http://database.services"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
<!--WSDL created by Apache Axis version: 1.2RC3
|
||||
Built on Feb 28, 2005 (10:15:14 EST)-->
|
||||
<wsdl:types>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://database.services">
|
||||
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
<complexType name="ProcedureResponse">
|
||||
<sequence>
|
||||
<element name="message" nillable="true" type="soapenc:string" />
|
||||
<element name="status" type="xsd:int" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
</schema>
|
||||
</wsdl:types>
|
||||
|
||||
<wsdl:message name="confirmRequest">
|
||||
<wsdl:part name="language_id" type="soapenc:string" />
|
||||
<wsdl:part name="user_id" type="soapenc:string" />
|
||||
<wsdl:part name="supplier_code" type="soapenc:string" />
|
||||
<wsdl:part name="customer_no" type="soapenc:string" />
|
||||
<wsdl:part name="author" type="soapenc:string" />
|
||||
<wsdl:part name="title" type="soapenc:string" />
|
||||
<wsdl:part name="isbn" type="soapenc:string" />
|
||||
<wsdl:part name="classification" type="soapenc:string" />
|
||||
<wsdl:part name="purchase_note" type="soapenc:string" />
|
||||
<wsdl:part name="article_no" type="soapenc:string" />
|
||||
<wsdl:part name="price" type="xsd:double" />
|
||||
<wsdl:part name="currency_id" type="soapenc:string" />
|
||||
<wsdl:part name="delivery_date" type="xsd:dateTime" />
|
||||
<wsdl:part name="info_note" type="soapenc:string" />
|
||||
<wsdl:part name="no_of_copies" type="xsd:int" />
|
||||
<wsdl:part name="order_no" type="soapenc:string" />
|
||||
<wsdl:part name="order_date" type="xsd:dateTime" />
|
||||
<wsdl:part name="title_no" type="soapenc:string" />
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:message name="confirmResponse">
|
||||
<wsdl:part name="confirmReturn" type="tns1:ProcedureResponse" />
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="OrderImpl">
|
||||
<wsdl:operation name="confirm"
|
||||
parameterOrder="language_id user_id supplier_code customer_no author title isbn classification purchase_note article_no price currency_id delivery_date info_note no_of_copies order_no order_date title_no">
|
||||
<wsdl:input name="confirmRequest" message="impl:confirmRequest" />
|
||||
<wsdl:output name="confirmResponse" message="impl:confirmResponse" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="OrderSoapBinding" type="impl:OrderImpl">
|
||||
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="confirm">
|
||||
<wsdlsoap:operation soapAction="" />
|
||||
<wsdl:input name="confirmRequest">
|
||||
<wsdlsoap:body use="encoded"
|
||||
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://order.soap.services" />
|
||||
</wsdl:input>
|
||||
|
||||
<wsdl:output name="confirmResponse">
|
||||
<wsdlsoap:body use="encoded"
|
||||
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://order.soap.services" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
|
||||
<wsdl:service name="OrderImplService">
|
||||
<wsdl:port name="Order" binding="impl:OrderSoapBinding">
|
||||
<wsdlsoap:address location="http://example.com/services/services/Order" />
|
||||
</wsdl:port>
|
||||
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
202
t/acceptance/wsdl/contributed/ETest.wsdl
Normal file
202
t/acceptance/wsdl/contributed/ETest.wsdl
Normal file
@@ -0,0 +1,202 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions targetNamespace="http://example.com/soap/services/ETest"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:apachesoap="http://xml.apache.org/xml-soap"
|
||||
xmlns:impl="http://example.com/soap/services/ETest"
|
||||
xmlns:intf="http://example.com/soap/services/ETest"
|
||||
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="urn:ETest"
|
||||
xmlns:tns2="urn:acquisition" 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:ETest" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
<complexType name="CreationBaseData">
|
||||
<sequence>
|
||||
<element name="createdBy" nillable="true" type="xsd:long" />
|
||||
<element name="creationDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="updateDateCenter" nillable="true" type="xsd:dateTime" />
|
||||
<element name="updateDateLocal" nillable="true" type="xsd:dateTime" />
|
||||
<element name="updatedBy" nillable="true" type="xsd:long" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
<complexType name="CreationData">
|
||||
<complexContent>
|
||||
<extension base="tns1:CreationBaseData">
|
||||
<sequence>
|
||||
<element name="creatorFullName" nillable="true" type="xsd:string" />
|
||||
<element name="modifierFullName" nillable="true" type="xsd:string" />
|
||||
</sequence>
|
||||
</extension>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType abstract="true" name="EProductData">
|
||||
<sequence>
|
||||
<element name="EStatus" nillable="true" type="xsd:string" />
|
||||
<element name="EStatusUpdatedate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="SFXID" nillable="true" type="xsd:string" />
|
||||
<element name="activationFromDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="activationToDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="activityStatusDateFrom" nillable="true" type="xsd:dateTime" />
|
||||
<element name="activityStatusDateTo" nillable="true" type="xsd:dateTime" />
|
||||
<element name="canEditSFXID" type="xsd:boolean" />
|
||||
<element name="concurrentNumberOfUsers" nillable="true" type="xsd:int" />
|
||||
<element name="creationData" nillable="true" type="tns1:CreationData" />
|
||||
<element name="deleteable" type="xsd:boolean" />
|
||||
<element name="ETestCode" nillable="true" type="xsd:string" />
|
||||
<element name="id" nillable="true" type="xsd:long" />
|
||||
<element name="instanceCode" nillable="true" type="xsd:string" />
|
||||
<element name="mainContact" nillable="true" type="xsd:string" />
|
||||
<element name="metaLibID" nillable="true" type="xsd:string" />
|
||||
<element name="otherID" nillable="true" type="xsd:string" />
|
||||
<element name="otherSource" nillable="true" type="xsd:string" />
|
||||
<element name="privateNote" nillable="true" type="xsd:string" />
|
||||
<element name="procurementStatus" nillable="true" type="xsd:string" />
|
||||
<element name="procurementStatusUpdateDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="procurementStatusUpdatedate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="sourceInstanceCode" nillable="true" type="xsd:string" />
|
||||
<element name="sponseringLibraryCode" nillable="true" type="xsd:string" />
|
||||
<element name="sponseringLibraryName" nillable="true" type="xsd:string" />
|
||||
<element name="updateTarget" nillable="true" type="xsd:string" />
|
||||
<element name="workExpressionCode" nillable="true" type="xsd:string" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
<complexType name="EProductInformation">
|
||||
<sequence>
|
||||
<element name="acquisitions" nillable="true"
|
||||
type="impl:ArrayOf_tns2_AcquisitionData" />
|
||||
<element name="data" nillable="true" type="tns1:EProductData" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
</schema>
|
||||
<schema targetNamespace="urn:acquisition" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
<complexType name="AcquisitionCommonData">
|
||||
<sequence>
|
||||
<element name="budgets" nillable="true" type="xsd:string" />
|
||||
<element name="campusCode" nillable="true" type="xsd:string" />
|
||||
<element name="concurrentUsersNote" nillable="true" type="xsd:string" />
|
||||
<element name="creationData" nillable="true" type="tns1:CreationData" />
|
||||
<element name="id" nillable="true" type="xsd:long" />
|
||||
<element name="instituteCode" nillable="true" type="xsd:string" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
<complexType name="AcquisitionData">
|
||||
<sequence>
|
||||
<element name="ILSSubscriptionNo" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionCode" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionCommonData" nillable="true"
|
||||
type="tns2:AcquisitionCommonData" />
|
||||
<element name="acquisitionMethod" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionNumber" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionStatus" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionStatusDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="advanceNoticeDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="autoRenewal" nillable="true" type="xsd:boolean" />
|
||||
<element name="consortialAgreement" type="xsd:boolean" />
|
||||
<element name="discountOnPrice" nillable="true" type="xsd:int" />
|
||||
<element name="id" nillable="true" type="xsd:long" />
|
||||
<element name="instanceCode" nillable="true" type="xsd:string" />
|
||||
<element name="materialType" nillable="true" type="xsd:string" />
|
||||
<element name="noteForILS" nillable="true" type="xsd:string" />
|
||||
<element name="noteForVendor" nillable="true" type="xsd:string" />
|
||||
<element name="noticePeriodCode" nillable="true" type="xsd:string" />
|
||||
<element name="numberOfCopies" nillable="true" type="xsd:int" />
|
||||
<element name="orderDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="orderForm" nillable="true" type="xsd:string" />
|
||||
<element name="orderSendMethod" nillable="true" type="xsd:string" />
|
||||
<element name="pooledConcurrentUsers" nillable="true" type="xsd:int" />
|
||||
<element name="price" nillable="true" type="xsd:double" />
|
||||
<element name="pricingCap" nillable="true" type="xsd:int" />
|
||||
<element name="pricingCapFrom" nillable="true" type="xsd:dateTime" />
|
||||
<element name="pricingCapTo" nillable="true" type="xsd:dateTime" />
|
||||
<element name="pricingModel" nillable="true" type="xsd:string" />
|
||||
<element name="printCancellationNote" nillable="true" type="xsd:string" />
|
||||
<element name="printCancellationRestriction" type="xsd:boolean" />
|
||||
<element name="printPurchaseOrderNo" nillable="true" type="xsd:string" />
|
||||
<element name="purchaseOrderNo" nillable="true" type="xsd:string" />
|
||||
<element name="renewallOrCancellationDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="renewallOrCancellationDescisionNote" nillable="true"
|
||||
type="xsd:string" />
|
||||
<element name="renewallOrCancellationNoteForILS" nillable="true"
|
||||
type="xsd:string" />
|
||||
<element name="renewallOrCancellationNoteForVendor" nillable="true"
|
||||
type="xsd:string" />
|
||||
<element name="subscriptionNotification" nillable="true" type="xsd:int" />
|
||||
<element name="subscriptionPeriodCode" nillable="true" type="xsd:string" />
|
||||
<element name="subscriptionType" nillable="true" type="xsd:string" />
|
||||
<element name="subscriptionTypeNote" nillable="true" type="xsd:string" />
|
||||
<element name="vendorAdvancedNotice" nillable="true" type="xsd:int" />
|
||||
<element name="vendorAdvancedNoticeVal" nillable="true" type="xsd:string" />
|
||||
<element name="vendorCode" nillable="true" type="xsd:string" />
|
||||
<element name="vendorName" nillable="true" type="xsd:string" />
|
||||
<element name="vendorSubscriptionCode" nillable="true" type="xsd:string" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
</schema>
|
||||
<schema targetNamespace="http://example.com/soap/services/ETest"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
<complexType name="ArrayOf_tns2_AcquisitionData">
|
||||
<complexContent>
|
||||
<restriction base="soapenc:Array">
|
||||
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns2:AcquisitionData[]" />
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
</schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="getETestResponse">
|
||||
<wsdl:part name="getETestReturn" type="tns1:EProductInformation" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="getFixedETestResponse">
|
||||
<wsdl:part name="getFixedETestReturn" type="tns1:EProductInformation" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="getFixedETestRequest"></wsdl:message>
|
||||
<wsdl:message name="getETestRequest">
|
||||
<wsdl:part name="indexName" type="xsd:string" />
|
||||
<wsdl:part name="indexValue" type="xsd:string" />
|
||||
<wsdl:part name="withStatus" type="xsd:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="ETestWeb">
|
||||
<wsdl:operation name="getETest" parameterOrder="indexName indexValue withStatus">
|
||||
<wsdl:input message="impl:getETestRequest" name="getETestRequest" />
|
||||
<wsdl:output message="impl:getETestResponse" name="getETestResponse" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="getFixedETest">
|
||||
<wsdl:input message="impl:getFixedETestRequest" name="getFixedETestRequest" />
|
||||
<wsdl:output message="impl:getFixedETestResponse"
|
||||
name="getFixedETestResponse" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="ETestSoapBinding" type="impl:ETestWeb">
|
||||
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="getETest">
|
||||
<wsdlsoap:operation soapAction="" />
|
||||
<wsdl:input name="getETestRequest">
|
||||
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://ETest.webservice.api.verde.exlibris.com" use="encoded" />
|
||||
</wsdl:input>
|
||||
<wsdl:output name="getETestResponse">
|
||||
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://example.com/soap/services/ETest" use="encoded" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="getFixedETest">
|
||||
<wsdlsoap:operation soapAction="" />
|
||||
<wsdl:input name="getFixedETestRequest">
|
||||
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://ETest.webservice.api.verde.exlibris.com" use="encoded" />
|
||||
</wsdl:input>
|
||||
<wsdl:output name="getFixedETestResponse">
|
||||
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://example.com/soap/services/ETest" use="encoded" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="ETestWebService">
|
||||
<wsdl:port binding="impl:ETestSoapBinding" name="ETest">
|
||||
<wsdlsoap:address location="http://example.com/soap/services/ETest" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
160
t/acceptance/wsdl/contributed/OITest.wsdl
Normal file
160
t/acceptance/wsdl/contributed/OITest.wsdl
Normal file
@@ -0,0 +1,160 @@
|
||||
<wsdl:definitions xmlns:oi="http://example.com/OITest/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:ws="http://example.com/OITest/ws/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:ns="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://example.com/OITest/ws/">
|
||||
<wsdl:types>
|
||||
<xsi:schema targetNamespace="http://example.com/OITest/ws/"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="http://example.com/OITest/ws/" elementFormDefault="unqualified"
|
||||
attributeFormDefault="unqualified">
|
||||
</xsi:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="AvailableToSellRequest">
|
||||
<wsdl:part name="atsInquiry" element="oi:atsInquiry" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="AvailableToSellResponse">
|
||||
<wsdl:part name="availableToSell" element="oi:availableToSell" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="POResponse">
|
||||
<wsdl:part name="acknowledgement" element="oi:acknowledgement" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="OITestWebServicesFault">
|
||||
<wsdl:part name="OITestFault" element="oi:OITestFault" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="CatalogRequest">
|
||||
<wsdl:part name="catalogRequest" element="oi:catalogRequest" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="CatalogReponse">
|
||||
<wsdl:part name="catalog" element="oi:catalog" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="CatalogListRequest">
|
||||
<wsdl:part name="catalogListInfo" element="oi:catalogListRequest" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="CatalogListResponse">
|
||||
<wsdl:part name="catalogList" element="oi:catalogList" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="POSubmitRequest">
|
||||
<wsdl:part name="submitPO" element="oi:submitPO" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="POCancelRequest">
|
||||
<wsdl:part name="cancelPO" element="oi:cancelPO" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="POChangeRequest">
|
||||
<wsdl:part name="changePO" element="oi:changePO" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="OITestPort">
|
||||
<wsdl:operation name="ATSCheck">
|
||||
<wsdl:input message="ws:AvailableToSellRequest" />
|
||||
<wsdl:output message="ws:AvailableToSellResponse" />
|
||||
<wsdl:fault name="OITestFault" message="ws:OITestWebServicesFault" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="POSubmit">
|
||||
<wsdl:input message="ws:POSubmitRequest" />
|
||||
<wsdl:output message="ws:POResponse" />
|
||||
<wsdl:fault name="OITestFault" message="ws:OITestWebServicesFault" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="POCancel">
|
||||
<wsdl:input message="ws:POCancelRequest" />
|
||||
<wsdl:output message="ws:POResponse" />
|
||||
<wsdl:fault name="OITestFault" message="ws:OITestWebServicesFault" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="POChange">
|
||||
<wsdl:input message="ws:POChangeRequest" />
|
||||
<wsdl:output message="ws:POResponse" />
|
||||
<wsdl:fault name="OITestFault" message="ws:OITestWebServicesFault" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="CatalogRequest">
|
||||
<wsdl:input message="ws:CatalogRequest" />
|
||||
<wsdl:output message="ws:CatalogReponse" />
|
||||
<wsdl:fault name="OITestFault" message="ws:OITestWebServicesFault" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="CatalogListRequest">
|
||||
<wsdl:input message="ws:CatalogListRequest" />
|
||||
<wsdl:output message="ws:CatalogListResponse" />
|
||||
<wsdl:fault name="OITestFault" message="ws:OITestWebServicesFault" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="OITestBinding" type="ws:OITestPort">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="ATSCheck">
|
||||
<soap:operation soapAction="http://example.com/OITest/ATSCheck" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="OITestFault">
|
||||
<soap:fault name="OITestFault" use="literal" />
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="POSubmit">
|
||||
<soap:operation soapAction="http://example.com/OITest/POSubmit" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="OITestFault">
|
||||
<soap:fault name="OITestFault" use="literal" />
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="POCancel">
|
||||
<soap:operation soapAction="http://example.com/OITest/POCancel" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="OITestFault">
|
||||
<soap:fault name="OITestFault" use="literal" />
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="POChange">
|
||||
<soap:operation soapAction="http://example.com/OITest/POChange" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="OITestFault">
|
||||
<soap:fault name="OITestFault" use="literal" />
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="CatalogRequest">
|
||||
<soap:operation soapAction="http://example.com/OITest/CatalogRequest" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="OITestFault">
|
||||
<soap:fault name="OITestFault" use="literal" />
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="CatalogListRequest">
|
||||
<soap:operation soapAction="http://example.com/OITest/CatalogListRequest" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="OITestFault">
|
||||
<soap:fault name="OITestFault" use="literal" />
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="OITestService">
|
||||
<wsdl:port name="OITestService" binding="ws:OITestBinding">
|
||||
<soap:address location="http://localhost:8080/ws/services/OITestService" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
368
t/acceptance/wsdl/contributed/tools.wsdl
Normal file
368
t/acceptance/wsdl/contributed/tools.wsdl
Normal file
@@ -0,0 +1,368 @@
|
||||
<?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/Dijkalk_Webservice/Tools"
|
||||
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
|
||||
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
|
||||
targetNamespace="http://tempuri.org/Dijkalk_Webservice/Tools"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
<wsdl:types>
|
||||
<s:schema elementFormDefault="qualified"
|
||||
targetNamespace="http://tempuri.org/Dijkalk_Webservice/Tools">
|
||||
<s:element name="IrSzamValid">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="cIrszam" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="IrSzamValidResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="IrSzamValidResult"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="HelynevValid">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="cHelynev" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="HelynevValidResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="HelynevValidResult"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="KozterValid">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="cIrszam" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="cKozterNev" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="KozterValidResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="KozterValidResult"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="GetVersion">
|
||||
<s:complexType />
|
||||
</s:element>
|
||||
<s:element name="GetVersionResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="GetVersionResult"
|
||||
type="s:string" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="string" nillable="true" type="s:string" />
|
||||
</s:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="IrSzamValidSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:IrSzamValid" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IrSzamValidSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:IrSzamValidResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="HelynevValidSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:HelynevValid" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="HelynevValidSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:HelynevValidResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KozterValidSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:KozterValid" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KozterValidSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:KozterValidResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetVersionSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:GetVersion" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetVersionSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:GetVersionResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IrSzamValidHttpGetIn">
|
||||
<wsdl:part name="cIrszam" type="s:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IrSzamValidHttpGetOut">
|
||||
<wsdl:part name="Body" element="tns:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="HelynevValidHttpGetIn">
|
||||
<wsdl:part name="cHelynev" type="s:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="HelynevValidHttpGetOut">
|
||||
<wsdl:part name="Body" element="tns:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KozterValidHttpGetIn">
|
||||
<wsdl:part name="cIrszam" type="s:string" />
|
||||
<wsdl:part name="cKozterNev" type="s:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KozterValidHttpGetOut">
|
||||
<wsdl:part name="Body" element="tns:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetVersionHttpGetIn" />
|
||||
<wsdl:message name="GetVersionHttpGetOut">
|
||||
<wsdl:part name="Body" element="tns:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IrSzamValidHttpPostIn">
|
||||
<wsdl:part name="cIrszam" type="s:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IrSzamValidHttpPostOut">
|
||||
<wsdl:part name="Body" element="tns:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="HelynevValidHttpPostIn">
|
||||
<wsdl:part name="cHelynev" type="s:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="HelynevValidHttpPostOut">
|
||||
<wsdl:part name="Body" element="tns:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KozterValidHttpPostIn">
|
||||
<wsdl:part name="cIrszam" type="s:string" />
|
||||
<wsdl:part name="cKozterNev" type="s:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KozterValidHttpPostOut">
|
||||
<wsdl:part name="Body" element="tns:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetVersionHttpPostIn" />
|
||||
<wsdl:message name="GetVersionHttpPostOut">
|
||||
<wsdl:part name="Body" element="tns:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="ToolsSoap">
|
||||
<wsdl:operation name="IrSzamValid">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Helység adatok lekérdezése irányítószám részlet alapján
|
||||
</documentation>
|
||||
<wsdl:input message="tns:IrSzamValidSoapIn" />
|
||||
<wsdl:output message="tns:IrSzamValidSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="HelynevValid">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Helység adatok lekérdezése helységnév részlet alapján
|
||||
</documentation>
|
||||
<wsdl:input message="tns:HelynevValidSoapIn" />
|
||||
<wsdl:output message="tns:HelynevValidSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KozterValid">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Közterület adatok lekérdezése irányítószám és közterület név részlet alapján
|
||||
</documentation>
|
||||
<wsdl:input message="tns:KozterValidSoapIn" />
|
||||
<wsdl:output message="tns:KozterValidSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetVersion">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Verziószám lekérdezés
|
||||
</documentation>
|
||||
<wsdl:input message="tns:GetVersionSoapIn" />
|
||||
<wsdl:output message="tns:GetVersionSoapOut" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:portType name="ToolsHttpGet">
|
||||
<wsdl:operation name="IrSzamValid">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Helység adatok lekérdezése irányítószám részlet alapján
|
||||
</documentation>
|
||||
<wsdl:input message="tns:IrSzamValidHttpGetIn" />
|
||||
<wsdl:output message="tns:IrSzamValidHttpGetOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="HelynevValid">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Helység adatok lekérdezése helységnév részlet alapján
|
||||
</documentation>
|
||||
<wsdl:input message="tns:HelynevValidHttpGetIn" />
|
||||
<wsdl:output message="tns:HelynevValidHttpGetOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KozterValid">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Közterület adatok lekérdezése irányítószám és közterület név részlet alapján
|
||||
</documentation>
|
||||
<wsdl:input message="tns:KozterValidHttpGetIn" />
|
||||
<wsdl:output message="tns:KozterValidHttpGetOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetVersion">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Verziószám lekérdezés
|
||||
</documentation>
|
||||
<wsdl:input message="tns:GetVersionHttpGetIn" />
|
||||
<wsdl:output message="tns:GetVersionHttpGetOut" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:portType name="ToolsHttpPost">
|
||||
<wsdl:operation name="IrSzamValid">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Helység adatok lekérdezése irányítószám részlet alapján
|
||||
</documentation>
|
||||
<wsdl:input message="tns:IrSzamValidHttpPostIn" />
|
||||
<wsdl:output message="tns:IrSzamValidHttpPostOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="HelynevValid">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Helység adatok lekérdezése helységnév részlet alapján
|
||||
</documentation>
|
||||
<wsdl:input message="tns:HelynevValidHttpPostIn" />
|
||||
<wsdl:output message="tns:HelynevValidHttpPostOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KozterValid">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Közterület adatok lekérdezése irányítószám és közterület név részlet alapján
|
||||
</documentation>
|
||||
<wsdl:input message="tns:KozterValidHttpPostIn" />
|
||||
<wsdl:output message="tns:KozterValidHttpPostOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetVersion">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
Verziószám lekérdezés
|
||||
</documentation>
|
||||
<wsdl:input message="tns:GetVersionHttpPostIn" />
|
||||
<wsdl:output message="tns:GetVersionHttpPostOut" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="ToolsSoap" type="tns:ToolsSoap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
|
||||
<wsdl:operation name="IrSzamValid">
|
||||
<soap:operation soapAction="http://tempuri.org/Dijkalk_Webservice/Tools/IrSzamValid"
|
||||
style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="HelynevValid">
|
||||
<soap:operation
|
||||
soapAction="http://tempuri.org/Dijkalk_Webservice/Tools/HelynevValid"
|
||||
style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KozterValid">
|
||||
<soap:operation soapAction="http://tempuri.org/Dijkalk_Webservice/Tools/KozterValid"
|
||||
style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetVersion">
|
||||
<soap:operation soapAction="http://tempuri.org/Dijkalk_Webservice/Tools/GetVersion"
|
||||
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="ToolsHttpGet" type="tns:ToolsHttpGet">
|
||||
<http:binding verb="GET" />
|
||||
<wsdl:operation name="IrSzamValid">
|
||||
<http:operation location="/IrSzamValid" />
|
||||
<wsdl:input>
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="HelynevValid">
|
||||
<http:operation location="/HelynevValid" />
|
||||
<wsdl:input>
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KozterValid">
|
||||
<http:operation location="/KozterValid" />
|
||||
<wsdl:input>
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetVersion">
|
||||
<http:operation location="/GetVersion" />
|
||||
<wsdl:input>
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="ToolsHttpPost" type="tns:ToolsHttpPost">
|
||||
<http:binding verb="POST" />
|
||||
<wsdl:operation name="IrSzamValid">
|
||||
<http:operation location="/IrSzamValid" />
|
||||
<wsdl:input>
|
||||
<mime:content type="application/x-www-form-urlencoded" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="HelynevValid">
|
||||
<http:operation location="/HelynevValid" />
|
||||
<wsdl:input>
|
||||
<mime:content type="application/x-www-form-urlencoded" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KozterValid">
|
||||
<http:operation location="/KozterValid" />
|
||||
<wsdl:input>
|
||||
<mime:content type="application/x-www-form-urlencoded" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetVersion">
|
||||
<http:operation location="/GetVersion" />
|
||||
<wsdl:input>
|
||||
<mime:content type="application/x-www-form-urlencoded" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="Tools">
|
||||
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
|
||||
<wsdl:port name="ToolsSoap" binding="tns:ToolsSoap">
|
||||
<soap:address location="http://www.example.org/tools.asmx" />
|
||||
</wsdl:port>
|
||||
<wsdl:port name="ToolsHttpGet" binding="tns:ToolsHttpGet">
|
||||
<http:address location="http://www.example.org/tools.asmx" />
|
||||
</wsdl:port>
|
||||
<wsdl:port name="ToolsHttpPost" binding="tns:ToolsHttpPost">
|
||||
<http:address location="http://www.example.org/tools.asmx" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
14
t/acceptance/wsdl/elementAtomicComplexType.xml
Normal file
14
t/acceptance/wsdl/elementAtomicComplexType.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:element name="testElementAtomicComplexTypeAll">
|
||||
<xsd:complexType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="test1" type="xsd:int"/>
|
||||
<xsd:element name="test2" type="xsd:string"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
174
t/acceptance/wsdl/email_account.wsdl
Normal file
174
t/acceptance/wsdl/email_account.wsdl
Normal file
@@ -0,0 +1,174 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="email_account"
|
||||
targetNamespace="email_account"
|
||||
xmlns:tns="email_account"
|
||||
xmlns:wsd="http://www.w3c.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="email_account">
|
||||
<xsd:complexType name="imapAccount">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Ein (evtl. unvollständiger) Account-Datensatz.
|
||||
Alle Felder des Datensatzes können, müssen aber nicht
|
||||
gefüllt sein.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:any>
|
||||
<xsd:element name="email" type="xsd:string" />
|
||||
<xsd:element name="uid" type="xsd:string" />
|
||||
<xsd:element name="password" type="xsd:string" />
|
||||
<xsd:element name="host" type="xsd:string" />
|
||||
<xsd:element name="sendQuota" type="xsd:int" />
|
||||
<xsd:element name="receiveQuota" type="xsd:int" />
|
||||
<xsd:element name="enabled" type="xsd:boolean" default="true"/>
|
||||
</xsd:any>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="imapAccountList">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Eine Liste von Account-Datensätzen. Die Liste kann leer sein.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:any maxOccurs="unbounded">
|
||||
<xsd:element name="account" type="tns:imapAccount"/>
|
||||
</xsd:any>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="getRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="getResponse">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="createRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="createResponse">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="modifyRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="modifyResponse">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="searchRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="searchResponse">
|
||||
<part name="accountList" type="tns:imapAccountList"/>
|
||||
</message>
|
||||
<message name="deleteRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="deleteResponse">
|
||||
<part name="accountList" type="tns:imapAccountList"/>
|
||||
</message>
|
||||
<portType name="email_account">
|
||||
<operation name="get">
|
||||
<documentation>
|
||||
Methode zum Anzeigen eines Account-Datensatzes.
|
||||
Erwartet als Input einen (potentiell unvollständigen)
|
||||
Account-Datensatz und liefert den (vollständigen)
|
||||
Datensatz zurück.
|
||||
</documentation>
|
||||
|
||||
<input message="getRequest"/>
|
||||
<output message="getResponse"/>
|
||||
</operation>
|
||||
<operation name="create">
|
||||
<documentation>
|
||||
Methode zum Anlegen eines Account-Datensatzes.
|
||||
Erwartet als Input einen (potentiell unvollständigen)
|
||||
Account-Datensatz und liefert den (vollständigen)
|
||||
Datensatz zurück.
|
||||
</documentation>
|
||||
<input message="createRequest"/>
|
||||
<output message="createResponse"/>
|
||||
</operation>
|
||||
<operation name="modify">
|
||||
<documentation>
|
||||
Methode zum Ändern eines Account-Datensatzes.
|
||||
Erwartet als Input einen (potentiell unvollständigen)
|
||||
Account-Datensatz und liefert den (vollständigen)
|
||||
Datensatz zurück.
|
||||
</documentation>
|
||||
<input message="modifyRequest"/>
|
||||
<output message="modifyResponse"/>
|
||||
</operation>
|
||||
<operation name="delete">
|
||||
<documentation>
|
||||
Methode zum Löschen eines Account-Datensatzes.
|
||||
Erwartet als Input einen (potentiell unvollständigen)
|
||||
Account-Datensatz und liefert den (vollständigen)
|
||||
Datensatz zurück.
|
||||
</documentation>
|
||||
<input message="deleteRequest"/>
|
||||
<output message="deleteResponse"/>
|
||||
</operation>
|
||||
<operation name="search">
|
||||
<documentation>
|
||||
Methode zum Suchen eines oder mehrerer Account-Datensätze.
|
||||
Erwartet als Input einen (potentiell unvollständigen)
|
||||
Account-Datensatz und liefert eine Liste an (vollständigen)
|
||||
passenden Datensätzen zurück. Die Liste kann leer sein.
|
||||
</documentation>
|
||||
<input message="searchRequest"/>
|
||||
<output message="searchResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<binding type="email_account" name="soap">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="email_account/get">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
<soap:operation soapAction="email_account/create">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
<soap:operation soapAction="email_account/modify">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
<soap:operation soapAction="email_account/delete">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
|
||||
<soap:operation soapAction="email_account/search">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</binding>
|
||||
<service name="email_account">
|
||||
<port name="email_account" binding="soap">
|
||||
<address location="https://127.0.0.1/email_account" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
165
t/acceptance/wsdl/generator_test.wsdl
Normal file
165
t/acceptance/wsdl/generator_test.wsdl
Normal file
@@ -0,0 +1,165 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleTypeList">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="xsd:int">
|
||||
<xsd:length value="2"/>
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testSimpleTypeListAtomic">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int"></xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
|
||||
<xsd:simpleType name="testRestriction">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: Integer between 1 and 9 (Exclusive constrains)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0"/>
|
||||
<xsd:maxExclusive value="10"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testRestrictionAtomicType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: Integer between 1 and 9 (Exclusive constrains)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0"/>
|
||||
<xsd:maxExclusive value="10"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeAll">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="Test1" type="xsd:string" />
|
||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1" />
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSequence">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test2" type="xsd:string" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSequence2">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test2" type="tns:testComplexTypeSequence" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:element name="testElementString" type="xsd:string" />
|
||||
<xsd:element name="testElementInt" type="xsd:int" />
|
||||
<xsd:element name="testElementRefInt" ref="tns:testElementInt" />
|
||||
<xsd:element name="testElementSimpleTypeList" type="tns:testSimpleTypeList"/>
|
||||
<xsd:element name="testElementComplexTypeAll" type="tns:testComplexTypeAll"/>
|
||||
<xsd:element name="testElementComplexTypeSequence" type="tns:testComplexTypeSequence"/>
|
||||
|
||||
<xsd:element name="testElementAtomicSimpleTypeRestriction">
|
||||
<xsd:simpleType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int" minInclusive="1"
|
||||
maxInclusive="9"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="testElementAtomicComplexTypeAll">
|
||||
<xsd:complexType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="test1" type="xsd:int"/>
|
||||
<xsd:element name="test2" type="xsd:string"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
135
t/acceptance/wsdl/generator_unsupported_test.wsdl
Normal file
135
t/acceptance/wsdl/generator_unsupported_test.wsdl
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
|
||||
<xsd:simpleType name="testUnion">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union memberTypes="xsd:int xsd:string"/>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testUnionAtomic">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minInclusive value="1"/>
|
||||
<xsd:maxInclusive value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="union"/>
|
||||
<xsd:enumeration value="test"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:union>
|
||||
</xsd:simpleType>
|
||||
|
||||
|
||||
<xsd:simpleType name="testUnion">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union memberTypes="xsd:int xsd:string"/>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testUnionAtomic">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minInclusive value="1"/>
|
||||
<xsd:maxInclusive value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="union"/>
|
||||
<xsd:enumeration value="test"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:union>
|
||||
</xsd:simpleType>
|
||||
|
||||
|
||||
<xsd:element name="testElementAtomicSimpleTypeRestriction">
|
||||
<xsd:simpleType>
|
||||
<xsd:union memberTypes="xsd:int xsd:long"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="testElementAtomicComplexTypeAllWithAtomicComplexTypeElement">
|
||||
<xsd:complexType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="test1">
|
||||
<xsd:simpleType>
|
||||
<xsd:list itemType="xsd:string"/>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="test2" type="xsd:string"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
323
t/acceptance/wsdl/message_gateway.wsdl
Normal file
323
t/acceptance/wsdl/message_gateway.wsdl
Normal file
@@ -0,0 +1,323 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions name="MessageGateway"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/"
|
||||
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<wsdl:types>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/">
|
||||
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="AuthMessage">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Username" xsd:type="xsd:string"/>
|
||||
<xsd:element name="Password" xsd:type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A type containing all elements of a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MRecipientURI" type="xsd:anyURI" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
The recipient in URI notaitions. Valid URI schemas are: mailto:, sms:,
|
||||
phone:. Not all URI schemas need to be implemented at the current
|
||||
implementation stage.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSenderAddress" type="xsd:string" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
E-Mail sender address. Ignored for all but mailto: recipient URIs.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MMessageContent" type="xsd:string" minOccurs="1"
|
||||
maxOccurs="3">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Message Content.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSubject" type="xsd:string" minOccurs="0" maxOccurs="1">
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Message Subject. Ignored for all but mailto: URIs
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MDeliveryReportRecipientURI" type="xsd:anyURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
||||
URI to send a delivery report to. May be of one of the following schemes:
|
||||
mailto:, http:, https:. Reports to mailto: URIs are sent as plaintext,
|
||||
reports to http(s) URIs are sent as SOAP requests following the
|
||||
MessageGatewayClient service definition.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepalive" type="tns:TKeepalive" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Container for keepalive information. May be missing.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepalive">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing keeplive information.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
|
||||
<xsd:element name="MKeepaliveTimeout" type="xsd:double">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Keepalive timeout. The keepalive timeout spezifies how long the sending of
|
||||
a message will be delayed waiting for keepalive updates. If a keepalive
|
||||
update is received during this period, the timeout will be reset. If not,
|
||||
the message will be sent after the timeout has expired.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepaliveErrorPolicy" minOccurs="0"
|
||||
maxOccurs="1" default="suppress">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
Policy to comply to in case of system errors. Valid values are "suppress"
|
||||
and "report". If the policy is set to "suppress", keepalive messages will
|
||||
not be sent to their recipients in case of partial system failure, even if
|
||||
the keepalive has expired. This may result in "false negatives", i.e.
|
||||
messages may not be sent, even though their keepalive has expired. If the
|
||||
value is "report", keepalive messages will be sent from any cluster node.
|
||||
This may result in "false positive" alerts.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="suppress"></xsd:enumeration>
|
||||
<xsd:enumeration value="report"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing a message ID.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Type containing all elements of a keppalive update / remove request.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
|
||||
The ID for the message to update / remove
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="MAction" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The action to perform. Valid values are: "remove", "update". On "remove",
|
||||
the message with the ID specified will be removed from the queue, thus it
|
||||
will never be sent, even if it's timeout expires. On "update" the
|
||||
keepalive timeout of the corresponding message will be reset.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="remove"></xsd:enumeration>
|
||||
<xsd:enumeration value="update"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="KeepaliveMessage" type="tns:TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Keepalive message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="KeepaliveMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Response element for a keepalive request</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="EnqueueMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message response element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:complexType name="TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessage" type="tns:TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The keepalive message to process.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MKeepaliveMessage" type="tns:TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a keepalive message to process.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="EnqueueMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessage">
|
||||
<wsdl:documentation>inputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
<wsdl:part name="auth" element="tns:AuthMessage">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="EnqueueMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessageResponse">
|
||||
<wsdl:documentation>outputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessage">
|
||||
|
||||
<wsdl:documentation>input parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessageResponse">
|
||||
<wsdl:documentation>output parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="MGWPortType">
|
||||
<wsdl:documentation>
|
||||
generic port type for all methods required for sending messages over the mosaic
|
||||
message gatewa
|
||||
</wsdl:documentation>
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to enqueue a normal (immediate send) or a delayed message with
|
||||
keepalive functionality.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:EnqueueMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:EnqueueMessageResponse"></wsdl:output>
|
||||
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to update or remove a
|
||||
keepalive message.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:KeepaliveMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:KeepaliveMessageResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="MGWBinding" type="tns:MGWPortType">
|
||||
<wsdl:documentation>Generic binding for all (SOAP) port</wsdl:documentation>
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<soap:operation soapAction="http://www.example.org/MessageGateway2/EnqueueMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" namespace="http://www.example.org/" parts="tns:parameters"/>
|
||||
<soap:header use="literal" namespace="http://www.example.org/"
|
||||
message="tns:EnqueueMessageRequest" part="tns:auth"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<soap:operation
|
||||
soapAction="http://www.example.org/MessageGateway2/KeepaliveMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="MessageGateway">
|
||||
<wsdl:documentation>
|
||||
Web Service for sending messages over the message gateway
|
||||
</wsdl:documentation>
|
||||
<wsdl:port name="HTTPPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the message gateway</wsdl:documentation>
|
||||
<soap:address location="http://test.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
|
||||
<wsdl:port name="HTTPSPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the message gateway</wsdl:documentation>
|
||||
<soap:address location="https://test.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
|
||||
<wsdl:port name="HTTP" binding="tns:MGWBinding">
|
||||
<http:address location="http://www.webservicex.net/globalweather.asmx" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
206
t/contributed.wsdl
Normal file
206
t/contributed.wsdl
Normal file
@@ -0,0 +1,206 @@
|
||||
<wsdl:definitions targetNamespace="http://example.com/soap/services/ETest/impl"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:apachesoap="http://xml.apache.org/xml-soap"
|
||||
xmlns:impl="http://example.com/soap/services/ETest/impl"
|
||||
xmlns:intf="http://example.com/soap/services/ETest"
|
||||
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:tns1="urn:ETest"
|
||||
xmlns:tns2="urn:acquisition"
|
||||
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:ETest" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
<complexType name="CreationBaseData">
|
||||
<sequence>
|
||||
<element name="createdBy" nillable="true" type="xsd:long" />
|
||||
<element name="creationDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="updateDateCenter" nillable="true" type="xsd:dateTime" />
|
||||
<element name="updateDateLocal" nillable="true" type="xsd:dateTime" />
|
||||
<element name="updatedBy" nillable="true" type="xsd:long" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
<complexType name="CreationData">
|
||||
<complexContent>
|
||||
<extension base="tns1:CreationBaseData">
|
||||
<sequence>
|
||||
<element name="creatorFullName" nillable="true" type="xsd:string" />
|
||||
<element name="modifierFullName" nillable="true" type="xsd:string" />
|
||||
</sequence>
|
||||
</extension>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType abstract="true" name="EProductData">
|
||||
<sequence>
|
||||
<element name="EStatus" nillable="true" type="xsd:string" />
|
||||
<element name="EStatusUpdatedate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="SFXID" nillable="true" type="xsd:string" />
|
||||
<element name="activationFromDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="activationToDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="activityStatusDateFrom" nillable="true" type="xsd:dateTime" />
|
||||
<element name="activityStatusDateTo" nillable="true" type="xsd:dateTime" />
|
||||
<element name="canEditSFXID" type="xsd:boolean" />
|
||||
<element name="concurrentNumberOfUsers" nillable="true" type="xsd:int" />
|
||||
<element name="creationData" nillable="true" type="tns1:CreationData" />
|
||||
<element name="deleteable" type="xsd:boolean" />
|
||||
<element name="ETestCode" nillable="true" type="xsd:string" />
|
||||
<element name="id" nillable="true" type="xsd:long" />
|
||||
<element name="instanceCode" nillable="true" type="xsd:string" />
|
||||
<element name="mainContact" nillable="true" type="xsd:string" />
|
||||
<element name="metaLibID" nillable="true" type="xsd:string" />
|
||||
<element name="otherID" nillable="true" type="xsd:string" />
|
||||
<element name="otherSource" nillable="true" type="xsd:string" />
|
||||
<element name="privateNote" nillable="true" type="xsd:string" />
|
||||
<element name="procurementStatus" nillable="true" type="xsd:string" />
|
||||
<element name="procurementStatusUpdateDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="procurementStatusUpdatedate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="sourceInstanceCode" nillable="true" type="xsd:string" />
|
||||
<element name="sponseringLibraryCode" nillable="true" type="xsd:string" />
|
||||
<element name="sponseringLibraryName" nillable="true" type="xsd:string" />
|
||||
<element name="updateTarget" nillable="true" type="xsd:string" />
|
||||
<element name="workExpressionCode" nillable="true" type="xsd:string" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
<complexType name="EProductInformation">
|
||||
<sequence>
|
||||
<element name="acquisitions" nillable="true"
|
||||
type="impl:ArrayOf_tns2_AcquisitionData" />
|
||||
<element name="data" nillable="true" type="tns1:EProductData" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
</schema>
|
||||
<schema targetNamespace="urn:acquisition" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
<complexType name="AcquisitionCommonData">
|
||||
<sequence>
|
||||
<element name="budgets" nillable="true" type="xsd:string" />
|
||||
<element name="campusCode" nillable="true" type="xsd:string" />
|
||||
<element name="concurrentUsersNote" nillable="true" type="xsd:string" />
|
||||
<element name="creationData" nillable="true" type="tns1:CreationData" />
|
||||
<element name="id" nillable="true" type="xsd:long" />
|
||||
<element name="instituteCode" nillable="true" type="xsd:string" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
<complexType name="AcquisitionData">
|
||||
<sequence>
|
||||
<element name="ILSSubscriptionNo" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionCode" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionCommonData" nillable="true"
|
||||
type="tns2:AcquisitionCommonData" />
|
||||
<element name="acquisitionMethod" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionNumber" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionStatus" nillable="true" type="xsd:string" />
|
||||
<element name="acquisitionStatusDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="advanceNoticeDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="autoRenewal" nillable="true" type="xsd:boolean" />
|
||||
<element name="consortialAgreement" type="xsd:boolean" />
|
||||
<element name="discountOnPrice" nillable="true" type="xsd:int" />
|
||||
<element name="id" nillable="true" type="xsd:long" />
|
||||
<element name="instanceCode" nillable="true" type="xsd:string" />
|
||||
<element name="materialType" nillable="true" type="xsd:string" />
|
||||
<element name="noteForILS" nillable="true" type="xsd:string" />
|
||||
<element name="noteForVendor" nillable="true" type="xsd:string" />
|
||||
<element name="noticePeriodCode" nillable="true" type="xsd:string" />
|
||||
<element name="numberOfCopies" nillable="true" type="xsd:int" />
|
||||
<element name="orderDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="orderForm" nillable="true" type="xsd:string" />
|
||||
<element name="orderSendMethod" nillable="true" type="xsd:string" />
|
||||
<element name="pooledConcurrentUsers" nillable="true" type="xsd:int" />
|
||||
<element name="price" nillable="true" type="xsd:double" />
|
||||
<element name="pricingCap" nillable="true" type="xsd:int" />
|
||||
<element name="pricingCapFrom" nillable="true" type="xsd:dateTime" />
|
||||
<element name="pricingCapTo" nillable="true" type="xsd:dateTime" />
|
||||
<element name="pricingModel" nillable="true" type="xsd:string" />
|
||||
<element name="printCancellationNote" nillable="true" type="xsd:string" />
|
||||
<element name="printCancellationRestriction" type="xsd:boolean" />
|
||||
<element name="printPurchaseOrderNo" nillable="true" type="xsd:string" />
|
||||
<element name="purchaseOrderNo" nillable="true" type="xsd:string" />
|
||||
<element name="renewallOrCancellationDate" nillable="true" type="xsd:dateTime" />
|
||||
<element name="renewallOrCancellationDescisionNote" nillable="true"
|
||||
type="xsd:string" />
|
||||
<element name="renewallOrCancellationNoteForILS" nillable="true"
|
||||
type="xsd:string" />
|
||||
<element name="renewallOrCancellationNoteForVendor" nillable="true"
|
||||
type="xsd:string" />
|
||||
<element name="subscriptionNotification" nillable="true" type="xsd:int" />
|
||||
<element name="subscriptionPeriodCode" nillable="true" type="xsd:string" />
|
||||
<element name="subscriptionType" nillable="true" type="xsd:string" />
|
||||
<element name="subscriptionTypeNote" nillable="true" type="xsd:string" />
|
||||
<element name="vendorAdvancedNotice" nillable="true" type="xsd:int" />
|
||||
<element name="vendorAdvancedNoticeVal" nillable="true" type="xsd:string" />
|
||||
<element name="vendorCode" nillable="true" type="xsd:string" />
|
||||
<element name="vendorName" nillable="true" type="xsd:string" />
|
||||
<element name="vendorSubscriptionCode" nillable="true" type="xsd:string" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
</schema>
|
||||
<schema targetNamespace="http://example.com/soap/services/ETest/impl"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
<complexType name="ArrayOf_tns2_AcquisitionData">
|
||||
<complexContent>
|
||||
<restriction base="soapenc:Array">
|
||||
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns2:AcquisitionData[]" />
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
</schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="getETestResponse">
|
||||
<wsdl:part name="getETestReturn" type="tns1:EProductInformation" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="getFixedETestResponse">
|
||||
<wsdl:part name="getFixedETestReturn" type="tns1:EProductInformation" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="getFixedETestRequest"></wsdl:message>
|
||||
<wsdl:message name="getETestRequest">
|
||||
<wsdl:part name="indexName" type="xsd:string" />
|
||||
<wsdl:part name="indexValue" type="xsd:string" />
|
||||
<wsdl:part name="withStatus" type="xsd:string" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="ETestWeb">
|
||||
<wsdl:operation name="getETest" parameterOrder="indexName indexValue withStatus">
|
||||
<wsdl:input message="impl:getETestRequest" name="getETestRequest" />
|
||||
<wsdl:output message="impl:getETestResponse" name="getETestResponse" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="getFixedETest">
|
||||
<wsdl:input message="impl:getFixedETestRequest" name="getFixedETestRequest" />
|
||||
<wsdl:output message="impl:getFixedETestResponse"
|
||||
name="getFixedETestResponse" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="ETestSoapBinding" type="impl:ETestWeb">
|
||||
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="getETest">
|
||||
<wsdlsoap:operation soapAction="" />
|
||||
<wsdl:input name="getETestRequest">
|
||||
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://example.com/soap/services/ETest" use="encoded" />
|
||||
</wsdl:input>
|
||||
<wsdl:output name="getETestResponse">
|
||||
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://example.com/soap/services/ETest" use="encoded" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="getFixedETest">
|
||||
<wsdlsoap:operation soapAction="" />
|
||||
<wsdl:input name="getFixedETestRequest">
|
||||
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://example.com/soap/services/ETest" use="encoded" />
|
||||
</wsdl:input>
|
||||
<wsdl:output name="getFixedETestResponse">
|
||||
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
namespace="http://example.com/soap/services/ETest" use="encoded" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
|
||||
<wsdl:service name="ETestWebService">
|
||||
<wsdl:port binding="impl:ETestSoapBinding" name="ETest">
|
||||
<wsdlsoap:address location="http://example.com/soap/services/ETest" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
19
t/lib/MyComplexType.pm
Normal file
19
t/lib/MyComplexType.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/perl
|
||||
package MyComplexType;
|
||||
use strict;
|
||||
use Class::Std::Storable;
|
||||
use lib '../../lib';
|
||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||
use base ('SOAP::WSDL::XSD::Typelib::ComplexType');
|
||||
|
||||
my %MyTestName_of :ATTR(:get<MyTestName>);
|
||||
|
||||
__PACKAGE__->_factory(
|
||||
[ qw(MyTestName) ], # order
|
||||
{ MyTestName => \%MyTestName_of }, # attribute lookup map
|
||||
{ MyTestName => 'SOAP::WSDL::XSD::Typelib::Builtin::string' } # class name lookup map
|
||||
);
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
|
||||
1;
|
||||
84
t/lib/MyElement.pm
Normal file
84
t/lib/MyElement.pm
Normal file
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/perl
|
||||
package MyElement;
|
||||
use strict;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use base (
|
||||
'SOAP::WSDL::XSD::Typelib::Element',
|
||||
'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
);
|
||||
|
||||
__PACKAGE__->__set_name('MyElementName');
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
|
||||
package MyComplexTypeElement;
|
||||
use strict;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use MyComplexType;
|
||||
use base (
|
||||
'SOAP::WSDL::XSD::Typelib::Element',
|
||||
'MyComplexType',
|
||||
);
|
||||
|
||||
__PACKAGE__->__set_name('MyComplexTypeElement');
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
|
||||
package MyTestElement;
|
||||
use strict;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::string;
|
||||
use base (
|
||||
'SOAP::WSDL::XSD::Typelib::Element',
|
||||
'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
);
|
||||
|
||||
__PACKAGE__->__set_name('MyTestElement');
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
|
||||
package MyTestElement2;
|
||||
use strict;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use base (
|
||||
'SOAP::WSDL::XSD::Typelib::Element',
|
||||
'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
);
|
||||
|
||||
__PACKAGE__->__set_name('MyTestElement2');
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
|
||||
|
||||
package MyAtomicComplexTypeElement;
|
||||
|
||||
use strict;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use base (
|
||||
'SOAP::WSDL::XSD::Typelib::Element',
|
||||
'SOAP::WSDL::XSD::Typelib::ComplexType',
|
||||
);
|
||||
|
||||
my %test_of :ATTR(:get<test>);
|
||||
my %test2_of :ATTR(:get<test2>);
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
|
||||
__PACKAGE__->_factory(
|
||||
[ qw(test test2) ],
|
||||
{
|
||||
test => \%test_of,
|
||||
test2 => \%test2_of,
|
||||
},
|
||||
{
|
||||
# this is the <element ref="" variant....
|
||||
test => 'MyTestElement',
|
||||
test2 => 'MyTestElement2',
|
||||
},
|
||||
);
|
||||
|
||||
__PACKAGE__->__set_name('MyAtomicComplexTypeElement');
|
||||
|
||||
1;
|
||||
53
t/lib/MySimpleType.pm
Normal file
53
t/lib/MySimpleType.pm
Normal file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/perl
|
||||
package MySimpleType;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use SOAP::WSDL::XSD::Typelib::SimpleType;
|
||||
# restriction base implemented via inheritance
|
||||
# derive by restriction
|
||||
# restriction base
|
||||
use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::SimpleType::restriction
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::string
|
||||
);
|
||||
|
||||
|
||||
# example simpleType derived by list.
|
||||
# XSD would be:
|
||||
# <simpleType name="MySimpleListType">
|
||||
# <list itemTipe="xsd:string">
|
||||
# </simpleType>
|
||||
package MySimpleListType;
|
||||
use Class::Std::Storable;
|
||||
# restriction base implemented via inheritance
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
# derive by list
|
||||
# list itemType
|
||||
use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::SimpleType
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::list
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::string
|
||||
);
|
||||
|
||||
package MyAtomicSimpleType;
|
||||
use Class::Std::Storable;
|
||||
# restriction base implemented via inheritance
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
# derive by restriction
|
||||
# restriction with atomic simpleType
|
||||
use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::SimpleType::restriction
|
||||
MySimpleType
|
||||
);
|
||||
|
||||
package MyAtomicSimpleListType;
|
||||
use Class::Std::Storable;
|
||||
# restriction base implemented via inheritance
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
# derive by restriction
|
||||
# restriction with atomic simpleType
|
||||
use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::SimpleType::restriction
|
||||
MySimpleListType
|
||||
);
|
||||
1;
|
||||
64
t/lib/Test/SOAPMessage.pm
Normal file
64
t/lib/Test/SOAPMessage.pm
Normal file
@@ -0,0 +1,64 @@
|
||||
package Test::SOAPMessage;
|
||||
|
||||
use strict;
|
||||
|
||||
use SOAP::Lite;
|
||||
use Test::Differences;
|
||||
use Tie::IxHash;
|
||||
|
||||
use base qw/Exporter/;
|
||||
|
||||
our @EXPORT = qw/soap_eq_or_diff/;
|
||||
|
||||
sub soap_eq_or_diff
|
||||
{
|
||||
my $got = shift;
|
||||
my $expected = shift;
|
||||
my $message = shift;
|
||||
my $soapGot = SOAP::Deserializer->deserialize( $got );
|
||||
my $soapExpected = SOAP::Deserializer->deserialize( $expected );
|
||||
|
||||
return eq_or_diff(
|
||||
unlather( $soapGot ),
|
||||
unlather( $soapExpected ),
|
||||
$message
|
||||
);
|
||||
}
|
||||
|
||||
sub unlather
|
||||
{
|
||||
my $som = shift;
|
||||
my $path = shift || '/Envelope/Body/[1]';
|
||||
my $data = shift;
|
||||
|
||||
unless ( $data )
|
||||
{
|
||||
my %hashData = ();
|
||||
tie (%hashData, q/Tie::IxHash/);
|
||||
$data = \%hashData;
|
||||
}
|
||||
|
||||
my $value;
|
||||
my $tag;
|
||||
my $i = 1;
|
||||
while( $som->match("$path/[$i]") )
|
||||
{
|
||||
$tag = $som->dataof->name();
|
||||
$data ||= {};
|
||||
$value = unlather($som,$path.'/'. '[' . $i . ']' ) || $som->valueof("$path/[$i]");
|
||||
if ($data->{ $tag })
|
||||
{
|
||||
$data->{ $tag } = [ $data->{ $tag } ] unless ( ref ( $data->{ $tag } ) eq 'ARRAY' );
|
||||
push @{ $data->{ $tag } }, $value;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data->{ $tag } = $value;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$data ||= $som->valueof($path);
|
||||
return $data;
|
||||
}
|
||||
|
||||
1;
|
||||
28
t/lib/Typelib/Base.pm
Normal file
28
t/lib/Typelib/Base.pm
Normal file
@@ -0,0 +1,28 @@
|
||||
package Typelib::Base;
|
||||
use Class::Std::Storable;
|
||||
|
||||
sub mk_add_mutators {
|
||||
my $class = shift;
|
||||
my $attributes = shift;
|
||||
for my $method ( keys %{$ attributes }) {
|
||||
*{ "$class\::add_$method" } = sub {
|
||||
my ($self, $value) = @_;
|
||||
my $ident = ident $self;
|
||||
|
||||
# we're the first value
|
||||
return $attributes->{ $method }->{ $ident } = $value
|
||||
if not defined $attributes->{ $method }->{ $ident };
|
||||
|
||||
# we're the second value
|
||||
return $attributes->{ $method }->{ $ident } = [
|
||||
$attributes->{ $method }->{ $ident }, $value ]
|
||||
if not ref $attributes->{ $method }->{ $ident } eq 'ARRAY';
|
||||
|
||||
# we're third or later
|
||||
push @{ $attributes->{ $method }->{ $ident } }, $value;
|
||||
return $attributes->{ $method }->{ $ident };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
17
t/lib/Typelib/TEnqueueMessage.pm
Normal file
17
t/lib/Typelib/TEnqueueMessage.pm
Normal file
@@ -0,0 +1,17 @@
|
||||
package Typelib::TEnqueueMessage;
|
||||
use strict;
|
||||
use base qw(Typelib::Base);
|
||||
|
||||
my %MMessage_of :ATTR(:name<MMessage> :default<()>);
|
||||
|
||||
my %attributes_of :ATTR();
|
||||
|
||||
%attributes_of = (
|
||||
MMessage => \%MMessage_of,
|
||||
);
|
||||
|
||||
# make a add_BLA method for every attribute
|
||||
__PACKAGE__->mk_add_mutators( \%attributes_of );
|
||||
|
||||
|
||||
1;
|
||||
26
t/lib/Typelib/TMessage.pm
Normal file
26
t/lib/Typelib/TMessage.pm
Normal file
@@ -0,0 +1,26 @@
|
||||
package Typelib::TMessage;
|
||||
use strict;
|
||||
use base qw(Typelib::Base);
|
||||
|
||||
my %MRecipientURI_of :ATTR(:name<MRecipientURI> :default<()>);
|
||||
my %MMessageContent_of :ATTR(:name<MMessageContent> :default<()>);
|
||||
my %MSenderAddress_of :ATTR(:name<MSenderAddress> :default<()>);
|
||||
my %MSubject_of :ATTR(:name<MSubject> :default<()>);
|
||||
my %MDeliveryReportRecipientURI_of :ATTR(:name<MDeliveryReportRecipientURI> :default<()>);
|
||||
my %MKeepalive_of :ATTR(:name<MKeepalive> :default<()>);
|
||||
|
||||
my %attributes_of :ATTR();
|
||||
|
||||
%attributes_of = (
|
||||
MRecipientURI => \%MRecipientURI_of,
|
||||
MMessageContent => \%MMessageContent_of,
|
||||
MSenderAddress => \%MSenderAddress_of,
|
||||
MSubject => \%MSubject_of,
|
||||
MDeliveryReportRecipientURI => \%MDeliveryReportRecipientURI_of,
|
||||
MKeepalive => \%MKeepalive_of,
|
||||
);
|
||||
|
||||
# make a add_BLA method for every attribute
|
||||
__PACKAGE__->mk_add_mutators( \%attributes_of );
|
||||
|
||||
1;
|
||||
189
t/test.wsdl
Normal file
189
t/test.wsdl
Normal file
@@ -0,0 +1,189 @@
|
||||
<definitions name="simpleType"
|
||||
targetNamespace="urn:myNamespace"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="urn:myNamespace"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:myNamespace">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:restriction base="int">
|
||||
<xsd:enumeration value="1"/>
|
||||
<xsd:enumeration value="2"/>
|
||||
<xsd:enumeration value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testSimpleList">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="int">
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="testSimpleUnion">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType Union test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union memberTypes="int float">
|
||||
</xsd:union>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="length3">
|
||||
<xsd:all>
|
||||
<xsd:element name="size" type="xsd:nonPositiveInteger"/>
|
||||
<xsd:element name="unit" type="xsd:NMTOKEN"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="complex">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="length" type="tns:length3"/>
|
||||
<xsd:element name="int" type="xsd:int"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="mixed" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="length" type="tns:length3"/>
|
||||
<xsd:element name="int" type="xsd:int"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:element name="TestElement" type="xsd:int"/>
|
||||
<xsd:element name="TestElementComplexType" type="tns:length3"/>
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:restriction base="int">
|
||||
<xsd:enumeration value="1"/>
|
||||
<xsd:enumeration value="2"/>
|
||||
<xsd:enumeration value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testSimpleList">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="int">
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="testSimpleUnion">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType Union test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union memberTypes="int float">
|
||||
</xsd:union>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="test" type="tns:complex"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testRequest2">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse2">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
<operation name="test2">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest2"/>
|
||||
<output message="tns:testResponse2"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort2">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort3">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort2" name="testBinding2">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort3" name="testBinding3">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
<port name="testPort2" binding="tns:testBinding2">
|
||||
<soap:address location="http://127.0.0.1/testPort2" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="testService2">
|
||||
<port name="testPort3" binding="tns:testBinding3">
|
||||
<soap:address location="http://127.0.0.1/testPort3" />
|
||||
</port>
|
||||
|
||||
</service>
|
||||
</definitions>
|
||||
Reference in New Issue
Block a user