Compare commits

..
1 Commits
Author SHA1 Message Date
Martin Kutter 7ca2154ad6 import SOAP-WSDL 2.00_28 from CPAN
git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_28
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_28.tar.gz
2009-12-12 19:48:15 -08:00
37 changed files with 446 additions and 286 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ $build = Module::Build->new(
create_makefile_pl => 'passthrough', create_makefile_pl => 'passthrough',
dist_abstract => 'SOAP with WSDL support', dist_abstract => 'SOAP with WSDL support',
dist_name => 'SOAP-WSDL', dist_name => 'SOAP-WSDL',
dist_version => '2.00_27', dist_version => '2.00_28',
module_name => 'SOAP::WSDL', module_name => 'SOAP::WSDL',
license => 'artistic', license => 'artistic',
requires => { requires => {
+15 -1
View File
@@ -1,4 +1,4 @@
Release notes for SOAP::WSDL 2.00_27 Release notes for SOAP::WSDL 2.00_28
------- -------
I'm proud to present a new pre-release version of SOAP::WSDL. I'm proud to present a new pre-release version of SOAP::WSDL.
@@ -34,6 +34,20 @@ Features:
The following changes have been made: The following changes have been made:
2.00_28
The following bugs have been fixed (the numbers in square brackets are the
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
The numbers with # are CPAN RT IDs (http://rt.cpan.org/).
* #32062: minor doc fixes
* [ 1852988 ] Generated Interface POD is invalid
* [ 1855583 ] t/SOAP/WSDL/XSD/Typelib/ComplexType.t requires Test::Warn
The following uncategorized improvements have been made:
* Updated SOAP::WSDL::Manual::WS_I to reflect new Server modules
2.00_27 2.00_27
The following features were added (the numbers in square brackets are the The following features were added (the numbers in square brackets are the
+11 -11
View File
@@ -1,6 +1,6 @@
--- ---
name: SOAP-WSDL name: SOAP-WSDL
version: 2.00_27 version: 2.00_28
author: author:
- 'Martin Kutter <martin.kutter@fen-net.de>' - 'Martin Kutter <martin.kutter@fen-net.de>'
abstract: SOAP with WSDL support abstract: SOAP with WSDL support
@@ -44,7 +44,7 @@ provides:
version: 2.00_25 version: 2.00_25
SOAP::WSDL::Definitions: SOAP::WSDL::Definitions:
file: lib/SOAP/WSDL/Definitions.pm file: lib/SOAP/WSDL/Definitions.pm
version: 2.00_25 version: 2.00_27
SOAP::WSDL::Deserializer::Hash: SOAP::WSDL::Deserializer::Hash:
file: lib/SOAP/WSDL/Deserializer/Hash.pm file: lib/SOAP/WSDL/Deserializer/Hash.pm
version: 2.00_25 version: 2.00_25
@@ -56,13 +56,13 @@ provides:
version: 2.00_25 version: 2.00_25
SOAP::WSDL::Expat::Base: SOAP::WSDL::Expat::Base:
file: lib/SOAP/WSDL/Expat/Base.pm file: lib/SOAP/WSDL/Expat/Base.pm
version: 2.00_24 version: 2.00_27
SOAP::WSDL::Expat::Message2Hash: SOAP::WSDL::Expat::Message2Hash:
file: lib/SOAP/WSDL/Expat/Message2Hash.pm file: lib/SOAP/WSDL/Expat/Message2Hash.pm
version: 2.00_24 version: 2.00_27
SOAP::WSDL::Expat::MessageParser: SOAP::WSDL::Expat::MessageParser:
file: lib/SOAP/WSDL/Expat/MessageParser.pm file: lib/SOAP/WSDL/Expat/MessageParser.pm
version: 2.00_25 version: 2.00_27
SOAP::WSDL::Expat::MessageStreamParser: SOAP::WSDL::Expat::MessageStreamParser:
file: lib/SOAP/WSDL/Expat/MessageStreamParser.pm file: lib/SOAP/WSDL/Expat/MessageStreamParser.pm
version: 2.00_24 version: 2.00_24
@@ -83,7 +83,7 @@ provides:
version: 2.00_25 version: 2.00_25
SOAP::WSDL::Generator::Template::XSD: SOAP::WSDL::Generator::Template::XSD:
file: lib/SOAP/WSDL/Generator/Template/XSD.pm file: lib/SOAP/WSDL/Generator/Template/XSD.pm
version: 2.00_25 version: 2.00_27
SOAP::WSDL::Generator::Visitor: SOAP::WSDL::Generator::Visitor:
file: lib/SOAP/WSDL/Generator/Visitor.pm file: lib/SOAP/WSDL/Generator/Visitor.pm
version: 2.00_25 version: 2.00_25
@@ -120,13 +120,13 @@ provides:
version: 2.00_25 version: 2.00_25
SOAP::WSDL::Serializer::XSD: SOAP::WSDL::Serializer::XSD:
file: lib/SOAP/WSDL/Serializer/XSD.pm file: lib/SOAP/WSDL/Serializer/XSD.pm
version: 2.00_25 version: 2.00_27
SOAP::WSDL::Server: SOAP::WSDL::Server:
file: lib/SOAP/WSDL/Server.pm file: lib/SOAP/WSDL/Server.pm
version: 2.00_25 version: 2.00_27
SOAP::WSDL::Server::CGI: SOAP::WSDL::Server::CGI:
file: lib/SOAP/WSDL/Server/CGI.pm file: lib/SOAP/WSDL/Server/CGI.pm
version: 2.00_26 version: 2.00_27
SOAP::WSDL::Service: SOAP::WSDL::Service:
file: lib/SOAP/WSDL/Service.pm file: lib/SOAP/WSDL/Service.pm
SOAP::WSDL::Transport::HTTP: SOAP::WSDL::Transport::HTTP:
@@ -256,10 +256,10 @@ provides:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
SOAP::WSDL::XSD::Typelib::ComplexType: SOAP::WSDL::XSD::Typelib::ComplexType:
file: lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm file: lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
version: 2.00_25 version: 2.00_27
SOAP::WSDL::XSD::Typelib::Element: SOAP::WSDL::XSD::Typelib::Element:
file: lib/SOAP/WSDL/XSD/Typelib/Element.pm file: lib/SOAP/WSDL/XSD/Typelib/Element.pm
version: 2.00_25 version: 2.00_27
SOAP::WSDL::XSD::Typelib::SimpleType: SOAP::WSDL::XSD::Typelib::SimpleType:
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
SOAP::WSDL::XSD::Typelib::SimpleType::restriction: SOAP::WSDL::XSD::Typelib::SimpleType::restriction:
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w #!/usr/bin/perl -w
use strict; use strict;
use warnings; use warnings;
use lib 'lib'; # just needed because interface lies here use lib 'lib'; # just needed because interface lies here
# I have to generate the interface using wsdl2perl.pl before # I have to generate the interface using wsdl2perl.pl before
use MyInterfaces::HelloWorld::HelloWorldSoap; use MyInterfaces::HelloWorld::HelloWorldSoap;
+4 -3
View File
@@ -13,15 +13,16 @@ $soap->on_action( sub { "urn:HelloWorld#sayHello" });
$soap->autotype(0); $soap->autotype(0);
# I have to lookup the top level element's namespace from the WSDL # I have to lookup the top level element's namespace from the WSDL
$soap->default_ns('urn:HelloWorld');
# I have to encode all parameters as SOAP::Data objects # I have to encode all parameters as SOAP::Data objects
# I have to know the order of parameters # I have to know the order of parameters
my $som = $soap->call( my $som = $soap->call(
SOAP::Data->name("sayHello") "sayHello",
->attr({ xmlns => 'urn:HelloWorld' }),
SOAP::Data->name('name')->value( $ARGV[1] || '"Your name"'), SOAP::Data->name('name')->value( $ARGV[1] || '"Your name"'),
SOAP::Data->name('givenName')->value( $ARGV[0] || '"Your given name"'), SOAP::Data->name('givenName')->value( $ARGV[0] || '"Your given name"'),
); );
die $som->fault->{ faultstring } if ($som->fault); die $som->fault->{ faultstring } if ($som->fault);
print $som->result, "\n"; print $som->result, "\n";
+6 -4
View File
@@ -1,10 +1,12 @@
use strict;
use warnings;
use lib 'lib'; use lib 'lib';
use MyInterfaces::TestService::TestPort; use MyInterfaces::TestService::TestPort;
my $soap = MyInterfaces::TestService::TestPort->new(); my $soap = MyInterfaces::TestService::TestPort->new();
$soap->outputxml(1);
my $result = $soap->ListPerson({});
# print "Found " . scalar @{ $result->get_out->get_NewElement } . " persons\n"; my $result = $soap->ListPerson({})
or die "error calling SOAP method";
print "Found " . @{ $result->get_out()->get_NewElement } . " persons\n";
print $result;
+104 -90
View File
@@ -1,107 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions name="benchmark" targetNamespace="http://www.example.org/benchmark/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.example.org/benchmark/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <?xml version="1.0" encoding="UTF-8"?>
<wsdl:types><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/benchmark/"> <wsdl:definitions name="benchmark"
<xsd:element name="ListPerson"> targetNamespace="http://www.example.org/benchmark/"
<xsd:complexType> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
<xsd:sequence> xmlns:tns="http://www.example.org/benchmark/"
<xsd:element name="in" type="tns:Person" maxOccurs="1" minOccurs="0"></xsd:element> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
</xsd:sequence> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
</xsd:complexType> <wsdl:types>
</xsd:element> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
<xsd:element name="ListPersonResponse"> targetNamespace="http://www.example.org/benchmark/">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="tns:ArrayOfPerson"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="Person">
<xsd:sequence> <xsd:element name="ListPerson">
<xsd:element name="PersonID" type="tns:PersonID"></xsd:element> <xsd:complexType>
<xsd:element name="Salutation" type="xsd:string"></xsd:element> <xsd:sequence>
<xsd:element name="Name" type="xsd:string"></xsd:element> <xsd:element name="in" type="tns:Person"
<xsd:element name="GivenName" type="xsd:string"></xsd:element> maxOccurs="1" minOccurs="0" />
<xsd:element name="DateOfBirth" type="xsd:date"></xsd:element> </xsd:sequence>
<xsd:element name="HomeAddress" type="tns:Address" </xsd:complexType>
maxOccurs="1" minOccurs="1"> </xsd:element>
</xsd:element>
<xsd:element name="WorkAddress" type="tns:Address"
maxOccurs="1" minOccurs="0">
</xsd:element>
<xsd:element name="Contracts" type="tns:ArrayOfContract"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="PhoneNumber"> <xsd:element name="ListPersonResponse">
<xsd:restriction base="xsd:string"> <xsd:complexType>
</xsd:restriction> <xsd:sequence>
</xsd:simpleType> <xsd:element name="out" type="tns:ArrayOfPerson" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="Person">
<xsd:complexType name="ArrayOfPerson"> <xsd:sequence>
<xsd:sequence minOccurs="0" maxOccurs="unbounded"> <xsd:element name="PersonID" type="tns:PersonID" />
<xsd:element name="NewElement" type="tns:Person" maxOccurs="unbounded" minOccurs="0"></xsd:element> <xsd:element name="Salutation" type="xsd:string" />
</xsd:sequence> <xsd:element name="Name" type="xsd:string" />
</xsd:complexType> <xsd:element name="GivenName" type="xsd:string" />
<xsd:element name="DateOfBirth" type="xsd:date" />
<xsd:element name="HomeAddress" type="tns:Address"
maxOccurs="1" minOccurs="1" />
<xsd:element name="WorkAddress" type="tns:Address"
maxOccurs="1" minOccurs="0" />
<xsd:element name="Contracts"
type="tns:ArrayOfContract" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PersonID"> <xsd:simpleType name="PhoneNumber">
<xsd:sequence> <xsd:restriction base="xsd:string"></xsd:restriction>
<xsd:element name="ID" type="xsd:int"></xsd:element> </xsd:simpleType>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Address"> <xsd:complexType name="ArrayOfPerson">
<xsd:sequence> <xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Street" type="xsd:string"></xsd:element> <xsd:element name="NewElement" type="tns:Person"
<xsd:element name="ZIP" type="xsd:string"></xsd:element> maxOccurs="unbounded" minOccurs="0" />
<xsd:element name="City" type="xsd:string"></xsd:element> </xsd:sequence>
<xsd:element name="Country" type="xsd:string"></xsd:element> </xsd:complexType>
<xsd:element name="PhoneNumber" type="tns:PhoneNumber"></xsd:element>
<xsd:element name="MobilePhoneNumber" type="tns:PhoneNumber"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfContract"> <xsd:complexType name="PersonID">
<xsd:sequence> <xsd:sequence>
<xsd:element name="Contract" type="tns:Contract" maxOccurs="unbounded" minOccurs="0"></xsd:element> <xsd:element name="ID" type="xsd:int"></xsd:element>
</xsd:sequence> </xsd:sequence>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="Contract"> <xsd:complexType name="Address">
<xsd:sequence>
<xsd:element name="Street" type="xsd:string" />
<xsd:element name="ZIP" type="xsd:string" />
<xsd:element name="City" type="xsd:string" />
<xsd:element name="Country" type="xsd:string" />
<xsd:element name="PhoneNumber" type="tns:PhoneNumber" />
<xsd:element name="MobilePhoneNumber" type="tns:PhoneNumber" />
</xsd:sequence>
</xsd:complexType>
<xsd:sequence> <xsd:complexType name="ArrayOfContract">
<xsd:element name="ContractID" type="xsd:long"></xsd:element> <xsd:sequence>
<xsd:element name="ContractName" type="xsd:string"></xsd:element> <xsd:element name="Contract" type="tns:Contract"
</xsd:sequence> maxOccurs="unbounded" minOccurs="0">
</xsd:complexType> </xsd:element>
</xsd:schema></wsdl:types> </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Contract">
<xsd:sequence>
<xsd:element name="ContractID" type="xsd:long" />
<xsd:element name="ContractName" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="ListPersonRequest"> <wsdl:message name="ListPersonRequest">
<wsdl:part name="parameters" element="tns:ListPerson"></wsdl:part> <wsdl:part name="parameters" element="tns:ListPerson" />
</wsdl:message> </wsdl:message>
<wsdl:message name="ListPersonResponse"> <wsdl:message name="ListPersonResponse">
<wsdl:part name="parameters" element="tns:ListPersonResponse"></wsdl:part> <wsdl:part name="parameters" element="tns:ListPersonResponse" />
</wsdl:message> </wsdl:message>
<wsdl:portType name="NewPortType"> <wsdl:portType name="NewPortType">
<wsdl:operation name="ListPerson"> <wsdl:operation name="ListPerson">
<wsdl:input message="tns:ListPersonRequest"></wsdl:input> <wsdl:input message="tns:ListPersonRequest"></wsdl:input>
<wsdl:output message="tns:ListPersonResponse"></wsdl:output> <wsdl:output message="tns:ListPersonResponse"></wsdl:output>
</wsdl:operation> </wsdl:operation>
</wsdl:portType> </wsdl:portType>
<wsdl:binding name="NewBinding" type="tns:NewPortType"> <wsdl:binding name="NewBinding" type="tns:NewPortType">
<soap:binding style="document" <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" /> transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="ListPerson"> <wsdl:operation name="ListPerson">
<soap:operation <soap:operation
soapAction="http://www.example.org/benchmark/ListPerson" /> soapAction="http://www.example.org/benchmark/ListPerson" />
<wsdl:input> <wsdl:input>
<soap:body use="literal" /> <soap:body use="literal" />
</wsdl:input> </wsdl:input>
<wsdl:output> <wsdl:output>
<soap:body use="literal" /> <soap:body use="literal" />
</wsdl:output> </wsdl:output>
</wsdl:operation> </wsdl:operation>
</wsdl:binding> </wsdl:binding>
<wsdl:service name="TestService"> <wsdl:service name="TestService">
<wsdl:port name="TestPort" binding="tns:NewBinding"> <wsdl:port name="TestPort" binding="tns:NewBinding">
<soap:address location="http://localhost:81/soap-wsdl-test/person.pl"></soap:address> <soap:address
</wsdl:port> location="http://localhost:81/soap-wsdl-test/person.pl"></soap:address>
</wsdl:service></wsdl:definitions> </wsdl:port>
</wsdl:service>
</wsdl:definitions>
+4 -4
View File
@@ -669,12 +669,12 @@ The following facets have no influence yet:
=item * L<SOAP::Lite|SOAP::Lite> =item * L<SOAP::Lite|SOAP::Lite>
Full featured SOAP-library, little WSDL support. Supports rpc-encoded style Full featured SOAP-library, little WSDL support. Supports rpc-encoded style
only. Many protocols supported. only. Many protocols supported.
=item * L<XML::Compile::WSDL|XML::Compile::WSDL> / L<XML::Compile::SOAP|XML::Compile::SOAP> =item * L<XML::Compile::WSDL|XML::Compile::WSDL> / L<XML::Compile::SOAP|XML::Compile::SOAP>
Creates parser/generator functions for SOAP messages. Includes SOAP Client Creates parser/generator functions for SOAP messages. Includes SOAP Client
and Server implementatios. and Server implementatios.
You might want to give it a try, especially if you need to adhere very You might want to give it a try, especially if you need to adhere very
@@ -730,9 +730,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION =head1 REPOSITORY INFORMATION
$Rev: 457 $ $Rev: 477 $
$LastChangedBy: kutterma $ $LastChangedBy: kutterma $
$Id: WSDL.pm 457 2007-12-16 08:02:06Z kutterma $ $Id: WSDL.pm 477 2007-12-24 10:23:52Z kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL.pm $ $HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL.pm $
=cut =cut
+4 -4
View File
@@ -9,7 +9,7 @@ use List::Util qw(first);
use Class::Std::Fast::Storable; use Class::Std::Fast::Storable;
use base qw(SOAP::WSDL::Base); use base qw(SOAP::WSDL::Base);
our $VERSION='2.00_25'; our $VERSION='2.00_27';
my %types_of :ATTR(:name<types> :default<[]>); my %types_of :ATTR(:name<types> :default<[]>);
my %message_of :ATTR(:name<message> :default<()>); my %message_of :ATTR(:name<message> :default<()>);
@@ -105,7 +105,7 @@ Returns the message matching the namespace/localname pair passed as arguments.
Accessors/Mutators for accessing / setting the E<gt>typesE<lt> child Accessors/Mutators for accessing / setting the E<gt>typesE<lt> child
element(s). element(s).
=head1 LICENSE and COPYRIGHT =head1 LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter. Copyright 2004-2007 Martin Kutter.
@@ -118,9 +118,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION =head1 REPOSITORY INFORMATION
$Rev: 431 $ $Rev: 477 $
$LastChangedBy: kutterma $ $LastChangedBy: kutterma $
$Id: Definitions.pm 431 2007-12-03 19:39:11Z kutterma $ $Id: Definitions.pm 477 2007-12-24 10:23:52Z kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Definitions.pm $ $HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Definitions.pm $
=cut =cut
+36 -2
View File
@@ -3,7 +3,7 @@ use strict;
use warnings; use warnings;
use XML::Parser::Expat; use XML::Parser::Expat;
our $VERSION = '2.00_24'; our $VERSION = '2.00_27';
sub new { sub new {
my ($class, $args) = @_; my ($class, $args) = @_;
@@ -41,4 +41,38 @@ sub get_data {
return $_[0]->{ data }; return $_[0]->{ data };
} }
1; 1;
=pod
=head1 NAME
SOAP::WSDL::Expat::Base - Base class for XML::Parser::Expat based XML parsers
=head1 DESCRIPTION
Base class for XML::Parser::Expat based XML parsers. All XML::SAX::Expat based
parsers in SOAP::WSDL inherit from this class.
=head1 AUTHOR
Replace the whitespace by @ for E-Mail Address.
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 Repository information
$Id: $
$LastChangedDate: 2007-09-10 18:19:23 +0200 (Mo, 10 Sep 2007) $
$LastChangedRevision: 218 $
$LastChangedBy: kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $
+7 -4
View File
@@ -4,7 +4,7 @@ use strict;
use warnings; use warnings;
use base qw(SOAP::WSDL::Expat::Base); use base qw(SOAP::WSDL::Expat::Base);
our $VERSION = '2.00_24'; our $VERSION = '2.00_27';
sub _initialize { sub _initialize {
my ($self, $parser) = @_; my ($self, $parser) = @_;
@@ -113,13 +113,16 @@ Replace the whitespace by @ for E-Mail Address.
Martin Kutter E<lt>martin.kutter fen-net.deE<gt> Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 COPYING =head1 LICENSE AND COPYRIGHT
This module may be used under the same terms as perl itself. Copyright 2004-2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 Repository information =head1 Repository information
$ID: $ $Id: $
$LastChangedDate: 2007-09-10 18:19:23 +0200 (Mo, 10 Sep 2007) $ $LastChangedDate: 2007-09-10 18:19:23 +0200 (Mo, 10 Sep 2007) $
$LastChangedRevision: 218 $ $LastChangedRevision: 218 $
+10 -7
View File
@@ -4,7 +4,7 @@ use strict;
use warnings; use warnings;
use Carp qw(croak confess); use Carp qw(croak confess);
our $VERSION = q{2.00_25}; our $VERSION = q{2.00_27};
use SOAP::WSDL::XSD::Typelib::Builtin; use SOAP::WSDL::XSD::Typelib::Builtin;
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType; use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
@@ -260,7 +260,7 @@ See L<SOAP::WSDL::Manual::Parser> for details.
Sometimes there's unneccessary information transported in SOAP messages. Sometimes there's unneccessary information transported in SOAP messages.
To skip XML nodes (including all child nodes), just edit the type map for To skip XML nodes (including all child nodes), just edit the type map for
the message, set the type map entry to '__SKIP__', and comment out all the message, set the type map entry to '__SKIP__', and comment out all
child elements you want to skip. child elements you want to skip.
=head1 Bugs and Limitations =head1 Bugs and Limitations
@@ -281,16 +281,19 @@ Replace the whitespace by @ for E-Mail Address.
Martin Kutter E<lt>martin.kutter fen-net.deE<gt> Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 COPYING =head1 LICENSE AND COPYRIGHT
This module may be used under the same terms as perl itself. Copyright 2004-2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 Repository information =head1 Repository information
$ID: $ $Id: $
$LastChangedDate: 2007-12-07 21:04:06 +0100 (Fr, 07 Dez 2007) $ $LastChangedDate: 2007-12-24 11:23:52 +0100 (Mo, 24 Dez 2007) $
$LastChangedRevision: 444 $ $LastChangedRevision: 477 $
$LastChangedBy: kutterma $ $LastChangedBy: kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $ $HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $
+9 -9
View File
@@ -56,22 +56,22 @@ See L<SOAP::WSDL::Manual::Parser> for details.
See SOAP::WSDL::Expat::MessageParser See SOAP::WSDL::Expat::MessageParser
=head1 LICENSE AND COPYRIGHT
Copyright 2007 Martin Kutter. All rights reserved.
This file is part of SOAP-WSDL. You may distribte/modify it under
the same terms as perl itself
=head1 AUTHOR =head1 AUTHOR
Martin Kutter E<lt>martin.kutter fen-net.deE<gt> Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 LICENSE AND COPYRIGHT
Copyright 2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 REPOSITORY INFORMATION =head1 REPOSITORY INFORMATION
$Rev: 391 $ $Rev: 477 $
$LastChangedBy: kutterma $ $LastChangedBy: kutterma $
$Id: MessageStreamParser.pm 391 2007-11-17 21:56:13Z kutterma $ $Id: MessageStreamParser.pm 477 2007-12-24 10:23:52Z kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageStreamParser.pm $ $HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageStreamParser.pm $
=cut =cut
+40
View File
@@ -145,3 +145,43 @@ sub _fixup_attrs {
1; 1;
=pod
=head1 NAME
SOAP::WSDL::Expat::WSDLParser - Parse WSDL files into object trees
=head1 SYNOPSIS
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
$parser->parse( $xml );
my $obj = $parser->get_data();
=head1 DESCRIPTION
WSDL parser used by SOAP::WSDL.
=head1 AUTHOR
Replace the whitespace by @ for E-Mail Address.
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 Repository information
$Id: $
$LastChangedDate: 2007-12-24 11:23:52 +0100 (Mo, 24 Dez 2007) $
$LastChangedRevision: 477 $
$LastChangedBy: kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/WSDLParser.pm $
+1 -1
View File
@@ -137,7 +137,7 @@ passed as a single hash ref:
Copyright 2007 Martin Kutter. All rights reserved. Copyright 2007 Martin Kutter. All rights reserved.
This file is part of SOAP-WSDL. You may distribte/modify it under This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself the same terms as perl itself
=head1 AUTHOR =head1 AUTHOR
+1 -1
View File
@@ -155,7 +155,7 @@ Set user-defined typemap snippet
Copyright 2007 Martin Kutter. All rights reserved. Copyright 2007 Martin Kutter. All rights reserved.
This file is part of SOAP-WSDL. You may distribte/modify it under This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself the same terms as perl itself
=head1 AUTHOR =head1 AUTHOR
+3 -3
View File
@@ -5,7 +5,7 @@ use Class::Std::Fast::Storable;
use File::Basename; use File::Basename;
use File::Spec; use File::Spec;
our $VERSION = q{2.00_25}; our $VERSION = q{2.00_27};
use SOAP::WSDL::Generator::Visitor::Typemap; use SOAP::WSDL::Generator::Visitor::Typemap;
use SOAP::WSDL::Generator::Visitor::Typelib; use SOAP::WSDL::Generator::Visitor::Typelib;
@@ -57,8 +57,8 @@ sub generate {
sub generate_typelib { sub generate_typelib {
my ($self, $arg_ref) = @_; my ($self, $arg_ref) = @_;
# $output_of{ ident $self } = ""; # $output_of{ ident $self } = "";
my @schema = exists $arg_ref->{ schema } my @schema = exists $arg_ref->{ schema }
? @{ $arg_ref->{schema} } ? @{ $arg_ref->{schema} }
: @{ $self->get_definitions()->first_types()->get_schema() }; : @{ $self->get_definitions()->first_types()->get_schema() };
for my $type (map { @{ $_->get_type() } , @{ $_->get_element() } } @schema[1..$#schema] ) { for my $type (map { @{ $_->get_type() } , @{ $_->get_element() } } @schema[1..$#schema] ) {
$type->_accept( $self ); $type->_accept( $self );
@@ -1,4 +1,8 @@
package [% interface_prefix %]::[% service.get_name.replace('\.', '::').replace('-', '_') %]::[% port.get_name.replace('^.+\.','').replace('-', '_') %]; [% interface_name = interface_prefix _ '::'
_ service.get_name.replace('\.', '::') _ '::'
_ port.get_name.replace('^.+\.','');
interface_name = interface_name.replace('-','_'); -%]
package [% interface_name %];
use strict; use strict;
use warnings; use warnings;
use Class::Std::Fast::Storable; use Class::Std::Fast::Storable;
@@ -33,13 +37,12 @@ __END__
=head1 NAME =head1 NAME
[% interface_name %] - SOAP Interface for the [% service.get_name %] Web Service
[% interface_prefix %]::[% service.get_name.replace('\.', '::').replace('-', '_') %]::[% port.get_name.replace('\.', '::').replace('-', '_') %] - SOAP Interface for the [% service.get_name %] Web Service
=head1 SYNOPSIS =head1 SYNOPSIS
use [% interface_prefix %]::[% service.get_name.replace('\.', '::').replace('-', '_') %]::[% port.get_name.replace('\.', '::').replace('-', '_') %]; use [% interface_name %];
my $interface = [% interface_prefix %]::[% service.get_name.replace('\.', '::').replace('-', '_') %]::[% port.get_name.replace('\.', '::').replace('-', '_') %]->new(); my $interface = [% interface_name %]->new();
my $response; my $response;
[% FOREACH operation = binding.get_operation; [% FOREACH operation = binding.get_operation;
+10 -6
View File
@@ -1,4 +1,8 @@
package [% server_prefix %]::[% service.get_name.replace('\.', '::') %]::[% port.get_name.replace('^.+\.','') %]; [% server_name = server_prefix _ '::'
_ service.get_name.replace('\.', '::') _ '::'
_ port.get_name.replace('^.+\.','');
server_name = server_name.replace('-','_'); -%]
package [% server_name %];
use strict; use strict;
use warnings; use warnings;
use Class::Std::Fast::Storable; use Class::Std::Fast::Storable;
@@ -23,7 +27,7 @@ my $action_map_ref = {
sub START { sub START {
my ($self, $ident, $arg_ref) = @_; my ($self, $ident, $arg_ref) = @_;
eval "require $transport_class_of{ $ident }" eval "require $transport_class_of{ $ident }"
or die "Cannot load transport class $transport_class_of{ $ident }: $@"; or die "Cannot load transport class $transport_class_of{ $ident }: $@";
$transport_of{ $ident } = $transport_class_of{ $ident }->new({ $transport_of{ $ident } = $transport_class_of{ $ident }->new({
action_map_ref => $action_map_ref, action_map_ref => $action_map_ref,
@@ -46,12 +50,12 @@ __END__
=head1 NAME =head1 NAME
[% interface_prefix %]::[% service.get_name.replace('\.', '::') %]::[% port.get_name.replace('\.', '::') %] - SOAP Server Class for the [% service.get_name %] Web Service [% server_name %] - SOAP Server Class for the [% service.get_name %] Web Service
=head1 SYNOPSIS =head1 SYNOPSIS
use [% server_prefix %]::[% service.get_name.replace('\.', '::') %]::[% port.get_name.replace('\.', '::') %]; use [% server_name %];
my $server = [% server_prefix %]::[% service.get_name.replace('\.', '::') %]::[% port.get_name.replace('\.', '::') %]->new({ my $server = [% server_name %]->new({
dispatch_to => 'My::Handler::Class', dispatch_to => 'My::Handler::Class',
transport_class => 'SOAP::WSDL::Server::CGI', # optional, default transport_class => 'SOAP::WSDL::Server::CGI', # optional, default
}); });
@@ -79,7 +83,7 @@ located at [% port.first_address.get_location %].
Constructor. Constructor.
The C<dispatch_to> argument is mandatory. It must be a class or object The C<dispatch_to> argument is mandatory. It must be a class or object
implementing the SOAP Service methods listed below. implementing the SOAP Service methods listed below.
=head2 SOAP Service methods =head2 SOAP Service methods
@@ -8,8 +8,8 @@ port_op.get_documentation %]
my ($self, $body, $header) = @_; my ($self, $body, $header) = @_;
# body is a ??? object - sorry, POD not implemented yet # body is a ??? object - sorry, POD not implemented yet
# header is a ??? object - sorry, POD not implemented yet # header is a ??? object - sorry, POD not implemented yet
# do something with body and header... # do something with body and header...
return [% INCLUDE Server/POD/Message.tt %] return [% INCLUDE Server/POD/Message.tt %]
} }
@@ -3,7 +3,7 @@
#element; #element;
#STOP; #STOP;
-%] -%]
[% element_prefix %]::[% element.get_name.replace('\.', '::') %]->new([% [% element_prefix %]::[% element.get_name.replace('\.', '::') %]->new([%
type = element.first_complexType || element.first_simpleType || definitions.first_types.find_type( type = element.first_complexType || element.first_simpleType || definitions.first_types.find_type(
element.expand( element.get_type ) ); element.expand( element.get_type ) );
INCLUDE Interface/POD/Type.tt; %] INCLUDE Interface/POD/Type.tt; %]
+3 -3
View File
@@ -48,7 +48,7 @@ SOAP::WSDL::Generator::Visitor - SOAP::WSDL's Visitor-based Code Generator
=head1 DESCRIPTION =head1 DESCRIPTION
SOAP::WSDL featores a code generating facility. This code generation facility SOAP::WSDL features a code generating facility. This code generation facility
(in fact there are several of them) is implemented as Visitor to (in fact there are several of them) is implemented as Visitor to
SOAP::WSDL::Base-derived objects. SOAP::WSDL::Base-derived objects.
@@ -186,8 +186,8 @@ mimicing .NET's .asmx example pages.
=back =back
All these behaviours could well (and has historically been) implemented in the All these behaviours could well be (and have historically been) implemented in
classes holding the WSDL data. This made these classes rather bloated, and the classes holding the WSDL data. This made these classes rather bloated, and
made it hard to change behaviour (like, supporting SOAP Headers, made it hard to change behaviour (like, supporting SOAP Headers,
supporting atomic types and other features which were missing from early supporting atomic types and other features which were missing from early
versions of SOAP::WSDL). versions of SOAP::WSDL).
+2 -2
View File
@@ -111,7 +111,7 @@ included perldoc will be, too - if not, blame the web service author.
print $result; print $result;
The above handling of errors ("die $result if not $result") may look a bit The above handling of errors ("die $result if not $result") may look a bit
strange - it is due to the nature of the strange - it is due to the nature of the
L<SOAP::WSDL::SOAP::Typelib::Fault11|SOAP::WSDL::SOAP::Typelib::Fault11> L<SOAP::WSDL::SOAP::Typelib::Fault11|SOAP::WSDL::SOAP::Typelib::Fault11>
objects SOAP::WSDL uses for signalling failure. objects SOAP::WSDL uses for signalling failure.
@@ -232,7 +232,7 @@ L<SOAP::WSDL::Manual::Parser> will tell you how to create a typemap class.
=head1 Creating a SOAP Server =head1 Creating a SOAP Server
Creating a SOAP server works just like creating a client - just add the Creating a SOAP server works just like creating a client - just add the
C<--server> or C<-s> option to the call to C<wsdl2perl.pl>. C<--server> or C<-s> option to the call to C<wsdl2perl.pl>.
perl wsdl2perl.pl -s -b BASE_DIR URL perl wsdl2perl.pl -s -b BASE_DIR URL
+84 -72
View File
@@ -84,7 +84,7 @@ SOAP::WSDL::Expat::MessageParser allows the use of XML Declarations.
the soap:Body element. the soap:Body element.
SOAP::WSDL::Serializer::SOAP11 does not emit children of soap:Envelope following SOAP::WSDL::Serializer::SOAP11 does not emit children of soap:Envelope following
the soap:Body element. Other serializers may behave differentls. the soap:Body element. Other serializers may behave different.
=head2 R1012 =head2 R1012
@@ -302,6 +302,73 @@ SOAP::WSDL::Expat::MessageParser checks the namespace of the SOAP envelope.
SOAP::WSDL::Expat::MessageParser does not check that Envelope is the root SOAP::WSDL::Expat::MessageParser does not check that Envelope is the root
element, yet. element, yet.
=head2 R1110
An INSTANCE MAY accept connections on TCP port 80 (HTTP)
SOAP::WSDL::Server::CGI may be used in a web server listening at port 80.
=head2 R1124
An INSTANCE MUST use a 2xx HTTP status code for responses that
indicate a successful outcome of a request.
SOAP::WSDL::Server::CGI sends a 2xx HTTP status code for successful requests.
=head2 R1111
An INSTANCE SHOULD use a "200 OK" HTTP status code for responses
that contain a SOAP message that is not a SOAP fault.
SOAP::WSDL::Server::CGI does this.
=head2 R1112
An INSTANCE SHOULD use either a "200 OK" or "202 Accepted" HTTP
status code for a response that does do not contain a SOAP message
but indicates successful HTTP outcome of a request.
SOAP::WSDL::Server::CGI does this.
=head2 R1130
An INSTANCE MUST use HTTP status code "307 Temporary Redirect"
when redirecting a request to a different endpoint.
SOAP::WSDL::Server::CGI has no means of redirecting. The web server running
a SOAP::WSDL::Server::CGI script is responsible for redirecting with a 307
HTTP status code.
=head2 R1125
An INSTANCE MUST use a 4xx HTTP status code for responses that indicate
a problem with the format of the request.
SOAP::WSDL does this.
=head2 R1113
An INSTANCE SHOULD use a "400 Bad Request "HTTP status code, if the
request message is a malformed HTTP request, or not well-formed XML.
SOAP::WSDL does this.
=head2 R1114
An INSTANCE SHOULD use a "405 Method not Allowed" HTTP status code if the
request method was not "POST".
SOAP::WSDL does this.
=head2 R1115
An INSTANCE SHOULD use a "415 Unsupported Media Type" HTTP status code if
the Content-Type HTTP request header did not have a value consistent with
the value specified for the corresponding binding of the input message.
SOAP::WSDL::Server::CGI does not support any content type other than text/xml
and application/xml yet.
=head1 RULES NOT CONFIRMED =head1 RULES NOT CONFIRMED
@@ -310,7 +377,7 @@ element, yet.
A RECEIVER MUST accept messages that include the Unicode Byte Order Mark A RECEIVER MUST accept messages that include the Unicode Byte Order Mark
(BOM). (BOM).
May automatically work with XML::Parser::Expat, but is not testet yet. May automatically work with XML::Parser::Expat, but is not tested yet.
TODO write test. If not confirmed, add encoding support. TODO write test. If not confirmed, add encoding support.
@@ -339,6 +406,8 @@ TODO add processing of arbitrary attributes to SOAP::WSDL::SOAP::Typelib::Fault1
A RECEIVER MUST accept fault messages that carry an xml:lang attribute on A RECEIVER MUST accept fault messages that carry an xml:lang attribute on
the faultstring element. the faultstring element.
SOAP::WSDL::Expat::MessageParser currently ignores all attributes.
TODO add processing of the xml:lang attribute to SOAP::WSDL::SOAP::Typelib::Fault11 TODO add processing of the xml:lang attribute to SOAP::WSDL::SOAP::Typelib::Fault11
=head2 R1007 =head2 R1007
@@ -555,94 +624,37 @@ SOAP::WSDL does not check mandatory header blocks yet.
SOAP::WSDL does not check mandatory header blocks yet. SOAP::WSDL does not check mandatory header blocks yet.
=head2 R1110
An INSTANCE MAY accept connections on TCP port 80 (HTTP)
SOAP::WSDL does not act as server yet.
=head2 R1124
An INSTANCE MUST use a 2xx HTTP status code for responses that
indicate a successful outcome of a request.
SOAP::WSDL does not act as server yet.
=head2 R1111
An INSTANCE SHOULD use a "200 OK" HTTP status code for responses
that contain a SOAP message that is not a SOAP fault.
SOAP::WSDL does not act as server yet.
=head2 R1112
An INSTANCE SHOULD use either a "200 OK" or "202 Accepted" HTTP
status code for a response that does do not contain a SOAP message
but indicates successful HTTP outcome of a request.
SOAP::WSDL does not act as server yet.
=head2 R1130
An INSTANCE MUST use HTTP status code "307 Temporary Redirect"
when redirecting a request to a different endpoint.
SOAP::WSDL does not act as server yet.
=head2 R1125
An INSTANCE MUST use a 4xx HTTP status code for responses that indicate
a problem with the format of the request.
SOAP::WSDL does not act as server yet.
=head2 R1113
An INSTANCE SHOULD use a "400 Bad Request "HTTP status code, if the
request message is a malformed HTTP request, or not well-formed XML.
SOAP::WSDL does not act as server yet.
=head2 R1114
An INSTANCE SHOULD use a "405 Method not Allowed" HTTP status code if the
request method was not "POST".
SOAP::WSDL does not act as server yet.
=head2 R1115
An INSTANCE SHOULD use a "415 Unsupported Media Type" HTTP status code if
the Content-Type HTTP request header did not have a value consistent with
the value specified for the corresponding binding of the input message.
SOAP::WSDL does not act as server yet.
=head2 R1120 =head2 R1120
An INSTANCE MAY use the HTTP state mechanism ("Cookies"). An INSTANCE MAY use the HTTP state mechanism ("Cookies").
SOAP::WSDL does not act as server yet. SOAP::WSDL::Server::CGI does not use cookies. A web server running a
SOAP::WSDL::Server::CGI script may use cookies..
=head2 R1122 =head2 R1122
An INSTANCE using Cookies SHOULD conform to RFC2965. An INSTANCE using Cookies SHOULD conform to RFC2965.
SOAP::WSDL does not act as server yet.
SOAP::WSDL::Server::CGI does not use cookies. A web server running a
SOAP::WSDL::Server::CGI script may use cookies..
=head2 R1121 =head2 R1121
An INSTANCE SHOULD NOT require consumer support for Cookies in order to An INSTANCE SHOULD NOT require consumer support for Cookies in order to
function correctly function correctly
SOAP::WSDL does not act as server yet.
SOAP::WSDL::Server::CGI does not use cookies. A web server running a
SOAP::WSDL::Server::CGI script may use cookies.
=head2 R1123 =head2 R1123
The value of the cookie MUST be considered to be opaque by the CONSUMER. The value of the cookie MUST be considered to be opaque by the CONSUMER.
SOAP::WSDL does not act as server yet.
SOAP::WSDL::Server::CGI does not use cookies. A web server running a
SOAP::WSDL::Server::CGI script may use cookies.
=head2 R2028 =head2 R2028
@@ -1237,9 +1249,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION =head1 REPOSITORY INFORMATION
$Rev: 391 $ $Rev: 478 $
$LastChangedBy: kutterma $ $LastChangedBy: kutterma $
$Id: WS_I.pod 391 2007-11-17 21:56:13Z kutterma $ $Id: WS_I.pod 478 2007-12-27 14:15:01Z kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/WS_I.pod $ $HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/WS_I.pod $
=cut =cut
+6 -6
View File
@@ -4,7 +4,7 @@ use strict;
use warnings; use warnings;
use Class::Std::Fast::Storable; use Class::Std::Fast::Storable;
use Scalar::Util qw(blessed); use Scalar::Util qw(blessed);
our $VERSION=q{2.00_25}; our $VERSION=q{2.00_27};
my $SOAP_NS = 'http://schemas.xmlsoap.org/soap/envelope/'; my $SOAP_NS = 'http://schemas.xmlsoap.org/soap/envelope/';
my $XML_INSTANCE_NS = 'http://www.w3.org/2001/XMLSchema-instance'; my $XML_INSTANCE_NS = 'http://www.w3.org/2001/XMLSchema-instance';
@@ -62,10 +62,10 @@ sub serialize_body {
return join ( q{}, return join ( q{},
"<$opt->{ namespace }->{ $SOAP_NS }\:Body>", "<$opt->{ namespace }->{ $SOAP_NS }\:Body>",
defined $data defined $data
? ref $data eq 'ARRAY' ? ref $data eq 'ARRAY'
? join q{}, map { blessed $_ ? $_->serialize_qualified() : () } @{ $data } ? join q{}, map { blessed $_ ? $_->serialize_qualified() : () } @{ $data }
: blessed $data : blessed $data
? $data->serialize_qualified ? $data->serialize_qualified()
: () : ()
: (), : (),
"</$opt->{ namespace }->{ $SOAP_NS }\:Body>", "</$opt->{ namespace }->{ $SOAP_NS }\:Body>",
@@ -119,9 +119,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION =head1 REPOSITORY INFORMATION
$Rev: 444 $ $Rev: 477 $
$LastChangedBy: kutterma $ $LastChangedBy: kutterma $
$Id: XSD.pm 444 2007-12-07 20:04:06Z kutterma $ $Id: XSD.pm 477 2007-12-24 10:23:52Z kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Serializer/XSD.pm $ $HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Serializer/XSD.pm $
=cut =cut
+5 -5
View File
@@ -6,7 +6,7 @@ use Scalar::Util qw(blessed);
use SOAP::WSDL::Factory::Deserializer; use SOAP::WSDL::Factory::Deserializer;
use SOAP::WSDL::Factory::Serializer; use SOAP::WSDL::Factory::Serializer;
our $VERSION = q{2.00_25}; our $VERSION = q{2.00_27};
my %dispatch_to_of :ATTR(:name<dispatch_to> :default<()>); my %dispatch_to_of :ATTR(:name<dispatch_to> :default<()>);
my %action_map_ref_of :ATTR(:name<action_map_ref> :default<{}>); my %action_map_ref_of :ATTR(:name<action_map_ref> :default<{}>);
@@ -28,7 +28,7 @@ sub handle {
soap_version => '1.1' soap_version => '1.1'
}); });
# TODO: factor out dispatcher logic into dispatcher factory + dispatcher # TODO: factor out dispatcher logic into dispatcher factory + dispatcher
# classes # classes
# $dispatcher_of{ $ident } ||= SOAP::WSDL::Factory::Dispatcher->get_dispatcher({}); # $dispatcher_of{ $ident } ||= SOAP::WSDL::Factory::Dispatcher->get_dispatcher({});
@@ -143,12 +143,12 @@ SOAP::WSDL::Server basically follows the architecture sketched below
| Handler | | Handler |
------------------------------------- -------------------------------------
All of the components (Transport class, deserializer, dispatcher and All of the components (Transport class, deserializer, dispatcher and
serializer) are implemented as plugins. serializer) are implemented as plugins.
The architecture is not implemented as planned yet, but the dispatcher is The architecture is not implemented as planned yet, but the dispatcher is
currently part of SOAP::WSDL::Server, which aggregates serializer and currently part of SOAP::WSDL::Server, which aggregates serializer and
deserializer, and is subclassed by transport classes (of which deserializer, and is subclassed by transport classes (of which
SOAP::WSDL::Server::CGI is the only implemented one yet). SOAP::WSDL::Server::CGI is the only implemented one yet).
The dispatcher is currently based on the SOAPAction header. This does not The dispatcher is currently based on the SOAPAction header. This does not
+9 -10
View File
@@ -12,13 +12,13 @@ use Class::Std::Fast::Storable;
use base qw(SOAP::WSDL::Server); use base qw(SOAP::WSDL::Server);
our $VERSION=q{2.00_26}; our $VERSION=q{2.00_27};
# mostly copied from SOAP::Lite. Unfortunately we can't use SOAP::Lite's CGI # mostly copied from SOAP::Lite. Unfortunately we can't use SOAP::Lite's CGI
# server directly - we would have to swap out it's base class... # server directly - we would have to swap out it's base class...
# #
# This should be a warning for us: We should not handle methods via inheritance, # This should be a warning for us: We should not handle methods via inheritance,
# but via some plugin mechanism, to allow alternative handlers to be plugge # but via some plugin mechanism, to allow alternative handlers to be plugged
# in. # in.
sub handle { sub handle {
@@ -26,7 +26,7 @@ sub handle {
my $response; my $response;
my $length = $ENV{'CONTENT_LENGTH'} || 0; my $length = $ENV{'CONTENT_LENGTH'} || 0;
if (!$length) { if (!$length) {
$response = HTTP::Response->new(411); # LENGTH REQUIRED $response = HTTP::Response->new(411); # LENGTH REQUIRED
$self->_output($response); $self->_output($response);
return; return;
@@ -37,7 +37,7 @@ sub handle {
} }
my $content = q{}; my $content = q{};
my $buffer; my $buffer;
binmode(STDIN); binmode(STDIN);
while (read(STDIN,$buffer,$length - length($content))) { while (read(STDIN,$buffer,$length - length($content))) {
$content .= $buffer; $content .= $buffer;
@@ -47,10 +47,10 @@ sub handle {
$ENV{'REQUEST_METHOD'} || '' => $ENV{'SCRIPT_NAME'}, $ENV{'REQUEST_METHOD'} || '' => $ENV{'SCRIPT_NAME'},
HTTP::Headers->new( HTTP::Headers->new(
map { map {
(/^HTTP_(.+)/i (/^HTTP_(.+)/i
? ($1=~m/SOAPACTION/) ? ($1=~m/SOAPACTION/)
?('SOAPAction') ?('SOAPAction')
:($1) :($1)
: $_ : $_
) => $ENV{$_} ) => $ENV{$_}
} keys %ENV), } keys %ENV),
@@ -93,15 +93,14 @@ sub _output :PRIVATE {
my ($self, $response) = @_; my ($self, $response) = @_;
# imitate nph- cgi for IIS (pointed by Murray Nesbitt) # imitate nph- cgi for IIS (pointed by Murray Nesbitt)
my $status = defined($ENV{'SERVER_SOFTWARE'}) && $ENV{'SERVER_SOFTWARE'}=~/IIS/ my $status = defined($ENV{'SERVER_SOFTWARE'}) && $ENV{'SERVER_SOFTWARE'}=~/IIS/
? $ENV{SERVER_PROTOCOL} || 'HTTP/1.0' ? $ENV{SERVER_PROTOCOL} || 'HTTP/1.0'
: 'Status:'; : 'Status:';
my $code = $response->code; my $code = $response->code;
binmode(STDOUT); binmode(STDOUT);
print STDOUT "$status $code ", HTTP::Status::status_message($code) print STDOUT "$status $code ", HTTP::Status::status_message($code)
, "\015\012", $response->headers_as_string("\015\012") , "\015\012", $response->headers_as_string("\015\012")
, "\015\012", $response->content; , "\015\012", $response->content;
} }
1; 1;
+2 -2
View File
@@ -409,11 +409,11 @@ Replace whitespace by @ in e-mail address.
Martin Kutter E<gt>martin.kutter fen-net.deE<lt> Martin Kutter E<gt>martin.kutter fen-net.deE<lt>
=head1 Licenxe =head1 LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter. Copyright 2004-2007 Martin Kutter.
This library is free software, you may distribute/modify it under the This file is part of SOAP-WSDL. You may distribute/modify it under the
same terms as perl itself same terms as perl itself
=cut =cut
@@ -3,6 +3,7 @@ use strict;
use warnings; use warnings;
use Date::Parse; use Date::Parse;
use Date::Format; use Date::Format;
use Time::Zone;
use Class::Std::Fast::Storable constructor => 'none', cache => 1; use Class::Std::Fast::Storable constructor => 'none', cache => 1;
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType); use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
@@ -16,13 +17,17 @@ sub set_value {
[\+\-] \d{2} \: \d{2} $ [\+\-] \d{2} \: \d{2} $
}xms }xms
); );
no warnings qw(uninitialized);
# strptime sets empty values to undef - and strftime doesn't like that... # strptime sets empty values to undef - and strftime doesn't like that...
my @time_from = map { ! defined $_ ? 0 : $_ } strptime($_[1]); my @time_from = map { ! defined $_ ? 0 : $_ } strptime($_[1]);
undef $time_from[$#time_from]; undef $time_from[$#time_from];
my $time_str = strftime( '%Y-%m-%dT%H:%M:%S%z', @time_from ); my $time_str = do { # no warnings;
strftime( '%Y-%m-%dT%H:%M:%S%z', @time_from );
};
# insert : in timezone info
substr $time_str, -2, 0, ':'; substr $time_str, -2, 0, ':';
$_[0]->SUPER::set_value($time_str); $_[0]->SUPER::set_value($time_str);
} }
+6 -6
View File
@@ -9,7 +9,7 @@ require Class::Std::Fast::Storable;
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType); use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
our $VERSION = '2.00_25'; our $VERSION = '2.00_27';
my %ELEMENTS_FROM; my %ELEMENTS_FROM;
my %ATTRIBUTES_OF; my %ATTRIBUTES_OF;
@@ -412,10 +412,10 @@ No facets are implemented yet.
=head1 LICENSE AND COPYRIGHT =head1 LICENSE AND COPYRIGHT
Copyright (c) 2007 Martin Kutter. All rights reserved. Copyright 2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under This file is part of SOAP-WSDL. You may distribute/modify it under the same
the same terms as perl itself. terms as perl itself
=head1 AUTHOR =head1 AUTHOR
@@ -423,9 +423,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION =head1 REPOSITORY INFORMATION
$Rev: 452 $ $Rev: 477 $
$LastChangedBy: kutterma $ $LastChangedBy: kutterma $
$Id: ComplexType.pm 452 2007-12-12 14:46:54Z kutterma $ $Id: ComplexType.pm 477 2007-12-24 10:23:52Z kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm $ $HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm $
=cut =cut
+21 -1
View File
@@ -2,7 +2,7 @@
package SOAP::WSDL::XSD::Typelib::Element; package SOAP::WSDL::XSD::Typelib::Element;
use strict; use strict;
our $VERSION=q{2.00_25}; our $VERSION=q{2.00_27};
my %NAME; my %NAME;
my %NILLABLE; my %NILLABLE;
@@ -159,4 +159,24 @@ namespace combination (Default for SOAP::WSDL::Envelope).
=back =back
=head1 LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same
terms as perl itself
=head1 AUTHOR
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION
$Rev: 477 $
$LastChangedBy: kutterma $
$Id: Element.pm 477 2007-12-24 10:23:52Z kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/Element.pm $
=cut =cut
+14 -6
View File
@@ -116,15 +116,23 @@ No facets are implemented yet.
=back =back
=head1 LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same
terms as perl itself
=head1 AUTHOR =head1 AUTHOR
Replace whitespace by @ in e-mail address. Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
Martin Kutter E<gt>martin.kutter fen-net.deE<lt> =head1 REPOSITORY INFORMATION
=head1 COPYING $Rev: 477 $
$LastChangedBy: kutterma $
This library is free software, you may distribute/modify it under the $Id: SimpleType.pm 477 2007-12-24 10:23:52Z kutterma $
same terms as perl itself $HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm $
=cut =cut
+1 -4
View File
@@ -1,4 +1,5 @@
use strict; use strict;
use warnings;
use lib '../../../lib'; use lib '../../../lib';
use Test::More tests => 4; use Test::More tests => 4;
use SOAP::WSDL; use SOAP::WSDL;
@@ -11,17 +12,13 @@ my @dir_from = File::Spec->splitdir($dir);
unshift @dir_from, $volume if $volume; unshift @dir_from, $volume if $volume;
my $url = join '/', @dir_from; my $url = join '/', @dir_from;
print "# Using SOAP::WSDL Version $SOAP::WSDL::VERSION\n"; print "# Using SOAP::WSDL Version $SOAP::WSDL::VERSION\n";
# chdir to my location # chdir to my location
my $soap = undef; my $soap = undef;
my $path = File::Spec->rel2abs( dirname __FILE__ );
my $proxy = 'http://127.0.0.1/testPort'; my $proxy = 'http://127.0.0.1/testPort';
ok( $soap = SOAP::WSDL->new( ok( $soap = SOAP::WSDL->new(
wsdl => 'file://' . $url . '/../../acceptance/wsdl/02_port.wsdl' wsdl => 'file://' . $url . '/../../acceptance/wsdl/02_port.wsdl'
) ); ) );
+1 -1
View File
@@ -19,7 +19,7 @@ my $data = $som->match('/a')->valueof;
is $data->{ c } , 3; is $data->{ c } , 3;
SKIP: { SKIP: {
skip "SOAP::Lite > 0.69 required" , 2 if ($SOAP::Lite::VERSION < 0.69); skip "SOAP::Lite > 0.69 required" , 2 if ($SOAP::Lite::VERSION lt '0.69');
is $data->{ b }->[0] , 1, "array values - SOAP::Lite $SOAP::Lite::VERSION";; is $data->{ b }->[0] , 1, "array values - SOAP::Lite $SOAP::Lite::VERSION";;
is $data->{ b }->[1] , 2, "array values - SOAP::Lite $SOAP::Lite::VERSION";; is $data->{ b }->[1] , 2, "array values - SOAP::Lite $SOAP::Lite::VERSION";;
} }
+4 -3
View File
@@ -1,9 +1,10 @@
use Test::More tests => 30; use Test::More tests => 30;
use strict; use strict;
use Carp qw(cluck);
$SIG{__WARN__} = sub { cluck @_ };
use warnings; use warnings;
#use Carp qw(cluck);
#
#$SIG{__WARN__} = sub { cluck @_ };
#use warnings;
use lib '../lib'; use lib '../lib';
use Date::Format; use Date::Format;
use Date::Parse; use Date::Parse;
+1 -1
View File
@@ -1,7 +1,7 @@
use Test::More tests => 7;
use strict; use strict;
use warnings; use warnings;
use lib '../lib'; use lib '../lib';
use Test::More tests => 7;
use Date::Parse; use Date::Parse;
use Date::Format; use Date::Format;
+2 -2
View File
@@ -45,7 +45,7 @@ package main;
use Test::More tests => 100; use Test::More tests => 100;
use Storable; use Storable;
my $have_warn = eval { use Test::Warn; 1; }; my $have_warn = eval { require Test::Warn; import Test::Warn; 1; };
my $obj; my $obj;
@@ -67,7 +67,7 @@ is scalar keys %{ $hash_of_ref }, 0;
SKIP: { SKIP: {
skip 'Cannot test warnings without Test::Warn', 1 if not $have_warn; skip 'Cannot test warnings without Test::Warn', 1 if not $have_warn;
warning_is { $obj->add_test() } 'attempting to add empty value to MyType'; warning_is( sub { $obj->add_test() }, 'attempting to add empty value to MyType' );
} }
$obj = MyType->new({ test => 'Test1'}); $obj = MyType->new({ test => 'Test1'});