import SOAP-WSDL 2.00.02 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 2.00.02 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00.02.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
745ce925c1
commit
915ee03cbe
38
t/001_use.t
38
t/001_use.t
@@ -1,38 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More; # TODO: change to tests => N;
|
||||
use lib '../lib';
|
||||
|
||||
my @modules = qw(
|
||||
SOAP::WSDL
|
||||
SOAP::WSDL::Client
|
||||
SOAP::WSDL::Serializer::XSD
|
||||
SOAP::WSDL::Deserializer::XSD
|
||||
SOAP::WSDL::Transport::HTTP
|
||||
SOAP::WSDL::Definitions
|
||||
SOAP::WSDL::Message
|
||||
SOAP::WSDL::Operation
|
||||
SOAP::WSDL::OpMessage
|
||||
SOAP::WSDL::SOAP::Address
|
||||
SOAP::WSDL::SOAP::Body
|
||||
SOAP::WSDL::SOAP::Header
|
||||
SOAP::WSDL::SOAP::Operation
|
||||
SOAP::WSDL::Binding
|
||||
SOAP::WSDL::Port
|
||||
SOAP::WSDL::PortType
|
||||
SOAP::WSDL::Types
|
||||
SOAP::WSDL::XSD::Builtin
|
||||
SOAP::WSDL::XSD::ComplexType
|
||||
SOAP::WSDL::XSD::SimpleType
|
||||
SOAP::WSDL::XSD::Element
|
||||
SOAP::WSDL::XSD::Schema
|
||||
);
|
||||
|
||||
plan tests => 2* scalar @modules;
|
||||
|
||||
for my $module (@modules)
|
||||
{
|
||||
use_ok($module);
|
||||
ok($module->new(), "Object creation");
|
||||
}
|
||||
@@ -1,398 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 5;
|
||||
use lib '../lib';
|
||||
|
||||
eval {
|
||||
require Test::XML;
|
||||
import Test::XML;
|
||||
};
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||
|
||||
my $parser;
|
||||
|
||||
ok($parser = SOAP::WSDL::Expat::WSDLParser->new(), "Object creation");
|
||||
|
||||
eval { $parser->parse_string( xml() ) };
|
||||
if ($@)
|
||||
{
|
||||
fail("parsing WSDL");
|
||||
die "Can't test without parsed WSDL: $@";
|
||||
}
|
||||
else
|
||||
{
|
||||
pass("parsing XML");
|
||||
}
|
||||
|
||||
my $wsdl;
|
||||
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||
|
||||
my $schema = $wsdl->get_types()->[0]->get_schema()->[0] || die "No schema !";
|
||||
|
||||
my $opt = {
|
||||
typelib => $wsdl->first_types,
|
||||
readable => 1,
|
||||
autotype => 0,
|
||||
namespace => { 'tns' => 'http://www.example.org/MessageGateway2/',
|
||||
'xsd' => 'http://www.w3.org/2001/XMLSchema',
|
||||
'wsdl' => 'http://schemas.xmlsoap.org/wsdl/',
|
||||
},
|
||||
indent => "",
|
||||
};
|
||||
|
||||
my $data = { EnqueueMessage => {
|
||||
MMessage => {
|
||||
MRecipientURI => 'anyURI',
|
||||
MSenderAddress => 'a string',
|
||||
MMessageContent => 'a string',
|
||||
MSubject => 'a string',
|
||||
MDeliveryReportRecipientURI => 'anyURI',
|
||||
MKeepalive => {
|
||||
MKeepaliveTimeout => 1234567,
|
||||
MKeepaliveErrorPolicy => ' ( suppress | report ) ',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
SKIP: { skip_without_test_xml();
|
||||
is_xml( $wsdl->find_message(
|
||||
"http://www.example.org/MessageGateway2/" ,'EnqueueMessageRequest'
|
||||
)->first_part()->serialize( 'test', $data, $opt ),
|
||||
xml_message()
|
||||
, "Serialized message part"
|
||||
);
|
||||
}
|
||||
|
||||
sub skip_without_test_xml {
|
||||
skip("Test::XML not available", 1) if (not $Test::XML::VERSION);
|
||||
}
|
||||
|
||||
sub xml_message {
|
||||
return
|
||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||
<MMessage>
|
||||
<MRecipientURI>anyURI</MRecipientURI>
|
||||
<MSenderAddress>a string</MSenderAddress>
|
||||
<MMessageContent>a string</MMessageContent>
|
||||
<MSubject>a string</MSubject>
|
||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||
<MKeepalive>
|
||||
<MKeepaliveTimeout>1234567</MKeepaliveTimeout>
|
||||
<MKeepaliveErrorPolicy> ( suppress | report ) </MKeepaliveErrorPolicy>
|
||||
</MKeepalive>
|
||||
</MMessage>
|
||||
</EnqueueMessage>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
sub xml {
|
||||
return q{<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions name="MessageGateway"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<wsdl:types>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/">
|
||||
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A type containing all elements of a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MRecipientURI" type="xsd:anyURI" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
The recipient in URI notaitions. Valid URI schemas are: mailto:, sms:,
|
||||
phone:. Not all URI schemas need to be implemented at the current
|
||||
implementation stage.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSenderAddress" type="xsd:string" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
E-Mail sender address. Ignored for all but mailto: recipient URIs.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MMessageContent" type="xsd:string" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Message Content.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSubject" type="xsd:string" minOccurs="0" maxOccurs="1">
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Message Subject. Ignored for all but mailto: URIs
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MDeliveryReportRecipientURI" type="xsd:anyURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
||||
URI to send a delivery report to. May be of one of the following schemes:
|
||||
mailto:, http:, https:. Reports to mailto: URIs are sent as plaintext,
|
||||
reports to http(s) URIs are sent as SOAP requests following the
|
||||
MessageGatewayClient service definition.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepalive" type="tns:TKeepalive" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Container for keepalive information. May be missing.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepalive">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing keeplive information.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
|
||||
<xsd:element name="MKeepaliveTimeout" type="xsd:double">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Keepalive timeout. The keepalive timeout spezifies how long the sending of
|
||||
a message will be delayed waiting for keepalive updates. If a keepalive
|
||||
update is received during this period, the timeout will be reset. If not,
|
||||
the message will be sent after the timeout has expired.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepaliveErrorPolicy" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
Policy to comply to in case of system errors. Valid values are "suppress"
|
||||
and "report". If the policy is set to "suppress", keepalive messages will
|
||||
not be sent to their recipients in case of partial system failure, even if
|
||||
the keepalive has expired. This may result in "false negatives", i.e.
|
||||
messages may not be sent, even though their keepalive has expired. If the
|
||||
value is "report", keepalive messages will be sent from any cluster node.
|
||||
This may result in "false positive" alerts.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="suppress"></xsd:enumeration>
|
||||
<xsd:enumeration value="report"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing a message ID.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Type containing all elements of a keppalive update / remove request.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The ID for the message to update / remove
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="MAction" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The action to perform. Valid values are: "remove", "update". On "remove",
|
||||
the message with the ID specified will be removed from the queue, thus it
|
||||
will never be sent, even if it's timeout expires. On "update" the
|
||||
keepalive timeout of the corresponding message will be reset.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="remove"></xsd:enumeration>
|
||||
<xsd:enumeration value="update"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="KeepaliveMessage" type="tns:TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Keepalive message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="KeepaliveMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Response element for a keepalive request</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="EnqueueMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message response element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:complexType name="TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessage" type="tns:TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The keepalive message to process.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MKeepaliveMessage" type="tns:TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a keepalive message to process.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="EnqueueMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessage">
|
||||
<wsdl:documentation>inputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
|
||||
</wsdl:message>
|
||||
<wsdl:message name="EnqueueMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessageResponse">
|
||||
<wsdl:documentation>outputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessage">
|
||||
|
||||
<wsdl:documentation>input parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessageResponse">
|
||||
<wsdl:documentation>output parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="MGWPortType">
|
||||
<wsdl:documentation>
|
||||
generic port type for all methods required for sending messages over the mosaic
|
||||
message gatewa
|
||||
</wsdl:documentation>
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to enqueue a normal (immediate send) or a delayed message with
|
||||
keepalive functionality.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:EnqueueMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:EnqueueMessageResponse"></wsdl:output>
|
||||
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to update or remove a
|
||||
keepalive message.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:KeepaliveMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:KeepaliveMessageResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="MGWBinding" type="tns:MGWPortType">
|
||||
<wsdl:documentation>Generic binding for all (SOAP) port</wsdl:documentation>
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<soap:operation soapAction="http://www.example.org/MessageGateway2/EnqueueMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<soap:operation
|
||||
soapAction="http://www.example.org/MessageGateway2/KeepaliveMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="MessageGateway">
|
||||
<wsdl:documentation>
|
||||
Web Service for sending messages over the mosaic message gatewa
|
||||
</wsdl:documentation>
|
||||
|
||||
<wsdl:port name="HTTPPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the mosaic message gatewa</wsdl:documentation>
|
||||
<soap:address location="https://www.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>};
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Test::More tests => 17; # qw/no_plan/; # TODO: change to tests => N;
|
||||
use Test::More tests => 18; # qw/no_plan/; # TODO: change to tests => N;
|
||||
use lib '../lib';
|
||||
use File::Spec;
|
||||
use File::Basename qw(dirname);
|
||||
@@ -26,6 +26,8 @@ $soap = SOAP::WSDL->new(
|
||||
outputxml => 1, # required, if not set ::SOM serializer will be loaded
|
||||
)->wsdlinit();
|
||||
|
||||
ok $soap->on_action('FOO');
|
||||
|
||||
$soap->servicename('MessageGateway');
|
||||
|
||||
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
||||
|
||||
@@ -1,437 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 22;
|
||||
use lib '../lib';
|
||||
use SOAP::WSDL::Expat::WSDLParser;
|
||||
use SOAP::WSDL::Expat::MessageParser;
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
use Carp qw(confess);
|
||||
|
||||
use_ok qw(SOAP::WSDL::Generator::Template::XSD);
|
||||
|
||||
my $path = dirname __FILE__;
|
||||
|
||||
my $wsdl;
|
||||
ok( $wsdl = SOAP::WSDL::Expat::WSDLParser->new()
|
||||
->parse_string( xml() ) , "get object tree");
|
||||
|
||||
my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
definitions => $wsdl,
|
||||
OUTPUT_PATH => "$path/testlib",
|
||||
typemap_prefix => "Test::Typemap",
|
||||
type_prefix => "Test::Type",
|
||||
element_prefix => "Test::Element",
|
||||
interface_prefix => "Test::Interface",
|
||||
});
|
||||
# local $SIG{__WARN__} = sub { confess @_};
|
||||
$generator->generate_interface();
|
||||
$generator->generate_typemap();
|
||||
{
|
||||
local $SIG{__WARN__} = sub {};
|
||||
$generator->generate_typelib();
|
||||
}
|
||||
|
||||
eval "use lib '$path/testlib'";
|
||||
|
||||
use_ok qw(Test::Element::EnqueueMessage);
|
||||
use_ok qw(Test::Type::TMessage);
|
||||
use_ok qw(Test::Typemap::MessageGateway);
|
||||
|
||||
my $data = {
|
||||
MMessage => {
|
||||
MRecipientURI => 'anyURI',
|
||||
MSenderAddress => 'a string',
|
||||
MMessageContent => 'a string',
|
||||
MSubject => 'a string',
|
||||
MDeliveryReportRecipientURI => 'anyURI',
|
||||
MKeepalive => {
|
||||
MKeepaliveTimeout => 1234567,
|
||||
MKeepaliveErrorPolicy => ' ( suppress | report ) ',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ok Test::Element::EnqueueMessage->new( $data ) , '(generated) object constructor';
|
||||
|
||||
my $message_parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'Test::Typemap::MessageGateway',
|
||||
strict => 0,
|
||||
});
|
||||
my $msg;
|
||||
eval { $msg = $message_parser->parse_string( xml_message2() ) };
|
||||
ok ( !$@, 'parse XML message: ' . $@);
|
||||
|
||||
|
||||
eval { $message_parser->parse_string( xml_message() ) };
|
||||
ok ( !$@, 'parse XML message using atomic type definitions');
|
||||
|
||||
SKIP: {
|
||||
eval "require Test::Pod; ";
|
||||
skip 'Cannot test generated POD without Test::POD' , 12 if $@;
|
||||
|
||||
foreach my $module (Test::Pod::all_pod_files( "$path/testlib")) {
|
||||
Test::Pod::pod_file_ok( $module )
|
||||
}
|
||||
}
|
||||
|
||||
use_ok qw(Test::Interface::MessageGateway::HTTPPort);
|
||||
|
||||
my $interface =
|
||||
Test::Interface::MessageGateway::HTTPPort->new( { no_dispatch => 1, } );
|
||||
|
||||
ok $interface->EnqueueMessage(
|
||||
{
|
||||
MMessage => { #Test::Type::TMessage
|
||||
MRecipientURI => 'mailto:recipient@example.org',
|
||||
MSenderAddress => 'mailto:sender@example.org',
|
||||
MMessageContent => 'content',
|
||||
MSubject => 'subject',
|
||||
MDeliveryReportRecipientURI => 'mailto:report.recipient@example.org',
|
||||
}
|
||||
}),
|
||||
'interface operation call (no_dispatch set)';
|
||||
|
||||
|
||||
# cleanup
|
||||
rmtree "$path/testlib";
|
||||
|
||||
sub xml_message {
|
||||
return
|
||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||
<MMessage>
|
||||
<MRecipientURI>anyURI</MRecipientURI>
|
||||
<MSenderAddress>a string</MSenderAddress>
|
||||
<MMessageContent>a string</MMessageContent>
|
||||
<MSubject>a string</MSubject>
|
||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||
<MKeepalive>
|
||||
<MKeepaliveTimeout>1234567</MKeepaliveTimeout>
|
||||
<MKeepaliveErrorPolicy> ( suppress | report ) </MKeepaliveErrorPolicy>
|
||||
</MKeepalive>
|
||||
</MMessage>
|
||||
</EnqueueMessage>
|
||||
};
|
||||
}
|
||||
|
||||
sub xml_message2 {
|
||||
return
|
||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||
<MMessage>
|
||||
<MRecipientURI>anyURI</MRecipientURI>
|
||||
<MSenderAddress>a string</MSenderAddress>
|
||||
<MMessageContent>a string</MMessageContent>
|
||||
<MSubject>a string</MSubject>
|
||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||
</MMessage>
|
||||
</EnqueueMessage>
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
sub xml {
|
||||
return q{<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions name="MessageGateway"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<wsdl:types>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/">
|
||||
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A type containing all elements of a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MRecipientURI" type="xsd:anyURI" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
The recipient in URI notaitions. Valid URI schemas are: mailto:, sms:,
|
||||
phone:. Not all URI schemas need to be implemented at the current
|
||||
implementation stage.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSenderAddress" type="xsd:string" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
E-Mail sender address. Ignored for all but mailto: recipient URIs.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MMessageContent" type="xsd:string" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Message Content.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSubject" type="xsd:string" minOccurs="0" maxOccurs="1">
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Message Subject. Ignored for all but mailto: URIs
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MDeliveryReportRecipientURI" type="xsd:anyURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
||||
URI to send a delivery report to. May be of one of the following schemes:
|
||||
mailto:, http:, https:. Reports to mailto: URIs are sent as plaintext,
|
||||
reports to http(s) URIs are sent as SOAP requests following the
|
||||
MessageGatewayClient service definition.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepalive" type="tns:TKeepalive" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Container for keepalive information. May be missing.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepalive">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing keeplive information.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
|
||||
<xsd:element name="MKeepaliveTimeout" type="xsd:double">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Keepalive timeout. The keepalive timeout spezifies how long the sending of
|
||||
a message will be delayed waiting for keepalive updates. If a keepalive
|
||||
update is received during this period, the timeout will be reset. If not,
|
||||
the message will be sent after the timeout has expired.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepaliveErrorPolicy" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
Policy to comply to in case of system errors. Valid values are "suppress"
|
||||
and "report". If the policy is set to "suppress", keepalive messages will
|
||||
not be sent to their recipients in case of partial system failure, even if
|
||||
the keepalive has expired. This may result in "false negatives", i.e.
|
||||
messages may not be sent, even though their keepalive has expired. If the
|
||||
value is "report", keepalive messages will be sent from any cluster node.
|
||||
This may result in "false positive" alerts.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="suppress"></xsd:enumeration>
|
||||
<xsd:enumeration value="report"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing a message ID.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Type containing all elements of a keppalive update / remove request.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The ID for the message to update / remove
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="MAction" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The action to perform. Valid values are: "remove", "update". On "remove",
|
||||
the message with the ID specified will be removed from the queue, thus it
|
||||
will never be sent, even if it's timeout expires. On "update" the
|
||||
keepalive timeout of the corresponding message will be reset.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="remove"></xsd:enumeration>
|
||||
<xsd:enumeration value="update"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="KeepaliveMessage" type="tns:TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Keepalive message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="KeepaliveMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Response element for a keepalive request</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="EnqueueMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message response element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:complexType name="TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessage" type="tns:TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The keepalive message to process.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MKeepaliveMessage" type="tns:TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a keepalive message to process.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="EnqueueMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessage">
|
||||
<wsdl:documentation>inputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
|
||||
</wsdl:message>
|
||||
<wsdl:message name="EnqueueMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessageResponse">
|
||||
<wsdl:documentation>outputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessage">
|
||||
|
||||
<wsdl:documentation>input parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessageResponse">
|
||||
<wsdl:documentation>output parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="MGWPortType">
|
||||
<wsdl:documentation>
|
||||
generic port type for all methods required for sending messages over the mosaic
|
||||
message gatewa
|
||||
</wsdl:documentation>
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to enqueue a normal (immediate send) or a delayed message with
|
||||
keepalive functionality.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:EnqueueMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:EnqueueMessageResponse"></wsdl:output>
|
||||
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to update or remove a
|
||||
keepalive message.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:KeepaliveMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:KeepaliveMessageResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="MGWBinding" type="tns:MGWPortType">
|
||||
<wsdl:documentation>Generic binding for all (SOAP) port</wsdl:documentation>
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<soap:operation soapAction="http://www.example.org/MessageGateway2/EnqueueMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<soap:operation
|
||||
soapAction="http://www.example.org/MessageGateway2/KeepaliveMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="MessageGateway">
|
||||
<wsdl:documentation>
|
||||
Web Service for sending messages over the message gatewa
|
||||
</wsdl:documentation>
|
||||
|
||||
<wsdl:port name="HTTPPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the message gateway</wsdl:documentation>
|
||||
<soap:address location="https://www.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
use Test::More tests => 3;
|
||||
use lib '../lib';
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
ok( SOAP::WSDL->new(), 'Instantiated object' );
|
||||
|
||||
eval { SOAP::WSDL->new( grzlmpfh => 'unknown')};
|
||||
ok $@, 'die on illegal parameter';
|
||||
@@ -33,9 +33,9 @@ $soap->outputxml(1);
|
||||
ok ($xml = $soap->call('test',
|
||||
testAll => {
|
||||
Test2 => 'Test2',
|
||||
TestRef => 'TestRef'
|
||||
TestElement => 'TestRef'
|
||||
}
|
||||
), 'Serialized complexType' );
|
||||
|
||||
like $xml, qr{<SOAP-ENV:Body><testAll><TestRef>TestRef</TestRef><Test2>Test2</Test2></testAll></SOAP-ENV:Body>}
|
||||
like $xml, qr{<SOAP-ENV:Body><testAll><TestElement>TestRef</TestElement><Test2>Test2</Test2></testAll></SOAP-ENV:Body>}
|
||||
, 'element ref="" serialization';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 8; #qw(no_plan);
|
||||
|
||||
use_ok qw(SOAP::WSDL::Client);
|
||||
|
||||
ok my $client = SOAP::WSDL::Client->new();
|
||||
@@ -30,7 +29,6 @@ is $serialize->{ body }->{ foo }, 'bar';
|
||||
$serialize = $client->call('testMethod', foo => 'bar');
|
||||
is $serialize->{ body }->{ foo }, 'bar';
|
||||
|
||||
|
||||
sub serialize {
|
||||
my $self = shift;
|
||||
return shift;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 11; #qw(no_plan);
|
||||
use Test::More tests => 14; #qw(no_plan);
|
||||
use File::Spec;
|
||||
use File::Basename;
|
||||
|
||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||
$path =~s{\\}{/}xg; # stupid windows workaround: $path works with /, but not
|
||||
# with \
|
||||
|
||||
use_ok qw( SOAP::WSDL::Expat::WSDLParser);
|
||||
|
||||
@@ -17,18 +19,18 @@ my $definitions = $parser->parse_file(
|
||||
use Data::Dumper;
|
||||
my $schema = $definitions->first_types()->get_schema()->[1];
|
||||
my $attr = $schema->get_element()->[0]->first_complexType->first_attribute();
|
||||
ok $attr->get_name('testAttribute');
|
||||
ok $attr->get_type('xs:string');
|
||||
ok $attr->get_name('testAttribute'), 'attribute name';
|
||||
ok $attr->get_type('xs:string'), 'attribute type';
|
||||
|
||||
|
||||
use SOAP::WSDL::Generator::Template::XSD;
|
||||
my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
definitions => $definitions,
|
||||
type_prefix => 'Foo',
|
||||
element_prefix => 'Foo',
|
||||
typemap_prefix => 'Foo',
|
||||
OUTPUT_PATH => "$path/testlib",
|
||||
});
|
||||
#use SOAP::WSDL::Generator::Template::XSD;
|
||||
#my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
# definitions => $definitions,
|
||||
# type_prefix => 'Foo',
|
||||
# element_prefix => 'Foo',
|
||||
# typemap_prefix => 'Foo',
|
||||
# OUTPUT_PATH => "$path/testlib",
|
||||
#});
|
||||
|
||||
$definitions = $parser->parse_uri(
|
||||
"file://$path/../../../acceptance/wsdl/WSDLParser-import.wsdl"
|
||||
@@ -43,6 +45,35 @@ is @{ $schema_from_ref }, 2, 'got builtin and imported schema';
|
||||
ok @{ $schema_from_ref->[1]->get_element } > 0;
|
||||
is $schema_from_ref->[1]->get_element->[0]->get_name(), 'sayHello';
|
||||
|
||||
{
|
||||
my $warn_parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
my $warning;
|
||||
local $SIG{__WARN__} = sub { $warning = join(q{}, @_ )};
|
||||
$definitions = $warn_parser->parse_file(
|
||||
"$path/../../../acceptance/wsdl/WSDLParser/import_no_location.wsdl"
|
||||
);
|
||||
like $warning, qr{cannot \s import \s document \s for \s namespace \s >urn:Test< \s without \slocation}x
|
||||
, 'warn on import without location';
|
||||
|
||||
$definitions = $warn_parser->parse_uri(
|
||||
"file://$path/../../../acceptance/wsdl/WSDLParser/xsd_import_no_location.wsdl"
|
||||
);
|
||||
like $warning, qr{cannot \s import \s document \s for \s namespace \s >urn:Test< \s without \slocation}x
|
||||
, 'warn on import without location';
|
||||
};
|
||||
|
||||
eval {
|
||||
my $warn_parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
|
||||
$definitions = $warn_parser->parse_file(
|
||||
"$path/../../../acceptance/wsdl/WSDLParser/import_xsd_cascade.wsdl"
|
||||
);
|
||||
};
|
||||
like $@, qr{\A cannot \s import \s document \s from \s namespace \s
|
||||
>urn:Test< \s without \s base \s uri\. \s
|
||||
Use \s >parse_uri< \s or \s >set_uri< \s to \s set \s one\.}x;
|
||||
|
||||
# Alarm is just to be sure - may loop infinitely if broken
|
||||
$SIG{ALRM} = sub { die 'looped'};
|
||||
alarm 1;
|
||||
|
||||
@@ -52,14 +83,3 @@ $definitions = $parser->parse_file(
|
||||
|
||||
alarm 0;
|
||||
pass 'import loop';
|
||||
|
||||
__END__
|
||||
|
||||
$generator->set_type_prefix('MyTypes');
|
||||
$generator->set_element_prefix('MyElements');
|
||||
$generator->set_typemap_prefix('MyTypemaps');
|
||||
$generator->set_interface_prefix('MyInterfaces');
|
||||
|
||||
$generator->set_output(undef);
|
||||
$generator->generate();
|
||||
|
||||
|
||||
@@ -39,31 +39,3 @@ $generator->generate_interface({
|
||||
|
||||
ok eval $output;
|
||||
print $@ if $@;
|
||||
|
||||
|
||||
# print $output;
|
||||
__END__
|
||||
|
||||
my $tt = Template->new(
|
||||
DEBUG => 1,
|
||||
EVAL_PERL => 1,
|
||||
RECURSION => 1,
|
||||
INCLUDE_PATH => "$path/../../../../lib/SOAP/WSDL/Template",
|
||||
);
|
||||
|
||||
foreach my $service (@{ $definitions->get_service }) {
|
||||
my $output;
|
||||
$tt->process( 'Interface.tt', {
|
||||
definitions => $definitions,
|
||||
service => $service,
|
||||
interface_prefix => 'MyInterface',
|
||||
type_prefix => 'MyTypes',
|
||||
TYPE_PREFIX => 'MyTypes',
|
||||
element_prefix => 'MyElement',
|
||||
}, \$output);
|
||||
die $tt->error if $tt->error();
|
||||
|
||||
ok eval $output, 'eval output';
|
||||
|
||||
print $output;
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
use Test::More tests => 51;
|
||||
use Test::More tests => 61;
|
||||
use File::Basename qw(dirname);
|
||||
use File::Spec;
|
||||
use File::Path;
|
||||
@@ -16,6 +16,9 @@ my $definitions = $parser->parse_file(
|
||||
"$path/../../../acceptance/wsdl/generator_test.wsdl"
|
||||
);
|
||||
|
||||
#my $type = $definitions->first_types()->find_type('urn:Test', 'elementRefComplexType');
|
||||
#die $type->get_element()->[0]->_DUMP;
|
||||
|
||||
my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
definitions => $definitions,
|
||||
type_prefix => 'Foo',
|
||||
@@ -127,6 +130,12 @@ is $complexExtension->get_Test1(), 'test1';
|
||||
is $complexExtension->get_Test2(), 'test2';
|
||||
is $complexExtension->get_Test3(), 'test3';
|
||||
|
||||
ok eval { require MyTypes::testComplexNestedExtension };
|
||||
my $nestedExtension = MyTypes::testComplexNestedExtension->new();
|
||||
ok $nestedExtension->can('get_Test1');
|
||||
ok $nestedExtension->can('get_Test2');
|
||||
ok $nestedExtension->can('get_Test3');
|
||||
ok $nestedExtension->can('get_Test4');
|
||||
|
||||
ok eval { require MyTypes::testComplexTypeElementAtomicSimpleType; };
|
||||
my $ct_east = MyTypes::testComplexTypeElementAtomicSimpleType->new({
|
||||
@@ -193,4 +202,11 @@ SKIP: {
|
||||
'Attribute POD');
|
||||
}
|
||||
|
||||
ok $typemap = MyTypemaps::testService->get_typemap();
|
||||
|
||||
ok $typemap->{'testElementNestedExtension/Test1'};
|
||||
ok $typemap->{'testElementNestedExtension/Test2'};
|
||||
ok $typemap->{'testElementNestedExtension/Test3'};
|
||||
ok $typemap->{'testElementNestedExtension/Test4'};
|
||||
|
||||
rmtree "$path/testlib";
|
||||
|
||||
131
t/SOAP/WSDL/Generator/XSD_custom_resolver.t
Normal file
131
t/SOAP/WSDL/Generator/XSD_custom_resolver.t
Normal file
@@ -0,0 +1,131 @@
|
||||
package TestResolver;
|
||||
use strict; use warnings;
|
||||
use Class::Std::Fast;
|
||||
|
||||
use base qw(SOAP::WSDL::Generator::PrefixResolver);
|
||||
|
||||
sub resolve_prefix {
|
||||
my ($self, $type, $namespace, $node) = @_;
|
||||
my $name = defined($node) ? $node->get_name() : ();
|
||||
if (($type eq 'interface') && $name =~m{\.}x) {
|
||||
return "MySpacialPrufax::";
|
||||
}
|
||||
if ($type eq 'type') {
|
||||
return 'MySpatialTaipeeProfix::'
|
||||
if $namespace ne 'http://www.w3.org/2001/XMLSchema'
|
||||
}
|
||||
return $self->SUPER::resolve_prefix($type, $namespace, $node);
|
||||
}
|
||||
|
||||
|
||||
package main;
|
||||
use Test::More tests => 15;
|
||||
use File::Basename qw(dirname);
|
||||
use File::Spec;
|
||||
use File::Path;
|
||||
|
||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||
|
||||
use_ok qw(SOAP::WSDL::Generator::Visitor::Typelib);
|
||||
use_ok qw(SOAP::WSDL::Generator::Template::XSD);
|
||||
|
||||
use SOAP::WSDL::Expat::WSDLParser;
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
|
||||
my $definitions = $parser->parse_file(
|
||||
"$path/../../../acceptance/wsdl/generator_test_dot_names.wsdl"
|
||||
#"$path/../../../acceptance/wsdl/elementAtomicComplexType.xml"
|
||||
);
|
||||
|
||||
my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
definitions => $definitions,
|
||||
type_prefix => 'Foo',
|
||||
element_prefix => 'Foo',
|
||||
typemap_prefix => 'Foo',
|
||||
OUTPUT_PATH => "$path/testlib",
|
||||
prefix_resolver_class => 'TestResolver',
|
||||
});
|
||||
|
||||
my $code = "";
|
||||
$generator->set_output(\$code);
|
||||
$generator->generate_typelib();
|
||||
{
|
||||
eval $code;
|
||||
ok !$@;
|
||||
print $@ if $@;
|
||||
}
|
||||
# print $code;
|
||||
|
||||
|
||||
$generator->set_type_prefix('MySpatialTaipeeProfix');
|
||||
$generator->set_element_prefix('MyElements');
|
||||
$generator->set_typemap_prefix('MyTypemaps');
|
||||
$generator->set_interface_prefix('MyInterfaces');
|
||||
|
||||
$generator->set_output(undef);
|
||||
$generator->generate();
|
||||
#$generator->generate_typelib();
|
||||
#$generator->generate_typemap();
|
||||
|
||||
if (eval { require Test::Warn; }) {
|
||||
Test::Warn::warning_like( sub { $generator->generate_interface() },
|
||||
qr{\A Multiple \s parts \s detected \s in \s message \s testMultiPartWarning}xms);
|
||||
}
|
||||
else {
|
||||
$generator->generate_interface();
|
||||
SKIP: { skip 'Cannot test warnings without Test::Warn', 1 };
|
||||
}
|
||||
|
||||
$generator->generate_server();
|
||||
|
||||
eval "use lib '$path/testlib'";
|
||||
|
||||
use_ok qw(MySpacialPrufax::My::SOAP::testService::testPort);
|
||||
use_ok qw(MyServer::My::SOAP::testService::testPort);
|
||||
use_ok qw(MySpatialTaipeeProfix::testComplexTypeRestriction);
|
||||
use_ok qw(MySpatialTaipeeProfix::testComplexTypeAll);
|
||||
SKIP: {
|
||||
eval { require Test::Pod::Content; }
|
||||
or skip 'Cannot test pod content without Test::Pod::Content', 6;
|
||||
Test::Pod::Content::pod_section_like(
|
||||
'MySpacialPrufax::My::SOAP::testService::testPort',
|
||||
'NAME',
|
||||
qr{^MySpacialPrufax::My::SOAP::testService::testPort \s - \s}xms,
|
||||
'Pod NAME section');
|
||||
Test::Pod::Content::pod_section_like(
|
||||
'MySpacialPrufax::My::SOAP::testService::testPort',
|
||||
'SYNOPSIS',
|
||||
qr{use \s MySpacialPrufax::My::SOAP::testService::testPort}xms,
|
||||
'Pod SYNOPSIS section');
|
||||
Test::Pod::Content::pod_section_like(
|
||||
'MySpacialPrufax::My::SOAP::testService::testPort',
|
||||
'SYNOPSIS',
|
||||
qr{\s MySpacialPrufax::My::SOAP::testService::testPort->new\(}xms,
|
||||
'Pod SYNOPSIS section');
|
||||
|
||||
Test::Pod::Content::pod_section_like(
|
||||
'MyServer::My::SOAP::testService::testPort',
|
||||
'NAME',
|
||||
qr{^MyServer::My::SOAP::testService::testPort \s - \s}xms,
|
||||
'Pod NAME section');
|
||||
Test::Pod::Content::pod_section_like(
|
||||
'MyServer::My::SOAP::testService::testPort',
|
||||
'SYNOPSIS',
|
||||
qr{use \s MyServer::My::SOAP::testService::testPort}xms,
|
||||
'Pod SYNOPSIS section');
|
||||
Test::Pod::Content::pod_section_like(
|
||||
'MyServer::My::SOAP::testService::testPort',
|
||||
'SYNOPSIS',
|
||||
qr{\s MyServer::My::SOAP::testService::testPort->new\(}xms,
|
||||
'Pod SYNOPSIS section');
|
||||
}
|
||||
|
||||
my $obj = MySpatialTaipeeProfix::testComplexTypeAll->new({
|
||||
Test_1 => 'Test1',
|
||||
Test_2 => 'Test2',
|
||||
});
|
||||
|
||||
like $obj->serialize(), qr{<Test-1>Test1</Test-1>}xm, 'serialize altered name with original name';
|
||||
|
||||
rmtree "$path/testlib";
|
||||
@@ -1,4 +1,4 @@
|
||||
use Test::More tests => 14;
|
||||
use Test::More tests => 15;
|
||||
use File::Basename qw(dirname);
|
||||
use File::Spec;
|
||||
use File::Path;
|
||||
@@ -99,4 +99,11 @@ SKIP: {
|
||||
'Pod SYNOPSIS section');
|
||||
}
|
||||
|
||||
my $obj = MyTypes::testComplexTypeAll->new({
|
||||
Test_1 => 'Test1',
|
||||
Test_2 => 'Test2',
|
||||
});
|
||||
like $obj->serialize(), qr{<Test-1>Test1</Test-1>}xm, 'serialize altered name with original name';
|
||||
|
||||
|
||||
rmtree "$path/testlib";
|
||||
|
||||
@@ -90,7 +90,6 @@ SKIP: {
|
||||
'Pod NAME section');
|
||||
}
|
||||
|
||||
#rmtree "$path/testlib";
|
||||
require FooMap::Service1;
|
||||
my $message_parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'FooMap::Service1',
|
||||
@@ -115,3 +114,5 @@ sub xml {
|
||||
</sayHello>
|
||||
</SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
||||
}
|
||||
|
||||
rmtree "$path/testlib";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use Test::More tests => 3;
|
||||
use Test::More tests => 2;
|
||||
use File::Basename qw(dirname);
|
||||
use File::Spec;
|
||||
|
||||
@@ -19,6 +19,9 @@ my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
});
|
||||
|
||||
{
|
||||
# currently, there is no completely unsupported XML schema
|
||||
# idiom (at least none which is detected properly)
|
||||
# TODO update WSDL and add some (there sure are)
|
||||
eval { $generator->generate_typelib() };
|
||||
}
|
||||
ok $@, $@;
|
||||
# ok $@, $@;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
use Test::More qw(no_plan);
|
||||
use lib 'testlib';
|
||||
#ok eval { require MyTypes::testComplexTypeSequenceWithAttribute; }
|
||||
# , 'load MyTypes::testComplexTypeSequenceWithAttribute';
|
||||
#
|
||||
#my $obj = MyTypes::testComplexTypeSequenceWithAttribute->new({
|
||||
# Test1 => 'foo',
|
||||
# Test2 => 'bar',
|
||||
#});
|
||||
#$obj->attr({ testAttr => 'foobar' });
|
||||
#
|
||||
#print $obj->attr();
|
||||
#
|
||||
|
||||
use_ok qw(MyElements::testElementComplexTypeSequenceWithAttribute);
|
||||
|
||||
my $obj = MyElements::testElementComplexTypeSequenceWithAttribute->new({
|
||||
Test1 => 'foo',
|
||||
Test2 => 'bar',
|
||||
});
|
||||
$obj->attr({ testAttr => 'foobar' });
|
||||
|
||||
print $obj;
|
||||
@@ -1,3 +1,9 @@
|
||||
package FOO;
|
||||
use strict; use warnings;
|
||||
use Class::Std::Fast;
|
||||
sub serialize_qualified { 'FOO' };
|
||||
|
||||
package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw(no_plan);
|
||||
@@ -9,12 +15,17 @@ my $serializer = SOAP::WSDL::Serializer::XSD->new();
|
||||
like $serializer->serialize(), qr{<SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty body';
|
||||
like $serializer->serialize({ body => {} }), qr{<SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty body';
|
||||
like $serializer->serialize({ body => [] }), qr{<SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty body';
|
||||
like $serializer->serialize({ header => {}, body => [] }),
|
||||
like $serializer->serialize({ header => {}, body => [] }),
|
||||
qr{<SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty header and body';
|
||||
like $serializer->serialize({ header => {}, body => [] , options => {
|
||||
namespace => {
|
||||
'http://schemas.xmlsoap.org/soap/envelope/' => 'SOAP',
|
||||
'http://www.w3.org/2001/XMLSchema-instance' => 'xsi',
|
||||
}
|
||||
} }),
|
||||
qr{<SOAP:Header></SOAP:Header><SOAP:Body></SOAP:Body>}, 'empty header and body';
|
||||
} }),
|
||||
qr{<SOAP:Header></SOAP:Header><SOAP:Body></SOAP:Body>}, 'empty header and body';
|
||||
|
||||
like $serializer->serialize({ header => {}, body => [ undef ] }),
|
||||
qr{<SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty header and body';
|
||||
like $serializer->serialize({ header => {}, body => [ undef, FOO->new() ] }),
|
||||
qr{<SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body>FOO</SOAP-ENV:Body>}, 'empty header and body';
|
||||
|
||||
173
t/SOAP/WSDL/Server/Mod_Perl2.t
Normal file
173
t/SOAP/WSDL/Server/Mod_Perl2.t
Normal file
@@ -0,0 +1,173 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
# ugly use lib to let it run from everywhere
|
||||
use lib '../../../../example/lib';
|
||||
use lib '../example/lib';
|
||||
use lib 'example/lib';
|
||||
use lib 'lib';
|
||||
use lib 't/lib';
|
||||
use warnings;
|
||||
use Test::More; #qw(no_plan);
|
||||
|
||||
use MyElements::sayHello;
|
||||
|
||||
eval { require Test::MockObject }
|
||||
or plan skip_all => 'Test::MockObject required for faking mod_perl';
|
||||
plan tests => 13;
|
||||
|
||||
my @ERROR_FROM = ();
|
||||
my $REQUEST = 'Foo',
|
||||
my $RESPONSE;
|
||||
my %DIR_CONFIG_OF = (
|
||||
dispatch_to => 'Mod_Perl2Test',
|
||||
soap_service => 'MyServer::HelloWorld::HelloWorldSoap',
|
||||
|
||||
);
|
||||
|
||||
my $mock = Test::MockObject->new();
|
||||
$mock->fake_module('APR::Table');
|
||||
$mock->fake_module('Apache2::Log' =>
|
||||
new => sub { return bless {}, 'Apache2::Log' },
|
||||
error => sub { shift; push @ERROR_FROM, @_ },
|
||||
warn => sub { shift; push @ERROR_FROM, @_ },
|
||||
);
|
||||
$mock->fake_module('Apache2::Headers' =>
|
||||
new => sub { my $class = shift; return bless { @_ }, $class },
|
||||
get => sub { return $_[0]->{ $_[1] } },
|
||||
);
|
||||
$mock->fake_module('Apache2::RequestRec' =>
|
||||
new => sub { return bless {}, 'Apache2::RequestRec' },
|
||||
log => sub { return Apache2::Log->new() },
|
||||
dir_config => sub { return $DIR_CONFIG_OF{$_[1]}},
|
||||
headers_in => sub { return Apache2::Headers->new(
|
||||
'content-length' => length($REQUEST),
|
||||
'SOAPAction' => 'urn:HelloWorld#sayHello',
|
||||
)
|
||||
},
|
||||
'read' => sub { $_[1] = $REQUEST; my $length = length($REQUEST); $REQUEST = q{}; return $length; },
|
||||
method => sub { 'POST' },
|
||||
uri => sub { 'http://example.org/soap-wsdl/helloWorld/' },
|
||||
content_type => sub {},
|
||||
'print' => sub { shift; $RESPONSE .= join(q{}, @_) },
|
||||
);
|
||||
|
||||
|
||||
use_ok qw(SOAP::WSDL::Server::Mod_Perl2);
|
||||
|
||||
ok my $obj = SOAP::WSDL::Server::Mod_Perl2->new(), 'instantiate object';
|
||||
|
||||
my $r = Apache2::RequestRec->new();
|
||||
|
||||
# block for scoping local
|
||||
{
|
||||
# dirty but useful...
|
||||
local $DIR_CONFIG_OF{dispatch_to} = undef;
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{\A No \s 'dispatch_to' \s variable \s set \s in \s httpd.conf }x
|
||||
, 'error on bad dispatch_to';
|
||||
@ERROR_FROM = ();
|
||||
}
|
||||
|
||||
# block for scoping local
|
||||
{
|
||||
# dirty but useful...
|
||||
local $DIR_CONFIG_OF{dispatch_to} = 'main';
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{\A Failed \s to \s require \s \[main\] }x, 'error on bad dispatch_to';
|
||||
@ERROR_FROM = ();
|
||||
}
|
||||
|
||||
# block for scoping local
|
||||
{
|
||||
# dirty but useful...
|
||||
local $DIR_CONFIG_OF{soap_service} = undef;
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{\A No \s 'soap_service' \s variable \s set \s in \s httpd.conf }x
|
||||
, 'error on bad dispatch_to';
|
||||
@ERROR_FROM = ();
|
||||
}
|
||||
|
||||
# block for scoping local
|
||||
{
|
||||
# dirty but useful...
|
||||
local $DIR_CONFIG_OF{soap_service} = 'soap_service';
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{\A Failed \s to \s require \s \[soap_service\] }x, 'error on bad dispatch_to';
|
||||
@ERROR_FROM = ();
|
||||
}
|
||||
|
||||
|
||||
# block for scoping local
|
||||
{
|
||||
# dirty but useful...
|
||||
local $DIR_CONFIG_OF{transport_class} = 'transport_class';
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{\A Failed \s to \s require \s \[transport_class\] }x, 'error on bad transport_class';
|
||||
@ERROR_FROM = ();
|
||||
}
|
||||
|
||||
# block for scoping local
|
||||
{
|
||||
# dirty but useful...
|
||||
local $DIR_CONFIG_OF{transport_class} = 'SOAP::WSDL::Server::Mod_Perl2';
|
||||
$REQUEST = q{Foobar};
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{\A Failed \s to \s handle \s request }x, 'error on bad request';
|
||||
@ERROR_FROM = ();
|
||||
}
|
||||
|
||||
# just a block - got used to it.
|
||||
{
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{\A No \s content-length \s provided }x, 'error on missing content-length';
|
||||
@ERROR_FROM = ();
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
my $hello = MyElements::sayHello->new({ name => 'Kutter', givenName => 'Martin' });
|
||||
$REQUEST = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body >'
|
||||
. $hello->serialize_qualified()
|
||||
. '</SOAP-ENV:Body></SOAP-ENV:Envelope>';
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $RESPONSE, qr{Hello \s Martin \sKutter}x, 'SOAP response';
|
||||
@ERROR_FROM = ();
|
||||
}
|
||||
|
||||
{
|
||||
my $hello = MyElements::sayHello->new({ name => '__DIE__', });
|
||||
$REQUEST = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body >'
|
||||
. $hello->serialize_qualified()
|
||||
. '</SOAP-ENV:Body></SOAP-ENV:Envelope>';
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{Failed \s to \s handle \s request: \s FOO}x, 'SOAP response';
|
||||
}
|
||||
|
||||
{
|
||||
my $hello = MyElements::sayHello->new({ name => '__DIE__', });
|
||||
$REQUEST = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body >'
|
||||
. $hello->serialize_qualified()
|
||||
. '<FOOBAR/>'
|
||||
. '</SOAP-ENV:Body></SOAP-ENV:Envelope>';
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{Failed \s to \s handle \s request: \s FOO}x, 'SOAP response';
|
||||
}
|
||||
|
||||
|
||||
# This test breaks the read() method. Be sure to add tests needing it above.
|
||||
{
|
||||
no warnings qw(redefine once);
|
||||
$REQUEST = 'FOOBAR';
|
||||
*Apache2::RequestRec::read = sub { $_[1] = "BA"; $REQUEST = q{}; return length($REQUEST) };
|
||||
my $hello = MyElements::sayHello->new({ name => 'Kutter', });
|
||||
$REQUEST = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body >'
|
||||
. $hello->serialize_qualified()
|
||||
. '</SOAP-ENV:Body></SOAP-ENV:Envelope>';
|
||||
SOAP::WSDL::Server::Mod_Perl2::handler($r);
|
||||
like $ERROR_FROM[0], qr{Failed \s to \s handle \s request: \s FOO}x, 'SOAP response';
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
use Test::More tests => 6;
|
||||
use Test::More tests => 7;
|
||||
use strict;
|
||||
use utf8;
|
||||
|
||||
@@ -15,6 +15,10 @@ my $result = $transport->send_receive(envelope => 'Test', action => 'foo');
|
||||
|
||||
ok ! $transport->is_success();
|
||||
|
||||
$result = $transport->send_receive(encoding => 'utf8', envelope => 'ÄÖÜ',
|
||||
$result = $transport->send_receive(encoding => 'utf8', envelope => 'ÄÖÜ',
|
||||
action => 'foo');
|
||||
ok ! $transport->is_success();
|
||||
|
||||
$result = $transport->send_receive(encoding => 'utf8', envelope => 'ÄÖÜ',
|
||||
action => 'foo', content_type => 'application/xml');
|
||||
ok ! $transport->is_success();
|
||||
@@ -1,6 +1,6 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 23;
|
||||
use Test::More tests => 24;
|
||||
use Scalar::Util qw(blessed);
|
||||
use lib '../../../../../../lib';
|
||||
use_ok qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||
@@ -30,6 +30,8 @@ is $obj->end_tag({ name => 'test' }), '</test>', 'end_tag';
|
||||
ok $obj->set_value('test'), 'set_value';
|
||||
is $obj->get_value(), 'test', 'get_value';
|
||||
|
||||
ok ! $obj->attr(), 'attr';
|
||||
|
||||
is "$obj", q{test}, 'stringification overloading';
|
||||
is $obj->serialize, q{test}, 'stringification overloading';
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ __PACKAGE__->__set_name( 'MyElementSimpleContent' );
|
||||
sub __get_attr_class { 'MyElement::_ATTR' };
|
||||
|
||||
package main;
|
||||
use Test::More tests => 111;
|
||||
use Test::More tests => 115;
|
||||
use Storable;
|
||||
|
||||
my $have_warn = eval { require Test::Warn; import Test::Warn; 1; };
|
||||
@@ -131,6 +131,7 @@ is $obj->get_test, 'Test2', 'element content';
|
||||
|
||||
$hash_of_ref = $obj->as_hash_ref();
|
||||
is $hash_of_ref->{ test }, 'Test2';
|
||||
ok ! ref $hash_of_ref->{ test };
|
||||
|
||||
$obj = MyType->new({
|
||||
test => [
|
||||
@@ -151,6 +152,7 @@ is $obj->get_test()->[1], 'Test2', 'element content (list content [1])';
|
||||
|
||||
$hash_of_ref = $obj->as_hash_ref();
|
||||
is $hash_of_ref->{ test }->[0], 'Test';
|
||||
ok ! ref $hash_of_ref->{ test }->[0];
|
||||
is $hash_of_ref->{ test }->[1], 'Test2';
|
||||
|
||||
my $nested = MyType2->new({
|
||||
@@ -277,12 +279,12 @@ for my $count (1..5) {
|
||||
for my $index (0..$count-1) {
|
||||
is $obj->get_test->[$index], "TestString$index";
|
||||
}
|
||||
is $obj->serialize(), $serialized[$count -1];
|
||||
is $obj->serialize(), $serialized[$count -1], "serialized $serialized[$count -1]";
|
||||
|
||||
}
|
||||
|
||||
my $clone = Storable::thaw( Storable::freeze( $obj ));
|
||||
is $clone->get_test()->[0], 'TestString0';
|
||||
is $clone->get_test()->[0], 'TestString0', 'clone via freeze/thaw';
|
||||
|
||||
## failure tests
|
||||
|
||||
@@ -297,14 +299,14 @@ eval {
|
||||
],
|
||||
});
|
||||
};
|
||||
like $@, qr{cannot \s use \s CODE}xms;
|
||||
like $@, qr{cannot \s use \s CODE}xms, 'error passing a code reference as list value to new()';
|
||||
|
||||
eval {
|
||||
$obj = MyType->new({
|
||||
test => \&CORE::die,
|
||||
test => \&CORE::die,
|
||||
});
|
||||
};
|
||||
like $@, qr{cannot \s use \s CODE}xms;
|
||||
like $@, qr{cannot \s use \s CODE}xms, 'error passing a code reference to new()';
|
||||
|
||||
# TODO ignore XMLNS (for now)
|
||||
$obj = MyType->new({ xmlns => 'fubar'});
|
||||
@@ -323,13 +325,17 @@ like $@, qr{unknown \s field \s foobar \s in \s MyType }xms;
|
||||
|
||||
|
||||
eval { $obj->set_FOO(42) };
|
||||
like $@, qr{Can't \s locate \s object \s method}x;
|
||||
like $@, qr{Can't \s locate \s object \s method}x, 'error on calling unknown object method';
|
||||
|
||||
eval { MyType->set_FOO(42) };
|
||||
like $@, qr{Can't \s locate \s object \s method}x;
|
||||
like $@, qr{Can't \s locate \s object \s method}x, 'error on calling unknown class method';
|
||||
|
||||
ok ! MyType->can('set_FOO'), 'MyType->can("setFOO")';
|
||||
|
||||
ok ! UNIVERSAL::can('MyType', 'set_FOO'), 'UNIVERSAL::can("MyTypes", "set_FOO")';
|
||||
|
||||
eval { MyType->new({ FOO => 42 }) };
|
||||
like $@, qr{unknown \s field \s}xm;
|
||||
like $@, qr{unknown \s field \s}xm, 'error passing unknown field to constructor';
|
||||
|
||||
eval { SOAP::WSDL::XSD::Typelib::ComplexType::AUTOMETHOD() };
|
||||
like $@, qr{Cannot \s call}xm;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<xsd:element name="AuthMessage">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Username" xsd:type="xsd:string"/>
|
||||
<xsd:element name="Password" xsd:type="xsd:string"/>
|
||||
<xsd:element name="Username" type="xsd:string"/>
|
||||
<xsd:element name="Password" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
@@ -283,7 +283,7 @@
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<soap:operation soapAction="http://www.example.org/MessageGateway2/EnqueueMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" namespace="http://www.example.org/" parts="tns:parameters"/>
|
||||
<soap:body use="literal" namespace="http://www.example.org/" parts="parameters"/>
|
||||
<soap:header use="literal" namespace="http://www.example.org/"
|
||||
message="tns:EnqueueMessageRequest" part="auth"/>
|
||||
</wsdl:input>
|
||||
@@ -315,9 +315,10 @@
|
||||
<wsdl:documentation>HTTP(S) port for the message gateway</wsdl:documentation>
|
||||
<soap:address location="https://test.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
|
||||
<wsdl:port name="HTTP" binding="tns:MGWBinding">
|
||||
<http:address location="http://www.webservicex.net/globalweather.asmx" />
|
||||
<wsdl:port name="HTTPSPort2" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the message gateway</wsdl:documentation>
|
||||
<soap:address location="https://test.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
<definitions
|
||||
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/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="Test">
|
||||
|
||||
@@ -1,108 +1,113 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:simpleType"
|
||||
targetNamespace="urn:simpleType"
|
||||
xmlns:tns="urn:simpleType"
|
||||
xmlns:xsd="http://www.w3c.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="simpleType">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="int">
|
||||
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort2">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort3">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<!-- This WSDL is broken on purpose: It's used to test error handling -->
|
||||
<definitions
|
||||
targetNamespace="urn:simpleType"
|
||||
xmlns:tns="urn:simpleType"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:simpleType">
|
||||
<xsd:simpleType name="testSimpleType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int">
|
||||
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<!-- This one is broken on purpose: It's used to test error handling -->
|
||||
<part name="test" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="test" type="tns:testSimpleType"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort2">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort3">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<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 soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort2" name="testBinding2">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort3" name="testBinding3">
|
||||
</binding>
|
||||
<binding type="tns:testPort2" name="testBinding2">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort3" name="testBinding3">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
<port name="testPort2" binding="tns:testBinding2">
|
||||
<soap:address location="http://127.0.0.1/testPort2" />
|
||||
</port>
|
||||
<port name="testPort3" binding="tns:testBinding3">
|
||||
<soap:address location="http://127.0.0.1/testPort3" />
|
||||
</port>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
<port name="testPort2" binding="tns:testBinding2">
|
||||
<soap:address location="http://127.0.0.1/testPort2" />
|
||||
</port>
|
||||
<port name="testPort3" binding="tns:testBinding3">
|
||||
<soap:address location="http://127.0.0.1/testPort3" />
|
||||
</port>
|
||||
|
||||
</service>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test" targetNamespace="urn:Test" xmlns:tns="urn:Test"
|
||||
<definitions targetNamespace="urn:Test" xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:complexType name="testComplexTypeAll">
|
||||
@@ -42,8 +43,8 @@
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test" targetNamespace="urn:Test" xmlns:tns="urn:Test"
|
||||
<definitions targetNamespace="urn:Test" xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:element name="TestElement" type="xsd:string" />
|
||||
<xsd:element name="TestRef" ref="tns:TestElement" />
|
||||
<xsd:complexType name="testComplexTypeRef">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="TestRef" ref="tns:TestElement" />
|
||||
<xsd:element ref="tns:TestElement" />
|
||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1" />
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
@@ -1,103 +1,104 @@
|
||||
<?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/"
|
||||
<definitions
|
||||
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/"
|
||||
xmlns="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>
|
||||
<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="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="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort3">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<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 soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort2" name="testBinding2">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
</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>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort3" name="testBinding3">
|
||||
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
</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 soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
@@ -1,45 +1,48 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test"
|
||||
<definitions
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:element name="testElement1">
|
||||
<xsd:simpleType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int" minInclusive="1"
|
||||
maxInclusive="9"/>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minInclusive>1</xsd:minInclusive>
|
||||
<xsd:maxInclusive>9</xsd:maxInclusive>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testElement1"/>
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
|
||||
@@ -1,60 +1,60 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
<definitions
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:element name="testElement1" type="xsd:string" />
|
||||
<xsd:element name="testElement2" type="xsd:int" />
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:element name="testElement1" type="xsd:string" />
|
||||
<xsd:element name="testElement2" type="xsd:int" />
|
||||
<xsd:element name="testElementRef" ref="tns:testElement1" />
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
</message>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
</message>
|
||||
<message name="testRefRequest">
|
||||
<part name="testAll" element="tns:testElementRef"/>
|
||||
<part name="testAll" element="tns:testElementRef"/>
|
||||
</message>
|
||||
|
||||
<message name="testResponse">
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" element="tns:testElement1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
<operation name="testRef">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
|
||||
<input message="tns:testRefRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
</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>
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testRef">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="testRef"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
@@ -62,11 +62,11 @@
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
@@ -1,69 +1,61 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2-4)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="xsd:int">
|
||||
<xsd:minLength value="2"/>
|
||||
<xsd:maxLength value="4"/>
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
<definitions targetNamespace="urn:Test" xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2-4)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="xsd:int"></xsd: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:simpleType name="testSimpleType2">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="xsd:int"></xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1" />
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testSimpleType2" />
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>Test-Methode</documentation>
|
||||
<input message="tns:testRequest" />
|
||||
<output message="tns:testResponse" />
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="urn:Test"
|
||||
<definitions
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
@@ -17,16 +18,16 @@
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0"/>
|
||||
<xsd:maxExclusive value="10"/>
|
||||
</xsd:restriction>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
@@ -34,13 +35,14 @@
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tnstestResponse"/>
|
||||
<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:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
|
||||
@@ -1,103 +1,98 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union memberTypes="xsd:int xsd:string"/>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="testSimpleType2">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minInclusive value="1"/>
|
||||
<xsd:maxInclusive value="3"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="union"/>
|
||||
<xsd:enumeration value="test"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:union>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexType1"/>
|
||||
</message>
|
||||
<message name="testRequest2">
|
||||
<part name="testAll" type="tns:testSimpleType2"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexType2"/>
|
||||
</message>
|
||||
<definitions name="Test" targetNamespace="urn:Test" xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union memberTypes="xsd:int xsd:string" />
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="testSimpleType2">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:union>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minInclusive value="1" />
|
||||
<xsd:maxInclusive value="3" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="union" />
|
||||
<xsd:enumeration value="test" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:union>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testSimpleType1" />
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testSimpleType2" />
|
||||
</message>
|
||||
<message name="testRequest2">
|
||||
<part name="testAll" type="tns:testSimpleType2" />
|
||||
</message>
|
||||
<message name="testResponse2">
|
||||
<part name="testAll" type="tns:testSimpleType2" />
|
||||
</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 name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>Test-Methode</documentation>
|
||||
|
||||
</portType>
|
||||
<input message="tns:testRequest" />
|
||||
<output message="tns:testResponse" />
|
||||
</operation>
|
||||
<operation name="test2">
|
||||
<documentation>Test-Methode</documentation>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
<operation name="test2">
|
||||
<soap:operation soapAction="test2">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
<input message="tns:testRequest2" />
|
||||
<output message="tns:testResponse2" />
|
||||
</operation>
|
||||
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
|
||||
</operation>
|
||||
<operation name="test2">
|
||||
<soap:operation soapAction="test2" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
@@ -41,12 +41,14 @@
|
||||
</s:complexType>
|
||||
|
||||
<s:complexType name="testExtended">
|
||||
<s:complexContent>
|
||||
<s:extension base="s0:test2">
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1"
|
||||
name="extend" type="s:string" />
|
||||
</s:sequence>
|
||||
</s:extension>
|
||||
</s:complexContent>
|
||||
</s:complexType>
|
||||
</s:schema>
|
||||
</types>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
targetNamespace="urn:HelloWorld"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<import namespace="urn:HelloWorld" location="WSDLParser-imported.wsdl"/>
|
||||
<import namespace="urn:HelloWorld" location="WSDLParser-imported.wsdl"/>
|
||||
|
||||
<service name="Service1">
|
||||
<port name="Service1Soap" binding="s0:Service1Soap">
|
||||
|
||||
4
t/acceptance/wsdl/WSDLParser/import_cascade.xsd
Normal file
4
t/acceptance/wsdl/WSDLParser/import_cascade.xsd
Normal file
@@ -0,0 +1,4 @@
|
||||
<s:schema elementFormDefault="qualified" targetNamespace="urn:HelloWorld"
|
||||
xmlns:s="http://www.w3.org/2001/XMLSchema">
|
||||
<s:import namespace="urn:HelloWorld2" schemaLocation="imported.xsd"/>
|
||||
</s:schema>
|
||||
13
t/acceptance/wsdl/WSDLParser/import_no_location.wsdl
Normal file
13
t/acceptance/wsdl/WSDLParser/import_no_location.wsdl
Normal file
@@ -0,0 +1,13 @@
|
||||
<?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/">
|
||||
|
||||
<import namespace="urn:Test" />
|
||||
</definitions>
|
||||
|
||||
15
t/acceptance/wsdl/WSDLParser/import_xsd_cascade.wsdl
Normal file
15
t/acceptance/wsdl/WSDLParser/import_xsd_cascade.wsdl
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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:import namespace="urn:Test" schemaLocation="import_cascade.xsd"/>
|
||||
</types>
|
||||
</definitions>
|
||||
|
||||
4
t/acceptance/wsdl/WSDLParser/imported.xsd
Normal file
4
t/acceptance/wsdl/WSDLParser/imported.xsd
Normal file
@@ -0,0 +1,4 @@
|
||||
<s:schema elementFormDefault="qualified" targetNamespace="urn:HelloWorld"
|
||||
xmlns:s="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
</s:schema>
|
||||
15
t/acceptance/wsdl/WSDLParser/xsd_import_no_location.wsdl
Normal file
15
t/acceptance/wsdl/WSDLParser/xsd_import_no_location.wsdl
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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:import namespace="urn:Test" />
|
||||
</types>
|
||||
</definitions>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="email_account"
|
||||
<definitions name="email_account"
|
||||
targetNamespace="email_account"
|
||||
xmlns:tns="email_account"
|
||||
xmlns:wsd="http://www.w3c.org/2001/XMLSchema"
|
||||
xmlns:xsd="http://www.w3c.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="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
|
||||
Ein (evtl. unvollständiger) Account-Datensatz.
|
||||
Alle Felder des Datensatzes können, müssen aber nicht
|
||||
gefüllt sein.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
@@ -37,55 +38,55 @@
|
||||
<xsd:element name="account" type="tns:imapAccount"/>
|
||||
</xsd:any>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="getRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="getResponse">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="createRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="createResponse">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="modifyRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="modifyResponse">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="searchRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="searchResponse">
|
||||
<part name="accountList" type="tns:imapAccountList"/>
|
||||
<part name="accountList" type="tns:imapAccountList"/>
|
||||
</message>
|
||||
<message name="deleteRequest">
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
<part name="account" type="tns:imapAccount"/>
|
||||
</message>
|
||||
<message name="deleteResponse">
|
||||
<part name="accountList" type="tns:imapAccountList"/>
|
||||
<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)
|
||||
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)
|
||||
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"/>
|
||||
@@ -93,29 +94,29 @@
|
||||
</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)
|
||||
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>
|
||||
<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)
|
||||
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>
|
||||
<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)
|
||||
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"/>
|
||||
|
||||
@@ -8,17 +8,16 @@
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/">
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:schema targetNamespace="urn:Test" xmlns="urn:Test">
|
||||
<xsd:attribute name="TestAttribute" type="xsd:string"></xsd:attribute>
|
||||
|
||||
<xsd:simpleType name="testSimpleTypeList">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2)
|
||||
SimpleType: List with an integer
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="xsd:int">
|
||||
<xsd:length value="2"/>
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
@@ -35,7 +34,6 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
|
||||
<xsd:simpleType name="testRestriction">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
@@ -74,6 +72,18 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSimpleRestriction">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="test" type="xsd:string"></xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="testComplexTypeRestriction">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
@@ -88,39 +98,32 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSimpleRestriction">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>complexType with simpleContent test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:restriction base="xsd:long">
|
||||
<xsd:maxExclusive value="5"/>
|
||||
<xsd:minExclusive value="0"/>
|
||||
<xsd:maxInclusive value="1"/>
|
||||
<xsd:minInclusive value="4"/>
|
||||
<xsd:enumeration value="2"/>
|
||||
<xsd:enumeration value="4"/>
|
||||
<xsd:totalDigits value="1"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="testComplexTypeExtension">
|
||||
<xsd:complexType name="testComplexTypeExtension">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>complexType extension test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tns:testComplexTypeAll">
|
||||
<xsd:extension base="tns:testComplexTypeSequence">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" />
|
||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test3" type="xsd:string" minOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexNestedExtension">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>complexType extension test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tns:testComplexTypeExtension">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test4" type="xsd:string" minOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeChoice">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType choice test</xsd:documentation>
|
||||
@@ -174,12 +177,25 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testEmptyComplexExtension">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tns:testComplexTypeSequence" />
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testEmptySimpleExtension">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="testElementNestedExtension" type="tns:testComplexNestedExtension" />
|
||||
<xsd:element name="testElementString" type="xsd:string" />
|
||||
<xsd:element name="testElementInt" type="xsd:int" />
|
||||
<xsd:element name="testElementRefInt" ref="tns:testElementInt" />
|
||||
<xsd:element name="testElementSimpleTypeList" type="tns:testSimpleTypeList"/>
|
||||
<!-- unprefixed type - test wheter xmlns from schema is propagated -->
|
||||
<xsd:element name="testElementSimpleTypeList" type="testSimpleTypeList"/>
|
||||
<xsd:element name="testElementComplexTypeAll" type="tns:testComplexTypeAll"/>
|
||||
<xsd:element name="testElementComplexTypeSequence" type="tns:testComplexTypeSequence"/>
|
||||
<xsd:element name="testOutputElementComplexTypeSequence" type="tns:testComplexTypeSequence"/>
|
||||
<xsd:element name="testElementComplexTypeSequenceWithAttribute" type="tns:testComplexTypeSequenceWithAttribute"/>
|
||||
<xsd:element name="testElementAtomicSimpleTypeRestriction">
|
||||
<xsd:simpleType>
|
||||
@@ -187,8 +203,10 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int" minInclusive="1"
|
||||
maxInclusive="9"/>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minInclusive>1</xsd:minInclusive>
|
||||
<xsd:maxInclusive>9</xsd:maxInclusive>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
@@ -199,7 +217,7 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="test1" type="int"/>
|
||||
<xsd:element name="test1" type="xsd:int"/>
|
||||
<xsd:element name="test2" type="xsd:string"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
@@ -230,6 +248,11 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="elementRefComplexType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="testElementString"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="testElementEmptyComplex" nillable="true">
|
||||
<xsd:complexType>
|
||||
@@ -248,6 +271,12 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
<xsd:complexType name="completelyEmptyComplexType">
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="testRef" type="elementRefComplexType"/>
|
||||
<xsd:element name="testComplexTypeRestriction" type="testComplexTypeRestriction"/>
|
||||
<xsd:element name="testComplexTypeSimpleRestriction" type="testComplexTypeSimpleRestriction"/>
|
||||
<xsd:element name="in" type="xsd:string"></xsd:element>
|
||||
<xsd:element name="out" type="xsd:string"></xsd:element>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testChoice">
|
||||
@@ -257,7 +286,7 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
<part name="testAll" element="tns:testElementString"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" element="tns:testElementString"/>
|
||||
<part name="testAll" element="tns:testElementEmptyComplex"/>
|
||||
</message>
|
||||
<message name="testMultiPartWarning">
|
||||
<part name="testAll" element="tns:testElementString"/>
|
||||
@@ -272,9 +301,35 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
</message>
|
||||
|
||||
<message name="testEmptyComplex">
|
||||
<part name="test" element="tns:testElementEmptyComplex"/>
|
||||
<part name="testOutput"
|
||||
element="tns:testElementNestedExtension" />
|
||||
</message>
|
||||
|
||||
<message name="testAtomicSimple">
|
||||
<part name="test"
|
||||
element="tns:testElementAtomicSimpleTypeRestriction" />
|
||||
</message>
|
||||
|
||||
<message name="testRef">
|
||||
<part name="test" element="tns:testRef"/>
|
||||
</message>
|
||||
|
||||
<message name="testRestriction">
|
||||
<wsdl:part name="test" element="tns:testComplexTypeRestriction"></wsdl:part>
|
||||
</message>
|
||||
|
||||
<message name="testSimpleRestriction">
|
||||
<wsdl:part name="test" element="tns:testComplexTypeSimpleRestriction"></wsdl:part>
|
||||
</message>
|
||||
|
||||
<wsdl:message name="Request">
|
||||
<wsdl:part name="Request" element="tns:in"></wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="Response">
|
||||
<wsdl:part name="Response" element="tns:out"></wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
@@ -295,7 +350,7 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testChoice"/>
|
||||
<output message="tns:testChoice"/>
|
||||
<output message="tns:testRestriction"/>
|
||||
</operation>
|
||||
<operation name="testMultiPartWarning">
|
||||
<documentation>
|
||||
@@ -305,62 +360,79 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
<output message="tns:testMultiPartWarning"/>
|
||||
</operation>
|
||||
|
||||
<operation name="testEmptyComplex">
|
||||
<input message="tns:testEmptyComplex"/>
|
||||
<output message="tns:testEmptyComplex"/>
|
||||
</operation>
|
||||
<operation name="testEmptyComplex">
|
||||
<input message="tns:testEmptyComplex"/>
|
||||
<output message="tns:testAtomicSimple"/>
|
||||
</operation>
|
||||
|
||||
<operation name="testRef">
|
||||
<input message="tns:testRef"/>
|
||||
<output message="tns:testSimpleRestriction"/>
|
||||
</operation>
|
||||
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="testChoice">
|
||||
<soap:operation soapAction="testChoice" style="document"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="testChoice">
|
||||
<soap:operation soapAction="testChoice" style="document" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test" style="document"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testHeader">
|
||||
<soap:operation soapAction="testHeader"/>
|
||||
<input>
|
||||
<soap:body use="literal" parts="testBody"/>
|
||||
<soap:header use="literal" part="testHeader" message="tns:testHeaderRequest"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testMultiPartWarning">
|
||||
<soap:operation soapAction="testHeader"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testEmptyComplex">
|
||||
<soap:operation soapAction="testEmptyComplex"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test" style="document" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testHeader">
|
||||
<soap:operation soapAction="testHeader" />
|
||||
<input>
|
||||
<soap:body use="literal" parts="testBody" />
|
||||
<soap:header use="literal" part="testHeader"
|
||||
message="tns:testHeaderRequest" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testMultiPartWarning">
|
||||
<soap:operation soapAction="testHeader" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testRef">
|
||||
<soap:operation soapAction="testEmptyComplex" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
|
||||
<wsdl:operation name="testEmptyComplex">
|
||||
<soap:operation soapAction="urn:Test/testEmptyComplex" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</binding>
|
||||
<wsdl:binding name="HTTPBinding" type="tns:testPort">
|
||||
<http:binding verb="GET" />
|
||||
@@ -369,36 +441,35 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
<wsdl:input>
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:content type="text/xml" />
|
||||
</wsdl:output>
|
||||
<wsdl:output></wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="testHeader">
|
||||
<http:operation location="/testHeader" />
|
||||
<wsdl:input>
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:content type="text/xml" />
|
||||
</wsdl:output>
|
||||
<wsdl:output></wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="testChoice">
|
||||
<http:operation location="/testChoice" />
|
||||
<wsdl:input>
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:content type="text/xml" />
|
||||
</wsdl:output>
|
||||
<wsdl:output></wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="testMultiPartWarning">
|
||||
<http:operation location="/testMultiPartWarning" />
|
||||
<wsdl:input>
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:content type="text/xml" />
|
||||
</wsdl:output>
|
||||
<wsdl:output></wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="testRef">
|
||||
<http:operation location="/testEmptyComplex" />
|
||||
<wsdl:input>
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output></wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="testEmptyComplex">
|
||||
<http:operation location="/testEmptyComplex" />
|
||||
@@ -406,7 +477,6 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
<http:urlEncoded />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:content type="text/xml" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
|
||||
@@ -1,292 +1,299 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
<definitions name="Test" targetNamespace="urn:Test" xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="test-SimpleTypeList">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list itemType="xsd:int">
|
||||
<xsd:length value="2"/>
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testSimpleTypeListAtomic">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int"></xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
|
||||
<xsd:simpleType name="testRestriction">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: Integer between 1 and 9 (Exclusive constrains)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0"/>
|
||||
<xsd:maxExclusive value="10"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testRestrictionAtomicType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: Integer between 1 and 9 (Exclusive constrains)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0"/>
|
||||
<xsd:maxExclusive value="10"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeAll">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="Test-1" type="xsd:string" />
|
||||
<xsd:element name="Test-2" type="xsd:string" minOccurs="1" />
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeRestriction">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="tns:testComplexTypeAll">
|
||||
<xsd:element name="Test.1" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test.2" type="xsd:string" minOccurs="1" />
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeExtension">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>complexType extension test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tns:testComplexTypeAll">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" />
|
||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test3" type="xsd:string" minOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeChoice">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:choice>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test2" type="xsd:string" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSequence">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test2" type="xsd:string" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSequence2">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1"/>
|
||||
<xsd:element name="Test2" type="tns:testComplexTypeSequence" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:element name="testElementString" type="xsd:string" />
|
||||
<xsd:element name="testElementInt" type="xsd:int" />
|
||||
<xsd:element name="testElementRefInt" ref="tns:testElementInt" />
|
||||
<xsd:element name="testElementSimpleTypeList" type="tns:test-SimpleTypeList"/>
|
||||
<xsd:element name="testElementComplexTypeAll" type="tns:testComplexTypeAll"/>
|
||||
<xsd:element name="testElementComplexTypeSequence" type="tns:testComplexTypeSequence"/>
|
||||
|
||||
<xsd:element name="testElementAtomicSimpleTypeRestriction">
|
||||
<xsd:simpleType>
|
||||
<xsd:simpleType name="test-SimpleTypeList">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int" minInclusive="1"
|
||||
maxInclusive="9"/>
|
||||
<xsd:list itemType="xsd:int"></xsd:list>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="testElementAtomicComplexTypeAll">
|
||||
<xsd:complexType>
|
||||
<xsd:simpleType name="testSimpleTypeListAtomic">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation> SimpleType: Integer between 1 and 9
|
||||
(Inclusive constraints) </xsd:documentation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer (length 2)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:list>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int"></xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
|
||||
<xsd:simpleType name="testRestriction">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: Integer between 1 and 9 (Exclusive
|
||||
constrains)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0" />
|
||||
<xsd:maxExclusive value="10" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="testRestrictionAtomicType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: Integer between 1 and 9 (Exclusive
|
||||
constrains)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0" />
|
||||
<xsd:maxExclusive value="10" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeAll">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="test1" type="int"/>
|
||||
<xsd:element name="test2" type="xsd:string"/>
|
||||
<xsd:element name="Test-1" type="xsd:string" />
|
||||
<xsd:element name="Test-2" type="xsd:string" minOccurs="1" />
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="Header" type="tns:testComplexTypeSequence"/>
|
||||
<xsd:element name="testHeader" type="tns:testComplexTypeSequence"/>
|
||||
<xsd:element name="testChoice" type="tns:testComplexTypeChoice"/>
|
||||
<xsd:complexType name="testComplexTypeRestriction">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="tns:testComplexTypeAll">
|
||||
<xsd:all>
|
||||
<xsd:element name="Test.1" type="xsd:string"
|
||||
minOccurs="1" />
|
||||
<xsd:element name="Test.2" type="xsd:string"
|
||||
minOccurs="1" />
|
||||
</xsd:all>
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeExtension">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
complexType extension test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tns:testComplexTypeAll">
|
||||
<xsd:all>
|
||||
<xsd:element name="Test1" type="xsd:string" />
|
||||
<xsd:element name="Test2" type="xsd:string"
|
||||
minOccurs="1" />
|
||||
<xsd:element name="Test3" type="xsd:string"
|
||||
minOccurs="1" />
|
||||
</xsd:all>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeChoice">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:choice>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1" />
|
||||
<xsd:element name="Test2" type="xsd:string" maxOccurs="1" />
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSequence">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1" />
|
||||
<xsd:element name="Test2" type="xsd:string" maxOccurs="1" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSequence2">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>ComplexType Test</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Test1" type="xsd:string" minOccurs="1" />
|
||||
<xsd:element name="Test2"
|
||||
type="tns:testComplexTypeSequence" maxOccurs="1" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="testComplexTypeElementAtomicSimpleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="testString" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="testAtomicSimpleTypeElement" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:minInclusive value="0"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:element name="testElementString" type="xsd:string" />
|
||||
<xsd:element name="testElementInt" type="xsd:int" />
|
||||
<!-- element name="" ref="" is invalid, but appears sometimes -->
|
||||
<xsd:element name="testElementRefInt" ref="tns:testElementInt" />
|
||||
<xsd:element name="testElementSimpleTypeList"
|
||||
type="tns:test-SimpleTypeList" />
|
||||
<xsd:element name="testElementComplexTypeAll"
|
||||
type="tns:testComplexTypeAll" />
|
||||
<xsd:element name="testElementComplexTypeSequence"
|
||||
type="tns:testComplexTypeSequence" />
|
||||
|
||||
<xsd:element name="testElementAtomicSimpleTypeRestriction">
|
||||
<xsd:simpleType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: Integer between 1 and 9 (Inclusive
|
||||
constraints)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minInclusive>1</xsd:minInclusive>
|
||||
<xsd:maxInclusive>9</xsd:maxInclusive>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="testAtomicSimpleTypeElement2" minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:minInclusive value="0"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:element name="testElementAtomicComplexTypeAll">
|
||||
<xsd:complexType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: Integer between 1 and 9 (Inclusive
|
||||
constraints)
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="test1" type="xsd:int" />
|
||||
<xsd:element name="test2" type="xsd:string" />
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="Header" type="tns:testComplexTypeSequence" />
|
||||
<xsd:element name="testHeader" type="tns:testComplexTypeSequence" />
|
||||
<xsd:element name="testChoice" type="tns:testComplexTypeChoice" />
|
||||
|
||||
|
||||
<xsd:complexType name="testComplexTypeElementAtomicSimpleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="testString" type="xsd:string"
|
||||
minOccurs="0" />
|
||||
<xsd:element name="testAtomicSimpleTypeElement"
|
||||
minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:minInclusive value="0" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="testAtomicSimpleTypeElement2"
|
||||
minOccurs="0">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:decimal">
|
||||
<xsd:minInclusive value="0" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testChoice">
|
||||
<part name="parameters" element="tns:testChoice"/>
|
||||
<part name="parameters" element="tns:testChoice" />
|
||||
</message>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" element="tns:testElementString"/>
|
||||
<part name="testAll" element="tns:testElementString" />
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" element="tns:testElementString"/>
|
||||
<part name="testAll" element="tns:testElementString" />
|
||||
</message>
|
||||
<message name="testMultiPartWarning">
|
||||
<part name="testAll" element="tns:testElementString"/>
|
||||
<part name="parameters" element="tns:testChoice"/>
|
||||
<part name="testAll" element="tns:testElementString" />
|
||||
<part name="parameters" element="tns:testChoice" />
|
||||
</message>
|
||||
<message name="testHeaderRequest">
|
||||
<part name="testBody" element="tns:testHeader"/>
|
||||
<part name="testHeader" element="tns:Header"/>
|
||||
<part name="testBody" element="tns:testHeader" />
|
||||
<part name="testHeader" element="tns:Header" />
|
||||
</message>
|
||||
<message name="testHeaderResponse">
|
||||
<part name="testAll" element="tns:testElementString"/>
|
||||
<part name="testAll" element="tns:testElementString" />
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
<documentation>Test-Methode</documentation>
|
||||
<input message="tns:testRequest" />
|
||||
<output message="tns:testResponse" />
|
||||
</operation>
|
||||
<operation name="testHeader">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testHeaderRequest"/>
|
||||
<output message="tns:testHeaderResponse"/>
|
||||
<documentation>Test-Methode</documentation>
|
||||
<input message="tns:testHeaderRequest" />
|
||||
<output message="tns:testHeaderResponse" />
|
||||
</operation>
|
||||
<operation name="testChoice">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testChoice"/>
|
||||
<output message="tns:testChoice"/>
|
||||
<documentation>Test-Methode</documentation>
|
||||
<input message="tns:testChoice" />
|
||||
<output message="tns:testChoice" />
|
||||
</operation>
|
||||
<operation name="testMultiPartWarning">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testMultiPartWarning"/>
|
||||
<output message="tns:testMultiPartWarning"/>
|
||||
<documentation>Test-Methode</documentation>
|
||||
<input message="tns:testMultiPartWarning" />
|
||||
<output message="tns:testMultiPartWarning" />
|
||||
</operation>
|
||||
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="testChoice">
|
||||
<soap:operation soapAction="testChoice" style="document"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="testChoice">
|
||||
<soap:operation soapAction="testChoice" style="document" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test" style="document"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testHeader">
|
||||
<soap:operation soapAction="testHeader"/>
|
||||
<input>
|
||||
<soap:body use="literal" parts="testBody"/>
|
||||
<soap:header use="literal" part="testHeader" message="tns:testHeaderRequest"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testMultiPartWarning">
|
||||
<soap:operation soapAction="testHeader"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test" style="document" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testHeader">
|
||||
<soap:operation soapAction="testHeader" />
|
||||
<input>
|
||||
<soap:body use="literal" parts="testBody" />
|
||||
<soap:header use="literal" part="testHeader"
|
||||
message="tns:testHeaderRequest" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testMultiPartWarning">
|
||||
<soap:operation soapAction="testHeader" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
|
||||
</binding>
|
||||
<service name="My.SOAP.testService">
|
||||
|
||||
@@ -1,57 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
|
||||
<xsd:simpleType name="testAny">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
SimpleType: List with an integer and a string
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:any/>
|
||||
</xsd:simpleType>
|
||||
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testAny"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testAny"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
</xsd:schema>
|
||||
</types>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Method
|
||||
</documentation>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
|
||||
<soap:operation soapAction="test" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
|
||||
43
t/acceptance/wsdl/helloWorld_header.wsdl
Normal file
43
t/acceptance/wsdl/helloWorld_header.wsdl
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="urn:TestNamespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:TestNamespace" targetNamespace="urn:TestNamespace">
|
||||
<wsdl:types>
|
||||
<xsd:schema targetNamespace="urn:TestNamespace" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xsd:element name="helloWorldHeader" type="xsd:string"/>
|
||||
<xsd:element name="helloWorldRequest" type="xsd:string"/>
|
||||
<xsd:element name="helloWorldResponse" type="xsd:string"/>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="helloWorldHeader">
|
||||
<wsdl:part name="helloWorldHeader" element="tns:helloWorldHeader"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="helloWorldRequest">
|
||||
<wsdl:part name="helloWorldRequest" element="tns:helloWorldRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="helloWorldResponse">
|
||||
<wsdl:part name="helloWorldResponse" element="tns:helloWorldResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="TestInterface">
|
||||
<wsdl:operation name="helloWorld">
|
||||
<wsdl:input message="tns:helloWorldRequest"/>
|
||||
<wsdl:output message="tns:helloWorldResponse"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="TestBinding" type="tns:TestInterface">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<wsdl:operation name="helloWorld">
|
||||
<soap:operation soapAction=""/>
|
||||
<wsdl:input>
|
||||
<soap:header use="literal" message="tns:helloWorldHeader" part="helloWorldHeader"/>
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="TestService">
|
||||
<wsdl:port binding="tns:TestBinding" name="TestPort">
|
||||
<soap:address location="http://www.example.com/"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
@@ -19,8 +19,8 @@
|
||||
<xsd:element name="AuthMessage">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Username" xsd:type="xsd:string"/>
|
||||
<xsd:element name="Password" xsd:type="xsd:string"/>
|
||||
<xsd:element name="Username" type="xsd:string"/>
|
||||
<xsd:element name="Password" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
@@ -37,7 +37,7 @@
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
The recipient in URI notaitions. Valid URI schemas are: mailto:, sms:,
|
||||
The recipient in URI notations. Valid URI schemas are: mailto:, sms:,
|
||||
phone:. Not all URI schemas need to be implemented at the current
|
||||
implementation stage.
|
||||
</xsd:documentation>
|
||||
@@ -72,7 +72,7 @@
|
||||
<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,
|
||||
mailto:, http:, https:. Reports to mailto: URIs are sent as plain text,
|
||||
reports to http(s) URIs are sent as SOAP requests following the
|
||||
MessageGatewayClient service definition.
|
||||
</xsd:documentation>
|
||||
@@ -315,9 +315,5 @@
|
||||
<wsdl:documentation>HTTP(S) port for the message gateway</wsdl:documentation>
|
||||
<soap:address location="https://test.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
|
||||
<wsdl:port name="HTTP" binding="tns:MGWBinding">
|
||||
<http:address location="http://www.webservicex.net/globalweather.asmx" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<s:element minOccurs="0" maxOccurs="1" name="givenName">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element type="string" name="givenName"></s:element>
|
||||
<s:element type="string" name="middleInitial"></s:element>
|
||||
<s:element type="s:string" name="givenName"></s:element>
|
||||
<s:element type="s:string" name="middleInitial"></s:element>
|
||||
</s:sequence>
|
||||
<s:attribute name="testAttr" type="s:string" use="optional"></s:attribute>
|
||||
</s:complexType>
|
||||
|
||||
15
t/lib/Mod_Perl2Test.pm
Normal file
15
t/lib/Mod_Perl2Test.pm
Normal file
@@ -0,0 +1,15 @@
|
||||
package Mod_Perl2Test;
|
||||
use strict; use warnings;
|
||||
use Class::Std::Fast;
|
||||
|
||||
sub sayHello {
|
||||
my ($self, $body, $header) = @_;
|
||||
my $name = $body->get_name();
|
||||
my $givenName = $body->get_givenName();
|
||||
|
||||
die "FOO" if ($name eq '__DIE__');
|
||||
|
||||
return MyElements::sayHelloResponse->new({
|
||||
sayHelloResult => "Hello $givenName $name"
|
||||
})}
|
||||
1;
|
||||
Reference in New Issue
Block a user