import SOAP-WSDL 2.00_01 from CPAN

git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_01
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_01.tar.gz
This commit is contained in:
Martin Kutter
2007-06-28 01:07:38 -08:00
committed by Michael G. Schwern
parent bfbf5e27e0
commit 6fe52c4370
108 changed files with 11670 additions and 2369 deletions

30
t/001_use.t Normal file
View 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';
chdir 't/' if (-d 't/');
my @modules = qw(
SOAP::WSDL::Definitions
SOAP::WSDL::Message
SOAP::WSDL::Operation
SOAP::WSDL::OpMessage
SOAP::WSDL::SoapOperation
SOAP::WSDL::Binding
SOAP::WSDL::Port
SOAP::WSDL::PortType
SOAP::WSDL::Types
SOAP::WSDL::SAX::WSDLHandler
SOAP::WSDL::XSD::Primitive
SOAP::WSDL::XSD::ComplexType
SOAP::WSDL::XSD::SimpleType
SOAP::WSDL::XSD::Element
SOAP::WSDL::XSD::Schema
);
for my $module (@modules)
{
use_ok($module);
ok($module->new(), "Object creation");
}

336
t/002_sax.t Normal file
View File

@@ -0,0 +1,336 @@
#!/usr/bin/perl -w
use strict;
use warnings;
use diagnostics;
use Test::More tests => 17; # qw/no_plan/; # TODO: change to tests => N;
use Test::Differences;
use Data::Dumper;
use lib '../lib';
use XML::SAX::ParserFactory;
eval {
require Test::XML;
import Test::XML;
};
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
my $filter;
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(
{ base => 'XML::SAX::Base' }
), "Object creation");
my $parser = XML::SAX::ParserFactory->parser(
Handler => $filter
);
$parser->parse_string( xml() );
my $wsdl;
ok( $wsdl = $filter->get_data() , "get object tree");
# print Dumper $wsdl;
my $types = $wsdl->first_types();
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:non-positive-integer">-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:non-positive-integer">-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:non-positive-integer">-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, { 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:non-positive-integer">-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.w3c.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:non-positive-integer"/>
<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: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>
</soap:operation>
</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>
</soap:operation>
</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>
</soap:operation>
</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>
};
}

289
t/003_sax_serializer.t Normal file
View File

@@ -0,0 +1,289 @@
use Test::More qw/no_plan/; # TODO: change to tests => N;
use Test::Differences;
use Data::Dumper;
use lib '../lib';
use Benchmark;
use XML::LibXML;
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
my $filter;
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
my $parser = XML::LibXML->new();
$parser->set_handler( $filter );
eval { $parser->parse_string( xml() ) };
if ($@)
{
fail("parsing WSDL");
die "Can't test without parsed WSDL";
}
else
{
pass("parsing XML");
}
my $wsdl;
ok( $wsdl = $filter->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( 'myNamespace', 'testSimpleType1' )->serialize(
'test', 1 , $opt ),
q{<test type="tns:testSimpleType1">1</test>} , "serialize simple type");
is( $schema->find_type( '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( 'myNamespace', 'TestElement' )->serialize(
undef, 1 , $opt),
q{<TestElement type="xsd:int">1</TestElement>}, "Serialize element"
);
$opt->{ readable } = 0;
is( $schema->find_type( 'myNamespace', 'length3')->serialize(
'TestComplex', { size => -13, unit => 'BLA' } ,
$opt ),
q{<TestComplex type="tns:length3">}
. q{<size type="xsd:non-positive-integer">-13</size>}
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestComplex>}
, "serialize complex type" );
is( $schema->find_element( 'myNamespace', 'TestElementComplexType')->serialize(
undef, { size => -13, unit => 'BLA' } ,
$opt ),
q{<TestElementComplexType type="tns:length3">}
. q{<size type="xsd:non-positive-integer">-13</size>}
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestElementComplexType>},
"element with complex type"
);
is( $schema->find_type( '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:non-positive-integer">-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('myNamespace', 'testRequest')->first_part()->serialize(
undef, { length => { size => -13, unit => 'BLA' } , int => 3 },
$opt ),
q{<test type="tns:complex">}
. q{<length type="tns:length3">}
. q{<size type="xsd:non-positive-integer">-13</size>}
. q{<unit type="xsd:NMTOKEN">BLA</unit>}
. q{</length><int type="xsd:int">3</int></test>}
, "Message part"
);
exit;
foreach my $service (@{ $wsdl->service() })
{
print "Service: ", $service->name(), "\n";
foreach my $port( @{ $service->port() })
{
print " ", "port name: ", $port->name, "\n";
print " ", "binding: ", $port->binding(), "\n";
print " ", "location: ", $port->location,"\n";
my $portType = $wsdl->get_portType(
$wsdl->get_binding( $port->binding() )->type()
);
foreach my $operation ( @{ $portType->operation() } )
{
print " ", "Operation name: ", $operation->name(), "\n";
print " ", "Input message: ",
$operation->input()->message(), "\n"
if ($operation->input());
my $input = $wsdl->get_message( $operation->input()->message() );
print " ", "Type: ", $input->name(), "\n";
print " ", "Output message: ",
$operation->output()->message(), "\n"
if ($operation->output());
my $output = $wsdl->get_message( $operation->output()->message() );
print " ", "Type: ", $output->name(), "\n";
}
}
}
sub xml
{
return q{<?xml version="1.0"?>
<definitions name="simpleType"
targetNamespace="myNamespace"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="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="myNamespace">
<xsd:complexType name="length3">
<xsd:sequence>
<xsd:element name="size" type="xsd:non-positive-integer"/>
<xsd:element name="unit" type="xsd:NMTOKEN"/>
</xsd:sequence>
</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: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="testRequest"/>
<output message="testResponse"/>
</operation>
<operation name="test2">
<documentation>
Test-Methode
</documentation>
<input message="testRequest2"/>
<output message="testResponse2"/>
</operation>
</portType>
<portType name="testPort2">
<operation name="test">
<documentation>
Test-Methode
</documentation>
<input message="testRequest"/>
<output message="testResponse"/>
</operation>
</portType>
<portType name="testPort3">
<operation name="test">
<documentation>
Test-Methode
</documentation>
<input message="testRequest"/>
<output message="testResponse"/>
</operation>
</portType>
<binding type="testPort" name="testBinding">
<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>
</soap:operation>
</binding>
<binding type="testPort2" name="testBinding2">
<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>
</soap:operation>
</binding>
<binding type="testPort3" name="testBinding3">
<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>
</soap:operation>
</binding>
<service name="testService">
<port name="testPort" binding="testBinding">
<soap:address location="http://127.0.0.1/testPort" />
</port>
<port name="testPort2" binding="testBinding2">
<soap:address location="http://127.0.0.1/testPort2" />
</port>
<port name="testPort3" binding="testBinding3">
<soap:address location="http://127.0.0.1/testPort3" />
</port>
</service>
</definitions>
};
}

413
t/004_sax_wsdl.t Normal file
View File

@@ -0,0 +1,413 @@
#!/usr/bin/perl -w
use strict;
use warnings;
use Test::More qw/no_plan/; # TODO: change to tests => N;
use Test::Differences;
# use Devel::Profiler;
use Data::Dumper;
use lib '../lib';
use XML::SAX::ParserFactory;
use Benchmark;
use diagnostics;
eval {
require Test::XML;
import Test::XML;
};
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
my $filter;
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
#my $parser = XML::SAX::ParserFactory->parser(
# Handler => $filter
#);
use XML::LibXML;
my $parser = XML::LibXML->new();
$parser->set_handler( $filter );
#timethis 10, sub { $parser->parse_string( xml() ) };
#__END__
eval { $parser->parse_string( xml() ) };
if ($@)
{
fail("parsing WSDL");
die "Can't test without parsed WSDL: $@";
}
else
{
pass("parsing XML");
}
my $wsdl;
ok( $wsdl = $filter->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 = {
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>
<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"
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: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>};
}

View File

@@ -0,0 +1,257 @@
#!/usr/bin/perl -w
use strict;
use warnings;
use Test::More qw/no_plan/; # TODO: change to tests => N;
use Test::Differences;
use Data::Dumper;
use lib '../lib';
use XML::LibXML;
use Benchmark;
use diagnostics;
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
my $filter;
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
my $parser = XML::LibXML->new();
$parser->set_handler( $filter );
eval { $parser->parse_string( xml() ) };
if ($@)
{
fail("parsing WSDL");
die "Can't test without parsed WSDL: $@";
}
else
{
pass("parsing XML");
}
my $wsdl;
ok( $wsdl = $filter->get_data() , "get object tree");
my $opt = {
namespace => $wsdl->get_xmlns(),
style => 'perl',
wsdl => $wsdl,
readable => 1,
};
my $txt;
ok( $txt = $wsdl->explain( $opt ) , "explain WSDL" );
# print $txt;
sub xml {
return q{<?xml version="1.0" encoding="UTF-8"?>
<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>
};
}

70
t/006_client.t Normal file
View File

@@ -0,0 +1,70 @@
#!/usr/bin/perl -w
use strict;
use warnings;
use Pod::Simple::Text;
use Test::More qw/no_plan/; # TODO: change to tests => N;
use Test::Differences;
use Data::Dumper;
use lib '../lib';
use XML::SAX::ParserFactory;
eval {
require Test::XML;
import Test::XML
};
use diagnostics;
use Cwd;
my $path = cwd;
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
use_ok(qw/SOAP::WSDL::Client/);
my $soap = SOAP::WSDL::Client->new(
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( 1 ) , "Set readable");
ok( $soap->explain() );
my $pod = Pod::Simple::Text->new();
my $output;
$pod->output_string( \$output );
$pod->parse_string_document( $soap->explain() );
# print $output;
SKIP: {
skip_without_test_xml();
is_xml( $soap->call( 'EnqueueMessage' ,
'MMessage' => {
'MRecipientURI' => 'mailto:test@example.com' ,
'MMessageContent' => 'TestContent for Message' ,
}
)
, 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>
</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);
}
__END__

36
t/007_envelope.t Normal file
View 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::Envelope/;
my $opt = {
readable => 1,
namespace => {
},
};
my $xml;
ok( $xml = SOAP::WSDL::Envelope->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' );
}

View File

@@ -0,0 +1,31 @@
#!/usr/bin/perl -w
use strict;
use warnings;
use Test::More qw/no_plan/; # TODO: change to tests => N;
use lib '../lib';
use diagnostics;
use Cwd;
my $path = cwd;
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
use_ok(qw/SOAP::WSDL::Client/);
my $soap = SOAP::WSDL::Client->new(
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/008_complexType.wsdl'
)->wsdlinit();
my $wsdl = $soap->{ _WSDL }->{ wsdl_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";

111
t/009_data_classes.t Normal file
View File

@@ -0,0 +1,111 @@
#!/usr/bin/perl -w
use Test::More qw/no_plan/; # TODO: change to tests => N;
#use Devel::Profiler bad_pkgs => [
# qw(UNIVERSAL Time::HiRes B Carp Exporter Cwd Config CORE DynaLoader
# XSLoader AutoLoader
# Class::Std SOAP::Lite) ];
use Scalar::Util;
use strict;
use Test::Differences;
use lib 't/lib';
use lib '../lib';
use lib 'lib';
use Benchmark;
use XML::Simple;
use SOAP::WSDL::SAX::WSDLHandler;
use Cwd;
use XML::LibXML::SAX;
use_ok(qw/SOAP::WSDL::SAX::MessageHandler/);
use SOAP::WSDL::Client;
use SOAP::WSDL::XSD::Typelib::Builtin;
my $path = cwd;
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
my $filter;
ok($filter = SOAP::WSDL::SAX::MessageHandler->new( {
class_resolver => FakeResolver->new(),
} ), "Object creation");
my $parser = XML::LibXML->new();
$parser->set_handler( $filter );
$parser->parse_string( xml() );
# print $filter->get_data();
# print $filter->get_data()->get_MMessage()->_DUMP();
if($filter->get_data()->get_MMessage()->get_MDeliveryReportRecipientURI()) {
pass "bool context overloading";
}
else
{
fail "bool context overloading"
}
my $soap = SOAP::WSDL::Client->new(
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");
# print $soap->call( 'EnqueueMessage'
# , MMessage => $filter->get_data()->get_MMessage() );
timethese 1000, {
'ClassParser' => sub { $parser->parse_string( xml() ); },
# 'HashParser' => sub { $hash_parser->parse_string( xml() ); },
'XML::Simple' => sub { return XMLin( xml() ) },
# 'SOAP::WSDL::Client->call' => sub {
# $soap->call( 'EnqueueMessage'
# , MMessage => $filter->get_data()->get_MMessage() );
# }
};
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
View 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';

51
t/012_element.t Normal file
View File

@@ -0,0 +1,51 @@
#!/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" ><MyTestElement >Test</MyTestElement>'
. '<MyTestElement2 >Test2</MyTestElement2></MyAtomicComplexTypeElement>'
, 'stringification';
__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';

45
t/013_complexType.t Normal file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/perl
use Test::More qw(no_plan);
use strict;
use lib 'lib/';
use lib '../lib/';
use lib 't/lib';
use Data::Dumper;
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, '<MyElementName >test</MyElementName>', 'stringification';
$obj = MyComplexType->new({ MyTestName => [ 'test', 'test2' ] });
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
, 'inherited class';
is $obj, '<MyElementName >test</MyElementName><MyElementName >test2</MyElementName>',
'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, '<MyElementName >test</MyElementName><MyElementName >test2</MyElementName>',
'stringification (on the fly-factory object)';
# print Dumper $obj->get_MyTestName();
__END__

366
t/014_sax_typelib.t Normal file
View File

@@ -0,0 +1,366 @@
#!/usr/bin/perl -w
use strict;
use warnings;
use Test::More qw/no_plan/; # TODO: change to tests => N;
use Test::Differences;
# use Devel::Profiler;
use Data::Dumper;
use lib '../lib';
use XML::SAX::ParserFactory;
use Benchmark;
use diagnostics;
eval {
require Test::XML;
import Test::XML;
};
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
my $filter;
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
use XML::LibXML;
my $parser = XML::LibXML->new();
$parser->set_handler( $filter );
eval { $parser->parse_string( xml() ) };
if ($@)
{
fail("parsing WSDL");
die "Can't test without parsed WSDL: $@";
}
else
{
pass("parsing XML");
}
my $wsdl;
ok( $wsdl = $filter->get_data() , "get object tree");
for my $element (@{ $wsdl->first_types()->get_schema()->[1]->get_type() } ) {
# print Dumper $element;
my $output;
$element->toClass({ prefix => 'MessageGateway', wsdl => $wsdl,
output => \$output
});
eval "$output";
}
if ($@) {
fail "evalling generated class";
}
else
{
pass "evalling generated class";
}
exit;
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"
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: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>};
}

350
t/015_to_typemap.t Normal file
View File

@@ -0,0 +1,350 @@
#!/usr/bin/perl -w
use strict;
use warnings;
use Test::More qw/no_plan/; # TODO: change to tests => N;
use Test::Differences;
# use Devel::Profiler;
use Data::Dumper;
use lib '../lib';
use XML::SAX::ParserFactory;
use Benchmark;
use diagnostics;
eval {
require Test::XML;
import Test::XML;
};
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
my $filter;
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
use XML::LibXML;
my $parser = XML::LibXML->new();
$parser->set_handler( $filter );
eval { $parser->parse_string( xml() ) };
if ($@)
{
fail("parsing WSDL");
die "Can't test without parsed WSDL: $@";
}
else
{
pass("parsing XML");
}
my $wsdl;
ok( $wsdl = $filter->get_data() , "get object tree");
ok $wsdl->to_typemap( { prefix => 'CP::EAI::Typelib::' } ), 'typemap';
exit;
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"
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: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>};
}

35
t/016_client_object.t Normal file
View File

@@ -0,0 +1,35 @@
#!/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 );
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';
ok $obj->get_test->isa('SOAP::WSDL::XSD::Typelib::Builtin::string')
, 'element isa';
is $obj, '<MyAtomicComplexTypeElement xmlns="urn:Test" ><MyTestElement >Test</MyTestElement>'
. '<MyTestElement2 >Test2</MyTestElement2></MyAtomicComplexTypeElement>'
, 'stringification';
my $soap = SOAP::WSDL::Client->new();
$soap->proxy('http://bla');
$soap->no_dispatch(1);
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{<MyTestElement >Test</MyTestElement>}
. q{<MyTestElement2 >Test2</MyTestElement2>}
. q{</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>}
, 'SOAP Envelope generation with objects';

View File

@@ -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";
}

View File

@@ -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";
};
};

View File

@@ -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";

View File

@@ -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");

View File

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

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

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

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

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

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

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

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

View File

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

View File

@@ -0,0 +1,304 @@
<?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"
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: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>
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" namespace="http://www.example.org/" />
</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://inousses.erlm.siemens.de/MessageGateway/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

View File

@@ -0,0 +1,72 @@
<?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>
</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>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0"?>
<definitions name="simpleType"
targetNamespace="simpleType"
xmlns:tns="simpleType"
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="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="testRequest"/>
<output message="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="testPort" name="testBinding">
<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>
</soap:operation>
</binding>
<binding type="testPort2" name="testBinding2">
<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>
</soap:operation>
</binding>
<binding type="testPort3" name="testBinding3">
<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>
</soap:operation>
</binding>
<service name="testService">
<port name="testPort" binding="testBinding">
<soap:address location="http://127.0.0.1/testPort" />
</port>
<port name="testPort2" binding="testBinding2">
<soap:address location="http://127.0.0.1/testPort2" />
</port>
<port name="testPort3" binding="testBinding3">
<soap:address location="http://127.0.0.1/testPort3" />
</port>
</service>
</definitions>

View File

@@ -0,0 +1,72 @@
<?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:testComplexType1"/>
</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">
<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>
</binding>
<service name="testService">
<port name="testPort" binding="tns:testBinding">
<soap:address location="http://127.0.0.1/testPort" />
</port>
</service>
</definitions>

View File

@@ -0,0 +1,99 @@
<?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"/>
<soap:operation soapAction="test">
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</soap:operation>
</binding>
<binding type="tns:testPort2" name="testBinding2">
<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>
</soap:operation>
</binding>
<binding type="tns:testPort3" name="testBinding3">
<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>
</soap:operation>
</binding>
<service name="testService">
<port name="testPort" binding="tns:testBinding">
<soap:address location="http://127.0.0.1/testPort" />
</port>
</service>
</definitions>

View File

@@ -0,0 +1,56 @@
<?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: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="testRequest"/>
<output message="testResponse"/>
</operation>
</portType>
<binding type="testPort" name="testBinding">
<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>
</soap:operation>
</binding>
<service name="testService">
<port name="testPort" binding="testBinding">
<soap:address location="http://127.0.0.1/testPort" />
</port>
</service>
</definitions>

View File

@@ -0,0 +1,48 @@
<?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:element name="testElement1" type="xsd:string" />
<xsd:element name="testElement2" type="xsd:int" />
</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="testRequest"/>
<output message="testResponse"/>
</operation>
</portType>
<binding type="testPort" name="testBinding">
<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>
</soap:operation>
</binding>
<service name="testService">
<port name="testPort" binding="testBinding">
<soap:address location="http://127.0.0.1/testPort" />
</port>
</service>
</definitions>

View File

@@ -0,0 +1,68 @@
<?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: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="testRequest"/>
<output message="testResponse"/>
</operation>
</portType>
<binding type="testPort" name="testBinding">
<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>
</soap:operation>
</binding>
<service name="testService">
<port name="testPort" binding="testBinding">
<soap:address location="http://127.0.0.1/testPort" />
</port>
</service>
</definitions>

View File

@@ -0,0 +1,57 @@
<?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: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="testRequest"/>
<output message="testResponse"/>
</operation>
</portType>
<binding type="testPort" name="testBinding">
<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>
</soap:operation>
</binding>
<service name="testService">
<port name="testPort" binding="testBinding">
<soap:address location="http://127.0.0.1/testPort" />
</port>
</service>
</definitions>

View File

@@ -0,0 +1,99 @@
<?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: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="testRequest"/>
<output message="testResponse"/>
</operation>
<operation name="test2">
<documentation>
Test-Methode
</documentation>
<input message="testRequest2"/>
<output message="testResponse2"/>
</operation>
</portType>
<binding type="testPort" name="testBinding">
<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>
</soap:operation>
<soap:operation soapAction="test2">
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</soap:operation>
</binding>
<service name="testService">
<port name="testPort" binding="testBinding">
<soap:address location="http://127.0.0.1/testPort" />
</port>
</service>
</definitions>

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

View File

@@ -18,10 +18,10 @@ xmlns="http://schemas.xmlsoap.org/wsdl/">
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="givenName"
type="s:string" />
type="s:string" nillable="1"/>
<s:element minOccurs="0" maxOccurs="1" name="test"
type="s0:test2" />
<!-- <s:element minOccurs="0" maxOccurs="1" name="test"
type="s0:test2" /> //-->
</s:sequence>
</s:complexType>
</s:element>
@@ -59,10 +59,10 @@ xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="sayHelloSoapIn">
<part name="parameters" element="s0:sayHello" />
<part name="test1" type="s0:testExtended" />
<!-- <part name="test1" type="s0:testExtended" />
<part name="test2" type="s0:test2"
targetNamespace="urn:test2" />
targetNamespace="urn:test2" /> //-->
</message>
<message name="sayHelloSoapOut">

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

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

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

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

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

4
t/attic/01_use.t Normal file
View File

@@ -0,0 +1,4 @@
use Test::More tests => 2;
use lib '../lib';
use_ok(qw/SOAP::WSDL/);
ok( SOAP::WSDL->new(), 'Instantiated object' );

38
t/attic/02_port.t Normal file
View File

@@ -0,0 +1,38 @@
use Test::More tests => 9;
use Cwd;
use File::Basename;
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;
#2
ok( $soap = SOAP::WSDL->new(
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
), 'Instantiated object' );
ok( ($soap->servicename('testService') eq 'testService' ) );
ok( ($soap->portname('testPort') eq 'testPort' ) );
ok( $soap->wsdlinit(), 'parsed WSDL' );
ok( ($soap->portname() eq 'testPort' ),
"Found first port definition" );
ok( ($soap->portname('testPort2') eq 'testPort2' ),
"Found second port definition (based on URL)" );
ok( $soap->wsdlinit(), 'parsed WSDL' );
ok( ($soap->portname('testPort3') eq 'testPort3' ),
"Found third port definition (based on Name)" );
ok( $soap->wsdlinit( servicename => 'testService', portname => 'testPort'), 'parsed WSDL' );
ok( ($soap->portname() eq 'testPort' ), 'found port passed to wsdlinit');

View File

@@ -0,0 +1,94 @@
BEGIN
{
chdir 't/' if (-d 't/');
use Test::More tests => 7;;
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 = $0;
$name =~s/\.t$//;
$name =~s/^t\///;
use_ok(qw/SOAP::WSDL/);
print "# SOAP::WSDL Version: $SOAP::WSDL::VERSION\n";
my $xml;
#2
ok( $soap = SOAP::WSDL->new(
wsdl => 'file://' . $path . '/acceptance/wsdl/' . $name . '.wsdl',
readable =>1,
), 'Instantiated object' );
#3
ok( $soap->wsdlinit(
checkoccurs => 1,
), 'parsed WSDL' );
$soap->no_dispatch(1);
ok ($xml = $soap->serializer->method( $soap->call('test',
testAll => {
Test1 => 'Test 1',
Test2 => 'Test 2',
}
) ), 'Serialized complexType' );
# oprint $xml;
#exit;
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|| die "Cannot open acceptance results file";
my $testXML = <$fh>;
close $fh;
SKIP: {
print $SKIP;
skip( $SKIP, 1 ) if ($SKIP);
eval { soap_eq_or_diff( $xml, $testXML, 'Got expected result') };
};
# $soap->wsdl_checkoccurs(1);
eval
{
$xml = $soap->serializer->method(
$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->serializer->method(
$soap->call('test',
testAll => {
Test1 => 'Test 1',
}
)
)
};
ok($@, 'Died on illegal number of elements (not enough)');

View File

@@ -0,0 +1,19 @@
BEGIN
{
chdir 't/' if (-d 't/');
use Test::More tests => 7;;
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/;

View File

@@ -0,0 +1,19 @@
BEGIN
{
chdir 't/' if (-d 't/');
use Test::More tests => 7;;
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/;

View File

@@ -0,0 +1,19 @@
BEGIN
{
chdir 't/' if (-d 't/');
use Test::More tests => 7;;
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/;

View File

@@ -0,0 +1,92 @@
BEGIN
{
chdir 't/' if (-d 't/');
use Test::More tests => 7;;
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 = $0;
$name =~s/\.t$//;
#2
ok( $soap = SOAP::WSDL->new(
wsdl => 'file://' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
), 'Instantiated object' );
#3
ok( $soap->wsdlinit(
checkoccurs => 1,
), 'parsed WSDL' );
$soap->no_dispatch(1);
$soap->serializer()->namespace('SOAP-ENV');
$soap->serializer()->encodingspace('SOAP-ENC');
#4
ok ($xml = $soap->serializer->method( $soap->call('test',
testSequence => {
Test1 => 'Test 1',
Test2 => 'Test 2',
}
) ), 'Serialized complexType' );
#5
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|| die "Cannot open acceptance results file";
my $testXML = <$fh>;
close $fh;
SKIP:
{
skip( 1, $SKIP ) if ($SKIP);
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
}
#6
eval
{
$xml = $soap->serializer->method(
$soap->call('test',
testSequence => {
Test1 => 'Test 1',
}
)
);
};
ok( ($@),
"Died on illegal number of elements"
);
#7
eval
{
$xml = $soap->serializer->method(
$soap->call('test',
testSequence => {
Test1 => 'Test 1',
Test2 => [ 1, 2, 3, ]
}
)
);
};
ok( ($@),
"Died on illegal number of elements"
);
# chdir back to where we came from
chdir $cwd;

View File

@@ -0,0 +1,19 @@
BEGIN
{
chdir 't/' if (-d 't/');
use Test::More tests => 7;;
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/;

View File

@@ -0,0 +1,5 @@
use Test::More tests => 1;
use lib '../lib';
use_ok qw/SOAP::WSDL/;

View File

@@ -0,0 +1,93 @@
BEGIN
{
chdir 't/' if (-d 't/');
use Test::More;
plan qw/no_plan/;
# plan "skip_all", "Not yet supported";
# use Test::More tests => 7;;
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;
# 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;
#2
ok( $soap = SOAP::WSDL->new(
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
), 'Instantiated object' );
#3
ok( $soap->wsdlinit(), 'parsed WSDL' );
$soap->no_dispatch(1);
$soap->serializer()->namespace('SOAP-ENV');
$soap->serializer()->encodingspace('SOAP-ENC');
ok ( $xml = $soap->serializer->method( $soap->call('test',
testAll => 1 )
),
'Serialized (simpler) element' );
# print $xml, "\n";
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|| die 'Cannot open acceptance file '
. $path . '/acceptance/results/' . $name . '.xml';
my $testXML = <$fh>;
close $fh;
SKIP: {
skip($SKIP, 1) if ($SKIP);
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
};
eval
{
$xml = $soap->serializer->method(
$soap->call('test',
testAll => [ 2, 3 ]
)
);
};
# print $@;
ok( ($@ =~m/illegal\snumber\sof\selements/),
"Died on illegal number of elements (too many)"
);
eval {
$xml = $soap->serializer->method(
$soap->call('test',
testAll => undef
)
)
};
ok($@, 'Died on illegal number of elements (not enough)');
chdir $cwd;

74
t/attic/04_element.t Normal file
View File

@@ -0,0 +1,74 @@
BEGIN
{
chdir 't/' if (-d 't/');
use Test::More tests => 7;;
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 = $0;
$name =~s/\.t$//;
#2
ok( $soap = SOAP::WSDL->new(
wsdl => 'file://' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
), 'Instantiated object' );
#3
ok( $soap->wsdlinit(), 'parsed WSDL' );
$soap->no_dispatch(1);
$soap->serializer()->namespace('SOAP-ENV');
$soap->serializer()->encodingspace('SOAP-ENC');
ok ($xml = $soap->serializer->method( $soap->call('test',
testAll => 'Test'
) ), 'Serialized (simpler) element' );
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|| die "Cannot open acceptance results file";
my $testXML = <$fh>;
close $fh;
SKIP:
{
skip( $SKIP, 1 ) if ($SKIP);
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
};
eval
{
$xml = $soap->serializer->method(
$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->serializer->method(
$soap->call('test',
testAll => undef
)
)
};
ok($@, 'Died on illegal number of elements (not enough)');

View File

@@ -0,0 +1,98 @@
use Test::More tests => 10;
use lib '../lib';
use lib 'lib';
use lib 't/lib';
use Cwd;
use File::Basename;
use Test::SOAPMessage;
use diagnostics;
use_ok(qw/SOAP::WSDL/);
unless ($SOAP::WSDL::MISSING) { };
my ($xml, $xml2);
# 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;
#2
ok( $soap = SOAP::WSDL->new(
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
), 'Instantiated object' );
#3
ok( $soap->wsdlinit(), 'parsed WSDL' );
$soap->no_dispatch(1);
#4
ok ( $xml = $soap->serializer->method( $soap->call('test',
testAll => [ 1, 2 ] )
),
'Serialized (simple) call (list)' );
#print $xml, "\n";
SKIP: {
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|| skip("Cannot open acceptance results file", 1);
my $testXML = <$fh>;
close $fh;
#5
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
}
#6
ok ( $xml2 = $soap->serializer->method( $soap->call('test',
testAll => "1 2" )
),
'Serialized (simple) call (scalar)' );
#7
ok( $xml eq $xml2, 'Got expected result');
#8
ok (
$xml = $soap->serializer->method(
$soap->call('test',
testAll => 2
)
), "Serialized simple call (scalar value)"
);
#9
eval {
$xml = $soap->serializer->method(
$soap->call('test',
testAll => undef
)
)
};
ok($@, 'Died on illegal number of elements (not enough)');
#10
SKIP:
{
skip ("maxLength test not implemented", 1)
if ( $SOAP::WSDL::MISSING->{ simpleType }->{ list }->{ maxLength } );
eval {
$xml = $soap->serializer->method(
$soap->call('test',
testAll => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ]
)
)
};
ok($@, 'Died on illegal number of elements (more than maxLength)');
}
chdir $cwd;

View File

@@ -0,0 +1,105 @@
use Test::More tests => 9;
use diagnostics;
use Cwd;
use File::Basename;
use lib '../lib';
use lib 'lib';
use lib 't/lib';
use Test::SOAPMessage;
use_ok(qw/SOAP::WSDL/);
my $xml;
# 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;
#2
ok( $soap = SOAP::WSDL->new(
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
), 'Instantiated object' );
#3
ok( $soap->wsdlinit(), 'parsed WSDL' );
$soap->no_dispatch(1);
$soap->autotype(0);
#4
ok ( $xml = $soap->serializer->method( $soap->call('test',
testAll => 1 )
),
'Serialized (simple) call (list)' );
print $xml, "\n";
SKIP: {
skip 'broken', 1;
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|| skip("Cannot open acceptance results file ". $name . '.xml', 1);
my $testXML = <$fh>;
close $fh;
chomp $testXML;
chomp $xml;
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
}
# 6
eval {
$xml = $soap->serializer->method(
$soap->call('test',
testAll => [ 1, 2 ]
)
)
};
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)');
SKIP:
{
skip( "minValue check not implemented ", 1)
if ($SOAP::WSDL::MISSING->{ simpleType }->{ restriction }->{ minValue });
eval {
$xml = $soap->serializer->method(
$soap->call('test',
testAll => 0
)
)
};
ok($@, 'Died on illegal value');
}
SKIP:
{
skip( "maxValue check not implemented ", 1)
if ($SOAP::WSDL::MISSING->{ simpleType }->{ restriction }->{ maxValue });
eval {
$xml = $soap->serializer->method(
$soap->call('test',
testAll => 100
)
)
};
ok($@, 'Died on illegal value');
}
chdir $cwd;

View File

@@ -0,0 +1,85 @@
use Test::More tests => 9;
use Cwd;
use File::Basename;
use lib '../lib';
use_ok(qw/SOAP::WSDL/);
my $xml;
# 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;
#2
ok( $soap = SOAP::WSDL->new(
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
), 'Instantiated object' );
#3
ok( $soap->wsdlinit(), 'parsed WSDL' );
$soap->no_dispatch(1);
$soap->serializer()->namespace('SOAP-ENV');
$soap->serializer()->encodingspace('SOAP-ENC');
#4
ok ( $xml = $soap->serializer->method( $soap->call('test',
testAll => 1 )
),
'Serialized (simple) call (list)' );
# print $xml, "\n";
SKIP: {
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|| skip("Cannot open acceptance results file ". $name . '.xml', 1);
my $testXML = <$fh>;
close $fh;
is( $xml, $testXML, 'Got expected result');
}
# 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)');
chdir $cwd;

83
t/attic/10_performance.t Normal file
View File

@@ -0,0 +1,83 @@
#!/usr/bin/perl -w
use strict;
use Test::More tests=> 6;
use Time::HiRes qw( gettimeofday tv_interval );
use lib '../..';
use Data::Dumper;
use Cwd;
use File::Basename;
use_ok qw/ SOAP::WSDL /;
use Benchmark;
# print "Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
# print "Performance test with simple WSDL file\n";
my $data = {
name => 'Mein Name',
givenName => 'Vorname'
};
# 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;
my $cacheDir;
if ($^O =~ m/Win/)
{
$cacheDir = 'C:/Temp/WSDL';
}
else
{
$cacheDir = '/tmp/';
}
my $t0 = [gettimeofday];
ok(
$soap=SOAP::WSDL->new(
wsdl => "file://$path/acceptance/wsdl/10_helloworld.asmx.xml",
no_dispatch => 1
),
"Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)" );
$soap->proxy('http://helloworld/helloworld.asmx');
$t0 = [gettimeofday];
eval{
$soap->wsdlinit(caching => 1,
cache_directory => $cacheDir ) };
unless ($@) {
pass("wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)");
} else {
fail( $@ );
}
$soap->readable(1);
$t0 = [gettimeofday];
ok( $soap->call("sayHello" , %{ $data }),
"1 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)") ;
$t0 = [gettimeofday];
ok($soap->call(sayHello => %{ $data }),
"1 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)" );
timethis 500, sub { $soap->call(sayHello => %{ $data }) };
__END__
$t0 = [gettimeofday];
for (my $i=1; $i<100; $i++)
{
$soap->call(sayHello => %{ $data });
}
ok(1, "100 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)");
chdir $cwd;

118
t/attic/11_helloworld.NET.t Normal file
View File

@@ -0,0 +1,118 @@
#!/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 '../..';
use Cwd;
use File::Basename;
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 => 'test',
# test => {
# name => 'TESTNAME',
# givenName => 'GIVENNAME',
# },
# test1 => {
# name => 'TESTNAME',
# givenName => 'GIVENNAME',
# extend => 'EXTEND',
# },
# test2 => {
# name => 'TESTNAME',
# givenName => 'GIVENNAME',
# }
};
my $t0 = [gettimeofday];
# 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;
ok( $soap=SOAP::WSDL->new(
wsdl => 'file:///'.$path.'/acceptance/wsdl/11_helloworld.wsdl',
no_dispatch => 1
) );
$soap->serializer()->namespace('SOAP-ENV');
$soap->serializer()->encodingspace('SOAP-ENC');
print "Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
$soap->proxy('http://helloworld/helloworld.asmx');
$t0 = [gettimeofday];
ok($soap->wsdlinit());
print "WSDL init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
$t0 = [gettimeofday];
do {
my $xml = $soap->serializer->method( $soap->call(sayHello => %{ $data }) );
open (FILE, "acceptance/results/11_helloworld.xml")
|| open (FILE, "t/acceptance/results/11_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/results/11_helloworld.xml")
|| open FILE, ("t/acceptance/results/11_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"; };
};
chdir $cwd;

48
t/attic/12_binding.pl Normal file
View File

@@ -0,0 +1,48 @@
use lib '../lib';
use Test;
use SOAP::WSDL;
use Cwd;
use Data::Dumper;
plan tests => 9;
print "# Using SOAP::WSDL Version $SOAP::WSDL::VERSION\n";
my $name = '02_port';
# chdir to my location
my $cwd = cwd;
if (-d 't')
{
$cwd .= '/t';
}
my $url = 'http://127.0.0.1/testPort';
ok(1);
ok( $soap = SOAP::WSDL->new(
wsdl => 'file:///' . $cwd . '/acceptance/wsdl/' . $name . '.wsdl'
) );
ok( ($soap->servicename('testService') eq 'testService' ) );
ok( ($soap->portname('testPort') eq 'testPort' ) );
ok( $soap->wsdlinit( url => $url ) );
__END__
my $xpath = $soap->_wsdl_xpath( );
my @ports = $xpath->findnodes( '/definitions/service[@name="' . $soap->servicename() . '"]/port/soap:address[@location="' . $url .'"]');
if (@ports)
{
print "# found testPort URL\n";
my $address = shift @ports;
my $port = $address->getParentNode();
print $port->getAttribute('binding'), "\n";
print $port->getAttribute('name'), "\n";
}

View File

@@ -1,17 +1,19 @@
use Test::More;
eval { use Test::Pod::Coverage 1.08 };
plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD" if $@;
eval "use Test::Pod::Coverage 1.00";
plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD" if $@;
BEGIN
{
if (-d 't/') # we're not in the test dir - probably using
{ # Build test
@dirs = ('blib/lib')
if (-d 't') # chdir into test directory if we
{ # are not there (make test)
chdir 't';
@dirs = '../blib/lib';
}
else
{
@dirs = '../lib';
@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"
}

19
t/lib/MyComplexType.pm Normal file
View 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; # no :ATTR - _factory takes care of
__PACKAGE__->_factory(
[ qw(MyTestName) ], # order
{ MyTestName => \%MyTestName_of }, # attribute lookup map
{ MyTestName => 'MyElement' } # class name lookup map
);
sub get_xmlns { 'urn:Test' };
1;

86
t/lib/MyElement.pm Normal file
View File

@@ -0,0 +1,86 @@
#!/usr/bin/perl
package MyElement;
use strict;
use Class::Std::Storable;
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',
);
sub START {
my ($self, $ident, $args_of) =@_;
$self->__set_name('MyElementName');
}
sub get_xmlns { 'urn:Test' };
package MyTestElement;
use strict;
use Class::Std::Storable;
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',
);
sub START {
my ($self, $ident, $args_of) =@_;
$self->__set_name('MyTestElement');
}
sub get_xmlns { 'urn:Test' };
package MyTestElement2;
use strict;
use Class::Std::Storable;
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',
);
sub START {
my ($self, $ident, $args_of) =@_;
$self->__set_name('MyTestElement2');
}
sub get_xmlns { 'urn:Test' };
;
package MyAtomicComplexTypeElement;
use strict;
use Class::Std::Storable;
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,
},
{
test => 'MyTestElement',
test2 => 'MyTestElement2',
},
);
__PACKAGE__->__set_name('MyAtomicComplexTypeElement');
1;

53
t/lib/MySimpleType.pm Normal file
View 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
View 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
View 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;

View File

@@ -0,0 +1,18 @@
package Typelib::TEnqueueMessage;
use strict;
use base qw(Typelib::Base);
use Class::Std::Storable;
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;

27
t/lib/Typelib/TMessage.pm Normal file
View File

@@ -0,0 +1,27 @@
package Typelib::TMessage;
use strict;
use base qw(Typelib::Base);
use Class::Std::Storable;
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;