import SOAP-WSDL 2.00.01 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 2.00.01 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00.01.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
0cbf981665
commit
745ce925c1
2
Build.PL
2
Build.PL
@@ -5,7 +5,7 @@ $build = Module::Build->new(
|
|||||||
create_makefile_pl => 'small',
|
create_makefile_pl => 'small',
|
||||||
dist_abstract => 'SOAP with WSDL support',
|
dist_abstract => 'SOAP with WSDL support',
|
||||||
dist_name => 'SOAP-WSDL',
|
dist_name => 'SOAP-WSDL',
|
||||||
dist_version => '2.00_33',
|
dist_version => '2.00.01',
|
||||||
module_name => 'SOAP::WSDL',
|
module_name => 'SOAP::WSDL',
|
||||||
license => 'artistic',
|
license => 'artistic',
|
||||||
requires => {
|
requires => {
|
||||||
|
|||||||
51
Changes
51
Changes
@@ -1,7 +1,7 @@
|
|||||||
Release notes for SOAP::WSDL 2.00_33
|
Release notes for SOAP::WSDL 2.00.01
|
||||||
-------
|
-------
|
||||||
|
|
||||||
I'm proud to present a new pre-release version of SOAP::WSDL.
|
I'm proud to present a new release of SOAP::WSDL.
|
||||||
|
|
||||||
SOAP::WSDL is a toolkit for creating WSDL-based SOAP client interfaces in perl.
|
SOAP::WSDL is a toolkit for creating WSDL-based SOAP client interfaces in perl.
|
||||||
|
|
||||||
@@ -15,6 +15,8 @@ Features:
|
|||||||
* Easy-to use API
|
* Easy-to use API
|
||||||
o Automatically encodes perl data structures as message data
|
o Automatically encodes perl data structures as message data
|
||||||
o Automatically sets HTTP headers right
|
o Automatically sets HTTP headers right
|
||||||
|
o Datatypes provide hints on method names on calls to non-existant
|
||||||
|
methods
|
||||||
* Efficient documentation
|
* Efficient documentation
|
||||||
o SOAP::WSDL::Manual guides you at getting your work done, not at
|
o SOAP::WSDL::Manual guides you at getting your work done, not at
|
||||||
the module's internals
|
the module's internals
|
||||||
@@ -23,17 +25,58 @@ Features:
|
|||||||
over 95% (excluding documentation - you wouldn't want to read
|
over 95% (excluding documentation - you wouldn't want to read
|
||||||
through it all).
|
through it all).
|
||||||
* SOAP::Lite like look and feel
|
* SOAP::Lite like look and feel
|
||||||
o Where possible, SOAP::WSDL mimics SOAP::Lite's API to allow easy migrations
|
o Where possible, SOAP::WSDL mimics SOAP::Lite's API to allow easy migration
|
||||||
* XML schema based class library for creating data objects
|
* XML schema based class library for creating data objects
|
||||||
* High-performance XML parser
|
* High-performance XML parser
|
||||||
* Plugin support. SOAP::WSDL can be extended through plugins in various aspects.
|
* Plugin support. SOAP::WSDL can be extended through plugins in various aspects.
|
||||||
The following plugins are supported:
|
The following plugins are supported:
|
||||||
o Transport plugins via SOAP::WSDL::Factory::Transport
|
o Transport plugins via SOAP::WSDL::Factory::Transport
|
||||||
o Serializer plugins via SOAP::WSDL::Factory::Serializer
|
o Serializer plugins via SOAP::WSDL::Factory::Serializer
|
||||||
o Deserializer plugins via SOAP::WSDL::Factory::Serializer
|
o Deserializer plugins via SOAP::WSDL::Factory::Deserializer
|
||||||
|
|
||||||
The following changes have been made:
|
The following changes have been made:
|
||||||
|
|
||||||
|
2.00.01
|
||||||
|
|
||||||
|
The following features were added (the numbers in square brackets are the
|
||||||
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||||
|
|
||||||
|
* [ 1941134 ] Server for mod_perl2. Thanks to Noah Robin for contributing.
|
||||||
|
|
||||||
|
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/).
|
||||||
|
|
||||||
|
* [ 1944368 ] SOAP/WSDL/XSD/Typelib/SimpleType.pm spelling
|
||||||
|
* [ 1944367 ] SOAP/WSDL/XSD/Typelib/ComplexType.pm spelling
|
||||||
|
* [ 1944364 ] SOAP/WSDL/XSD/Typelib/Builtin.pm spelling
|
||||||
|
* [ 1944362 ] SOAP/WSDL/SOAP/Typelib/Fault11.pm spelling
|
||||||
|
* [ 1944361 ] SOAP/WSDL/Generator/Visitor.pm spelling
|
||||||
|
* [ 1944360 ] SOAP/WSDL/Generator/Iterator/WSDL11.pm spelling
|
||||||
|
* [ 1944359 ] SOAP::WSDL::Factory::Transport spelling
|
||||||
|
* [ 1944355 ] SOAP::WSDL::Deserializer::XSD.pm spelling
|
||||||
|
Thanks to "nobody" for correcting these errors.
|
||||||
|
|
||||||
|
* [ 1942576 ] SOAP/WSDL/Deserializer/SOM.pm spelling.
|
||||||
|
* [ 1942568 ] SOAP/WSDL/Client.pm minor spelling/grammar/style cleanup.
|
||||||
|
* [ 1942562 ] WSDL.pm spelling corrections.
|
||||||
|
Thanks to Noah Robin for providing patches for these errors.
|
||||||
|
|
||||||
|
* #34642 booleans in WSDL attributes don't get converted to perl's
|
||||||
|
representation (for now - not all attributes covered yet)
|
||||||
|
* #34714: MessageParser misses character data in elements just below SOAP-ENV:Body
|
||||||
|
* #34688: wsdl2perl.pl croaks when WSDL operation uses a header
|
||||||
|
|
||||||
|
The following uncategorized improvements have been made:
|
||||||
|
|
||||||
|
* Storable freeze/thaw speedup in conjunction with upcoming version of
|
||||||
|
Class::Std::Fast
|
||||||
|
* improved server doc generation
|
||||||
|
* improved xsi:nil handling
|
||||||
|
* serializing an attribute from http://www.w3.org/XML/1998/namespace now
|
||||||
|
serializes it with xml: prefix. This should probably be moved into the
|
||||||
|
generator, to avoid testing every attribute
|
||||||
|
|
||||||
2.00_33 - Mar 30 2008
|
2.00_33 - Mar 30 2008
|
||||||
|
|
||||||
The following features were added (the numbers in square brackets are the
|
The following features were added (the numbers in square brackets are the
|
||||||
|
|||||||
131
META.yml
131
META.yml
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: SOAP-WSDL
|
name: SOAP-WSDL
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
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
|
||||||
@@ -41,191 +41,214 @@ build_requires:
|
|||||||
provides:
|
provides:
|
||||||
SOAP::WSDL:
|
SOAP::WSDL:
|
||||||
file: lib/SOAP/WSDL.pm
|
file: lib/SOAP/WSDL.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::Base:
|
SOAP::WSDL::Base:
|
||||||
file: lib/SOAP/WSDL/Base.pm
|
file: lib/SOAP/WSDL/Base.pm
|
||||||
version: 2.00_27
|
version: 2.00.01
|
||||||
SOAP::WSDL::Binding:
|
SOAP::WSDL::Binding:
|
||||||
file: lib/SOAP/WSDL/Binding.pm
|
file: lib/SOAP/WSDL/Binding.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::Client:
|
SOAP::WSDL::Client:
|
||||||
file: lib/SOAP/WSDL/Client.pm
|
file: lib/SOAP/WSDL/Client.pm
|
||||||
version: 2.00_27
|
version: 2.00.01
|
||||||
SOAP::WSDL::Client::Base:
|
SOAP::WSDL::Client::Base:
|
||||||
file: lib/SOAP/WSDL/Client/Base.pm
|
file: lib/SOAP/WSDL/Client/Base.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::Definitions:
|
SOAP::WSDL::Definitions:
|
||||||
file: lib/SOAP/WSDL/Definitions.pm
|
file: lib/SOAP/WSDL/Definitions.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
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.01
|
||||||
SOAP::WSDL::Deserializer::SOM:
|
SOAP::WSDL::Deserializer::SOM:
|
||||||
file: lib/SOAP/WSDL/Deserializer/SOM.pm
|
file: lib/SOAP/WSDL/Deserializer/SOM.pm
|
||||||
version: 2.00_24
|
version: 2.00.01
|
||||||
SOAP::WSDL::Deserializer::XSD:
|
SOAP::WSDL::Deserializer::XSD:
|
||||||
file: lib/SOAP/WSDL/Deserializer/XSD.pm
|
file: lib/SOAP/WSDL/Deserializer/XSD.pm
|
||||||
version: 2.00_25
|
version: 2.00.01
|
||||||
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_32
|
version: 2.00.01
|
||||||
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_27
|
version: 2.00.01
|
||||||
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_27
|
version: 2.00.01
|
||||||
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.01
|
||||||
SOAP::WSDL::Factory::Deserializer:
|
SOAP::WSDL::Factory::Deserializer:
|
||||||
file: lib/SOAP/WSDL/Factory/Deserializer.pm
|
file: lib/SOAP/WSDL/Factory/Deserializer.pm
|
||||||
version: 2.00_24
|
version: 2.00.01
|
||||||
SOAP::WSDL::Factory::Generator:
|
SOAP::WSDL::Factory::Generator:
|
||||||
file: lib/SOAP/WSDL/Factory/Generator.pm
|
file: lib/SOAP/WSDL/Factory/Generator.pm
|
||||||
version: 2.00_24
|
version: 2.00.01
|
||||||
SOAP::WSDL::Factory::Serializer:
|
SOAP::WSDL::Factory::Serializer:
|
||||||
file: lib/SOAP/WSDL/Factory/Serializer.pm
|
file: lib/SOAP/WSDL/Factory/Serializer.pm
|
||||||
version: 2.00_24
|
version: 2.00.01
|
||||||
SOAP::WSDL::Factory::Transport:
|
SOAP::WSDL::Factory::Transport:
|
||||||
file: lib/SOAP/WSDL/Factory/Transport.pm
|
file: lib/SOAP/WSDL/Factory/Transport.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::Generator::Iterator::WSDL11:
|
SOAP::WSDL::Generator::Iterator::WSDL11:
|
||||||
file: lib/SOAP/WSDL/Generator/Iterator/WSDL11.pm
|
file: lib/SOAP/WSDL/Generator/Iterator/WSDL11.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::Generator::PrefixResolver:
|
SOAP::WSDL::Generator::PrefixResolver:
|
||||||
file: lib/SOAP/WSDL/Generator/PrefixResolver.pm
|
file: lib/SOAP/WSDL/Generator/PrefixResolver.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::Generator::Template:
|
SOAP::WSDL::Generator::Template:
|
||||||
file: lib/SOAP/WSDL/Generator/Template.pm
|
file: lib/SOAP/WSDL/Generator/Template.pm
|
||||||
version: v2.0033
|
version: 2.00.01
|
||||||
SOAP::WSDL::Generator::Template::Plugin::XSD:
|
SOAP::WSDL::Generator::Template::Plugin::XSD:
|
||||||
file: lib/SOAP/WSDL/Generator/Template/Plugin/XSD.pm
|
file: lib/SOAP/WSDL/Generator/Template/Plugin/XSD.pm
|
||||||
|
version: 2.00.01
|
||||||
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_27
|
version: 2.00.01
|
||||||
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.01
|
||||||
SOAP::WSDL::Generator::Visitor::Typelib:
|
SOAP::WSDL::Generator::Visitor::Typelib:
|
||||||
file: lib/SOAP/WSDL/Generator/Visitor/Typelib.pm
|
file: lib/SOAP/WSDL/Generator/Visitor/Typelib.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::Generator::Visitor::Typemap:
|
SOAP::WSDL::Generator::Visitor::Typemap:
|
||||||
file: lib/SOAP/WSDL/Generator/Visitor/Typemap.pm
|
file: lib/SOAP/WSDL/Generator/Visitor/Typemap.pm
|
||||||
version: 2.00_25
|
version: 2.00.01
|
||||||
SOAP::WSDL::Message:
|
SOAP::WSDL::Message:
|
||||||
file: lib/SOAP/WSDL/Message.pm
|
file: lib/SOAP/WSDL/Message.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::OpMessage:
|
SOAP::WSDL::OpMessage:
|
||||||
file: lib/SOAP/WSDL/OpMessage.pm
|
file: lib/SOAP/WSDL/OpMessage.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::Operation:
|
SOAP::WSDL::Operation:
|
||||||
file: lib/SOAP/WSDL/Operation.pm
|
file: lib/SOAP/WSDL/Operation.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::Part:
|
SOAP::WSDL::Part:
|
||||||
file: lib/SOAP/WSDL/Part.pm
|
file: lib/SOAP/WSDL/Part.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::Port:
|
SOAP::WSDL::Port:
|
||||||
file: lib/SOAP/WSDL/Port.pm
|
file: lib/SOAP/WSDL/Port.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::PortType:
|
SOAP::WSDL::PortType:
|
||||||
file: lib/SOAP/WSDL/PortType.pm
|
file: lib/SOAP/WSDL/PortType.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::SOAP::Address:
|
SOAP::WSDL::SOAP::Address:
|
||||||
file: lib/SOAP/WSDL/SOAP/Address.pm
|
file: lib/SOAP/WSDL/SOAP/Address.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::SOAP::Body:
|
SOAP::WSDL::SOAP::Body:
|
||||||
file: lib/SOAP/WSDL/SOAP/Body.pm
|
file: lib/SOAP/WSDL/SOAP/Body.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::SOAP::Header:
|
SOAP::WSDL::SOAP::Header:
|
||||||
file: lib/SOAP/WSDL/SOAP/Header.pm
|
file: lib/SOAP/WSDL/SOAP/Header.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::SOAP::HeaderFault:
|
SOAP::WSDL::SOAP::HeaderFault:
|
||||||
file: lib/SOAP/WSDL/SOAP/HeaderFault.pm
|
file: lib/SOAP/WSDL/SOAP/HeaderFault.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::SOAP::Operation:
|
SOAP::WSDL::SOAP::Operation:
|
||||||
file: lib/SOAP/WSDL/SOAP/Operation.pm
|
file: lib/SOAP/WSDL/SOAP/Operation.pm
|
||||||
version: 2.00_25
|
version: 2.00.01
|
||||||
SOAP::WSDL::SOAP::Typelib::Fault11:
|
SOAP::WSDL::SOAP::Typelib::Fault11:
|
||||||
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
||||||
version: 2.00_25
|
version: 2.00.01
|
||||||
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_27
|
version: 2.00.01
|
||||||
SOAP::WSDL::Server:
|
SOAP::WSDL::Server:
|
||||||
file: lib/SOAP/WSDL/Server.pm
|
file: lib/SOAP/WSDL/Server.pm
|
||||||
version: 2.00_27
|
version: 2.00.01
|
||||||
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_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::Service:
|
SOAP::WSDL::Service:
|
||||||
file: lib/SOAP/WSDL/Service.pm
|
file: lib/SOAP/WSDL/Service.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::Transport::HTTP:
|
SOAP::WSDL::Transport::HTTP:
|
||||||
file: lib/SOAP/WSDL/Transport/HTTP.pm
|
file: lib/SOAP/WSDL/Transport/HTTP.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::Transport::Loopback:
|
SOAP::WSDL::Transport::Loopback:
|
||||||
file: lib/SOAP/WSDL/Transport/Loopback.pm
|
file: lib/SOAP/WSDL/Transport/Loopback.pm
|
||||||
version: 2.00_25
|
version: 2.00.01
|
||||||
SOAP::WSDL::Transport::Test:
|
SOAP::WSDL::Transport::Test:
|
||||||
file: lib/SOAP/WSDL/Transport/Test.pm
|
file: lib/SOAP/WSDL/Transport/Test.pm
|
||||||
version: 2.00_25
|
version: 2.00.01
|
||||||
SOAP::WSDL::TypeLookup:
|
SOAP::WSDL::TypeLookup:
|
||||||
file: lib/SOAP/WSDL/TypeLookup.pm
|
file: lib/SOAP/WSDL/TypeLookup.pm
|
||||||
version: 2.00_31
|
version: 2.00.01
|
||||||
SOAP::WSDL::Types:
|
SOAP::WSDL::Types:
|
||||||
file: lib/SOAP/WSDL/Types.pm
|
file: lib/SOAP/WSDL/Types.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Annotation:
|
SOAP::WSDL::XSD::Annotation:
|
||||||
file: lib/SOAP/WSDL/XSD/Annotation.pm
|
file: lib/SOAP/WSDL/XSD/Annotation.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Attribute:
|
SOAP::WSDL::XSD::Attribute:
|
||||||
file: lib/SOAP/WSDL/XSD/Attribute.pm
|
file: lib/SOAP/WSDL/XSD/Attribute.pm
|
||||||
version: 2.00_29
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::AttributeGroup:
|
SOAP::WSDL::XSD::AttributeGroup:
|
||||||
file: lib/SOAP/WSDL/XSD/AttributeGroup.pm
|
file: lib/SOAP/WSDL/XSD/AttributeGroup.pm
|
||||||
version: 2.00_29
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Builtin:
|
SOAP::WSDL::XSD::Builtin:
|
||||||
file: lib/SOAP/WSDL/XSD/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Builtin.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::ComplexType:
|
SOAP::WSDL::XSD::ComplexType:
|
||||||
file: lib/SOAP/WSDL/XSD/ComplexType.pm
|
file: lib/SOAP/WSDL/XSD/ComplexType.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Element:
|
SOAP::WSDL::XSD::Element:
|
||||||
file: lib/SOAP/WSDL/XSD/Element.pm
|
file: lib/SOAP/WSDL/XSD/Element.pm
|
||||||
version: 2.00_25
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Enumeration:
|
SOAP::WSDL::XSD::Enumeration:
|
||||||
file: lib/SOAP/WSDL/XSD/Enumeration.pm
|
file: lib/SOAP/WSDL/XSD/Enumeration.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
|
SOAP::WSDL::XSD::FractionDigits:
|
||||||
|
file: lib/SOAP/WSDL/XSD/FractionDigits.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Group:
|
SOAP::WSDL::XSD::Group:
|
||||||
file: lib/SOAP/WSDL/XSD/Group.pm
|
file: lib/SOAP/WSDL/XSD/Group.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Length:
|
SOAP::WSDL::XSD::Length:
|
||||||
file: lib/SOAP/WSDL/XSD/Length.pm
|
file: lib/SOAP/WSDL/XSD/Length.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::MaxExclusive:
|
SOAP::WSDL::XSD::MaxExclusive:
|
||||||
file: lib/SOAP/WSDL/XSD/MaxExclusive.pm
|
file: lib/SOAP/WSDL/XSD/MaxExclusive.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::MaxInclusive:
|
SOAP::WSDL::XSD::MaxInclusive:
|
||||||
file: lib/SOAP/WSDL/XSD/MaxInclusive.pm
|
file: lib/SOAP/WSDL/XSD/MaxInclusive.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::MaxLength:
|
SOAP::WSDL::XSD::MaxLength:
|
||||||
file: lib/SOAP/WSDL/XSD/MaxLength.pm
|
file: lib/SOAP/WSDL/XSD/MaxLength.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::MinExclusive:
|
SOAP::WSDL::XSD::MinExclusive:
|
||||||
file: lib/SOAP/WSDL/XSD/MinExclusive.pm
|
file: lib/SOAP/WSDL/XSD/MinExclusive.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::MinInclusive:
|
SOAP::WSDL::XSD::MinInclusive:
|
||||||
file: lib/SOAP/WSDL/XSD/MinInclusive.pm
|
file: lib/SOAP/WSDL/XSD/MinInclusive.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::MinLength:
|
SOAP::WSDL::XSD::MinLength:
|
||||||
file: lib/SOAP/WSDL/XSD/MinLength.pm
|
file: lib/SOAP/WSDL/XSD/MinLength.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Pattern:
|
SOAP::WSDL::XSD::Pattern:
|
||||||
file: lib/SOAP/WSDL/XSD/Pattern.pm
|
file: lib/SOAP/WSDL/XSD/Pattern.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Schema:
|
SOAP::WSDL::XSD::Schema:
|
||||||
file: lib/SOAP/WSDL/XSD/Schema.pm
|
file: lib/SOAP/WSDL/XSD/Schema.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Schema::Builtin:
|
SOAP::WSDL::XSD::Schema::Builtin:
|
||||||
file: lib/SOAP/WSDL/XSD/Schema/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Schema/Builtin.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::SimpleType:
|
SOAP::WSDL::XSD::SimpleType:
|
||||||
file: lib/SOAP/WSDL/XSD/SimpleType.pm
|
file: lib/SOAP/WSDL/XSD/SimpleType.pm
|
||||||
version: 2.00_25
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::TotalDigits:
|
SOAP::WSDL::XSD::TotalDigits:
|
||||||
file: lib/SOAP/WSDL/XSD/TotalDigits.pm
|
file: lib/SOAP/WSDL/XSD/TotalDigits.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Typelib::Attribute:
|
SOAP::WSDL::XSD::Typelib::Attribute:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Attribute.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Attribute.pm
|
||||||
version: 2.00_29
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Typelib::AttributeSet:
|
SOAP::WSDL::XSD::Typelib::AttributeSet:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/AttributeSet.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/AttributeSet.pm
|
||||||
version: 2.00_29
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin:
|
SOAP::WSDL::XSD::Typelib::Builtin:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
||||||
version: 2.00_25
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::ENTITY:
|
SOAP::WSDL::XSD::Typelib::Builtin::ENTITY:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::ID:
|
SOAP::WSDL::XSD::Typelib::Builtin::ID:
|
||||||
@@ -323,17 +346,19 @@ 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_33
|
version: 2.00.01
|
||||||
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_29
|
version: 2.00.01
|
||||||
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
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::Typelib::SimpleType::restriction:
|
SOAP::WSDL::XSD::Typelib::SimpleType::restriction:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
||||||
|
version: 2.00.01
|
||||||
SOAP::WSDL::XSD::WhiteSpace:
|
SOAP::WSDL::XSD::WhiteSpace:
|
||||||
file: lib/SOAP/WSDL/XSD/WhiteSpace.pm
|
file: lib/SOAP/WSDL/XSD/WhiteSpace.pm
|
||||||
version: 2.00_33
|
version: 2.00.01
|
||||||
generated_by: Module::Build version 0.2808
|
generated_by: Module::Build version 0.2808
|
||||||
meta-spec:
|
meta-spec:
|
||||||
url: http://module-build.sourceforge.net/META-spec-v1.2.html
|
url: http://module-build.sourceforge.net/META-spec-v1.2.html
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
# Unfortunately, Build testcover reports test coverage wrong.
|
# Unfortunately, Build testcover reports test coverage wrong.
|
||||||
#
|
#
|
||||||
# To get a complete coverage report, just run this file as a shell script
|
# To get a complete coverage report, just run this file as a shell script
|
||||||
# on a linux box (or execute the equivalent commands on another OS):
|
# on a linux box (or execute the equivalent commands on another OS):
|
||||||
|
#
|
||||||
|
# Note that this shell script requires Devel::CoverX::Covered - if you
|
||||||
|
# don't have it, comment out the line noted below
|
||||||
|
#
|
||||||
cd t/
|
cd t/
|
||||||
|
cover -delete
|
||||||
find . -type f -name '*.t' | xargs -n 1 /usr/bin/perl -MDevel::Cover=-silent,1,-summary,0 -I../lib
|
find . -type f -name '*.t' | xargs -n 1 /usr/bin/perl -MDevel::Cover=-silent,1,-summary,0 -I../lib
|
||||||
|
|
||||||
|
# Devel::CoverX::Covered
|
||||||
|
covered runs
|
||||||
|
|
||||||
cover -ignore_re \.t$ -ignore_re ^lib -coverage="statement" -coverage=condition -coverage=subroutine -coverage="branch"
|
cover -ignore_re \.t$ -ignore_re ^lib -coverage="statement" -coverage=condition -coverage=subroutine -coverage="branch"
|
||||||
|
|
||||||
|
|||||||
5
TODO
5
TODO
@@ -1,10 +1,5 @@
|
|||||||
TODO list for SOAP::WSDL
|
TODO list for SOAP::WSDL
|
||||||
|
|
||||||
2.00 Pre-releases
|
|
||||||
--------
|
|
||||||
|
|
||||||
* Act as SOAP Server [ 1842436 ]
|
|
||||||
|
|
||||||
2.1 release
|
2.1 release
|
||||||
--------
|
--------
|
||||||
* Support namespaces in SOAP message payload [ 1809057 ]
|
* Support namespaces in SOAP message payload [ 1809057 ]
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
%DB::packages=(SOAP::WSDL::Expat::MessageParser => 1);
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use lib '../../Class-Std-Fast/lib';
|
use lib '../../Class-Std-Fast/lib';
|
||||||
|
use lib '/home/martin/workspace/SOAP-WSDL_XS/blib/lib';
|
||||||
|
use lib '/home/martin/workspace/SOAP-WSDL_XS/blib/arch';
|
||||||
use lib '../t/lib';
|
use lib '../t/lib';
|
||||||
# use SOAP::WSDL::SAX::MessageHandler;
|
# use SOAP::WSDL::SAX::MessageHandler;
|
||||||
|
|
||||||
use Benchmark qw(cmpthese timethese);
|
use Benchmark qw(cmpthese timethese);
|
||||||
use SOAP::WSDL::Expat::MessageParser;
|
use SOAP::WSDL::Expat::MessageParser;
|
||||||
use SOAP::WSDL::Expat::Message2Hash;
|
use SOAP::WSDL::Expat::Message2Hash;
|
||||||
|
use SOAP::WSDL::Expat::MessageParser_XS;
|
||||||
use SOAP::Lite;
|
use SOAP::Lite;
|
||||||
use XML::Simple;
|
use XML::Simple;
|
||||||
use XML::LibXML;
|
use XML::LibXML;
|
||||||
@@ -17,24 +19,50 @@ use MyComplexType;
|
|||||||
use MyElement;
|
use MyElement;
|
||||||
use MySimpleType;
|
use MySimpleType;
|
||||||
|
|
||||||
my $xml = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
my $xml = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||||
<SOAP-ENV:Body>
|
<SOAP-ENV:Body>
|
||||||
<MyAtomicComplexTypeElement xmlns="urn:Test" >
|
<MyAtomicComplexTypeElement xmlns="urn:Test" >
|
||||||
<test>
|
<test>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test2</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test3</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test4</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test5</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test6</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test7</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test8</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test9</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test10</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test11</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test12</test2>
|
||||||
<test2 >Test2</test2>
|
<test2 >Test13</test2>
|
||||||
<test2 >Test55</test2>
|
<test2 >Test55</test2>
|
||||||
|
<test2 >Test14</test2>
|
||||||
|
<test2 >Test15</test2>
|
||||||
|
<test2 >Test16</test2>
|
||||||
|
<test2 >Test17</test2>
|
||||||
|
<test2 >Test18</test2>
|
||||||
|
<test2 >Test19</test2>
|
||||||
|
<test2 >Test20</test2>
|
||||||
|
<test2 >Test21</test2>
|
||||||
|
<test2 >Test22</test2>
|
||||||
|
<test2 >Test23</test2>
|
||||||
|
<test2 >Test24</test2>
|
||||||
|
<test2 >Test25</test2>
|
||||||
|
<test2 >Test565</test2>
|
||||||
|
<test2 >Test27</test2>
|
||||||
|
<test2 >Test28</test2>
|
||||||
|
<test2 >Test29</test2>
|
||||||
|
<test2 >Test30</test2>
|
||||||
|
<test2 >Test31</test2>
|
||||||
|
<test2 >Test32</test2>
|
||||||
|
<test2 >Test33</test2>
|
||||||
|
<test2 >Test34</test2>
|
||||||
|
<test2 >Test35</test2>
|
||||||
|
<test2 >Test36</test2>
|
||||||
|
<test2 >Test37</test2>
|
||||||
|
<test2 >Test38</test2>
|
||||||
|
<test2 >Test55</test2>
|
||||||
</test>
|
</test>
|
||||||
</MyAtomicComplexTypeElement>
|
</MyAtomicComplexTypeElement>
|
||||||
</SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
</SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
||||||
@@ -57,13 +85,17 @@ my @data;
|
|||||||
|
|
||||||
my $deserializer = SOAP::Deserializer->new();
|
my $deserializer = SOAP::Deserializer->new();
|
||||||
|
|
||||||
sub libxml_test {
|
my $parser_xs = SOAP::WSDL::Expat::MessageParser_XS->new({
|
||||||
|
class_resolver => 'FakeResolver'
|
||||||
|
});
|
||||||
|
|
||||||
|
sub libxml_test {
|
||||||
my $dom = $libxml->parse_string( $xml );
|
my $dom = $libxml->parse_string( $xml );
|
||||||
push @data, dom2hash( $dom->firstChild );
|
push @data, dom2hash( $dom->firstChild );
|
||||||
};
|
};
|
||||||
|
|
||||||
sub dom2hash {
|
sub dom2hash {
|
||||||
for ($_[0]->childNodes) {
|
for ($_[0]->childNodes) {
|
||||||
if (exists $_[1]->{ $_->nodeName }) {
|
if (exists $_[1]->{ $_->nodeName }) {
|
||||||
if (ref $_[1]->{ $_->nodeName } eq 'ARRAY') {
|
if (ref $_[1]->{ $_->nodeName } eq 'ARRAY') {
|
||||||
if ($_->nodeName eq '#text') {
|
if ($_->nodeName eq '#text') {
|
||||||
@@ -78,7 +110,7 @@ sub dom2hash {
|
|||||||
$_[1] = [ $_[1], $_->textContent() ];
|
$_[1] = [ $_[1], $_->textContent() ];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_[1]->{ $_->nodeName } = [ $_[1]->{ $_->nodeName } ,
|
$_[1]->{ $_->nodeName } = [ $_[1]->{ $_->nodeName } ,
|
||||||
dom2hash( $_, {} ) ];
|
dom2hash( $_, {} ) ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,11 +126,11 @@ sub dom2hash {
|
|||||||
}
|
}
|
||||||
return $_[1];
|
return $_[1];
|
||||||
}
|
}
|
||||||
|
cmpthese 5000,
|
||||||
cmpthese 5000,
|
|
||||||
{
|
{
|
||||||
'SOAP::WSDL (Hash)' => sub { push @data, $hash_parser->parse( $xml ) },
|
'SOAP::WSDL (Hash)' => sub { push @data, $hash_parser->parse( $xml ) },
|
||||||
'SOAP::WSDL (XSD)' => sub { push @data, $parser->parse( $xml ) },
|
'SOAP::WSDL (XSD)' => sub { push @data, $parser->parse( $xml ) },
|
||||||
|
'SOAP::WSDL_XS (XSD)' => sub { push @data, $parser_xs->parse_string( $xml ) },
|
||||||
'XML::Simple (Hash)' => sub { push @data, XMLin $xml },
|
'XML::Simple (Hash)' => sub { push @data, XMLin $xml },
|
||||||
'XML::LibXML (DOM)' => sub { push @data, $libxml->parse_string( $xml ) },
|
'XML::LibXML (DOM)' => sub { push @data, $libxml->parse_string( $xml ) },
|
||||||
'XML::LibXML (Hash)' => \&libxml_test,
|
'XML::LibXML (Hash)' => \&libxml_test,
|
||||||
@@ -128,3 +160,18 @@ BEGIN {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
Output on my machine:
|
||||||
|
|
||||||
|
xml length: 641 bytes
|
||||||
|
Rate SOAP::Lite XML::Simple (Hash) SOAP::WSDL (XSD) XML::LibXML (Hash) SOAP::WSDL (Hash) SOAP::WSDL_XS (XSD) XML::LibXML (DOM)
|
||||||
|
SOAP::Lite 446/s -- -54% -72% -73% -80% -95% -96%
|
||||||
|
XML::Simple (Hash) 963/s 116% -- -39% -41% -57% -89% -91%
|
||||||
|
SOAP::WSDL (XSD) 1587/s 256% 65% -- -3% -29% -81% -86%
|
||||||
|
XML::LibXML (Hash) 1629/s 265% 69% 3% -- -27% -81% -85%
|
||||||
|
SOAP::WSDL (Hash) 2222/s 398% 131% 40% 36% -- -74% -80%
|
||||||
|
SOAP::WSDL_XS (XSD) 8475/s 1798% 780% 434% 420% 281% -- -24%
|
||||||
|
XML::LibXML (DOM) 11111/s 2389% 1053% 600% 582% 400% 31% --
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ my $obj = SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new();
|
|||||||
timethese 10000, {
|
timethese 10000, {
|
||||||
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new() },
|
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new() },
|
||||||
'new + params' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({
|
'new + params' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({
|
||||||
value => 'Teststring'
|
value => 'Teststring',
|
||||||
}) },
|
}) },
|
||||||
'set_FOO' => sub { $obj->set_value('Test') },
|
'set_FOO' => sub { $obj->set_value('Test') },
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,8 +11,9 @@ my $obj = SOAP::WSDL::XSD::Typelib::Builtin::string->new();
|
|||||||
timethese 20000, {
|
timethese 20000, {
|
||||||
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::string->new() },
|
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::string->new() },
|
||||||
'new + params' => sub { SOAP::WSDL::XSD::Typelib::Builtin::string->new({
|
'new + params' => sub { SOAP::WSDL::XSD::Typelib::Builtin::string->new({
|
||||||
value => 'Teststring'
|
value => 'Teststring',
|
||||||
}) },
|
})
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
$obj->set_value('Foobar');
|
$obj->set_value('Foobar');
|
||||||
@@ -36,7 +37,7 @@ new + params: 1 wallclock secs ( 0.53 usr + 0.01 sys = 0.54 CPU) @ 37037.04/s
|
|||||||
Benchmark: timing 1000000 iterations of get_FOO, set_FOO...
|
Benchmark: timing 1000000 iterations of get_FOO, set_FOO...
|
||||||
get_FOO: 2 wallclock secs ( 1.43 usr + 0.01 sys = 1.44 CPU) @ 694444.44/s (n=1000000)
|
get_FOO: 2 wallclock secs ( 1.43 usr + 0.01 sys = 1.44 CPU) @ 694444.44/s (n=1000000)
|
||||||
set_FOO: 0 wallclock secs ( 1.43 usr + 0.01 sys = 1.44 CPU) @ 694444.44/s (n=1000000)
|
set_FOO: 0 wallclock secs ( 1.43 usr + 0.01 sys = 1.44 CPU) @ 694444.44/s (n=1000000)
|
||||||
|
|
||||||
|
|
||||||
::Fast
|
::Fast
|
||||||
---
|
---
|
||||||
@@ -47,7 +48,7 @@ Benchmark: timing 1000000 iterations of get_FOO, set_FOO...
|
|||||||
get_FOO: 0 wallclock secs ( 0.81 usr + 0.00 sys = 0.81 CPU) @ 1234567.90/s (n=1000000)
|
get_FOO: 0 wallclock secs ( 0.81 usr + 0.00 sys = 0.81 CPU) @ 1234567.90/s (n=1000000)
|
||||||
set_FOO: 2 wallclock secs ( 0.87 usr + 0.01 sys = 0.88 CPU) @ 1136363.64/s (n=1000000)
|
set_FOO: 2 wallclock secs ( 0.87 usr + 0.01 sys = 0.88 CPU) @ 1136363.64/s (n=1000000)
|
||||||
|
|
||||||
::Fast with inlined ID
|
::Fast with inlined ID
|
||||||
Benchmark: timing 20000 iterations of new, new + params...
|
Benchmark: timing 20000 iterations of new, new + params...
|
||||||
new: 0 wallclock secs ( 0.41 usr + 0.00 sys = 0.41 CPU) @ 48780.49/s (n=20000)
|
new: 0 wallclock secs ( 0.41 usr + 0.00 sys = 0.41 CPU) @ 48780.49/s (n=20000)
|
||||||
new + params: 1 wallclock secs ( 0.52 usr + 0.00 sys = 0.52 CPU) @ 38461.54/s (n=20000)
|
new + params: 1 wallclock secs ( 0.52 usr + 0.00 sys = 0.52 CPU) @ 38461.54/s (n=20000)
|
||||||
|
|||||||
@@ -1,29 +1,43 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
use diagnostics;
|
||||||
use lib '../example/lib';
|
use lib '../example/lib';
|
||||||
use lib '/home/martin/workspace/SOAP-WSDL-Fast_XS/blib/lib';
|
use lib '../../SOAP-Lite-0.71/lib';
|
||||||
use lib '/home/martin/workspace/SOAP-WSDL-Fast_XS/blib/arch';
|
use lib '/home/martin/workspace/SOAP-WSDL_XS/blib/lib';
|
||||||
|
use lib '/home/martin/workspace/SOAP-WSDL_XS/blib/arch';
|
||||||
|
use Data::Dumper;
|
||||||
use SOAP::Lite;
|
use SOAP::Lite;
|
||||||
use XML::Compile::WSDL11;
|
use XML::Compile::WSDL11;
|
||||||
use XML::Compile::Transport::SOAPHTTP;
|
use XML::Compile::Transport::SOAPHTTP;
|
||||||
use MyInterfaces::HelloWorld::HelloWorldSoap;
|
use MyInterfaces::HelloWorld::HelloWorldSoap;
|
||||||
use SOAP::WSDL::Deserializer::XSD_XS;
|
use SOAP::WSDL::Deserializer::XSD_XS;
|
||||||
use Benchmark qw(cmpthese);
|
use Benchmark qw(cmpthese timethese);
|
||||||
|
|
||||||
|
use SOAP::WSDL::Transport::HTTP;
|
||||||
|
use SOAP::WSDL::Factory::Transport;
|
||||||
|
SOAP::WSDL::Factory::Transport->register('http', 'SOAP::WSDL::Transport::HTTP');
|
||||||
|
|
||||||
|
#my $proxy = 'http://localhost:81/soap-wsdl-test/helloworld.pl';
|
||||||
|
my $proxy = 'http://localhost:81/soap-wsdl-test/helloworld';
|
||||||
|
|
||||||
my $lite = SOAP::Lite->new(
|
my $lite = SOAP::Lite->new(
|
||||||
proxy => 'http://localhost:81/soap-wsdl-test/helloworld.pl'
|
proxy => $proxy
|
||||||
);
|
);
|
||||||
|
|
||||||
$lite->on_action( sub { "urn:HelloWorld#sayHello" });
|
$lite->on_action( sub { "urn:HelloWorld#sayHello" });
|
||||||
$lite->autotype(0);
|
$lite->autotype(0);
|
||||||
|
|
||||||
my $soap = MyInterfaces::HelloWorld::HelloWorldSoap->new();
|
my $soap = MyInterfaces::HelloWorld::HelloWorldSoap->new({
|
||||||
|
proxy => $proxy,
|
||||||
|
});
|
||||||
|
|
||||||
my $soap_xs = MyInterfaces::HelloWorld::HelloWorldSoap->new();
|
my $soap_xs = MyInterfaces::HelloWorld::HelloWorldSoap->new({
|
||||||
|
proxy => $proxy,
|
||||||
|
});
|
||||||
$soap_xs->set_deserializer( SOAP::WSDL::Deserializer::XSD_XS->new() );
|
$soap_xs->set_deserializer( SOAP::WSDL::Deserializer::XSD_XS->new() );
|
||||||
|
|
||||||
my @result;
|
my @result = ();;
|
||||||
|
|
||||||
sub wsdl_bench {
|
sub wsdl_bench {
|
||||||
push @result, $soap->sayHello({
|
push @result, $soap->sayHello({
|
||||||
@@ -40,7 +54,12 @@ sub wsdl_xs_bench {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $wsdl = XML::Compile::WSDL11->new('../example/wsdl/11_helloworld.wsdl');
|
my $wsdl = XML::Compile::WSDL11->new('../example/wsdl/11_helloworld.wsdl');
|
||||||
my $call = $wsdl->compileClient('sayHello');
|
my $call = $wsdl->compileClient('sayHello',
|
||||||
|
sloppy_integers => 1,
|
||||||
|
check_values => 0,
|
||||||
|
check_values => 0,
|
||||||
|
validation => 0,
|
||||||
|
);
|
||||||
|
|
||||||
sub compile_bench {
|
sub compile_bench {
|
||||||
push @result, $call->(
|
push @result, $call->(
|
||||||
@@ -58,12 +77,16 @@ sub lite_bench {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# give all a chance to perform first-run initializations
|
||||||
|
compile_bench();
|
||||||
|
lite_bench();
|
||||||
wsdl_bench();
|
wsdl_bench();
|
||||||
wsdl_xs_bench();
|
wsdl_xs_bench();
|
||||||
|
|
||||||
cmpthese 150, {
|
timethese 150, {
|
||||||
'SOAP::WSDL' => \&wsdl_bench,
|
'SOAP::WSDL' => \&wsdl_bench,
|
||||||
'SOAP::WSDL_XS' => \&wsdl_xs_bench,
|
'SOAP::WSDL_XS' => \&wsdl_xs_bench,
|
||||||
'XML::Compile' => \&compile_bench,
|
'XML::Compile' => \&compile_bench,
|
||||||
# 'SOAP::Lite' => \&lite_bench,
|
'SOAP::Lite' => \&lite_bench,
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use lib '../example/lib';
|
use lib '../example/lib';
|
||||||
|
use lib '../../Class-Std-Fast/lib';
|
||||||
|
use lib '../../SOAP-Lite-0.71/lib';
|
||||||
use lib '../../SOAP-WSDL_XS/blib/lib';
|
use lib '../../SOAP-WSDL_XS/blib/lib';
|
||||||
use lib '../../SOAP-WSDL_XS/blib/arch';
|
use lib '../../SOAP-WSDL_XS/blib/arch';
|
||||||
use strict;
|
use strict;
|
||||||
@@ -11,15 +13,80 @@ use XML::Compile::Util;
|
|||||||
use XML::Compile::WSDL11;
|
use XML::Compile::WSDL11;
|
||||||
use XML::Simple;
|
use XML::Simple;
|
||||||
|
|
||||||
|
use SOAP::Lite;
|
||||||
|
use MyInterfaces::TestService::TestPort;
|
||||||
|
|
||||||
use SOAP::WSDL::Deserializer::XSD_XS;
|
use SOAP::WSDL::Deserializer::XSD_XS;
|
||||||
use SOAP::WSDL::Factory::Deserializer;
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
|
|
||||||
|
#
|
||||||
|
# register SOAP::WSDL's transport as default for SOAP::WSDL and SOAP::WSDL_XS
|
||||||
|
# - they use SOAP::Lite's SOAP::Transport::* if available
|
||||||
|
#
|
||||||
|
use SOAP::WSDL::Transport::HTTP;
|
||||||
|
use SOAP::WSDL::Factory::Transport;
|
||||||
|
SOAP::WSDL::Factory::Transport->register('http', 'SOAP::WSDL::Transport::HTTP');
|
||||||
|
|
||||||
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
|
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
|
||||||
use SOAP::Lite;
|
|
||||||
|
|
||||||
use MyInterfaces::TestService::TestPort;
|
my $person = {
|
||||||
|
PersonID => { # MyTypes::PersonID
|
||||||
|
ID => 1, # int
|
||||||
|
},
|
||||||
|
Salutation => 'Salutation0', # string
|
||||||
|
Name => 'Name0', # string
|
||||||
|
GivenName => 'Martin', # string
|
||||||
|
DateOfBirth => '1970-01-01', # date
|
||||||
|
HomeAddress => { # MyTypes::Address
|
||||||
|
Street => 'Street 0', # string
|
||||||
|
ZIP => '00000', # string
|
||||||
|
City => 'City0', # string
|
||||||
|
Country => 'Country0', # string
|
||||||
|
PhoneNumber => '++499131123456', # PhoneNumber
|
||||||
|
MobilePhoneNumber => '++49150123456', # PhoneNumber
|
||||||
|
},
|
||||||
|
WorkAddress => { # MyTypes::Address
|
||||||
|
Street => 'Somestreet 23', # string
|
||||||
|
ZIP => '12345', # string
|
||||||
|
City => 'SomeCity', # string
|
||||||
|
Country => 'Germany', # string
|
||||||
|
PhoneNumber => '++499131123456', # PhoneNumber
|
||||||
|
MobilePhoneNumber => '++49150123456', # PhoneNumber
|
||||||
|
},
|
||||||
|
Contracts => { # MyTypes::ArrayOfContract
|
||||||
|
Contract => [
|
||||||
|
{ # MyTypes::Contract
|
||||||
|
ContractID => 100000, # long
|
||||||
|
ContractName => 'SomeContract0', # string
|
||||||
|
},
|
||||||
|
{ # MyTypes::Contract
|
||||||
|
ContractID => 100001, # long
|
||||||
|
ContractName => 'SomeContract1', # string
|
||||||
|
},
|
||||||
|
{ # MyTypes::Contract
|
||||||
|
ContractID => 100002, # long
|
||||||
|
ContractName => 'SomeContract2', # string
|
||||||
|
},
|
||||||
|
{ # MyTypes::Contract
|
||||||
|
ContractID => 100003, # long
|
||||||
|
ContractName => 'SomeContract3', # string
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
;
|
||||||
|
#
|
||||||
|
# compile XML::Compile client with the options suggested by Mark Overmeer
|
||||||
|
# for maximum speedup
|
||||||
|
#
|
||||||
|
my $compile = XML::Compile::WSDL11->new('../example/wsdl/Person.wsdl',
|
||||||
|
sloppy_integers => 1,
|
||||||
|
check_values => 0,
|
||||||
|
check_values => 0,
|
||||||
|
validation => 0,
|
||||||
|
ignore_facets => 1,
|
||||||
|
);
|
||||||
|
|
||||||
my $compile = XML::Compile::WSDL11->new('../example/wsdl/Person.wsdl');
|
|
||||||
my $call = $compile->compileClient('ListPerson');
|
my $call = $compile->compileClient('ListPerson');
|
||||||
$call->({ in => undef});
|
$call->({ in => undef});
|
||||||
|
|
||||||
@@ -52,34 +119,45 @@ Benchmark $n: Store result in private variable and destroy it
|
|||||||
";
|
";
|
||||||
$n++;
|
$n++;
|
||||||
cmpthese $count, {
|
cmpthese $count, {
|
||||||
# 'XML::Simple' => sub { my $result = XMLin( MyData::xml() )},
|
'SOAP::WSDL' => sub { my $result = $soap->ListPerson({}) },
|
||||||
# 'SOAP::WSDL' => sub { my $result = $soap->ListPerson({}) },
|
'XML::Compile' => sub { my $result = $call->() },
|
||||||
# 'XML::Compile' => sub { my $result = $call->() },
|
|
||||||
'SOAP::WSDL_XS' => sub { my $result = $wsdl_xs->ListPerson({}) },
|
'SOAP::WSDL_XS' => sub { my $result = $wsdl_xs->ListPerson({}) },
|
||||||
# 'SOAP::Lite' => sub { my $result = $deserializer->deserialize( MyData::xml() )},
|
'SOAP::Lite' => sub { my $som = $lite->call('ListPerson') },
|
||||||
# 'SOAP::Lite' => sub { my $som = $lite->call('ListPerson') },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
print "\nBenchmark $n: Push result on list\n";
|
print "\nBenchmark $n: Push result on list\n";
|
||||||
$n++;
|
$n++;
|
||||||
cmpthese $count, {
|
cmpthese $count, {
|
||||||
# 'XML::Simple' => sub { push @data, XMLin( MyData::xml() )},
|
'SOAP::WSDL' => sub { push @data, $soap->ListPerson({}) },
|
||||||
# 'SOAP::WSDL' => sub { push @data, $soap->ListPerson({}) },
|
'XML::Compile' => sub { push @data, $call->() },
|
||||||
# 'XML::Compile' => sub { push @data, $call->() },
|
|
||||||
'SOAP::WSDL_XS' => sub { push @data, $wsdl_xs->ListPerson({}) },
|
'SOAP::WSDL_XS' => sub { push @data, $wsdl_xs->ListPerson({}) },
|
||||||
# 'SOAP::Lite' => sub { push @data, $deserializer->deserialize( MyData::xml() )}
|
'SOAP::Lite' => sub { push @data, $lite->call('ListPerson') },
|
||||||
# 'SOAP::Lite' => sub { push @data, $lite->call('ListPerson') },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@data = ();
|
@data = ();
|
||||||
print "\nBenchmark $n: Play it again, Sam\n";
|
print "\nBenchmark $n: Play it again, Sam\n";
|
||||||
|
$n++;
|
||||||
cmpthese $count, {
|
cmpthese $count, {
|
||||||
# 'XML::Simple' => sub { push @data, XMLin( MyData::xml() )},
|
|
||||||
# 'SOAP::WSDL' => sub { push @data, $soap->ListPerson({}) },
|
'SOAP::WSDL' => sub { push @data, $soap->ListPerson({}) },
|
||||||
'SOAP::WSDL_XS' => sub { push @data, $wsdl_xs->ListPerson({}) },
|
'SOAP::WSDL_XS' => sub { push @data, $wsdl_xs->ListPerson({}) },
|
||||||
# 'XML::Compile' => sub { push @data, $call->() },
|
'XML::Compile' => sub { push @data, $call->() },
|
||||||
# 'SOAP::Lite' => sub { push @data, $deserializer->deserialize( MyData::xml() )}
|
'SOAP::Lite' => sub { push @data, $lite->call('ListPerson') },
|
||||||
# 'SOAP::Lite' => sub { push @data, $lite->call('ListPerson') },
|
};
|
||||||
|
|
||||||
|
print "\nBenchmark $n: ca. 1kB request - result destroyed immediately\n";
|
||||||
|
$n++;
|
||||||
|
cmpthese $count, {
|
||||||
|
'SOAP::WSDL' => sub { my $result = $soap->ListPerson({ in => $person }) },
|
||||||
|
'SOAP::WSDL_XS' => sub { my $result = $wsdl_xs->ListPerson({ in => $person }) },
|
||||||
|
'XML::Compile' => sub { my $result = $call->({ in => $person }) },
|
||||||
|
};
|
||||||
|
|
||||||
|
print "\nBenchmark $n: ca. 1kB request - push result on list\n";
|
||||||
|
$n++;
|
||||||
|
cmpthese $count, {
|
||||||
|
'SOAP::WSDL' => sub { push @data, $soap->ListPerson({ in => $person }) },
|
||||||
|
'SOAP::WSDL_XS' => sub { push @data, $wsdl_xs->ListPerson({ in => $person }) },
|
||||||
|
'XML::Compile' => sub { push @data, $call->({ in => $person }) },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ use lib '../../SOAP-WSDL_XS/blib/lib';
|
|||||||
use lib '../../SOAP-WSDL_XS/blib/arch';
|
use lib '../../SOAP-WSDL_XS/blib/arch';
|
||||||
use strict;
|
use strict;
|
||||||
use Benchmark;
|
use Benchmark;
|
||||||
|
use Storable;
|
||||||
#use SOAP::WSDL::Deserializer::XSD_XS;
|
#use SOAP::WSDL::Deserializer::XSD_XS;
|
||||||
use SOAP::WSDL::Factory::Deserializer;
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
# # register for SOAP 1.1
|
# # register for SOAP 1.1
|
||||||
@@ -15,13 +16,21 @@ my @data = ();
|
|||||||
my $soap = MyInterfaces::TestService::TestPort->new();
|
my $soap = MyInterfaces::TestService::TestPort->new();
|
||||||
|
|
||||||
# Load all classes - XML::Compile has created everything before, too
|
# Load all classes - XML::Compile has created everything before, too
|
||||||
timethis 100, sub { $soap->ListPerson({}) };
|
#timethis 100, sub { $soap->ListPerson({}) };
|
||||||
#timethis 50, sub { push @data, $soap->ListPerson({}) };
|
#timethis 50, sub { push @data, $soap->ListPerson({}) };
|
||||||
#@data = ();
|
#@data = ();
|
||||||
# timethis 50, sub { push @data, $soap->ListPerson({}) };
|
# timethis 50, sub { push @data, $soap->ListPerson({}) };
|
||||||
|
|
||||||
# for (1..50) { push @data, $soap->ListPerson({}) };
|
# for (1..50) { push @data, $soap->ListPerson({}) };
|
||||||
#print $soap->ListPerson({});
|
#print $soap->ListPerson({});
|
||||||
|
my $result = $soap->ListPerson({});
|
||||||
|
|
||||||
|
timethis 30 , sub {
|
||||||
|
my $frozen = Storable::freeze( $result );
|
||||||
|
my $thawed = Storable::thaw($frozen);
|
||||||
|
};
|
||||||
|
# print $thawed;
|
||||||
|
|
||||||
|
|
||||||
package Transport;
|
package Transport;
|
||||||
use Class::Std::Fast;
|
use Class::Std::Fast;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
package main;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use lib '../../lib';
|
use lib '../../lib';
|
||||||
@@ -33,7 +34,7 @@ in examples/wsdl/helloworld.wsdl
|
|||||||
Before using this script, you should secure your webserver. The easiest way
|
Before using this script, you should secure your webserver. The easiest way
|
||||||
to do so is to let it listen to 127.0.0.1 only.
|
to do so is to let it listen to 127.0.0.1 only.
|
||||||
|
|
||||||
Then make a ScriptAlias named /soap-wsdl-test/ pointing at the directory
|
Then make a ScriptAlias named /soap-wsdl-test/ pointing at the directory
|
||||||
this file lies in.
|
this file lies in.
|
||||||
|
|
||||||
For my apache, it looks like this:
|
For my apache, it looks like this:
|
||||||
|
|||||||
@@ -15,12 +15,11 @@ my %dispatch_to :ATTR(:name<dispatch_to>);
|
|||||||
|
|
||||||
my $action_map_ref = {
|
my $action_map_ref = {
|
||||||
'urn:HelloWorld#sayHello' => 'sayHello',
|
'urn:HelloWorld#sayHello' => 'sayHello',
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
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,
|
||||||
@@ -30,7 +29,7 @@ sub START {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub handle {
|
sub handle {
|
||||||
$transport_of{ ${ $_[0] } }->handle();
|
$transport_of{ ${ $_[0] } }->handle(@_[1..$#_]);
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
@@ -76,7 +75,7 @@ located at http://localhost:81/soap-wsdl-test/helloworld.pl.
|
|||||||
|
|
||||||
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
|
||||||
@@ -94,9 +93,9 @@ class.
|
|||||||
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 MyElements::sayHelloResponse->new( {
|
return MyElements::sayHelloResponse->new( {
|
||||||
sayHelloResult => $some_value, # string
|
sayHelloResult => $some_value, # string
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ use Class::Std::Fast;
|
|||||||
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
||||||
use LWP::UserAgent;
|
use LWP::UserAgent;
|
||||||
|
|
||||||
our $VERSION= '2.00_33';
|
use version; our $VERSION= qv('2.00.01');
|
||||||
|
|
||||||
my %no_dispatch_of :ATTR(:name<no_dispatch>);
|
my %no_dispatch_of :ATTR(:name<no_dispatch>);
|
||||||
my %wsdl_of :ATTR(:name<wsdl>);
|
my %wsdl_of :ATTR(:name<wsdl>);
|
||||||
@@ -512,7 +512,7 @@ it's content.
|
|||||||
The object tree has two main functions: It knows how to serialize data passed
|
The object tree has two main functions: It knows how to serialize data passed
|
||||||
as hash ref, and how to render the WSDL elements found into perl classes.
|
as hash ref, and how to render the WSDL elements found into perl classes.
|
||||||
|
|
||||||
Yup your're right, there's a builting code generation facility. Read
|
Yup you're right; there's a builtin code generation facility. Read
|
||||||
L<SOAP::WSDL::Manual> for using it.
|
L<SOAP::WSDL::Manual> for using it.
|
||||||
|
|
||||||
=item * no_dispatch
|
=item * no_dispatch
|
||||||
@@ -595,7 +595,7 @@ See L<class_resolver|class_resolver> above.
|
|||||||
|
|
||||||
=item * Hash refs
|
=item * Hash refs
|
||||||
|
|
||||||
This is for convnience: A single hash ref containing the content of the
|
This is for convenience: A single hash ref containing the content of the
|
||||||
SOAP body.
|
SOAP body.
|
||||||
|
|
||||||
=item * xml
|
=item * xml
|
||||||
@@ -675,13 +675,13 @@ interpreting mod:
|
|||||||
simpleContent
|
simpleContent
|
||||||
|
|
||||||
The following XML Schema definition content model is only partially
|
The following XML Schema definition content model is only partially
|
||||||
supported:
|
supported in interpreting mode:
|
||||||
|
|
||||||
complexContent - only restriction variety supported
|
complexContent - only restriction variety supported
|
||||||
|
|
||||||
See L<SOAP::WSDL::Manual::XSD> for details.
|
See L<SOAP::WSDL::Manual::XSD> for details.
|
||||||
|
|
||||||
=item * Serialization of hash refs dos not work for ambiguos values
|
=item * Serialization of hash refs does not work for ambiguous values
|
||||||
|
|
||||||
If you have list elements with multiple occurences allowed, SOAP::WSDL
|
If you have list elements with multiple occurences allowed, SOAP::WSDL
|
||||||
has no means of finding out which variant you meant.
|
has no means of finding out which variant you meant.
|
||||||
@@ -691,17 +691,17 @@ Passing in item => [1,2,3] could serialize to
|
|||||||
<item>1 2</item><item>3</item>
|
<item>1 2</item><item>3</item>
|
||||||
<item>1</item><item>2 3</item>
|
<item>1</item><item>2 3</item>
|
||||||
|
|
||||||
Ambiguos data can be avoided by providing data as objects.
|
Ambiguous data can be avoided by providing data as objects.
|
||||||
|
|
||||||
=item * XML Schema facets
|
=item * XML Schema facets
|
||||||
|
|
||||||
Almost no XML schema facets are implemented yet. The only facets
|
Almost no XML schema facets are implemented. The only facets
|
||||||
currently implemented are:
|
currently implemented are:
|
||||||
|
|
||||||
fixed
|
fixed
|
||||||
default
|
default
|
||||||
|
|
||||||
The following facets have no influence yet:
|
The following facets have no influence:
|
||||||
|
|
||||||
minLength
|
minLength
|
||||||
maxLength
|
maxLength
|
||||||
@@ -725,10 +725,10 @@ The following facets have no influence yet:
|
|||||||
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::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 implementations. Can validate XML messages.
|
||||||
|
|
||||||
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
|
||||||
closely to the XML Schema / WSDL specs.
|
closely to the XML Schema / WSDL specs.
|
||||||
@@ -762,7 +762,7 @@ Peter Orvos, Mark Overmeer, Jon Robens, Isidro Vila Verde and Glenn Wood
|
|||||||
(in alphabetical order) spotted bugs and/or suggested improvements in
|
(in alphabetical order) spotted bugs and/or suggested improvements in
|
||||||
the 1.2x releases.
|
the 1.2x releases.
|
||||||
|
|
||||||
Andreas 'ac0v' Specht constantly asked for better performance.
|
Noah Robin contirbuted lots of documentation fixes, and the mod_perl server.
|
||||||
|
|
||||||
JT Justman and Noah Robin provided early feedback and bug reports for
|
JT Justman and Noah Robin provided early feedback and bug reports for
|
||||||
the 2.xx pre-releases.
|
the 2.xx pre-releases.
|
||||||
@@ -770,7 +770,11 @@ the 2.xx pre-releases.
|
|||||||
Adam Kennedy checked and suggested improvements on metadata and dependencies
|
Adam Kennedy checked and suggested improvements on metadata and dependencies
|
||||||
in the 2.xx pre-releases.
|
in the 2.xx pre-releases.
|
||||||
|
|
||||||
CPAN Testers have provided most valuable (automated) feedback. Thanks.
|
Andreas 'ac0v' Specht constantly asked for better performance.
|
||||||
|
|
||||||
|
Matt S. Trout encouraged me "to get a non-dev-release out."
|
||||||
|
|
||||||
|
CPAN Testers provided most valuable (automated) feedback. Thanks a lot.
|
||||||
|
|
||||||
Numerous people sent me their real-world WSDL files for testing. Thank you.
|
Numerous people sent me their real-world WSDL files for testing. Thank you.
|
||||||
|
|
||||||
@@ -792,9 +796,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 583 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: WSDL.pm 583 2008-03-24 07:44:06Z kutterma $
|
$Id: WSDL.pm 616 2008-04-22 21:51:49Z 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
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Class::Std::Fast::Storable;
|
|||||||
use List::Util qw(first);
|
use List::Util qw(first);
|
||||||
use Carp qw(croak carp confess);
|
use Carp qw(croak carp confess);
|
||||||
|
|
||||||
our $VERSION='2.00_27';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %id_of :ATTR(:name<id> :default<()>);
|
my %id_of :ATTR(:name<id> :default<()>);
|
||||||
my %lang_of :ATTR(:name<lang> :default<()>);
|
my %lang_of :ATTR(:name<lang> :default<()>);
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ use Class::Std::Fast::Storable;
|
|||||||
use List::Util qw(first);
|
use List::Util qw(first);
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %operation_of :ATTR(:name<operation> :default<()>);
|
my %operation_of :ATTR(:name<operation> :default<()>);
|
||||||
my %type_of :ATTR(:name<type> :default<()>);
|
my %type_of :ATTR(:name<type> :default<()>);
|
||||||
my %transport_of :ATTR(:name<transport> :default<()>);
|
my %transport_of :ATTR(:name<transport> :default<()>);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use SOAP::WSDL::Factory::Serializer;
|
|||||||
use SOAP::WSDL::Factory::Transport;
|
use SOAP::WSDL::Factory::Transport;
|
||||||
use SOAP::WSDL::Expat::MessageParser;
|
use SOAP::WSDL::Expat::MessageParser;
|
||||||
|
|
||||||
our $VERSION = '2.00_27';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
||||||
my %no_dispatch_of :ATTR(:name<no_dispatch> :default<()>);
|
my %no_dispatch_of :ATTR(:name<no_dispatch> :default<()>);
|
||||||
@@ -259,10 +259,10 @@ You probably should not use a character encoding different from utf8:
|
|||||||
SOAP::WSDL::Client will not convert the request into a different encoding
|
SOAP::WSDL::Client will not convert the request into a different encoding
|
||||||
(yet).
|
(yet).
|
||||||
|
|
||||||
To leave out the encoding, just set the content type without appendet charset
|
To leave out the encoding, just set the content type without appending charset
|
||||||
like in
|
like this:
|
||||||
|
|
||||||
text/xml
|
$soap->set_content_type('text/xml');
|
||||||
|
|
||||||
Default:
|
Default:
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ Default:
|
|||||||
=head2 Features different from SOAP::Lite
|
=head2 Features different from SOAP::Lite
|
||||||
|
|
||||||
SOAP::WSDL does not aim to be a complete replacement for SOAP::Lite - the
|
SOAP::WSDL does not aim to be a complete replacement for SOAP::Lite - the
|
||||||
SOAP::Lite module has it's strengths and weaknesses and SOAP::WSDL is
|
SOAP::Lite module has its strengths and weaknesses and SOAP::WSDL is
|
||||||
designed as a cure for the weakness of little WSDL support - nothing more,
|
designed as a cure for the weakness of little WSDL support - nothing more,
|
||||||
nothing less.
|
nothing less.
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ A few things are quite different from SOAP::Lite, though:
|
|||||||
|
|
||||||
=head3 SOAP request data
|
=head3 SOAP request data
|
||||||
|
|
||||||
SOAP request data may either be given as message object, or as hash ref (in
|
SOAP request data may either be given as message object, or as a hash ref (in
|
||||||
which case it will automatically be encoded into a message object).
|
which case it will automatically be encoded into a message object).
|
||||||
|
|
||||||
=head3 Return values
|
=head3 Return values
|
||||||
@@ -303,7 +303,7 @@ The fault object is a SOAP1.1 fault object of the following
|
|||||||
C<SOAP::WSDL::SOAP::Typelib::Fault11>.
|
C<SOAP::WSDL::SOAP::Typelib::Fault11>.
|
||||||
|
|
||||||
SOAP::WSDL::SOAP::Typelib::Fault11 objects are false in boolean context, so
|
SOAP::WSDL::SOAP::Typelib::Fault11 objects are false in boolean context, so
|
||||||
you can just do something like
|
you can just do something like:
|
||||||
|
|
||||||
my $result = $soap->call($method, $data);
|
my $result = $soap->call($method, $data);
|
||||||
|
|
||||||
@@ -360,9 +360,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 455 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Client.pm 455 2007-12-14 15:50:16Z kutterma $
|
$Id: Client.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use base 'SOAP::WSDL::Client';
|
use base 'SOAP::WSDL::Client';
|
||||||
use Scalar::Util qw(blessed);
|
use Scalar::Util qw(blessed);
|
||||||
|
|
||||||
our $VERSION = '2.00_33';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
sub call {
|
sub call {
|
||||||
my ($self, $method, $body, $header) = @_;
|
my ($self, $method, $body, $header) = @_;
|
||||||
@@ -78,9 +78,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 542 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Base.pm 542 2008-02-18 09:38:06Z kutterma $
|
$Id: Base.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client/Base.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client/Base.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -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_33';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
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<[]>);
|
||||||
@@ -118,9 +118,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 549 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Definitions.pm 549 2008-02-20 10:14:26Z kutterma $
|
$Id: Definitions.pm 616 2008-04-22 21:51:49Z 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
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use SOAP::WSDL::Expat::Message2Hash;
|
|||||||
use SOAP::WSDL::Factory::Deserializer;
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
SOAP::WSDL::Factory::Deserializer->register( '1.1', __PACKAGE__ );
|
SOAP::WSDL::Factory::Deserializer->register( '1.1', __PACKAGE__ );
|
||||||
|
|
||||||
our $VERSION='2.00_25';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
sub BUILD {
|
sub BUILD {
|
||||||
my ($self, $ident, $args_of_ref) = @_;
|
my ($self, $ident, $args_of_ref) = @_;
|
||||||
@@ -54,7 +54,7 @@ SOAP::WSDL::Deserializer::Hash - Deserializer SOAP messages into perl hash refs
|
|||||||
|
|
||||||
use SOAP::WSDL;
|
use SOAP::WSDL;
|
||||||
use SOAP::WSDL::Deserializer::Hash;
|
use SOAP::WSDL::Deserializer::Hash;
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
Deserializer for creating perl hash refs as result of a SOAP call.
|
Deserializer for creating perl hash refs as result of a SOAP call.
|
||||||
@@ -152,9 +152,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 427 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Hash.pm 427 2007-12-02 22:20:24Z kutterma $
|
$Id: Hash.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/Hash.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/Hash.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package SOAP::WSDL::Deserializer::SOM;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
our $VERSION = '2.00_24';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
our @ISA;
|
our @ISA;
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
@@ -37,7 +37,7 @@ SOAP::WSDL::Deserializer::SOM - Deserializer SOAP messages into SOM objects
|
|||||||
use SOAP::WSDL::Deserializer::SOM;
|
use SOAP::WSDL::Deserializer::SOM;
|
||||||
use SOAP::WSDL::Factory::Deserializer;
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
SOAP::WSDL::Factory::Deserializer->register( '1.1', __PACKAGE__ );
|
SOAP::WSDL::Factory::Deserializer->register( '1.1', __PACKAGE__ );
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
Deserializer for creating SOAP::Lite's SOM object as result of a SOAP call.
|
Deserializer for creating SOAP::Lite's SOM object as result of a SOAP call.
|
||||||
@@ -68,11 +68,11 @@ from the L<SOAP::Lite|SOAP::Lite> package.
|
|||||||
|
|
||||||
=head1 USAGE
|
=head1 USAGE
|
||||||
|
|
||||||
SOAP::WSDL::Deserializer will not auroregister itself - to use it for a particular
|
SOAP::WSDL::Deserializer will not autoregister itself - to use it for a particular
|
||||||
SOAP version just use the following lines:
|
SOAP version just use the following lines:
|
||||||
|
|
||||||
my $soap_version = '1.1'; # or '1.2', further versions may appear.
|
my $soap_version = '1.1'; # or '1.2', further versions may appear.
|
||||||
|
|
||||||
use SOAP::WSDL::Deserializer::SOM;
|
use SOAP::WSDL::Deserializer::SOM;
|
||||||
use SOAP::WSDL::Factory::Deserializer;
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
SOAP::WSDL::Factory::Deserializer->register( $soap_version, __PACKAGE__ );
|
SOAP::WSDL::Factory::Deserializer->register( $soap_version, __PACKAGE__ );
|
||||||
@@ -114,9 +114,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 391 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: SOM.pm 391 2007-11-17 21:56:13Z kutterma $
|
$Id: SOM.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/SOM.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/SOM.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Class::Std::Fast::Storable;
|
|||||||
use SOAP::WSDL::SOAP::Typelib::Fault11;
|
use SOAP::WSDL::SOAP::Typelib::Fault11;
|
||||||
use SOAP::WSDL::Expat::MessageParser;
|
use SOAP::WSDL::Expat::MessageParser;
|
||||||
|
|
||||||
our $VERSION='2.00_25';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ Usually you don't need to do anything to use this package - it's the default
|
|||||||
deserializer for SOAP::WSDL::Client and interface classes generated by
|
deserializer for SOAP::WSDL::Client and interface classes generated by
|
||||||
SOAP::WSDL.
|
SOAP::WSDL.
|
||||||
|
|
||||||
Is you want to use the XSD serializer from SOAP::WSDL, set the outputtree()
|
If you want to use the XSD serializer from SOAP::WSDL, set the outputtree()
|
||||||
property and provide a class_resolver.
|
property and provide a class_resolver.
|
||||||
|
|
||||||
=head1 METHODS
|
=head1 METHODS
|
||||||
@@ -99,9 +99,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 501 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: XSD.pm 501 2008-01-26 20:23:32Z kutterma $
|
$Id: XSD.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/XSD.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/XSD.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use XML::Parser::Expat;
|
|||||||
|
|
||||||
# TODO: convert to Class::Std::Fast based class - hash based classes suck.
|
# TODO: convert to Class::Std::Fast based class - hash based classes suck.
|
||||||
|
|
||||||
our $VERSION = '2.00_32';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, $arg_ref) = @_;
|
my ($class, $arg_ref) = @_;
|
||||||
|
|||||||
@@ -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_27';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
sub _initialize {
|
sub _initialize {
|
||||||
my ($self, $parser) = @_;
|
my ($self, $parser) = @_;
|
||||||
@@ -21,7 +21,7 @@ sub _initialize {
|
|||||||
my ($_element, $_method,
|
my ($_element, $_method,
|
||||||
$_class, $_parser, %_attrs) = ();
|
$_class, $_parser, %_attrs) = ();
|
||||||
|
|
||||||
no strict qw(refs);
|
# no strict qw(refs);
|
||||||
$parser->setHandlers(
|
$parser->setHandlers(
|
||||||
Start => sub {
|
Start => sub {
|
||||||
push @$list, $current;
|
push @$list, $current;
|
||||||
|
|||||||
@@ -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_27};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
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;
|
||||||
@@ -24,8 +24,12 @@ sub new {
|
|||||||
};
|
};
|
||||||
|
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
$self->load_classes() if ($args->{ class_resolver })
|
|
||||||
&& ! exists $LOADED_OF{ $self->{ class_resolver } };
|
# could be written as && - but Devel::Cover doesn't like that
|
||||||
|
if ($args->{ class_resolver }) {
|
||||||
|
$self->load_classes()
|
||||||
|
if ! exists $LOADED_OF{ $self->{ class_resolver } };
|
||||||
|
}
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,6 +166,9 @@ sub _initialize {
|
|||||||
# (circumventing constructor) here.
|
# (circumventing constructor) here.
|
||||||
# That's dirty, but fast.
|
# That's dirty, but fast.
|
||||||
#
|
#
|
||||||
|
# TODO: check whether this is faster under all perls - there's
|
||||||
|
# strange benchmark results...
|
||||||
|
#
|
||||||
# The alternative would read:
|
# The alternative would read:
|
||||||
# $current = $_class->new({ @_[2..$#_] });
|
# $current = $_class->new({ @_[2..$#_] });
|
||||||
#
|
#
|
||||||
@@ -172,8 +179,20 @@ sub _initialize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# set attributes if there are any
|
# set attributes if there are any
|
||||||
$current->attr({ @_[2..$#_] }) if (@_ > 2);
|
ATTR: {
|
||||||
|
if (@_ > 2) {
|
||||||
|
# die Data::Dumper::Dumper(@_[2..$#_]);
|
||||||
|
my %attr = @_[2..$#_];
|
||||||
|
if (my $nil = delete $attr{nil}) {
|
||||||
|
# TODO: check namespace
|
||||||
|
if ($nil && $nil ne 'false') {
|
||||||
|
undef $characters;
|
||||||
|
last ATTR if not (%attr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$current->attr(\%attr);
|
||||||
|
}
|
||||||
|
}
|
||||||
$depth++;
|
$depth++;
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
@@ -194,13 +213,6 @@ sub _initialize {
|
|||||||
|
|
||||||
$depth--;
|
$depth--;
|
||||||
|
|
||||||
# return if there's only one elment - can't set it in parent ;-)
|
|
||||||
# but set as root element if we don't have one already.
|
|
||||||
if (not defined $list->[-1]) {
|
|
||||||
$self->{ data } = $current if (not exists $self->{ data });
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
|
|
||||||
# we only set character values in leaf nodes
|
# we only set character values in leaf nodes
|
||||||
if ($_leaf) {
|
if ($_leaf) {
|
||||||
# Use dirty but fast access via global variables.
|
# Use dirty but fast access via global variables.
|
||||||
@@ -210,12 +222,20 @@ sub _initialize {
|
|||||||
# $current->set_value( $characters ) if (length($characters));
|
# $current->set_value( $characters ) if (length($characters));
|
||||||
#
|
#
|
||||||
$SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType::___value
|
$SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType::___value
|
||||||
->{ $$current } = $characters if $characters =~m{ [^\s] }xms;
|
->{ $$current } = $characters
|
||||||
|
if defined $characters && defined $current; # =~m{ [^\s] }xms;
|
||||||
}
|
}
|
||||||
|
|
||||||
# empty characters
|
# empty characters
|
||||||
$characters = q{};
|
$characters = q{};
|
||||||
|
|
||||||
|
# return if there's only one elment - can't set it in parent ;-)
|
||||||
|
# but set as root element if we don't have one already.
|
||||||
|
if (not defined $list->[-1]) {
|
||||||
|
$self->{ data } = $current if (not exists $self->{ data });
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
# set appropriate attribute in last element
|
# set appropriate attribute in last element
|
||||||
# multiple values must be implemented in base class
|
# multiple values must be implemented in base class
|
||||||
# $_method = "add_$_localname";
|
# $_method = "add_$_localname";
|
||||||
@@ -295,8 +315,8 @@ the same terms as perl itself
|
|||||||
|
|
||||||
$Id: $
|
$Id: $
|
||||||
|
|
||||||
$LastChangedDate: 2008-03-29 22:38:55 +0100 (Sa, 29 Mrz 2008) $
|
$LastChangedDate: 2008-04-22 23:51:49 +0200 (Di, 22 Apr 2008) $
|
||||||
$LastChangedRevision: 585 $
|
$LastChangedRevision: 616 $
|
||||||
$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 $
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use XML::Parser::Expat;
|
|||||||
use SOAP::WSDL::Expat::MessageParser;
|
use SOAP::WSDL::Expat::MessageParser;
|
||||||
use base qw(SOAP::WSDL::Expat::MessageParser);
|
use base qw(SOAP::WSDL::Expat::MessageParser);
|
||||||
|
|
||||||
our $VERSION = '2.00_24';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
sub parse_start {
|
sub parse_start {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
@@ -43,7 +43,7 @@ SOAP::WSDL::Expat::MessageStreamParser - Convert SOAP messages to custom object
|
|||||||
# process response while it comes in, trying to read 32k chunks.
|
# process response while it comes in, trying to read 32k chunks.
|
||||||
$lwp->request( $request, sub { $chunk_parser->parse_more($_[0]) } , 32468 );
|
$lwp->request( $request, sub { $chunk_parser->parse_more($_[0]) } , 32468 );
|
||||||
$chunk_parser->parse_done();
|
$chunk_parser->parse_done();
|
||||||
|
|
||||||
my $obj = $parser->get_data();
|
my $obj = $parser->get_data();
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
@@ -69,9 +69,9 @@ the same terms as perl itself
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 477 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: MessageStreamParser.pm 477 2007-12-24 10:23:52Z kutterma $
|
$Id: MessageStreamParser.pm 616 2008-04-22 21:51:49Z 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
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Carp;
|
|||||||
use SOAP::WSDL::TypeLookup;
|
use SOAP::WSDL::TypeLookup;
|
||||||
use base qw(SOAP::WSDL::Expat::Base);
|
use base qw(SOAP::WSDL::Expat::Base);
|
||||||
|
|
||||||
our $VERSION = q{2.00_32};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
sub _import_children {
|
sub _import_children {
|
||||||
my ($self, $name, $imported, $importer, $import_namespace) = @_;
|
my ($self, $name, $imported, $importer, $import_namespace) = @_;
|
||||||
@@ -279,10 +279,10 @@ the same terms as perl itself
|
|||||||
|
|
||||||
=head1 Repository information
|
=head1 Repository information
|
||||||
|
|
||||||
$Id: WSDLParser.pm 549 2008-02-20 10:14:26Z kutterma $
|
$Id: WSDLParser.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
|
|
||||||
$LastChangedDate: 2008-02-20 11:14:26 +0100 (Mi, 20 Feb 2008) $
|
$LastChangedDate: 2008-04-22 23:51:49 +0200 (Di, 22 Apr 2008) $
|
||||||
$LastChangedRevision: 549 $
|
$LastChangedRevision: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
|
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/WSDLParser.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/WSDLParser.pm $
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package SOAP::WSDL::Factory::Deserializer;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
our $VERSION = '2.00_24';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %DESERIALIZER = (
|
my %DESERIALIZER = (
|
||||||
'1.1' => 'SOAP::WSDL::Deserializer::XSD',
|
'1.1' => 'SOAP::WSDL::Deserializer::XSD',
|
||||||
@@ -47,10 +47,10 @@ SOAP::WSDL::Factory::Deserializer - Factory for retrieving Deserializer objects
|
|||||||
# in deserializer class:
|
# in deserializer class:
|
||||||
package MyWickedDeserializer;
|
package MyWickedDeserializer;
|
||||||
use SOAP::WSDL::Factory::Deserializer;
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
|
|
||||||
# register class as deserializer for SOAP1.2 messages
|
# register class as deserializer for SOAP1.2 messages
|
||||||
SOAP::WSDL::Factory::Deserializer->register( '1.2' , __PACKAGE__ );
|
SOAP::WSDL::Factory::Deserializer->register( '1.2' , __PACKAGE__ );
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
SOAP::WSDL::Factory::Deserializer serves as factory for retrieving
|
SOAP::WSDL::Factory::Deserializer serves as factory for retrieving
|
||||||
@@ -150,5 +150,5 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Serializer.pm 176 2007-08-31 15:28:29Z kutterma $
|
$Id: Serializer.pm 176 2007-08-31 15:28:29Z kutterma $
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package SOAP::WSDL::Factory::Generator;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
our $VERSION='2.00_24';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %GENERATOR = (
|
my %GENERATOR = (
|
||||||
'XSD' => 'SOAP::WSDL::Generator::Template::XSD',
|
'XSD' => 'SOAP::WSDL::Generator::Template::XSD',
|
||||||
@@ -49,10 +49,10 @@ SOAP::WSDL::Factory:Generator - Factory for retrieving generator objects
|
|||||||
# in generator class:
|
# in generator class:
|
||||||
package MyWickedGenerator;
|
package MyWickedGenerator;
|
||||||
use SOAP::WSDL::Factory::Generator;
|
use SOAP::WSDL::Factory::Generator;
|
||||||
|
|
||||||
# register as generator for SOAP1.2 messages
|
# register as generator for SOAP1.2 messages
|
||||||
SOAP::WSDL::Factory::Generator->register( '1.2' , __PACKAGE__ );
|
SOAP::WSDL::Factory::Generator->register( '1.2' , __PACKAGE__ );
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
SOAP::WSDL::Factory::Generator serves as factory for retrieving
|
SOAP::WSDL::Factory::Generator serves as factory for retrieving
|
||||||
@@ -168,5 +168,5 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Serializer.pm 176 2007-08-31 15:28:29Z kutterma $
|
$Id: Serializer.pm 176 2007-08-31 15:28:29Z kutterma $
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package SOAP::WSDL::Factory::Serializer;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
our $VERSION='2.00_24';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %SERIALIZER = (
|
my %SERIALIZER = (
|
||||||
'1.1' => 'SOAP::WSDL::Serializer::XSD',
|
'1.1' => 'SOAP::WSDL::Serializer::XSD',
|
||||||
@@ -46,10 +46,10 @@ SOAP::WSDL::Factory::Serializer - Factory for retrieving serializer objects
|
|||||||
# in serializer class:
|
# in serializer class:
|
||||||
package MyWickedSerializer;
|
package MyWickedSerializer;
|
||||||
use SOAP::WSDL::Factory::Serializer;
|
use SOAP::WSDL::Factory::Serializer;
|
||||||
|
|
||||||
# register as serializer for SOAP1.2 messages
|
# register as serializer for SOAP1.2 messages
|
||||||
SOAP::WSDL::Factory::Serializer->register( '1.2' , __PACKAGE__ );
|
SOAP::WSDL::Factory::Serializer->register( '1.2' , __PACKAGE__ );
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
SOAP::WSDL::Factory::Serializer serves as factory for retrieving
|
SOAP::WSDL::Factory::Serializer serves as factory for retrieving
|
||||||
@@ -138,9 +138,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 510 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Serializer.pm 510 2008-01-29 08:03:46Z kutterma $
|
$Id: Serializer.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
package SOAP::WSDL::Factory::Transport;
|
package SOAP::WSDL::Factory::Transport;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
our $VERSION='2.00_33';
|
|
||||||
|
|
||||||
# class data
|
|
||||||
my %registered_transport_of = ();
|
my %registered_transport_of = ();
|
||||||
|
|
||||||
# Local constants
|
# Local constants
|
||||||
@@ -32,14 +30,17 @@ sub register {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub get_transport {
|
sub get_transport {
|
||||||
my ($class, $scheme, %attrs) = @_;
|
my ($class, $url, %attrs) = @_;
|
||||||
|
|
||||||
$scheme =~s{ \A ([^\:]+) \: .+ }{$1}x;
|
|
||||||
|
|
||||||
if ($registered_transport_of{ $scheme }) {
|
my $scheme = $url;
|
||||||
|
$scheme =~s{ \:.+$ }{}xm;
|
||||||
|
|
||||||
|
|
||||||
|
if (defined $registered_transport_of{ $scheme }) {
|
||||||
no strict qw(refs);
|
no strict qw(refs);
|
||||||
defined %{ "$registered_transport_of{ $scheme }::" }
|
defined %{ "$registered_transport_of{ $scheme }::" } or
|
||||||
or eval "require $registered_transport_of{ $scheme }"
|
eval "require $registered_transport_of{ $scheme }"
|
||||||
or die "Cannot load transport class $registered_transport_of{ $scheme } : $@";
|
or die "Cannot load transport class $registered_transport_of{ $scheme } : $@";
|
||||||
|
|
||||||
# try "foo::Client" class first - SOAP::Tranport always requires
|
# try "foo::Client" class first - SOAP::Tranport always requires
|
||||||
@@ -50,28 +51,30 @@ sub get_transport {
|
|||||||
# sparse resource ...
|
# sparse resource ...
|
||||||
# ... but we've decided to mimic SOAP::Lite...
|
# ... but we've decided to mimic SOAP::Lite...
|
||||||
|
|
||||||
# my $protocol_class = $SOAP_LITE_TRANSPORT_OF{ $scheme } . '::Client';
|
|
||||||
# my $transport;
|
|
||||||
# eval {
|
|
||||||
# $transport = $protocol_class->new( %attrs );
|
|
||||||
# };
|
|
||||||
# return $transport if not $@;
|
|
||||||
return $registered_transport_of{ $scheme }->new( %attrs );
|
return $registered_transport_of{ $scheme }->new( %attrs );
|
||||||
}
|
}
|
||||||
|
|
||||||
# try SOAP::Lite's Transport module - just skip if not require'able
|
# try SOAP::Lite's Transport module - just skip if not require'able
|
||||||
SOAP_Lite: {
|
SOAP_Lite: {
|
||||||
if (exists $SOAP_LITE_TRANSPORT_OF{ $scheme }) {
|
if (exists $SOAP_LITE_TRANSPORT_OF{ $scheme }) {
|
||||||
eval "require $SOAP_LITE_TRANSPORT_OF{ $scheme }"
|
no strict qw(refs);
|
||||||
or last SOAP_Lite;
|
# behaves interestingly different under different versions of perl
|
||||||
my $protocol_class = $SOAP_LITE_TRANSPORT_OF{ $scheme } . '::Client';
|
# maybe true even if it's not available
|
||||||
return $protocol_class->new( %attrs );
|
defined %{ "$SOAP_LITE_TRANSPORT_OF{ $scheme }::" }
|
||||||
}
|
or eval "require $SOAP_LITE_TRANSPORT_OF{ $scheme }"
|
||||||
|
or last SOAP_Lite;
|
||||||
|
|
||||||
|
my $protocol_class = $SOAP_LITE_TRANSPORT_OF{ $scheme } . '::Client';
|
||||||
|
# may fail if it's not available
|
||||||
|
my $transport = eval { $protocol_class->new( %attrs ) }
|
||||||
|
or last SOAP_Lite;
|
||||||
|
return $transport;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exists $SOAP_WSDL_TRANSPORT_OF{ $scheme }) {
|
if (exists $SOAP_WSDL_TRANSPORT_OF{ $scheme }) {
|
||||||
no strict qw(refs);
|
no strict qw(refs);
|
||||||
defined %{ "$SOAP_WSDL_TRANSPORT_OF{ $scheme }::" }
|
defined %{ "$SOAP_WSDL_TRANSPORT_OF{ $scheme }::"}
|
||||||
or eval "require $SOAP_WSDL_TRANSPORT_OF{ $scheme }"
|
or eval "require $SOAP_WSDL_TRANSPORT_OF{ $scheme }"
|
||||||
or die "Cannot load transport class $SOAP_WSDL_TRANSPORT_OF{ $scheme } : $@";
|
or die "Cannot load transport class $SOAP_WSDL_TRANSPORT_OF{ $scheme } : $@";
|
||||||
return $SOAP_WSDL_TRANSPORT_OF{ $scheme }->new( %attrs );
|
return $SOAP_WSDL_TRANSPORT_OF{ $scheme }->new( %attrs );
|
||||||
@@ -159,7 +162,7 @@ the class should be used for, and $module is the class' module name.
|
|||||||
To auto-register your transport class on loading, execute register() in your
|
To auto-register your transport class on loading, execute register() in your
|
||||||
tranport class (see L<SYNOPSIS|SYNOPSIS> above).
|
tranport class (see L<SYNOPSIS|SYNOPSIS> above).
|
||||||
|
|
||||||
Multiple protocols ore multiple classes are registered by multiple calls to
|
Multiple protocols or multiple classes are registered by multiple calls to
|
||||||
register().
|
register().
|
||||||
|
|
||||||
=head2 Transport plugin package layout
|
=head2 Transport plugin package layout
|
||||||
@@ -240,9 +243,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 579 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Transport.pm 579 2008-03-09 18:39:24Z kutterma $
|
$Id: Transport.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Transport.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Transport.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package SOAP::WSDL::Generator::Iterator::WSDL11;
|
|||||||
use strict; use warnings;
|
use strict; use warnings;
|
||||||
use Class::Std::Fast;
|
use Class::Std::Fast;
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %definitions_of :ATTR(:name<definitions> :default<[]>);
|
my %definitions_of :ATTR(:name<definitions> :default<[]>);
|
||||||
my %nodes_of :ATTR(:name<nodes> :default<[]>);
|
my %nodes_of :ATTR(:name<nodes> :default<[]>);
|
||||||
|
|
||||||
@@ -242,8 +244,8 @@ The nodes are returned in the order denoted in the following example:
|
|||||||
</service>
|
</service>
|
||||||
</definitions>
|
</definitions>
|
||||||
|
|
||||||
You should not rely too much on this order - it may change. Even though, the
|
You should not rely too much on this order - it may change. Even though the
|
||||||
current order will probably remain, but the nodes currently skipped might
|
current order will probably remain, the nodes currently skipped might
|
||||||
be returned somewhere along the path.
|
be returned somewhere along the path.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,20 +3,26 @@ use strict; use warnings;
|
|||||||
|
|
||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %namespace_prefix_map_of :ATTR(:name<namespace_prefix_map> :default<{}>);
|
my %namespace_prefix_map_of :ATTR(:name<namespace_prefix_map> :default<{}>);
|
||||||
my %namespace_map_of :ATTR(:name<namespace_map> :default<{}>);
|
my %namespace_map_of :ATTR(:name<namespace_map> :default<{}>);
|
||||||
my %prefix_of :ATTR(:name<prefix> :default<{}>);
|
my %prefix_of :ATTR(:name<prefix> :default<{}>);
|
||||||
|
|
||||||
sub resolve_prefix {
|
sub resolve_prefix {
|
||||||
my ($self, $type, $namespace, $element) = @_;
|
my ($self, $type, $namespace, $element) = @_;
|
||||||
return $prefix_of{ $$self }->{ $type }
|
my $prefix;
|
||||||
if not defined($namespace);
|
if (not defined($namespace)) {
|
||||||
return $namespace_prefix_map_of{ $$self }->{ $namespace }
|
$prefix = $prefix_of{ $$self }->{ $type }
|
||||||
|| ( ($namespace_map_of{ $$self }->{ $namespace })
|
}
|
||||||
? join ('::', $prefix_of{ $$self }->{ $type }, $namespace_map_of{ $$self }->{ $namespace })
|
else {
|
||||||
: $prefix_of{ $$self }->{ $type }
|
$prefix = $namespace_prefix_map_of{ $$self }->{ $namespace }
|
||||||
);
|
|| ( ($namespace_map_of{ $$self }->{ $namespace })
|
||||||
|
? join ('::', $prefix_of{ $$self }->{ $type }, $namespace_map_of{ $$self }->{ $namespace })
|
||||||
|
: $prefix_of{ $$self }->{ $type }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return "${prefix}::";
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
@@ -67,7 +73,7 @@ Subclasses must implement the following methods:
|
|||||||
# ...
|
# ...
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve_prefix is expected to return a (perl class) prefis. It is called with
|
resolve_prefix is expected to return a (perl class) prefix. It is called with
|
||||||
the following parameters:
|
the following parameters:
|
||||||
|
|
||||||
NAME DESCRIPTION
|
NAME DESCRIPTION
|
||||||
@@ -80,7 +86,7 @@ You usually just need type and namespace for prefix resolving. node is
|
|||||||
provided for rather funky setups, where you have to choose different prefixes
|
provided for rather funky setups, where you have to choose different prefixes
|
||||||
based on type names or whatever.
|
based on type names or whatever.
|
||||||
|
|
||||||
Note that node may be of any of the following classes:
|
Node may be of any of the following classes:
|
||||||
|
|
||||||
SOAP::WSDL::Service
|
SOAP::WSDL::Service
|
||||||
SOAP::WSDL::XSD::Attribute
|
SOAP::WSDL::XSD::Attribute
|
||||||
@@ -90,8 +96,34 @@ Note that node may be of any of the following classes:
|
|||||||
Note that both namespace and node may be undef - you should test for
|
Note that both namespace and node may be undef - you should test for
|
||||||
definedness before doing anything fancy with them.
|
definedness before doing anything fancy with them.
|
||||||
|
|
||||||
|
If you want your prefixes to represent perl class hierarchies, they should
|
||||||
|
end with '::'.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
Imagine you're generating interfaces for the Acme Pet Shop. Acme Corp. has
|
||||||
|
set up their datatypes to be global across all interfaces (and products), while
|
||||||
|
elements are local to the product (the Pet Shop in the example).
|
||||||
|
All elements are in the urn:Acme namespace.
|
||||||
|
|
||||||
|
In addition, there are types in the namespace urn:Acme:Goods, which should go
|
||||||
|
into the same namespace as types, but be prefixed with 'Goods_'
|
||||||
|
|
||||||
|
You may want prefixes (roughly) like this:
|
||||||
|
|
||||||
|
Interfaces: Acme::Client::PetShop::
|
||||||
|
Server: Acme::Server::PetShop::
|
||||||
|
Types: Acme::Types::
|
||||||
|
Types (Goods): Acme::Types::Goods_
|
||||||
|
Elements: Acme::Elements::PetShop::
|
||||||
|
Typemaps: Acme::Typemaps::PetShop::
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
=head1 BUGS AND LIMITATIONS
|
||||||
|
|
||||||
|
You cannot suffix your types by some rule yet...
|
||||||
|
|
||||||
=head1 LICENSE AND COPYRIGHT
|
=head1 LICENSE AND COPYRIGHT
|
||||||
|
|
||||||
Copyright 2008 Martin Kutter.
|
Copyright 2008 Martin Kutter.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Class::Std::Fast::Storable;
|
|||||||
use Carp;
|
use Carp;
|
||||||
use SOAP::WSDL::Generator::PrefixResolver;
|
use SOAP::WSDL::Generator::PrefixResolver;
|
||||||
|
|
||||||
use version; our $VERSION = qv(2.00_33);
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %tt_of :ATTR(:get<tt>);
|
my %tt_of :ATTR(:get<tt>);
|
||||||
my %definitions_of :ATTR(:name<definitions> :default<()>);
|
my %definitions_of :ATTR(:name<definitions> :default<()>);
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ use warnings;
|
|||||||
use Carp qw(confess);
|
use Carp qw(confess);
|
||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %namespace_prefix_map_of :ATTR(:name<namespace_prefix_map> :default<{}>);
|
my %namespace_prefix_map_of :ATTR(:name<namespace_prefix_map> :default<{}>);
|
||||||
my %namespace_map_of :ATTR(:name<namespace_map> :default<{}>);
|
my %namespace_map_of :ATTR(:name<namespace_map> :default<{}>);
|
||||||
my %prefix_of :ATTR(:name<prefix> :default<()>);
|
my %prefix_of :ATTR(:name<prefix> :default<()>);
|
||||||
@@ -14,9 +16,6 @@ sub load { # called as MyPlugin->load($context)
|
|||||||
my ($class, $context, @arg_from) = @_;
|
my ($class, $context, @arg_from) = @_;
|
||||||
my $stash = $context->stash();
|
my $stash = $context->stash();
|
||||||
my $self = bless \do { my $o = Class::Std::Fast::ID() }, $class;
|
my $self = bless \do { my $o = Class::Std::Fast::ID() }, $class;
|
||||||
# $self->set_namespace_map( $stash->{ context }->{ namespace_map });
|
|
||||||
# $self->set_namespace_prefix_map( $stash->{ context }->{ namespace_prefix_map });
|
|
||||||
# $self->set_prefix( $stash->{ context }->{ prefix });
|
|
||||||
$self->set_prefix_resolver( $stash->{ context }->{ prefix_resolver });
|
$self->set_prefix_resolver( $stash->{ context }->{ prefix_resolver });
|
||||||
return $self; # returns 'MyPlugin'
|
return $self; # returns 'MyPlugin'
|
||||||
}
|
}
|
||||||
@@ -27,9 +26,6 @@ sub new {
|
|||||||
my ($class, $arg_ref) = @_;
|
my ($class, $arg_ref) = @_;
|
||||||
|
|
||||||
my $self = bless \do { my $o = Class::Std::Fast::ID() }, $class;
|
my $self = bless \do { my $o = Class::Std::Fast::ID() }, $class;
|
||||||
# $self->set_namespace_map( $arg_ref->{ namespace_map });
|
|
||||||
# $self->set_namespace_prefix_map( $arg_ref->{ namespace_prefix_map });
|
|
||||||
# $self->set_prefix( $arg_ref->{ prefix });
|
|
||||||
$self->set_prefix_resolver( $arg_ref->{ prefix_resolver });
|
$self->set_prefix_resolver( $arg_ref->{ prefix_resolver });
|
||||||
return $self; # returns 'MyPlugin'
|
return $self; # returns 'MyPlugin'
|
||||||
}
|
}
|
||||||
@@ -38,10 +34,10 @@ sub _get_prefix {
|
|||||||
my ($self, $type, $node) = @_;
|
my ($self, $type, $node) = @_;
|
||||||
my $namespace = defined ($node)
|
my $namespace = defined ($node)
|
||||||
? ref($node)
|
? ref($node)
|
||||||
? $node->get_targetNamespace
|
? $node->get_targetNamespace()
|
||||||
: $node
|
: $node
|
||||||
: undef;
|
: undef;
|
||||||
return $self->get_prefix_resolver->resolve_prefix(
|
return $self->get_prefix_resolver()->resolve_prefix(
|
||||||
$type,
|
$type,
|
||||||
$namespace,
|
$namespace,
|
||||||
ref($node)
|
ref($node)
|
||||||
@@ -50,27 +46,16 @@ sub _get_prefix {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#sub _get_prefix {
|
|
||||||
# my ($self, $type, $namespace) = @_;
|
|
||||||
# return $prefix_of{ $$self }->{ $type }
|
|
||||||
# if not defined($namespace);
|
|
||||||
# return $namespace_prefix_map_of{ $$self }->{ $namespace }
|
|
||||||
# || ( ($namespace_map_of{ $$self }->{ $namespace })
|
|
||||||
# ? join ('::', $prefix_of{ $$self }->{ $type }, $namespace_map_of{ $$self }->{ $namespace })
|
|
||||||
# : $prefix_of{ $$self }->{ $type }
|
|
||||||
# );
|
|
||||||
#}
|
|
||||||
|
|
||||||
sub create_xsd_name {
|
sub create_xsd_name {
|
||||||
my ($self,$element) = @_;
|
my ($self,$node) = @_;
|
||||||
my $name = $self->_resolve_prefix($element) . '::'
|
my $name = $self->_resolve_prefix($node) #. '::'
|
||||||
. $element->get_name();
|
. $node->get_name();
|
||||||
return $self->perl_name( $name );
|
return $self->perl_name( $name );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub create_typemap_name {
|
sub create_typemap_name {
|
||||||
my ($self, $node) = @_;
|
my ($self, $node) = @_;
|
||||||
my $name = $self->_get_prefix('typemap') . '::'
|
my $name = $self->_get_prefix('typemap') #. '::'
|
||||||
. $node->get_name();
|
. $node->get_name();
|
||||||
return $self->perl_name( $name );
|
return $self->perl_name( $name );
|
||||||
}
|
}
|
||||||
@@ -79,10 +64,9 @@ sub create_server_name {
|
|||||||
my ($self, $server, $port) = @_;
|
my ($self, $server, $port) = @_;
|
||||||
my $port_name = $port->get_name();
|
my $port_name = $port->get_name();
|
||||||
$port_name =~s{\A (?:.+)\. ([^\.]+) \z}{$1}x;
|
$port_name =~s{\A (?:.+)\. ([^\.]+) \z}{$1}x;
|
||||||
my $name = join('::',
|
my $name = join( q{},
|
||||||
$self->_get_prefix('server', $server),
|
$self->_get_prefix('server', $server),
|
||||||
$server->get_name(),
|
join( '::', $server->get_name(), $port_name)
|
||||||
$port_name
|
|
||||||
);
|
);
|
||||||
return $self->perl_name( $name );
|
return $self->perl_name( $name );
|
||||||
}
|
}
|
||||||
@@ -91,10 +75,9 @@ sub create_interface_name {
|
|||||||
my ($self, $server, $port) = @_;
|
my ($self, $server, $port) = @_;
|
||||||
my $port_name = $port->get_name();
|
my $port_name = $port->get_name();
|
||||||
$port_name =~s{\A (?:.+)\. ([^\.]+) \z}{$1}x;
|
$port_name =~s{\A (?:.+)\. ([^\.]+) \z}{$1}x;
|
||||||
my $name = join('::',
|
my $name = join( q{},
|
||||||
$self->_get_prefix('interface', $server),
|
$self->_get_prefix('interface', $server),
|
||||||
$server->get_name(),
|
join( '::', $server->get_name(), $port_name )
|
||||||
$port_name
|
|
||||||
);
|
);
|
||||||
return $self->perl_name( $name );
|
return $self->perl_name( $name );
|
||||||
}
|
}
|
||||||
@@ -121,8 +104,8 @@ sub _resolve_prefix {
|
|||||||
sub perl_name {
|
sub perl_name {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $name = shift;
|
my $name = shift;
|
||||||
$name =~s{[\-]}{_}xmsg;
|
$name =~s{\-}{_}xmsg;
|
||||||
$name =~s{[\.]}{::}xmsg;
|
$name =~s{\.}{::}xmsg;
|
||||||
return $name;
|
return $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ use Class::Std::Fast::Storable;
|
|||||||
use File::Basename;
|
use File::Basename;
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
|
|
||||||
our $VERSION = q{2.00_27};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
use SOAP::WSDL::Generator::Visitor::Typemap;
|
use SOAP::WSDL::Generator::Visitor::Typemap;
|
||||||
use SOAP::WSDL::Generator::Visitor::Typelib;
|
use SOAP::WSDL::Generator::Visitor::Typelib;
|
||||||
use SOAP::WSDL::Generator::Template::Plugin::XSD;
|
use SOAP::WSDL::Generator::Template::Plugin::XSD;
|
||||||
use base qw(SOAP::WSDL::Generator::Template);
|
use base qw(SOAP::WSDL::Generator::Template);
|
||||||
|
|
||||||
my %output_of :ATTR(:name<output> :default<()>);
|
my %output_of :ATTR(:name<output> :default<()>);
|
||||||
my %typemap_of :ATTR(:name<typemap> :default<({})>);
|
my %typemap_of :ATTR(:name<typemap> :default<({})>);
|
||||||
|
|
||||||
sub BUILD {
|
sub BUILD {
|
||||||
my ($self, $ident, $arg_ref) = @_;
|
my ($self, $ident, $arg_ref) = @_;
|
||||||
@@ -47,6 +47,29 @@ sub BUILD {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# construct object on call to allow late binding of prefix_resolver class
|
||||||
|
# and namespace maps (not used yet)
|
||||||
|
sub get_name_resolver {
|
||||||
|
my $self = shift;
|
||||||
|
return SOAP::WSDL::Generator::Template::Plugin::XSD->new({
|
||||||
|
prefix_resolver => $self->get_prefix_resolver_class()->new({
|
||||||
|
namespace_prefix_map => {
|
||||||
|
'http://www.w3.org/2001/XMLSchema' => 'SOAP::WSDL::XSD::Typelib::Builtin',
|
||||||
|
},
|
||||||
|
namespace_map => {
|
||||||
|
},
|
||||||
|
prefix => {
|
||||||
|
attribute => $self->get_attribute_prefix,
|
||||||
|
interface => $self->get_interface_prefix,
|
||||||
|
element => $self->get_element_prefix,
|
||||||
|
server => $self->get_server_prefix,
|
||||||
|
type => $self->get_type_prefix,
|
||||||
|
typemap => $self->get_typemap_prefix,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
sub generate {
|
sub generate {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $opt = shift;
|
my $opt = shift;
|
||||||
@@ -73,7 +96,7 @@ sub _generate_interface {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $arg_ref = shift;
|
my $arg_ref = shift;
|
||||||
my $template_name = delete $arg_ref->{ template_name };
|
my $template_name = delete $arg_ref->{ template_name };
|
||||||
my $prefix_method = delete $arg_ref->{ prefix_method };
|
my $name_method = delete $arg_ref->{ name_method };
|
||||||
for my $service (@{ $self->get_definitions->get_service }) {
|
for my $service (@{ $self->get_definitions->get_service }) {
|
||||||
for my $port (@{ $service->get_port() }) {
|
for my $port (@{ $service->get_port() }) {
|
||||||
# Skip ports without (known) address
|
# Skip ports without (known) address
|
||||||
@@ -85,10 +108,11 @@ sub _generate_interface {
|
|||||||
my $output = $arg_ref->{ output }
|
my $output = $arg_ref->{ output }
|
||||||
? $arg_ref->{ output }
|
? $arg_ref->{ output }
|
||||||
: $self->_generate_filename(
|
: $self->_generate_filename(
|
||||||
$self->can($prefix_method)->($self),
|
$self->get_name_resolver()->can($name_method)->(
|
||||||
$service->get_name(),
|
$self->get_name_resolver(),
|
||||||
$port_name,
|
$service,
|
||||||
);
|
$port,
|
||||||
|
));
|
||||||
print "Creating interface class $output\n";
|
print "Creating interface class $output\n";
|
||||||
|
|
||||||
$self->_process($template_name,
|
$self->_process($template_name,
|
||||||
@@ -105,14 +129,14 @@ sub _generate_interface {
|
|||||||
sub generate_server {
|
sub generate_server {
|
||||||
my ($self, $arg_ref) = @_;
|
my ($self, $arg_ref) = @_;
|
||||||
$arg_ref->{ template_name } = 'Server.tt';
|
$arg_ref->{ template_name } = 'Server.tt';
|
||||||
$arg_ref->{ prefix_method } = 'get_server_prefix';
|
$arg_ref->{ name_method } = 'create_server_name';
|
||||||
$self->_generate_interface($arg_ref);
|
$self->_generate_interface($arg_ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub generate_client {
|
sub generate_client {
|
||||||
my ($self, $arg_ref) = @_;
|
my ($self, $arg_ref) = @_;
|
||||||
$arg_ref->{ template_name } = 'Interface.tt';
|
$arg_ref->{ template_name } = 'Interface.tt';
|
||||||
$arg_ref->{ prefix_method } = 'get_interface_prefix';
|
$arg_ref->{ name_method } = 'create_interface_name';
|
||||||
$self->_generate_interface($arg_ref);
|
$self->_generate_interface($arg_ref);
|
||||||
}
|
}
|
||||||
sub generate_interface;
|
sub generate_interface;
|
||||||
@@ -133,22 +157,7 @@ sub generate_typemap {
|
|||||||
'Fault/detail' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
'Fault/detail' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||||
%{ $typemap_of{ident $self }},
|
%{ $typemap_of{ident $self }},
|
||||||
},
|
},
|
||||||
resolver => SOAP::WSDL::Generator::Template::Plugin::XSD->new({
|
resolver => $self->get_name_resolver(),
|
||||||
prefix_resolver => $self->get_prefix_resolver_class()->new({
|
|
||||||
namespace_prefix_map => {
|
|
||||||
'http://www.w3.org/2001/XMLSchema' => 'SOAP::WSDL::XSD::Typelib::Builtin',
|
|
||||||
},
|
|
||||||
namespace_map => {
|
|
||||||
},
|
|
||||||
prefix => {
|
|
||||||
interface => $self->get_interface_prefix,
|
|
||||||
element => $self->get_element_prefix,
|
|
||||||
server => $self->get_server_prefix,
|
|
||||||
type => $self->get_type_prefix,
|
|
||||||
typemap => $self->get_typemap_prefix,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
use SOAP::WSDL::Generator::Iterator::WSDL11;
|
use SOAP::WSDL::Generator::Iterator::WSDL11;
|
||||||
@@ -163,7 +172,7 @@ sub generate_typemap {
|
|||||||
|
|
||||||
my $output = $arg_ref->{ output }
|
my $output = $arg_ref->{ output }
|
||||||
? $arg_ref->{ output }
|
? $arg_ref->{ output }
|
||||||
: $self->_generate_filename( $self->get_typemap_prefix(), $service->get_name() );
|
: $self->_generate_filename( $self->get_name_resolver()->create_typemap_name($service) );
|
||||||
print "Creating typemap class $output\n";
|
print "Creating typemap class $output\n";
|
||||||
$self->_process('Typemap.tt',
|
$self->_process('Typemap.tt',
|
||||||
{
|
{
|
||||||
@@ -176,8 +185,7 @@ sub generate_typemap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub _generate_filename :PRIVATE {
|
sub _generate_filename :PRIVATE {
|
||||||
my ($self, @parts) = @_;
|
my ($self, $name) = @_;
|
||||||
my $name = join '::', @parts;
|
|
||||||
$name =~s{ \. }{::}xmsg;
|
$name =~s{ \. }{::}xmsg;
|
||||||
$name =~s{ \- }{_}xmsg;
|
$name =~s{ \- }{_}xmsg;
|
||||||
$name =~s{ :: }{/}xmsg;
|
$name =~s{ :: }{/}xmsg;
|
||||||
@@ -188,7 +196,7 @@ sub visit_XSD_Attribute {
|
|||||||
my ($self, $attribute) = @_;
|
my ($self, $attribute) = @_;
|
||||||
my $output = defined $output_of{ ident $self }
|
my $output = defined $output_of{ ident $self }
|
||||||
? $output_of{ ident $self }
|
? $output_of{ ident $self }
|
||||||
: $self->_generate_filename( $self->get_attribute_prefix(), $attribute->get_name() );
|
: $self->_generate_filename( $self->get_name_resolver()->create_xsd_name($attribute) );
|
||||||
$self->_process('attribute.tt', { attribute => $attribute } , $output);
|
$self->_process('attribute.tt', { attribute => $attribute } , $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +204,7 @@ sub visit_XSD_Element {
|
|||||||
my ($self, $element) = @_;
|
my ($self, $element) = @_;
|
||||||
my $output = defined $output_of{ ident $self }
|
my $output = defined $output_of{ ident $self }
|
||||||
? $output_of{ ident $self }
|
? $output_of{ ident $self }
|
||||||
: $self->_generate_filename( $self->get_element_prefix(), $element->get_name() );
|
: $self->_generate_filename( $self->get_name_resolver()->create_xsd_name($element) );
|
||||||
$self->_process('element.tt', { element => $element } , $output);
|
$self->_process('element.tt', { element => $element } , $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,7 +212,7 @@ sub visit_XSD_SimpleType {
|
|||||||
my ($self, $type) = @_;
|
my ($self, $type) = @_;
|
||||||
my $output = defined $output_of{ ident $self }
|
my $output = defined $output_of{ ident $self }
|
||||||
? $output_of{ ident $self }
|
? $output_of{ ident $self }
|
||||||
: $self->_generate_filename( $self->get_type_prefix(), $type->get_name() );
|
: $self->_generate_filename( $self->get_name_resolver()->create_xsd_name($type) );
|
||||||
$self->_process('simpleType.tt', { simpleType => $type } , $output);
|
$self->_process('simpleType.tt', { simpleType => $type } , $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,8 +220,8 @@ sub visit_XSD_ComplexType {
|
|||||||
my ($self, $type) = @_;
|
my ($self, $type) = @_;
|
||||||
my $output = defined $output_of{ ident $self }
|
my $output = defined $output_of{ ident $self }
|
||||||
? $output_of{ ident $self }
|
? $output_of{ ident $self }
|
||||||
: $self->_generate_filename( $self->get_type_prefix(), $type->get_name() );
|
: $self->_generate_filename( $self->get_name_resolver()->create_xsd_name($type) );
|
||||||
$self->_process('complexType.tt', { complexType => $type } , $output);
|
$self->_process('complexType.tt', { complexType => $type } , $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
@parts = map {
|
@parts = map {
|
||||||
my $part = $_;
|
my $part = $_;
|
||||||
(grep {
|
(grep {
|
||||||
my ($ns, $lname) = $def->expand( $_ );
|
# my ($ns, $lname) = $def->expand( $_ );
|
||||||
($lname eq $part->get_name)
|
($_ eq $part->get_name)
|
||||||
} @body_part_from
|
} @body_part_from
|
||||||
)
|
)
|
||||||
? do {
|
? do {
|
||||||
|
|||||||
@@ -11,10 +11,11 @@
|
|||||||
my $def = $stash->{ definitions };
|
my $def = $stash->{ definitions };
|
||||||
my $type_prefix = $stash->{ type_prefix };
|
my $type_prefix = $stash->{ type_prefix };
|
||||||
my $element_prefix = $stash->{ element_prefix };
|
my $element_prefix = $stash->{ element_prefix };
|
||||||
my ($ns, $lname) = $def->expand( $item->get_part() );
|
#my ($ns, $lname) = $def->expand( $item->get_part() );
|
||||||
|
my $part_name = $item->get_part();
|
||||||
my ($part) = grep {
|
my ($part) = grep {
|
||||||
$_->get_name eq $lname
|
$_->get_name eq $part_name
|
||||||
&& $_->get_targetNamespace eq $ns } @{ $message->get_part( ) };
|
} @{ $message->get_part( ) };
|
||||||
my $part_class = do {
|
my $part_class = do {
|
||||||
my $name;
|
my $name;
|
||||||
($name = $part->get_element)
|
($name = $part->get_element)
|
||||||
|
|||||||
@@ -7,4 +7,3 @@
|
|||||||
port_op.get_documentation %]
|
port_op.get_documentation %]
|
||||||
|
|
||||||
$interface->[% operation.get_name %]([% INCLUDE Interface/POD/Message.tt %] );
|
$interface->[% operation.get_name %]([% INCLUDE Interface/POD/Message.tt %] );
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ sub START {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub handle {
|
sub handle {
|
||||||
$transport_of{ ${ shift @_ } }->handle(@_);
|
$transport_of{ ${ $_[0] } }->handle(@_[1..$#_]);
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
@@ -102,4 +102,4 @@ implementing the SOAP Service methods listed below.
|
|||||||
|
|
||||||
Generated by SOAP::WSDL on [% PERL %]print scalar localtime() [% END %]
|
Generated by SOAP::WSDL on [% PERL %]print scalar localtime() [% END %]
|
||||||
|
|
||||||
=pod
|
=cut
|
||||||
|
|||||||
@@ -3,15 +3,48 @@
|
|||||||
|
|
||||||
[% head3 %] [% operation.get_name %]
|
[% head3 %] [% operation.get_name %]
|
||||||
|
|
||||||
[% type = definitions.find_portType( binding.expand( binding.get_type ) );
|
[% type = definitions.find_portType( binding.expand( binding.get_type ) );
|
||||||
port_op = type.find_operation( definitions.get_targetNamespace, operation.get_name );
|
port_op = '';
|
||||||
port_op.get_documentation %]
|
FOREACH port_op = type.get_operation();
|
||||||
|
IF (port_op.get_name == operation.get_name);
|
||||||
|
LAST;
|
||||||
|
END;
|
||||||
|
END;
|
||||||
|
|
||||||
|
input_message_name = port_op.first_input.get_message();
|
||||||
|
output_message_name = port_op.first_output.get_message();
|
||||||
|
|
||||||
|
input_message = definitions.find_message(port_op.first_input.expand(input_message_name));
|
||||||
|
output_message = definitions.find_message(port_op.first_output.expand(output_message_name));
|
||||||
|
|
||||||
|
input_parts = input_message.get_part();
|
||||||
|
output_parts = output_message.get_part();
|
||||||
|
|
||||||
|
# port_op.get_documentation
|
||||||
|
%]
|
||||||
|
|
||||||
sub [% operation.get_name %] {
|
sub [% operation.get_name %] {
|
||||||
my ($self, $body, $header) = @_;
|
my ($self, $body, $header) = @_;
|
||||||
# body is a ??? object - sorry, POD not implemented yet
|
[%
|
||||||
# header is a ??? object - sorry, POD not implemented yet
|
IF (input_parts.size() > 1); -%]
|
||||||
|
# body is a list ref of the following objects:
|
||||||
|
# [
|
||||||
|
# sorry - POD support not implemented yet
|
||||||
|
# ]
|
||||||
|
[% ELSE;
|
||||||
|
input_element = definitions.first_types.find_element(input_parts.0.expand(input_parts.0.get_element));
|
||||||
|
IF (input_element);
|
||||||
|
class = XSD.create_xsd_name( input_element );
|
||||||
|
ELSE;
|
||||||
|
input_type = definitions.first_types.find_type(input_parts.0.expand(input_parts.0.get_type));
|
||||||
|
class = XSD.create_xsd_name( input_type );
|
||||||
|
END;
|
||||||
|
-%]
|
||||||
|
# body is a [% class %] object
|
||||||
|
[%-
|
||||||
|
END;
|
||||||
|
%]
|
||||||
|
# header is a ??? object - sorry, POD support 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 %]
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ get_/set_ methods:
|
|||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
[% FOREACH element = complexType.get_attribute -%]
|
[% FOREACH element = complexType.get_attribute;
|
||||||
|
WHILE element.get_ref;
|
||||||
|
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||||
|
END; -%]
|
||||||
=item * [% element.get_name %]
|
=item * [% element.get_name %]
|
||||||
|
|
||||||
[%- IF (element.get_annotation && element.get_annotation.0.get_documentation) %]
|
[%- IF (element.get_annotation && element.get_annotation.0.get_documentation) %]
|
||||||
|
|||||||
@@ -3,18 +3,27 @@ package [% XSD.create_xmlattr_name(complexType) %];
|
|||||||
use base qw(SOAP::WSDL::XSD::Typelib::AttributeSet);
|
use base qw(SOAP::WSDL::XSD::Typelib::AttributeSet);
|
||||||
|
|
||||||
{ # BLOCK to scope variables
|
{ # BLOCK to scope variables
|
||||||
[% FOREACH element = complexType.get_attribute %]
|
[% FOREACH element = complexType.get_attribute;
|
||||||
|
WHILE element.get_ref;
|
||||||
|
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||||
|
END; %]
|
||||||
my %[% element.get_name %]_of :ATTR(:get<[% element.get_name %]>);
|
my %[% element.get_name %]_of :ATTR(:get<[% element.get_name %]>);
|
||||||
[%- END %]
|
[%- END %]
|
||||||
|
|
||||||
__PACKAGE__->_factory(
|
__PACKAGE__->_factory(
|
||||||
[ qw(
|
[ qw(
|
||||||
[%- FOREACH element = complexType.get_attribute %]
|
[%- FOREACH element = complexType.get_attribute;
|
||||||
|
WHILE element.get_ref;
|
||||||
|
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||||
|
END; %]
|
||||||
[% element.get_name -%]
|
[% element.get_name -%]
|
||||||
[% END %]
|
[% END %]
|
||||||
) ],
|
) ],
|
||||||
{
|
{
|
||||||
[% FOREACH element = complexType.get_attribute -%]
|
[% FOREACH element = complexType.get_attribute;
|
||||||
|
WHILE element.get_ref;
|
||||||
|
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||||
|
END; %]
|
||||||
[% element.get_name %] => \%[% element.get_name %]_of,
|
[% element.get_name %] => \%[% element.get_name %]_of,
|
||||||
[% END -%]
|
[% END -%]
|
||||||
},
|
},
|
||||||
@@ -26,10 +35,11 @@ __PACKAGE__->_factory(
|
|||||||
[% element.get_name %] => '[% XSD.create_xsd_name(element_type) %]',
|
[% element.get_name %] => '[% XSD.create_xsd_name(element_type) %]',
|
||||||
[%
|
[%
|
||||||
ELSIF (ref = element.get_ref);
|
ELSIF (ref = element.get_ref);
|
||||||
attribute = definitions.first_types.find_attribute( complexType.expand(ref) );
|
WHILE element.get_ref;
|
||||||
# element_type = definitions.get_types.0.find_type(complexType.expand( attribute.get_type ));
|
element = definitions.first_types.find_attribute(element.expand( element.get_ref ));
|
||||||
|
END;
|
||||||
%]
|
%]
|
||||||
[% attribute.get_name %] => '[% XSD.create_xsd_name(attribute) %]',
|
[% element.get_name %] => '[% XSD.create_xsd_name(element) %]',
|
||||||
[% ELSIF (element.first_simpleType);
|
[% ELSIF (element.first_simpleType);
|
||||||
THROW NOT_IMPLEMENTED , "Attributes with atomic simpleType definition are not implemented yet";
|
THROW NOT_IMPLEMENTED , "Attributes with atomic simpleType definition are not implemented yet";
|
||||||
atomic_types.${ element.get_name } = element.first_simpleType;
|
atomic_types.${ element.get_name } = element.first_simpleType;
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ use warnings;
|
|||||||
sub get_xmlns { '[% element.get_targetNamespace %]' }
|
sub get_xmlns { '[% element.get_targetNamespace %]' }
|
||||||
|
|
||||||
__PACKAGE__->__set_name('[% element.get_name %]');
|
__PACKAGE__->__set_name('[% element.get_name %]');
|
||||||
__PACKAGE__->__set_nillable([% element.get_nillable %]);
|
__PACKAGE__->__set_nillable([% IF (element.get_nillable);
|
||||||
|
IF (element.get_nillable != 'false'); %]1[% ELSE %]0[% END;
|
||||||
|
END;
|
||||||
|
%]);
|
||||||
__PACKAGE__->__set_minOccurs([% element.get_minOccurs %]);
|
__PACKAGE__->__set_minOccurs([% element.get_minOccurs %]);
|
||||||
__PACKAGE__->__set_maxOccurs([% element.get_maxOccurs %]);
|
__PACKAGE__->__set_maxOccurs([% element.get_maxOccurs %]);
|
||||||
__PACKAGE__->__set_ref([% IF element.get_ref; %]'[% element.get_ref %]'[% END %]);
|
__PACKAGE__->__set_ref([% IF element.get_ref; %]'[% element.get_ref %]'[% END %]);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
|
|
||||||
our $VERSION = q{2.00_25};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %definitions_of :ATTR(:name<definitions> :default<()>);
|
my %definitions_of :ATTR(:name<definitions> :default<()>);
|
||||||
my %type_prefix_of :ATTR(:name<type_prefix> :default<()>);
|
my %type_prefix_of :ATTR(:name<type_prefix> :default<()>);
|
||||||
@@ -66,13 +66,13 @@ tree of objects.
|
|||||||
|
|
||||||
A Visitor's methods are called using the so-called double dispatch technique.
|
A Visitor's methods are called using the so-called double dispatch technique.
|
||||||
To allow double dispatching, the Visitor implements one method for every class
|
To allow double dispatching, the Visitor implements one method for every class
|
||||||
ro be handled, whereas every class implements just one method (commonly named
|
to be handled, whereas every class implements just one method (commonly named
|
||||||
"access"), which does nothing more than calling a method on the reference
|
"access"), which does nothing more than calling a method on the reference
|
||||||
given, with the self object as parameter.
|
given, with the self object as parameter.
|
||||||
|
|
||||||
If all this sounds strange, maybe an example helps. Imagine you had a list of
|
If all this sounds strange, maybe an example helps. Imagine you had a list of
|
||||||
person objects and wanted to print out a list of their names (or address
|
person objects and wanted to print out a list of their names (or address
|
||||||
stamps or everything elseyou like). This can easily be implemented with a
|
stamps or everything else you like). This can easily be implemented with a
|
||||||
Visitor:
|
Visitor:
|
||||||
|
|
||||||
package PersonVisitor;
|
package PersonVisitor;
|
||||||
@@ -107,7 +107,7 @@ Visitor:
|
|||||||
Person name is Vlissides
|
Person name is Vlissides
|
||||||
|
|
||||||
While using this pattern for just printing a list may look a bit over-sized,
|
While using this pattern for just printing a list may look a bit over-sized,
|
||||||
but it may become handy if you need multiple output formats and different
|
it may become handy if you need multiple output formats and different
|
||||||
classes to operate on.
|
classes to operate on.
|
||||||
|
|
||||||
The main benefits using visitors are:
|
The main benefits using visitors are:
|
||||||
@@ -188,8 +188,8 @@ mimicing .NET's .asmx example pages.
|
|||||||
|
|
||||||
All these behaviours could well be (and have historically been) implemented in
|
All these behaviours could well be (and have historically been) implemented in
|
||||||
the 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).
|
||||||
|
|
||||||
Implementing these behaviours in Visitor classes eases adding new behaviours,
|
Implementing these behaviours in Visitor classes eases adding new behaviours,
|
||||||
@@ -203,7 +203,7 @@ schema implementation.
|
|||||||
SOAP::WSDL::Base defines an accept method which expects a Visitor as only
|
SOAP::WSDL::Base defines an accept method which expects a Visitor as only
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
The method visit_Foo_Bar is called on the visitor, whith the self object as
|
The method visit_Foo_Bar is called on the visitor, with the self object as
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
The actual method name is constructed this way:
|
The actual method name is constructed this way:
|
||||||
@@ -224,7 +224,7 @@ visit_XSD_ComplexType is called on the visitor.
|
|||||||
=head2 Writing your own visitor
|
=head2 Writing your own visitor
|
||||||
|
|
||||||
SOAP::WSDL eases writing your own visitor. This might be required if you need
|
SOAP::WSDL eases writing your own visitor. This might be required if you need
|
||||||
some special output format from a WSDL file, or want to feed your own
|
some special output format from a WSDL file or want to feed your own
|
||||||
serializer/deserializer pair with custom configuration data. Or maybe you want
|
serializer/deserializer pair with custom configuration data. Or maybe you want
|
||||||
to generate C# code from it...
|
to generate C# code from it...
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ The SOAP::WSDL::Generator::Visitor implementations include part of their own
|
|||||||
Iterator (which means they know how to find the next objects to visit). You
|
Iterator (which means they know how to find the next objects to visit). You
|
||||||
may or may not choose to implement a separate Iterator.
|
may or may not choose to implement a separate Iterator.
|
||||||
|
|
||||||
Letting a visitor implementing it's own Iterator visit a WSDL definition is as
|
Letting a visitor implementing its own Iterator visit a WSDL definition is as
|
||||||
easy as writing something like this:
|
easy as writing something like this:
|
||||||
|
|
||||||
my $visitor = MyVisitor->new();
|
my $visitor = MyVisitor->new();
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ use base qw(SOAP::WSDL::Generator::Visitor
|
|||||||
SOAP::WSDL::Generator::Template
|
SOAP::WSDL::Generator::Template
|
||||||
);
|
);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use Class::Std::Fast::Storable;
|
|||||||
|
|
||||||
use base qw(SOAP::WSDL::Generator::Visitor);
|
use base qw(SOAP::WSDL::Generator::Visitor);
|
||||||
|
|
||||||
our $VERSION = q{2.00_25};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %path_of :ATTR(:name<path> :default<[]>);
|
my %path_of :ATTR(:name<path> :default<[]>);
|
||||||
my %typemap_of :ATTR(:name<typemap> :default<()>);
|
my %typemap_of :ATTR(:name<typemap> :default<()>);
|
||||||
@@ -41,7 +41,7 @@ sub add_element_path {
|
|||||||
|
|
||||||
sub process_referenced_type {
|
sub process_referenced_type {
|
||||||
my ( $self, $ns, $localname ) = @_;
|
my ( $self, $ns, $localname ) = @_;
|
||||||
return if not $localname;
|
|
||||||
my $ident = ident $self;
|
my $ident = ident $self;
|
||||||
|
|
||||||
# get type's class name
|
# get type's class name
|
||||||
@@ -65,8 +65,7 @@ sub process_atomic_type {
|
|||||||
my ( $self, $type, $callback ) = @_;
|
my ( $self, $type, $callback ) = @_;
|
||||||
return if not $type;
|
return if not $type;
|
||||||
|
|
||||||
my $ident = ident $self;
|
$callback->( $self, $type );
|
||||||
$callback->( $self, $type ) if $callback;
|
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,9 +96,6 @@ sub visit_XSD_Element {
|
|||||||
# warn "simpleType " . $element->get_name();
|
# warn "simpleType " . $element->get_name();
|
||||||
my @path = @{ $path_of{ ${ $self } } };
|
my @path = @{ $path_of{ ${ $self } } };
|
||||||
my $typeclass = $self->get_resolver()->create_subpackage_name($element);
|
my $typeclass = $self->get_resolver()->create_subpackage_name($element);
|
||||||
# my $typeclass = defined ($parent)
|
|
||||||
# ? join q{::_}, $parent , $element->get_name()
|
|
||||||
# : join q{::}, $self->resolver()->get_element_prefix( $element->get_targetNamespace), $element->get_name();
|
|
||||||
$self->set_typemap_entry($typeclass);
|
$self->set_typemap_entry($typeclass);
|
||||||
$typeclass =~s{\.}{::}g;
|
$typeclass =~s{\.}{::}g;
|
||||||
$typeclass =~s{\-}{_}g;
|
$typeclass =~s{\-}{_}g;
|
||||||
@@ -108,14 +104,11 @@ sub visit_XSD_Element {
|
|||||||
|
|
||||||
# for atomic and complex types , and ref elements
|
# for atomic and complex types , and ref elements
|
||||||
my $typeclass = $self->get_resolver()->create_subpackage_name($element);
|
my $typeclass = $self->get_resolver()->create_subpackage_name($element);
|
||||||
# my $typeclass = join q{::}, $self->get_resolver()->get_element_prefix( $element->get_targetNamespace), $element->get_name();
|
|
||||||
# $typeclass =~s{\.}{::}g;
|
|
||||||
# $typeclass =~s{\-}{_}g;
|
|
||||||
$self->set_typemap_entry($typeclass);
|
$self->set_typemap_entry($typeclass);
|
||||||
|
|
||||||
$self->process_atomic_type( $element->first_complexType()
|
$self->process_atomic_type( $element->first_complexType()
|
||||||
, sub { $_[1]->_accept($_[0]) } )
|
, sub { $_[1]->_accept($_[0]) } )
|
||||||
&& last;
|
&& last SWITCH;
|
||||||
|
|
||||||
# TODO: add element ref handling
|
# TODO: add element ref handling
|
||||||
};
|
};
|
||||||
@@ -125,9 +118,6 @@ sub visit_XSD_Element {
|
|||||||
if (not defined($parent)) {
|
if (not defined($parent)) {
|
||||||
# for atomic and complex types , and ref elements
|
# for atomic and complex types , and ref elements
|
||||||
my $typeclass = $self->get_resolver()->create_xsd_name($element);
|
my $typeclass = $self->get_resolver()->create_xsd_name($element);
|
||||||
# my $typeclass = join q{::}, $self->get_resolver()->get_element_prefix($element->get_targetNamespace), $element->get_name();
|
|
||||||
# $typeclass =~s{\.}{::}g;
|
|
||||||
# $typeclass =~s{\-}{_}g;
|
|
||||||
$self->set_typemap_entry($typeclass);
|
$self->set_typemap_entry($typeclass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -237,62 +237,14 @@ 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
|
||||||
|
|
||||||
Note that SOAP::WSDL only includes a basic CGI based SOAP servers by now -
|
SOAP::WSDL currently includes classes for building a basic CGI and a
|
||||||
while more advanced servers (like standalone or mod_perl based) are no big
|
mod_perl 2 based SOAP server.
|
||||||
deal, no base implementation is included yet.
|
|
||||||
|
|
||||||
=head1 Troubleshooting
|
|
||||||
|
|
||||||
=head2 Accessing HTTPS webservices
|
|
||||||
|
|
||||||
You need Crypt::SSLeay installed to access HTTPS webservices.
|
|
||||||
|
|
||||||
=head2 Accessing protected web services
|
|
||||||
|
|
||||||
Passing a userndame and password, or a client certificate and key, to the
|
|
||||||
transport layer is highly dependent on the transport backend.
|
|
||||||
|
|
||||||
=head3 Accessing HTTP(S) webservices with basic/digest authentication
|
|
||||||
|
|
||||||
When using SOAP::WSDL::Transport::HTTP (SOAP::Lite not installed), add a
|
|
||||||
method called "get_basic_credentials" to SOAP::WSDL::Transport::HTTP:
|
|
||||||
|
|
||||||
*SOAP::WSDL::Transport::HTTP::get_basic_credentials = sub {
|
|
||||||
return ($user, $password);
|
|
||||||
};
|
|
||||||
|
|
||||||
When using SOAP::Transport::HTTP (SOAP::Lite is installed), do the same to
|
|
||||||
this backend:
|
|
||||||
|
|
||||||
*SOAP::Transport::HTTP::Client::get_basic_credentials = sub {
|
|
||||||
return ($user, $password);
|
|
||||||
};
|
|
||||||
|
|
||||||
=head3 Accessing HTTP(S) webservices protected by NTLM authentication
|
|
||||||
|
|
||||||
Besides passing user credentials as when accessing a web service protected
|
|
||||||
by basic or digest authentication, you also need to enforce connection
|
|
||||||
keep_alive on the transport backens.
|
|
||||||
|
|
||||||
To do so, pass a I<proxy> argument to the new() method of the generated
|
|
||||||
class. This unfortunately means that you have to set the endpoint URL, too:
|
|
||||||
|
|
||||||
my $interface = MyInterfaces::SERVICE_NAME::PORT_NAME->new({
|
|
||||||
proxy => [ $url, keep_alive => 1 ]
|
|
||||||
});
|
|
||||||
|
|
||||||
You may, of course, decide to just hack the generated class. Be advised that
|
|
||||||
subclassing might be a more appropriate solution - re-generating overwrites
|
|
||||||
changes in interface classes.
|
|
||||||
|
|
||||||
=head3 Accessing HTTPS webservices protected by certificate authentication
|
|
||||||
|
|
||||||
You need Crypt::SSLeay installed to access HTTPS webservices.
|
|
||||||
|
|
||||||
See L<Crypt::SSLeay> on how to configure client certificate authentication.
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
|
L<SOAP::WSDL::Manual::Cookbook> cooking recipes for accessing web services,
|
||||||
|
altering the XML Serializer and others.
|
||||||
|
|
||||||
L<SOAP::WSDL::Manual::XSD> SOAP::WSDL's XML Schema implementation
|
L<SOAP::WSDL::Manual::XSD> SOAP::WSDL's XML Schema implementation
|
||||||
|
|
||||||
L<SOAP::WSDL::Manual::Glossary> The meaning of all these words
|
L<SOAP::WSDL::Manual::Glossary> The meaning of all these words
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %part_of :ATTR(:name<part> :default<[]>);
|
my %part_of :ATTR(:name<part> :default<[]>);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %body_of :ATTR(:name<body> :default<[]>);
|
my %body_of :ATTR(:name<body> :default<[]>);
|
||||||
my %header_of :ATTR(:name<header> :default<[]>);
|
my %header_of :ATTR(:name<header> :default<[]>);
|
||||||
my %headerfault_of :ATTR(:name<headerfault> :default<[]>);
|
my %headerfault_of :ATTR(:name<headerfault> :default<[]>);
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %operation_of :ATTR(:name<operation> :default<()>);
|
my %operation_of :ATTR(:name<operation> :default<()>);
|
||||||
my %input_of :ATTR(:name<input> :default<[]>);
|
my %input_of :ATTR(:name<input> :default<[]>);
|
||||||
my %output_of :ATTR(:name<output> :default<[]>);
|
my %output_of :ATTR(:name<output> :default<[]>);
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ use Class::Std::Fast::Storable;
|
|||||||
|
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %element_of :ATTR(:name<element> :default<()>);
|
my %element_of :ATTR(:name<element> :default<()>);
|
||||||
my %type_of :ATTR(:name<type> :default<()>);
|
my %type_of :ATTR(:name<type> :default<()>);
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %binding_of :ATTR(:name<binding> :default<()>);
|
my %binding_of :ATTR(:name<binding> :default<()>);
|
||||||
my %address_of :ATTR(:name<address> :default<()>);
|
my %address_of :ATTR(:name<address> :default<()>);
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %operation_of :ATTR(:name<operation> :default<()>);
|
my %operation_of :ATTR(:name<operation> :default<()>);
|
||||||
|
|
||||||
my %attributes_of :ATTR();
|
my %attributes_of :ATTR();
|
||||||
|
|||||||
@@ -3,5 +3,8 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %location :ATTR(:name<location> :default<()>);
|
my %location :ATTR(:name<location> :default<()>);
|
||||||
1;
|
1;
|
||||||
@@ -3,6 +3,9 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %use_of :ATTR(:name<use> :default<q{}>);
|
my %use_of :ATTR(:name<use> :default<q{}>);
|
||||||
my %namespace_of :ATTR(:name<namespace> :default<q{}>);
|
my %namespace_of :ATTR(:name<namespace> :default<q{}>);
|
||||||
my %encodingStyle_of :ATTR(:name<encodingStyle> :default<q{}>);
|
my %encodingStyle_of :ATTR(:name<encodingStyle> :default<q{}>);
|
||||||
|
|||||||
@@ -3,10 +3,14 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %use_of :ATTR(:name<use> :default<q{}>);
|
my %use_of :ATTR(:name<use> :default<q{}>);
|
||||||
my %namespace_of :ATTR(:name<namespace> :default<q{}>);
|
my %namespace_of :ATTR(:name<namespace> :default<q{}>);
|
||||||
my %encodingStyle_of :ATTR(:name<encodingStyle> :default<q{}>);
|
my %encodingStyle_of :ATTR(:name<encodingStyle> :default<q{}>);
|
||||||
my %message_of :ATTR(:name<message> :default<()>);
|
my %message_of :ATTR(:name<message> :default<()>);
|
||||||
my %part_of :ATTR(:name<part> :default<q{}>);
|
my %part_of :ATTR(:name<part> :default<q{}>);
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
@@ -3,4 +3,6 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use base qw(SOAP::WSDL::Header);
|
use base qw(SOAP::WSDL::Header);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
1;
|
1;
|
||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_25};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %style_of :ATTR(:name<style> :default<()>);
|
my %style_of :ATTR(:name<style> :default<()>);
|
||||||
my %soapAction_of :ATTR(:name<soapAction> :default<()>);
|
my %soapAction_of :ATTR(:name<soapAction> :default<()>);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
|
|
||||||
our $VERSION=q{2.00_25};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||||
use SOAP::WSDL::XSD::Typelib::Element;
|
use SOAP::WSDL::XSD::Typelib::Element;
|
||||||
@@ -74,15 +74,15 @@ This means you can do something like:
|
|||||||
|
|
||||||
=head2 get_faultcode / set_faultcode
|
=head2 get_faultcode / set_faultcode
|
||||||
|
|
||||||
Getter/setter for object's the faultcode property.
|
Getter/setter for object's faultcode property.
|
||||||
|
|
||||||
=head2 get_faultstring / set_faultstring
|
=head2 get_faultstring / set_faultstring
|
||||||
|
|
||||||
Getter/setter for object's the faultstring property.
|
Getter/setter for object's faultstring property.
|
||||||
|
|
||||||
=head2 get_faultactor / set_faultactor
|
=head2 get_faultactor / set_faultactor
|
||||||
|
|
||||||
Getter/setter for object's the faultactor property.
|
Getter/setter for object's faultactor property.
|
||||||
|
|
||||||
=head2 get_detail / set_detail
|
=head2 get_detail / set_detail
|
||||||
|
|
||||||
@@ -101,9 +101,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 427 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Fault11.pm 427 2007-12-02 22:20:24Z kutterma $
|
$Id: Fault11.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ 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_27};
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
use SOAP::WSDL::Factory::Serializer;
|
use SOAP::WSDL::Factory::Serializer;
|
||||||
|
|
||||||
my $SOAP_NS = 'http://schemas.xmlsoap.org/soap/envelope/';
|
my $SOAP_NS = 'http://schemas.xmlsoap.org/soap/envelope/';
|
||||||
@@ -120,10 +122,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 510 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: XSD.pm 510 2008-01-29 08:03:46Z kutterma $
|
$Id: XSD.pm 616 2008-04-22 21:51:49Z 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
|
||||||
|
|
||||||
|
|||||||
@@ -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_27};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
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<{}>);
|
||||||
@@ -160,6 +160,45 @@ of the deserialized messages).
|
|||||||
A hash-based dispatcher could be implemented by examining the top level
|
A hash-based dispatcher could be implemented by examining the top level
|
||||||
hash keys.
|
hash keys.
|
||||||
|
|
||||||
|
=head1 EXCEPTION HANDLING
|
||||||
|
|
||||||
|
=head2 Builtin exceptions
|
||||||
|
|
||||||
|
SOAP::WSDL::Server handles the following errors itself:
|
||||||
|
|
||||||
|
In case of errors, a SOAP Fault containing an appropriate error message
|
||||||
|
is returned.
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item * XML parsing errors
|
||||||
|
|
||||||
|
=item * Configuration errors
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=head2 Throwing exceptions
|
||||||
|
|
||||||
|
The proper way to throw a exception is just to die -
|
||||||
|
SOAP::WSDL::Server::CGI catches the exception and sends a SOAP Fault
|
||||||
|
back to the client.
|
||||||
|
|
||||||
|
If you want more control over the SOAP Fault sent to the client, you can
|
||||||
|
die with a SOAP::WSDL::SOAP::Fault11 object - or just let the
|
||||||
|
SOAP::Server's deserializer create one for you:
|
||||||
|
|
||||||
|
my $soap = MyServer::SomeService->new();
|
||||||
|
|
||||||
|
die $soap->get_deserializer()->generate_fault({
|
||||||
|
code => 'soap:Server',
|
||||||
|
role => 'urn:localhost',
|
||||||
|
message => "The error message to pas back",
|
||||||
|
detail => "Some details on the error",
|
||||||
|
});
|
||||||
|
|
||||||
|
You may use any other object as exception, provided it has a
|
||||||
|
serialize() method which returns the object's XML representation.
|
||||||
|
|
||||||
=head1 LICENSE AND COPYRIGHT
|
=head1 LICENSE AND COPYRIGHT
|
||||||
|
|
||||||
Copyright 2004-2008 Martin Kutter.
|
Copyright 2004-2008 Martin Kutter.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ use Class::Std::Fast::Storable;
|
|||||||
|
|
||||||
use base qw(SOAP::WSDL::Server);
|
use base qw(SOAP::WSDL::Server);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
# 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...
|
||||||
@@ -39,7 +39,7 @@ sub handle {
|
|||||||
my $content = q{};
|
my $content = q{};
|
||||||
my $buffer;
|
my $buffer;
|
||||||
|
|
||||||
# do wen need to use bytes; here ?
|
# do we need to use bytes; here ?
|
||||||
binmode(STDIN);
|
binmode(STDIN);
|
||||||
while (read(STDIN,$buffer,$length - length($content))) {
|
while (read(STDIN,$buffer,$length - length($content))) {
|
||||||
$content .= $buffer;
|
$content .= $buffer;
|
||||||
@@ -64,22 +64,22 @@ sub handle {
|
|||||||
my $response_message = eval { $self->SUPER::handle($request) };
|
my $response_message = eval { $self->SUPER::handle($request) };
|
||||||
# caveat: SOAP::WSDL::SOAP::Typelib::Fault11 is false in bool context...
|
# caveat: SOAP::WSDL::SOAP::Typelib::Fault11 is false in bool context...
|
||||||
if ($@ || blessed $@) {
|
if ($@ || blessed $@) {
|
||||||
|
my $exception = $@;
|
||||||
$response = HTTP::Response->new(500);
|
$response = HTTP::Response->new(500);
|
||||||
if (blessed $@) {
|
$response->header('Content-type' => 'text/xml; charset="utf-8"');
|
||||||
|
if (blessed($exception)) {
|
||||||
$response->content( $self->get_serializer->serialize({
|
$response->content( $self->get_serializer->serialize({
|
||||||
body =>$@
|
body => $exception
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$response->content($@);
|
$response->content($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$response = HTTP::Response->new(200);
|
$response = HTTP::Response->new(200);
|
||||||
$response->header(
|
$response->header('Content-type' => 'text/xml; charset="utf-8"');
|
||||||
'Content-type' => 'text/xml; charset="utf-8"'
|
|
||||||
);
|
|
||||||
$response->content( $response_message );
|
$response->content( $response_message );
|
||||||
{
|
{
|
||||||
use bytes;
|
use bytes;
|
||||||
@@ -140,35 +140,9 @@ or the like, but provides a basic SOAP server using SOAP::WSDL::Server.
|
|||||||
|
|
||||||
=head1 METHODS
|
=head1 METHODS
|
||||||
|
|
||||||
=head1 EXCEPTION HANDLING
|
=head2 handle
|
||||||
|
|
||||||
SOAP::WSDL::CGI handles the following errors:
|
See synopsis above.
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item * XML parsing error
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
The proper way to throw a exception is just to die -
|
|
||||||
SOAP::WSDL::Server::CGI catches the exception and sends a SOAP Fault
|
|
||||||
back to the client.
|
|
||||||
|
|
||||||
If you want more control over the SOAP Fault sent to the client, you can
|
|
||||||
die with a SOAP::WSDL::SOAP::Fault11 object - or just let the
|
|
||||||
SOAP::Server's deserializer create one for you:
|
|
||||||
|
|
||||||
my $soap = MyServer::SomeService->new();
|
|
||||||
|
|
||||||
die $soap->get_deserializer()->generate_fault({
|
|
||||||
code => 'soap:Server',
|
|
||||||
role => 'urn:localhost',
|
|
||||||
message => "The error message to pas back",
|
|
||||||
detail => "Some details on the error",
|
|
||||||
});
|
|
||||||
|
|
||||||
You may use any other object as exception, provided it has a
|
|
||||||
serialize() method which returns the object's XML representation.
|
|
||||||
|
|
||||||
=head1 LICENSE AND COPYRIGHT
|
=head1 LICENSE AND COPYRIGHT
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %port_of :ATTR(:name<port> :default<[]>);
|
my %port_of :ATTR(:name<port> :default<[]>);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package SOAP::WSDL::Transport::HTTP;
|
|||||||
use strict;
|
use strict;
|
||||||
use base qw(LWP::UserAgent);
|
use base qw(LWP::UserAgent);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
# create methods normally inherited from SOAP::Client
|
# create methods normally inherited from SOAP::Client
|
||||||
SUBFACTORY: {
|
SUBFACTORY: {
|
||||||
no strict qw(refs);
|
no strict qw(refs);
|
||||||
@@ -88,10 +90,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 399 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: HTTP.pm 399 2007-11-19 19:20:52Z kutterma $
|
$Id: HTTP.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'basic';
|
use Class::Std::Fast::Storable constructor => 'basic';
|
||||||
use SOAP::WSDL::Factory::Transport;
|
use SOAP::WSDL::Factory::Transport;
|
||||||
|
|
||||||
our $VERSION=q{2.00_25};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
|
# register on loading
|
||||||
SOAP::WSDL::Factory::Transport->register( http => __PACKAGE__ );
|
SOAP::WSDL::Factory::Transport->register( http => __PACKAGE__ );
|
||||||
SOAP::WSDL::Factory::Transport->register( https => __PACKAGE__ );
|
SOAP::WSDL::Factory::Transport->register( https => __PACKAGE__ );
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ SOAP::WSDL::Transport::Test - Loopback transport class for SOAP::WSDL
|
|||||||
|
|
||||||
use SOAP::WSDL::Client;
|
use SOAP::WSDL::Client;
|
||||||
use SOAP::WSDL::Transport::Loopback;
|
use SOAP::WSDL::Transport::Loopback;
|
||||||
|
|
||||||
my $soap = SOAP::WSDL::Client->new()
|
my $soap = SOAP::WSDL::Client->new()
|
||||||
$soap->get_transport->set_base_dir('.');
|
$soap->get_transport->set_base_dir('.');
|
||||||
$soap->call('method', \%body, \%header);
|
$soap->call('method', \%body, \%header);
|
||||||
@@ -71,5 +72,5 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: HTTP.pm 218 2007-09-10 16:19:23Z kutterma $
|
$Id: HTTP.pm 218 2007-09-10 16:19:23Z kutterma $
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use SOAP::WSDL::Factory::Transport;
|
use SOAP::WSDL::Factory::Transport;
|
||||||
|
|
||||||
our $VERSION=q{2.00_25};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
SOAP::WSDL::Factory::Transport->register( http => __PACKAGE__ );
|
SOAP::WSDL::Factory::Transport->register( http => __PACKAGE__ );
|
||||||
SOAP::WSDL::Factory::Transport->register( https => __PACKAGE__ );
|
SOAP::WSDL::Factory::Transport->register( https => __PACKAGE__ );
|
||||||
@@ -66,7 +66,7 @@ SOAP::WSDL::Transport::Test - Test transport class for SOAP::WSDL
|
|||||||
|
|
||||||
use SOAP::WSDL::Client;
|
use SOAP::WSDL::Client;
|
||||||
use SOAP::WSDL::Transport::Test;
|
use SOAP::WSDL::Transport::Test;
|
||||||
|
|
||||||
my $soap = SOAP::WSDL::Client->new()
|
my $soap = SOAP::WSDL::Client->new()
|
||||||
$soap->get_transport->set_base_dir('.');
|
$soap->get_transport->set_base_dir('.');
|
||||||
$soap->call('method', \%body, \%header);
|
$soap->call('method', \%body, \%header);
|
||||||
@@ -125,5 +125,5 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: HTTP.pm 218 2007-09-10 16:19:23Z kutterma $
|
$Id: HTTP.pm 218 2007-09-10 16:19:23Z kutterma $
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
@@ -2,7 +2,7 @@ package SOAP::WSDL::TypeLookup;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
our $VERSION=q{2.00_31};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %TYPE_FROM = (
|
my %TYPE_FROM = (
|
||||||
# wsdl:
|
# wsdl:
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ use SOAP::WSDL::XSD::Schema::Builtin;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %schema_of :ATTR(:name<schema> :default<[]>);
|
my %schema_of :ATTR(:name<schema> :default<[]>);
|
||||||
|
|
||||||
sub START {
|
sub START {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<enumeration value="">
|
#<enumeration value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_29};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<attribute
|
#<attribute
|
||||||
# default = string
|
# default = string
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_29};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<attributeGroup
|
#<attributeGroup
|
||||||
# id = ID
|
# id = ID
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
|
# only used in SOAP::WSDL - will be obsolete once SOAP::WSDL uses the
|
||||||
|
# generative approach, too
|
||||||
|
|
||||||
sub serialize {
|
sub serialize {
|
||||||
my ($self, $name, $value, $opt) = @_;
|
my ($self, $name, $value, $opt) = @_;
|
||||||
my $xml;
|
my $xml;
|
||||||
|
|||||||
@@ -6,8 +6,11 @@ use Class::Std::Fast::Storable;
|
|||||||
use Scalar::Util qw(blessed);
|
use Scalar::Util qw(blessed);
|
||||||
use base qw/SOAP::WSDL::Base/;
|
use base qw/SOAP::WSDL::Base/;
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
|
# id provided by Base
|
||||||
|
# name provided by Base
|
||||||
|
# annotation provided by Base
|
||||||
my %length_of :ATTR(:name<length> :default<[]>);
|
my %length_of :ATTR(:name<length> :default<[]>);
|
||||||
my %minLength_of :ATTR(:name<minLength> :default<[]>);
|
my %minLength_of :ATTR(:name<minLength> :default<[]>);
|
||||||
my %maxLength_of :ATTR(:name<maxLength> :default<[]>);
|
my %maxLength_of :ATTR(:name<maxLength> :default<[]>);
|
||||||
@@ -21,7 +24,7 @@ my %minInclusive :ATTR(:name<minInclusive> :default<[]>);
|
|||||||
my %maxExclusive :ATTR(:name<maxExclusive> :default<[]>);
|
my %maxExclusive :ATTR(:name<maxExclusive> :default<[]>);
|
||||||
my %maxInclusive :ATTR(:name<maxInclusive> :default<[]>);
|
my %maxInclusive :ATTR(:name<maxInclusive> :default<[]>);
|
||||||
|
|
||||||
my %annotation_of :ATTR(:name<annotation> :default<()>);
|
|
||||||
my %attribute_of :ATTR(:name<attribute> :default<()>);
|
my %attribute_of :ATTR(:name<attribute> :default<()>);
|
||||||
my %element_of :ATTR(:name<element> :default<()>);
|
my %element_of :ATTR(:name<element> :default<()>);
|
||||||
my %group_of :ATTR(:name<group> :default<()>);
|
my %group_of :ATTR(:name<group> :default<()>);
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_25};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %annotation_of :ATTR(:name<annotation> :default<()>);
|
# id provided by Base
|
||||||
|
# name provided by Base
|
||||||
|
# annotation provided by Base
|
||||||
my %simpleType_of :ATTR(:name<simpleType> :default<()>);
|
my %simpleType_of :ATTR(:name<simpleType> :default<()>);
|
||||||
my %complexType_of :ATTR(:name<complexType> :default<()>);
|
my %complexType_of :ATTR(:name<complexType> :default<()>);
|
||||||
my %facet_of :ATTR(:name<facet> :default<()>);
|
my %facet_of :ATTR(:name<facet> :default<()>);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<enumeration value="">
|
#<enumeration value="">
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package SOAP::WSDL::XSD::Pattern;
|
package SOAP::WSDL::XSD::FractionDigits;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<pattern value="">
|
#<pattern value="">
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ our $VERSION=q{2.00_33};
|
|||||||
# may be defined as atomic simpleType
|
# may be defined as atomic simpleType
|
||||||
my %value_of :ATTR(:name<value> :default<()>);
|
my %value_of :ATTR(:name<value> :default<()>);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<xs:group name="myModelGroup">
|
#<xs:group name="myModelGroup">
|
||||||
# <xs:sequence>
|
# <xs:sequence>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<minExclusive value="">
|
#<minExclusive value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<minExclusive value="">
|
#<minExclusive value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<minExclusive value="">
|
#<minExclusive value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<maxLength value="">
|
#<maxLength value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<minExclusive value="">
|
#<minExclusive value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<minExclusive value="">
|
#<minExclusive value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<minExclusive value="">
|
#<minExclusive value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<pattern value="">
|
#<pattern value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
# child elements
|
# child elements
|
||||||
my %attributeGroup_of :ATTR(:name<attributeGroup> :default<[]>);
|
my %attributeGroup_of :ATTR(:name<attributeGroup> :default<[]>);
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ use SOAP::WSDL::XSD::Schema;
|
|||||||
use SOAP::WSDL::XSD::Builtin;
|
use SOAP::WSDL::XSD::Builtin;
|
||||||
use base qw(SOAP::WSDL::XSD::Schema);
|
use base qw(SOAP::WSDL::XSD::Schema);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
# all builtin types - add validation (e.g. content restrictions) later...
|
# all builtin types - add validation (e.g. content restrictions) later...
|
||||||
my %BUILTINS = (
|
my %BUILTINS = (
|
||||||
'anyURI' => {},
|
'anyURI' => {},
|
||||||
@@ -96,9 +98,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 583 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Builtin.pm 583 2008-03-24 07:44:06Z kutterma $
|
$Id: Builtin.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Schema/Builtin.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Schema/Builtin.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_25};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %length_of :ATTR(:name<length> :default<[]>);
|
my %length_of :ATTR(:name<length> :default<[]>);
|
||||||
my %minLength_of :ATTR(:name<minLength> :default<[]>);
|
my %minLength_of :ATTR(:name<minLength> :default<[]>);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<totalDigits value="">
|
#<totalDigits value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,15 @@ use warnings;
|
|||||||
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Element);
|
use base qw(SOAP::WSDL::XSD::Typelib::Element);
|
||||||
|
|
||||||
our $VERSION=q{2.00_29};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
sub start_tag {
|
sub start_tag {
|
||||||
# my ($self, $opt, $value) = @_;
|
# my ($self, $opt, $value) = @_;
|
||||||
return q{} if (@_ < 3);
|
return q{} if (@_ < 3);
|
||||||
|
my $ns = $_[0]->get_xmlns();
|
||||||
|
if ($ns eq 'http://www.w3.org/XML/1998/namespace') {
|
||||||
|
return qq{ xml:$_[1]->{ name }="};
|
||||||
|
}
|
||||||
return qq{ $_[1]->{ name }="};
|
return qq{ $_[1]->{ name }="};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,12 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||||
|
|
||||||
our $VERSION=q{2.00_29};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
sub serialize {
|
sub serialize {
|
||||||
# we work on @_ for performance.
|
# we work on @_ for performance.
|
||||||
# $_[1] ||= {}; # $option_ref
|
# $_[1] ||= {}; # $option_ref
|
||||||
|
# TODO: What about namespaces?
|
||||||
return ${ $_[0]->_serialize({ attr => 1 }) };
|
return ${ $_[0]->_serialize({ attr => 1 }) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Fast::Storable;
|
use Class::Std::Fast::Storable;
|
||||||
|
|
||||||
our $VERSION=q{2.00_25};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin::anyType;
|
use SOAP::WSDL::XSD::Typelib::Builtin::anyType;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
||||||
@@ -90,7 +90,7 @@ L</OVERLOADED OPERATORS>
|
|||||||
package MySimpleType;
|
package MySimpleType;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
use SOAP::WSDL::XSD::Typelib::SimpleType;
|
use SOAP::WSDL::XSD::Typelib::SimpleType;
|
||||||
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::SimpleType
|
use base qw(SOAP::WSDL::XSD::Typelib::SimpleType
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::list
|
SOAP::WSDL::XSD::Typelib::Builtin::list
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::string
|
SOAP::WSDL::XSD::Typelib::Builtin::string
|
||||||
@@ -237,7 +237,7 @@ Returns true/false in boolean context.
|
|||||||
|
|
||||||
Returns 1 / 0 in numeric context.
|
Returns 1 / 0 in numeric context.
|
||||||
|
|
||||||
boolean objects have a special method for deleteing their value, because
|
boolean objects have a special method for deleting their value, because
|
||||||
calling C<setl_value(undef)> results in the value being set to false.
|
calling C<setl_value(undef)> results in the value being set to false.
|
||||||
|
|
||||||
$obj->delete_value();
|
$obj->delete_value();
|
||||||
|
|||||||
@@ -5,11 +5,12 @@ use warnings;
|
|||||||
use Carp;
|
use Carp;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
use Scalar::Util qw(blessed);
|
use Scalar::Util qw(blessed);
|
||||||
|
use Data::Dumper;
|
||||||
require Class::Std::Fast::Storable;
|
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_33';
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %ELEMENTS_FROM;
|
my %ELEMENTS_FROM;
|
||||||
my %ATTRIBUTES_OF;
|
my %ATTRIBUTES_OF;
|
||||||
@@ -25,15 +26,27 @@ our $___xml_attribute_of_ref = \%xml_attr_of;
|
|||||||
# STORABLE_ methods for supporting Class::Std::Fast::Storable.
|
# STORABLE_ methods for supporting Class::Std::Fast::Storable.
|
||||||
# We could also handle them via AUTOMETHOD,
|
# We could also handle them via AUTOMETHOD,
|
||||||
# but AUTOMETHOD should always croak...
|
# but AUTOMETHOD should always croak...
|
||||||
# Do we really need this ?
|
# Actually, AUTOMETHOD is faster (~1%) if Class::Std::Fast is loaded
|
||||||
# ... looks like we do...
|
# properly, and slower (~10%) if not.
|
||||||
sub STORABLE_freeze_pre {}
|
# Hmmm. Trade 1% for 10?
|
||||||
sub STORABLE_freeze_post {}
|
|
||||||
sub STORABLE_thaw_pre {}
|
#sub STORABLE_freeze_pre {}
|
||||||
sub STORABLE_thaw_post {}
|
#sub STORABLE_freeze_post {}
|
||||||
|
#sub STORABLE_thaw_pre {}
|
||||||
|
#sub STORABLE_thaw_post {}
|
||||||
|
|
||||||
|
my %STORABLE_METHODS = (
|
||||||
|
STORABLE_freeze_pre => undef,
|
||||||
|
STORABLE_freeze_post => undef,
|
||||||
|
STORABLE_thaw_pre => undef,
|
||||||
|
STORABLE_thaw_post => undef,
|
||||||
|
);
|
||||||
|
|
||||||
# for error reporting. Eases working with data objects...
|
# for error reporting. Eases working with data objects...
|
||||||
sub AUTOMETHOD {
|
sub AUTOMETHOD {
|
||||||
|
# return before unpacking @_ for speed reasons
|
||||||
|
return if exists $STORABLE_METHODS{$_};
|
||||||
|
|
||||||
my ($self, $ident, @args_from) = @_;
|
my ($self, $ident, @args_from) = @_;
|
||||||
|
|
||||||
my $class = ref $self || $self or die "Cannot call AUTOMETHOD as function";
|
my $class = ref $self || $self or die "Cannot call AUTOMETHOD as function";
|
||||||
@@ -240,7 +253,7 @@ sub _factory {
|
|||||||
xmlns # xmlns
|
xmlns # xmlns
|
||||||
}xms # get_elements is inlined for performance.
|
}xms # get_elements is inlined for performance.
|
||||||
? ()
|
? ()
|
||||||
: do { use Data::Dumper;
|
: do {
|
||||||
croak "unknown field $_ in $class. Valid fields are:\n"
|
croak "unknown field $_ in $class. Valid fields are:\n"
|
||||||
. join(', ', @{ $ELEMENTS_FROM{ $class } }) . "\n"
|
. join(', ', @{ $ELEMENTS_FROM{ $class } }) . "\n"
|
||||||
. "Structure given:\n" . Dumper @_ };
|
. "Structure given:\n" . Dumper @_ };
|
||||||
@@ -268,16 +281,22 @@ sub _factory {
|
|||||||
if (defined $element) {
|
if (defined $element) {
|
||||||
$element = [ $element ] if not ref $element eq 'ARRAY';
|
$element = [ $element ] if not ref $element eq 'ARRAY';
|
||||||
my $name = $_;
|
my $name = $_;
|
||||||
|
my $target_namespace = $_[0]->get_xmlns();
|
||||||
map {
|
map {
|
||||||
# serialize element elements with their own serializer
|
# serialize element elements with their own serializer
|
||||||
# but name them like they're named here.
|
# but name them like they're named here.
|
||||||
if ( $_->isa( 'SOAP::WSDL::XSD::Typelib::Element' ) ) {
|
if ( $_->isa( 'SOAP::WSDL::XSD::Typelib::Element' ) ) {
|
||||||
$_->serialize({ name => $name });
|
# serialize elements of different namespaces
|
||||||
|
# with namespace declaration
|
||||||
|
($target_namespace ne $_->get_xmlns())
|
||||||
|
? $_->serialize({ name => $name, qualified => 1 })
|
||||||
|
: $_->serialize({ name => $name });
|
||||||
}
|
}
|
||||||
# serialize complextype elments (of other types) with their
|
# serialize complextype elments (of other types) with their
|
||||||
# serializer, but add element tags around.
|
# serializer, but add element tags around.
|
||||||
else {
|
else {
|
||||||
|
# TODO: check whether we have to handle
|
||||||
|
# types from different namespaces special, too
|
||||||
join q{}, $_->start_tag({ name => $name , %{ $option_ref } })
|
join q{}, $_->start_tag({ name => $name , %{ $option_ref } })
|
||||||
, $_->serialize($option_ref)
|
, $_->serialize($option_ref)
|
||||||
, $_->end_tag({ name => $name , %{ $option_ref } });
|
, $_->end_tag({ name => $name , %{ $option_ref } });
|
||||||
@@ -432,9 +451,9 @@ This means you may set element properties by passing
|
|||||||
Examples are similar to the examples provided for new() above.
|
Examples are similar to the examples provided for new() above.
|
||||||
|
|
||||||
Note that you cannot delete a property by setting it to undef - this sets
|
Note that you cannot delete a property by setting it to undef - this sets
|
||||||
the property to a empty property object (with vaue undef).
|
the property to an empty property object (with value undef).
|
||||||
|
|
||||||
To delete a property, say
|
To delete a property, say:
|
||||||
|
|
||||||
$obj->set_FOO();
|
$obj->set_FOO();
|
||||||
|
|
||||||
@@ -481,9 +500,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 583 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: ComplexType.pm 583 2008-03-24 07:44:06Z kutterma $
|
$Id: ComplexType.pm 616 2008-04-22 21:51:49Z 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
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package SOAP::WSDL::XSD::Typelib::Element;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
our $VERSION=q{2.00_29};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
my %NAME;
|
my %NAME;
|
||||||
my %NILLABLE;
|
my %NILLABLE;
|
||||||
@@ -28,6 +28,7 @@ BLOCK: {
|
|||||||
no strict qw(refs);
|
no strict qw(refs);
|
||||||
while (my ($name, $value) = each %method_lookup ) {
|
while (my ($name, $value) = each %method_lookup ) {
|
||||||
*{ "__set$name" } = sub {
|
*{ "__set$name" } = sub {
|
||||||
|
# TODO the "or die" is bullshit - at least the error message is wrong...
|
||||||
my $class = ref $_[0] || $_[0] or die "Cannot call __set$name without parameter";
|
my $class = ref $_[0] || $_[0] or die "Cannot call __set$name without parameter";
|
||||||
$value->{ $class } = $_[1];
|
$value->{ $class } = $_[1];
|
||||||
};
|
};
|
||||||
@@ -175,9 +176,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 564 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Element.pm 564 2008-02-23 13:31:39Z kutterma $
|
$Id: Element.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/Element.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/Element.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -3,11 +3,15 @@ package SOAP::WSDL::XSD::Typelib::SimpleType;
|
|||||||
use strict;
|
use strict;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::SimpleType::restriction;
|
package SOAP::WSDL::XSD::Typelib::SimpleType::restriction;
|
||||||
use strict;
|
use strict;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::SimpleType);
|
use base qw(SOAP::WSDL::XSD::Typelib::SimpleType);
|
||||||
|
|
||||||
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
@@ -83,9 +87,9 @@ faint of heart).
|
|||||||
simpleType classes derived via restriction must inherit from these classes in
|
simpleType classes derived via restriction must inherit from these classes in
|
||||||
exactly this order:
|
exactly this order:
|
||||||
|
|
||||||
SOAP::WSDL::XSD::Typelib::SimpleType # you may leave out this
|
SOAP::WSDL::XSD::Typelib::SimpleType # you may leave this out
|
||||||
SOAP::WSDL::XSD::Typelib::SimpleType::restriction # derive by retriction
|
SOAP::WSDL::XSD::Typelib::SimpleType::restriction # derive by restriction
|
||||||
The::Restriction::Base::Class # resytriction base
|
The::Restriction::Base::Class # restriction base
|
||||||
|
|
||||||
The::Restriction::Base::Class can either be a builtin class (see
|
The::Restriction::Base::Class can either be a builtin class (see
|
||||||
SOAP::WSDL::XSD::Builtin) or another simpleType class.
|
SOAP::WSDL::XSD::Builtin) or another simpleType class.
|
||||||
@@ -129,9 +133,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 477 $
|
$Rev: 616 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: SimpleType.pm 477 2007-12-24 10:23:52Z kutterma $
|
$Id: SimpleType.pm 616 2008-04-22 21:51:49Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm $
|
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Fast::Storable constructor => 'none';
|
use Class::Std::Fast::Storable constructor => 'none';
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION=q{2.00_33};
|
use version; our $VERSION = qv('2.00.01');
|
||||||
|
|
||||||
#<pattern value="">
|
#<pattern value="">
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ use strict;
|
|||||||
use lib 'lib/';
|
use lib 'lib/';
|
||||||
use lib '../lib/';
|
use lib '../lib/';
|
||||||
use lib 't/lib';
|
use lib 't/lib';
|
||||||
use Storable;
|
|
||||||
|
|
||||||
use_ok qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
use_ok qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||||
use_ok qw( MyComplexType );
|
use_ok qw( MyComplexType );
|
||||||
@@ -36,7 +35,7 @@ is $obj, '<MyTestName>test</MyTestName><MyTestName>test2</MyTestName>',
|
|||||||
$obj = MyComplexType2->new({ MyTestName => [ 'test', 'test2' ] });
|
$obj = MyComplexType2->new({ MyTestName => [ 'test', 'test2' ] });
|
||||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||||
, 'inherited class (on the fly-factory object)';
|
, 'inherited class (on the fly-factory object)';
|
||||||
is $obj, '<MyTestName>test</MyTestName><MyTestName>test2</MyTestName>',
|
is $obj, '<MyTestName xmlns="urn:Test">test</MyTestName><MyTestName xmlns="urn:Test">test2</MyTestName>',
|
||||||
'stringification (on the fly-factory object)';
|
'stringification (on the fly-factory object)';
|
||||||
|
|
||||||
# TODO factor out into complexType test
|
# TODO factor out into complexType test
|
||||||
|
|||||||
@@ -97,43 +97,41 @@ ok $interface->EnqueueMessage(
|
|||||||
# cleanup
|
# cleanup
|
||||||
rmtree "$path/testlib";
|
rmtree "$path/testlib";
|
||||||
|
|
||||||
# print $wsdl->explain();
|
|
||||||
|
|
||||||
sub xml_message {
|
sub xml_message {
|
||||||
return
|
return
|
||||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||||
<MMessage>
|
<MMessage>
|
||||||
<MRecipientURI>anyURI</MRecipientURI>
|
<MRecipientURI>anyURI</MRecipientURI>
|
||||||
<MSenderAddress>a string</MSenderAddress>
|
<MSenderAddress>a string</MSenderAddress>
|
||||||
<MMessageContent>a string</MMessageContent>
|
<MMessageContent>a string</MMessageContent>
|
||||||
<MSubject>a string</MSubject>
|
<MSubject>a string</MSubject>
|
||||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||||
<MKeepalive>
|
<MKeepalive>
|
||||||
<MKeepaliveTimeout>1234567</MKeepaliveTimeout>
|
<MKeepaliveTimeout>1234567</MKeepaliveTimeout>
|
||||||
<MKeepaliveErrorPolicy> ( suppress | report ) </MKeepaliveErrorPolicy>
|
<MKeepaliveErrorPolicy> ( suppress | report ) </MKeepaliveErrorPolicy>
|
||||||
</MKeepalive>
|
</MKeepalive>
|
||||||
</MMessage>
|
</MMessage>
|
||||||
</EnqueueMessage>
|
</EnqueueMessage>
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
sub xml_message2 {
|
sub xml_message2 {
|
||||||
return
|
return
|
||||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||||
<MMessage>
|
<MMessage>
|
||||||
<MRecipientURI>anyURI</MRecipientURI>
|
<MRecipientURI>anyURI</MRecipientURI>
|
||||||
<MSenderAddress>a string</MSenderAddress>
|
<MSenderAddress>a string</MSenderAddress>
|
||||||
<MMessageContent>a string</MMessageContent>
|
<MMessageContent>a string</MMessageContent>
|
||||||
<MSubject>a string</MSubject>
|
<MSubject>a string</MSubject>
|
||||||
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
<MDeliveryReportRecipientURI>anyURI</MDeliveryReportRecipientURI>
|
||||||
</MMessage>
|
</MMessage>
|
||||||
</EnqueueMessage>
|
</EnqueueMessage>
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub xml {
|
sub xml {
|
||||||
return q{<?xml version="1.0" encoding="UTF-8"?>
|
return q{<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<wsdl:definitions name="MessageGateway"
|
<wsdl:definitions name="MessageGateway"
|
||||||
targetNamespace="http://www.example.org/MessageGateway2/"
|
targetNamespace="http://www.example.org/MessageGateway2/"
|
||||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 4;
|
use Test::More tests => 5;
|
||||||
use lib '../../../../lib';
|
use lib '../../../../lib';
|
||||||
use lib '../../../../t/lib';
|
use lib '../../../../t/lib';
|
||||||
use lib 't/lib';
|
use lib 't/lib';
|
||||||
@@ -14,7 +14,7 @@ use MyComplexType;
|
|||||||
use MyElement;
|
use MyElement;
|
||||||
use MySimpleType;
|
use MySimpleType;
|
||||||
|
|
||||||
my $xml = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
my $xml = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||||
<SOAP-ENV:Body><MyAtomicComplexTypeElement xmlns="urn:Test" >
|
<SOAP-ENV:Body><MyAtomicComplexTypeElement xmlns="urn:Test" >
|
||||||
<test>Test</test>
|
<test>Test</test>
|
||||||
@@ -26,26 +26,30 @@ my $parser = SOAP::WSDL::Expat::MessageParser->new({
|
|||||||
class_resolver => 'FakeResolver'
|
class_resolver => 'FakeResolver'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test_nil($parser);
|
||||||
|
|
||||||
$parser->parse( $xml );
|
$parser->parse( $xml );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
is $parser->get_data(), q{<MyAtomicComplexTypeElement xmlns="urn:Test">}
|
is $parser->get_data(), q{<MyAtomicComplexTypeElement xmlns="urn:Test">}
|
||||||
. q{<test>Test</test><test2>Test2</test2></MyAtomicComplexTypeElement>}
|
. q{<test>Test</test><test2>Test2</test2></MyAtomicComplexTypeElement>}
|
||||||
, 'Content comparison';
|
, 'Content comparison';
|
||||||
|
|
||||||
my $xml_attr = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
my $xml_attr = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||||
<SOAP-ENV:Body><MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2">
|
<SOAP-ENV:Body><MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2">
|
||||||
<test>Test</test>
|
<test>Test</test>
|
||||||
<test2 > </test2>
|
<test2></test2>
|
||||||
</MyElementAttrs></SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
</MyElementAttrs></SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
||||||
|
|
||||||
$parser->parse($xml_attr);
|
$parser->parse($xml_attr);
|
||||||
|
|
||||||
is $parser->get_data(),
|
is $parser->get_data(),
|
||||||
q{<MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2"><test>Test</test></MyElementAttrs>},
|
q{<MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2"><test>Test</test><test2></test2></MyElementAttrs>},
|
||||||
'Content with attributes';
|
'Content with attributes';
|
||||||
|
|
||||||
my $xml_error = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
my $xml_error = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||||
<SOAP-ENV:Body><MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2">
|
<SOAP-ENV:Body><MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2">
|
||||||
<test>Test</test>
|
<test>Test</test>
|
||||||
@@ -65,8 +69,6 @@ BEGIN {
|
|||||||
'MyAtomicComplexTypeElement/test' => 'MyTestElement',
|
'MyAtomicComplexTypeElement/test' => 'MyTestElement',
|
||||||
'MyAtomicComplexTypeElement/test2' => 'MyTestElement2',
|
'MyAtomicComplexTypeElement/test2' => 'MyTestElement2',
|
||||||
'MyAtomicComplexTypeElement/foo' => '__SKIP__',
|
'MyAtomicComplexTypeElement/foo' => '__SKIP__',
|
||||||
# 'MyAtomicComplexTypeElement/foo/bar' => 'MyFooElement',
|
|
||||||
# 'MyAtomicComplexTypeElement/foo/baz' => 'MyFooElement',
|
|
||||||
'MyElementAttrs' => 'MyElementAttrs',
|
'MyElementAttrs' => 'MyElementAttrs',
|
||||||
'MyElementAttrs/test' => 'MyTestElement',
|
'MyElementAttrs/test' => 'MyTestElement',
|
||||||
'MyElementAttrs/test2' => 'MyTestElement2',
|
'MyElementAttrs/test2' => 'MyTestElement2',
|
||||||
@@ -83,3 +85,16 @@ BEGIN {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sub test_nil {
|
||||||
|
my $parser = shift();
|
||||||
|
my $xml_nil_attr = 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><MyElementAttrs xmlns="urn:Test">
|
||||||
|
<test>Test</test>
|
||||||
|
<test2 xsi:nil="1"/>
|
||||||
|
</MyElementAttrs></SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
||||||
|
|
||||||
|
my $result = $parser->parse($xml_nil_attr);
|
||||||
|
is $result->get_test2->serialize({ name => 'test2'}), '<test2 xsi:nil="true"/>';
|
||||||
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user