import SOAP-WSDL 1.24 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 1.24 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-1.24.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
7ba2f93e44
commit
9e85f63aa0
@@ -1,53 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use lib 'lib';
|
||||
use lib 't/lib';
|
||||
use SOAP::WSDL::SAX::MessageHandler;
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Expat::MessageParser/);
|
||||
|
||||
use MyComplexType;
|
||||
use MyElement;
|
||||
use MySimpleType;
|
||||
|
||||
my $xml = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body><MyAtomicComplexTypeElement xmlns="urn:Test" >
|
||||
<test>Test</test>
|
||||
<test2 >Test2</test2>
|
||||
</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'FakeResolver'
|
||||
});
|
||||
|
||||
$parser->parse( $xml );
|
||||
|
||||
is $parser->get_data(), q{<MyAtomicComplexTypeElement xmlns="urn:Test" >}
|
||||
. q{<test >Test</test><test2 >Test2</test2></MyAtomicComplexTypeElement>}
|
||||
, 'Content comparison';
|
||||
|
||||
# data classes reside in t/lib/Typelib/
|
||||
BEGIN {
|
||||
package FakeResolver;
|
||||
{
|
||||
my %class_list = (
|
||||
'MyAtomicComplexTypeElement' => 'MyAtomicComplexTypeElement',
|
||||
'MyAtomicComplexTypeElement/test' => 'MyTestElement',
|
||||
'MyAtomicComplexTypeElement/test2' => 'MyTestElement2',
|
||||
);
|
||||
|
||||
sub new { return bless {}, 'FakeResolver' };
|
||||
|
||||
sub get_class {
|
||||
my $name = join('/', @{ $_[1] });
|
||||
return ($class_list{ $name }) ? $class_list{ $name }
|
||||
: warn "no class found for $name";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
@@ -1,335 +0,0 @@
|
||||
package TopElement;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||
use Memoize;
|
||||
|
||||
memoize('_get_handlers');
|
||||
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
{
|
||||
my %TestElement_of :ATTR();
|
||||
my $CLASS_OF_REF = { TestElement => 'TestElement' };
|
||||
|
||||
__PACKAGE__->_factory( [ 'TestElement' ],
|
||||
{ 'TestElement' => \%TestElement_of, },
|
||||
{ TestElement => 'TestElement' },
|
||||
);
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
__PACKAGE__->__set_name('TopElement');
|
||||
__PACKAGE__->__set_nillable(1);
|
||||
|
||||
sub _get_handlers {
|
||||
my $self = shift;
|
||||
my $parser = shift;
|
||||
|
||||
return {
|
||||
Start => $parser->start_tag({
|
||||
class_of => $CLASS_OF_REF,
|
||||
handler_of => {
|
||||
TestElement => TestElement->_get_handlers( $parser ),
|
||||
}
|
||||
}),
|
||||
End => $parser->end_top_tag( ),
|
||||
Char => undef,
|
||||
};
|
||||
}
|
||||
}
|
||||
1;
|
||||
|
||||
package TestElement;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||
|
||||
use Memoize;
|
||||
memoize('_get_handlers');
|
||||
|
||||
use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
{
|
||||
my %test_of :ATTR();
|
||||
my %test2_of :ATTR();
|
||||
|
||||
my $CLASS_OF_REF = {
|
||||
test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string'
|
||||
};
|
||||
|
||||
__PACKAGE__->_factory( [ 'test', 'test2' ],
|
||||
{ test => \%test_of, test2 => \%test2_of, },
|
||||
$CLASS_OF_REF,
|
||||
);
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
__PACKAGE__->__set_name('TestElement');
|
||||
__PACKAGE__->__set_nillable(1);
|
||||
|
||||
sub _get_handlers {
|
||||
my $self = shift;
|
||||
my $parser = shift;
|
||||
|
||||
return {
|
||||
Start => $parser->start_tag({
|
||||
class_of => $CLASS_OF_REF,
|
||||
handler_of =>
|
||||
{
|
||||
map { ( $_ => $CLASS_OF_REF->{$_}->_get_handlers( $parser ) )}
|
||||
keys %{ $CLASS_OF_REF }
|
||||
},
|
||||
}),
|
||||
End => $parser->end_tag(),
|
||||
Char => undef,
|
||||
};
|
||||
}
|
||||
}
|
||||
1;
|
||||
|
||||
package TestResolver;
|
||||
|
||||
sub get_class {
|
||||
my $path = join('/', @{ $_[1] });
|
||||
my $class = {
|
||||
'TestElement' => 'TestElement',
|
||||
'TestElement/test' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'TestElement/test2' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'TopElement' => 'TopElement',
|
||||
'TopElement/TestElement' => 'TestElement',
|
||||
'TopElement/TestElement/test' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'TopElement/TestElement/test2' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
};
|
||||
return $class->{ $path };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
package main;
|
||||
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../../lib';
|
||||
|
||||
use_ok('SOAP::WSDL::Expat::MessageParser');
|
||||
use_ok('SOAP::WSDL::Expat::MessageSubParser');
|
||||
my $obj;
|
||||
|
||||
ok($obj = SOAP::WSDL::Expat::MessageSubParser->new(), "Object creation");
|
||||
|
||||
#my $test = $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# },
|
||||
# handler_of => {
|
||||
# test => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# test2 => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# }
|
||||
#});
|
||||
#
|
||||
#my $handlers = {
|
||||
# Start => $test,
|
||||
# End => $obj->end_tag(),
|
||||
#};
|
||||
#
|
||||
#my $parser = $obj->initialize( $handlers );
|
||||
#
|
||||
#$parser->parsestring('<test>Test</test>');
|
||||
#is $obj->get_data(), 'Test', 'Parse simple XML';
|
||||
#
|
||||
#my $element = $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# TestElement => 'TestElement',
|
||||
# },
|
||||
# handler_of => {
|
||||
# TestElement => {
|
||||
# Start => $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# },
|
||||
# handler_of => {
|
||||
# test => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# test2 => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# }
|
||||
# }),
|
||||
# End => $obj->end_tag(),
|
||||
# Char => undef,
|
||||
# }
|
||||
# }
|
||||
#});
|
||||
#
|
||||
#
|
||||
#$handlers = {
|
||||
# Start => $element,
|
||||
# End => $obj->end_tag(),
|
||||
# Char => undef,
|
||||
#};
|
||||
#
|
||||
#$parser = $obj->initialize( TestElement->_get_parser( $obj ) );
|
||||
#
|
||||
#my $xml = '<TestElement xmlns="urn:Test">
|
||||
# <test>Test</test>
|
||||
# <test2>Test2</test2>
|
||||
#</TestElement>';
|
||||
#
|
||||
#$parser->parsestring($xml);
|
||||
#
|
||||
#is $obj->get_data()
|
||||
# , '<TestElement xmlns="urn:Test" ><test >Test</test ><test2 >Test2</test2 ></TestElement>'
|
||||
# , 'Parse && serialize ComplexType Element';
|
||||
#
|
||||
|
||||
#my $mp = SOAP::WSDL::Expat::MessageParser->new({
|
||||
# class_resolver => 'TestResolver',
|
||||
#});
|
||||
#
|
||||
#$mp->parse( $xml );
|
||||
|
||||
#use Benchmark;
|
||||
#
|
||||
#timethese 1000 , {
|
||||
# mp => sub { $mp->parse($xml) },
|
||||
# 'sub_p' => sub { $obj->initialize( $handlers )->parse( $xml ) },
|
||||
#
|
||||
#};
|
||||
|
||||
#my $top = $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# TopElement => 'TopElement',
|
||||
# },
|
||||
# handler_of => {
|
||||
# TopElement => {
|
||||
# Start => $obj->start_tag({
|
||||
# order => [ 'TestElement', ],
|
||||
# class_of => {
|
||||
# TestElement => 'TestElement',
|
||||
# },
|
||||
# handler_of => {
|
||||
# TestElement => {
|
||||
# Start => $obj->start_tag({
|
||||
# order => ['test', 'test2'],
|
||||
# class_of => {
|
||||
# test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# },
|
||||
# handler_of => {
|
||||
# test => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# test2 => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# },
|
||||
# occurs_of => {
|
||||
# test => { max => 1 },
|
||||
# }
|
||||
# }),
|
||||
# End => $obj->end_tag(),
|
||||
# Char => undef,
|
||||
# }
|
||||
# }
|
||||
# })
|
||||
# }
|
||||
# }
|
||||
#});
|
||||
|
||||
my $top = $obj->start_tag({
|
||||
class_of => {
|
||||
TopElement => 'TopElement',
|
||||
},
|
||||
handler_of => {
|
||||
TopElement => TopElement->_get_handlers( $obj ),
|
||||
}
|
||||
});
|
||||
|
||||
my $parser = $obj->initialize( { Start => $top , End => $obj->end_tag() , Char => undef } );
|
||||
|
||||
my $xml = '
|
||||
<TopElement xmlns="urn:Test">
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
</TopElement>';
|
||||
|
||||
$parser->parsestring($xml);
|
||||
|
||||
# print $obj->get_data();
|
||||
|
||||
__END__
|
||||
|
||||
# TODO factor out into benchmark suite
|
||||
|
||||
use XML::Simple;
|
||||
use Benchmark;
|
||||
|
||||
my $mp = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'TestResolver',
|
||||
});
|
||||
$mp->parse( $xml );
|
||||
|
||||
$top = $obj->start_tag({
|
||||
class_of => {
|
||||
TopElement => 'TopElement',
|
||||
},
|
||||
handler_of => {
|
||||
TopElement => TopElement->_get_handlers( $obj ),
|
||||
}
|
||||
});
|
||||
my $top_end = $obj->end_top_tag();
|
||||
$parser = $obj->initialize( { Start => $top , End => $top_end, , Char => undef } );
|
||||
$parser->parse( $xml ),
|
||||
|
||||
print "DATA:" . $obj->get_data(), "\n";
|
||||
|
||||
|
||||
# $XML::Simple::PREFERRED_PARSER = 'XML::SAX::Expat';
|
||||
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
|
||||
|
||||
timethese 500 , {
|
||||
'typemap' => sub { $mp->parse($xml) },
|
||||
'sub_tree' => sub {
|
||||
my $parser = $obj->initialize( { Start => $top , End => $top_end, , Char => undef } );
|
||||
$parser->parse( $xml ),
|
||||
},
|
||||
'XML::Simple' => sub { XMLin( $xml ); }
|
||||
};
|
||||
@@ -1,411 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Test::More tests => 7;
|
||||
use Data::Dumper;
|
||||
use lib '../lib';
|
||||
|
||||
eval {
|
||||
require Test::XML;
|
||||
import Test::XML;
|
||||
};
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||
|
||||
my $parser;
|
||||
ok $parser = SOAP::WSDL::Expat::WSDLParser->new(), "Object creation";
|
||||
|
||||
$parser->parse( xml() );
|
||||
|
||||
eval { $parser->parse( xml() ) };
|
||||
if ($@)
|
||||
{
|
||||
fail("parsing WSDL");
|
||||
die "Can't test without parsed WSDL: " , Dumper $@;
|
||||
}
|
||||
else
|
||||
{
|
||||
pass("parsing XML");
|
||||
}
|
||||
|
||||
my $wsdl;
|
||||
ok $wsdl = $parser->get_data() , "get object tree";
|
||||
|
||||
my $schema = $wsdl->first_types()->get_schema()->[1] || die "No schema !";
|
||||
|
||||
my $element = $schema->find_element(
|
||||
'http://www.example.org/MessageGateway2/'
|
||||
, 'EnqueueMessage'
|
||||
);
|
||||
|
||||
ok $element, 'find element';
|
||||
is $element->get_xmlns()->{ 'http://www.example.org/MessageGateway2/' }, 'tns', 'Namespace definition';
|
||||
|
||||
|
||||
my $opt = {
|
||||
typelib => $wsdl->first_types,
|
||||
readable => 1,
|
||||
autotype => 0,
|
||||
namespace => { 'http://www.example.org/MessageGateway2/' => 'tns',
|
||||
'http://www.w3.org/2001/XMLSchema' => 'xsd',
|
||||
'http://schemas.xmlsoap.org/wsdl/' => 'wsdl',
|
||||
},
|
||||
indent => "",
|
||||
};
|
||||
|
||||
my $data = { EnqueueMessage => {
|
||||
MMessage => {
|
||||
MRecipientURI => 'anyURI',
|
||||
MSenderAddress => 'a string',
|
||||
MMessageContent => 'a string',
|
||||
MSubject => 'a string',
|
||||
MDeliveryReportRecipientURI => 'anyURI',
|
||||
MKeepalive => {
|
||||
MKeepaliveTimeout => 1234567,
|
||||
MKeepaliveErrorPolicy => ' ( suppress | report ) ',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
SKIP: { skip_without_test_xml();
|
||||
is_xml( $wsdl->find_message(
|
||||
"http://www.example.org/MessageGateway2/" ,'EnqueueMessageRequest'
|
||||
)->first_part()->serialize( 'test', $data, $opt ),
|
||||
xml_message()
|
||||
, "Serialized message part"
|
||||
);
|
||||
}
|
||||
|
||||
sub skip_without_test_xml {
|
||||
skip("Test::XML not available", 1) if (not $Test::XML::VERSION);
|
||||
}
|
||||
|
||||
sub xml_message {
|
||||
return
|
||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||
<MMessage>
|
||||
<MRecipientURI>anyURI</MRecipientURI>
|
||||
<MSenderAddress>a string</MSenderAddress>
|
||||
<MMessageContent>a string</MMessageContent>
|
||||
<MSubject>a string</MSubject>
|
||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||
<MKeepalive>
|
||||
<MKeepaliveTimeout>1234567</MKeepaliveTimeout>
|
||||
<MKeepaliveErrorPolicy> ( suppress | report ) </MKeepaliveErrorPolicy>
|
||||
</MKeepalive>
|
||||
</MMessage>
|
||||
</EnqueueMessage>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
sub xml {
|
||||
return q{<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions name="MessageGateway"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<wsdl:types>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/">
|
||||
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A type containing all elements of a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MRecipientURI" type="xsd:anyURI" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
The recipient in URI notaitions. Valid URI schemas are: mailto:, sms:,
|
||||
phone:. Not all URI schemas need to be implemented at the current
|
||||
implementation stage.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSenderAddress" type="xsd:string" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
E-Mail sender address. Ignored for all but mailto: recipient URIs.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MMessageContent" type="xsd:string" minOccurs="1"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Message Content.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MSubject" type="xsd:string" minOccurs="0" maxOccurs="1">
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Message Subject. Ignored for all but mailto: URIs
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MDeliveryReportRecipientURI" type="xsd:anyURI" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
||||
URI to send a delivery report to. May be of one of the following schemes:
|
||||
mailto:, http:, https:. Reports to mailto: URIs are sent as plaintext,
|
||||
reports to http(s) URIs are sent as SOAP requests following the
|
||||
MessageGatewayClient service definition.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepalive" type="tns:TKeepalive" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Container for keepalive information. May be missing.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepalive">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing keeplive information.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
|
||||
<xsd:element name="MKeepaliveTimeout" type="xsd:double">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Keepalive timeout. The keepalive timeout spezifies how long the sending of
|
||||
a message will be delayed waiting for keepalive updates. If a keepalive
|
||||
update is received during this period, the timeout will be reset. If not,
|
||||
the message will be sent after the timeout has expired.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="MKeepaliveErrorPolicy" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
||||
<xsd:documentation>
|
||||
Policy to comply to in case of system errors. Valid values are "suppress"
|
||||
and "report". If the policy is set to "suppress", keepalive messages will
|
||||
not be sent to their recipients in case of partial system failure, even if
|
||||
the keepalive has expired. This may result in "false negatives", i.e.
|
||||
messages may not be sent, even though their keepalive has expired. If the
|
||||
value is "report", keepalive messages will be sent from any cluster node.
|
||||
This may result in "false positive" alerts.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="suppress"></xsd:enumeration>
|
||||
<xsd:enumeration value="report"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Type containing a message ID.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Type containing all elements of a keppalive update / remove request.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessageID" type="xsd:string" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The ID for the message to update / remove
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="MAction" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The action to perform. Valid values are: "remove", "update". On "remove",
|
||||
the message with the ID specified will be removed from the queue, thus it
|
||||
will never be sent, even if it's timeout expires. On "update" the
|
||||
keepalive timeout of the corresponding message will be reset.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="remove"></xsd:enumeration>
|
||||
<xsd:enumeration value="update"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="KeepaliveMessage" type="tns:TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Keepalive message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="KeepaliveMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Response element for a keepalive request</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="EnqueueMessageResponse" type="tns:TMessageID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message response element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:complexType name="TEnqueueMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MMessage" type="tns:TMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a message to enqueue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="TKeepaliveMessageRequest">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A complex type containing one element: The keepalive message to process.
|
||||
</xsd:documentation>
|
||||
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="MKeepaliveMessage" type="tns:TKeepliveMessage">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Element containing a keepalive message to process.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="EnqueueMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessage">
|
||||
<wsdl:documentation>inputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
|
||||
</wsdl:message>
|
||||
<wsdl:message name="EnqueueMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:EnqueueMessageResponse">
|
||||
<wsdl:documentation>outputparameters for EnqueueMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageRequest">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessage">
|
||||
|
||||
<wsdl:documentation>input parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="KeepaliveMessageResponse">
|
||||
<wsdl:part name="parameters" element="tns:KeepaliveMessageResponse">
|
||||
<wsdl:documentation>output parameters for KeepaliveMessag</wsdl:documentation>
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="MGWPortType">
|
||||
<wsdl:documentation>
|
||||
generic port type for all methods required for sending messages over the mosaic
|
||||
message gatewa
|
||||
</wsdl:documentation>
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to enqueue a normal (immediate send) or a delayed message with
|
||||
keepalive functionality.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:EnqueueMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:EnqueueMessageResponse"></wsdl:output>
|
||||
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<wsdl:documentation>
|
||||
This method is used to update or remove a
|
||||
keepalive message.
|
||||
</wsdl:documentation>
|
||||
<wsdl:input message="tns:KeepaliveMessageRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:KeepaliveMessageResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="MGWBinding" type="tns:MGWPortType">
|
||||
<wsdl:documentation>Generic binding for all (SOAP) port</wsdl:documentation>
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="EnqueueMessage">
|
||||
<soap:operation soapAction="http://www.example.org/MessageGateway2/EnqueueMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="KeepaliveMessage">
|
||||
<soap:operation
|
||||
soapAction="http://www.example.org/MessageGateway2/KeepaliveMessage" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="MessageGateway">
|
||||
<wsdl:documentation>
|
||||
Web Service for sending messages over the mosaic message gatewa
|
||||
</wsdl:documentation>
|
||||
|
||||
<wsdl:port name="HTTPPort" binding="tns:MGWBinding">
|
||||
<wsdl:documentation>HTTP(S) port for the mosaic message gatewa</wsdl:documentation>
|
||||
<soap:address location="https://www.example.org/MessageGateway/" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>};
|
||||
}
|
||||
Reference in New Issue
Block a user