Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
080b211e4e | ||
|
|
fa4d5dd884 | ||
|
|
3d11524449 | ||
|
|
21efa286af | ||
|
|
008d06b72a | ||
|
|
c6a48ba84b |
38
Build.PL
38
Build.PL
@@ -4,41 +4,51 @@ $build = Module::Build->new(
|
||||
create_makefile_pl => 'passthrough',
|
||||
dist_abstract => 'SOAP with WSDL support',
|
||||
dist_name => 'SOAP-WSDL',
|
||||
dist_version => '2.00_16',
|
||||
dist_version => '2.00_22',
|
||||
module_name => 'SOAP::WSDL',
|
||||
license => 'artistic',
|
||||
requires => {
|
||||
'Class::Std' => q/v0.0.8/,
|
||||
# 5.6.x is way too buggy and has no unicode support
|
||||
# for us. SOAP-WSDL relies on unicode (WS-I demands it)
|
||||
# and triggers several 5.6 bugs...
|
||||
'perl' => '5.8.0',
|
||||
'Class::Std' => q/v0.0.8/,
|
||||
'Class::Std::Storable' => 0,
|
||||
'Data::Dumper' => 0,
|
||||
'Date::Parse' => 0,
|
||||
'Date::Format' => 0,
|
||||
'LWP::UserAgent' => 0,
|
||||
'List::Util' => 0,
|
||||
'File::Basename' => 0,
|
||||
'File::Path' => 0,
|
||||
'XML::Parser::Expat' => 0,
|
||||
'Getopt::Long' => 0,
|
||||
'List::Util' => 0,
|
||||
'LWP::UserAgent' => 0,
|
||||
'Template' => 0,
|
||||
'Term::ReadKey' => 0,
|
||||
'Getopt::Long' => 0,
|
||||
'XML::Parser::Expat' => 0,
|
||||
},
|
||||
buildrequires => {
|
||||
'Date::Parse' => 0,
|
||||
'Date::Format' => 0,
|
||||
'Test::More' => 0,
|
||||
'Class::Std' => q/v0.0.8/,
|
||||
'Class::Std::Storable' => 0,
|
||||
'Cwd' => 0,
|
||||
'Date::Parse' => 0,
|
||||
'Date::Format' => 0,
|
||||
'Getopt::Long' => 0,
|
||||
'List::Util' => 0,
|
||||
'LWP::UserAgent' => 0,
|
||||
'File::Basename' => 0,
|
||||
'File::Path' => 0,
|
||||
'XML::Parser::Expat' => 0,
|
||||
'Template' => 0,
|
||||
'Getopt::Long' => 0,
|
||||
'Cwd' => 0,
|
||||
'File::Find' => 0,
|
||||
'File::Spec' => 0,
|
||||
'Storable' => 0,
|
||||
'Test::More' => 0,
|
||||
'Template' => 0,
|
||||
'XML::Parser::Expat' => 0,
|
||||
},
|
||||
recursive_test_files => 1,
|
||||
meta_add => {
|
||||
no_index => {
|
||||
directory => 'lib/SOAP/WSDL/Generator/Template/XSD/',
|
||||
},
|
||||
}
|
||||
);
|
||||
$build->add_build_element('tt');
|
||||
$build->create_build_script;
|
||||
|
||||
168
CHANGES
168
CHANGES
@@ -1,4 +1,4 @@
|
||||
Release notes for SOAP::WSDL 2.00_16
|
||||
Release notes for SOAP::WSDL 2.00_22
|
||||
-------
|
||||
|
||||
I'm proud to present a new pre-release version of SOAP::WSDL.
|
||||
@@ -15,6 +15,12 @@ Features:
|
||||
* Easy-to use API
|
||||
o Automatically encodes perl data structures as message data
|
||||
o Automatically sets HTTP headers right
|
||||
* Efficient documentation
|
||||
o SOAP::WSDL::Manual guides you at getting your work done, not at
|
||||
the module's internals
|
||||
* Thorough test suite
|
||||
o SOAP::WSDL is heavily regression tested, with a test coverage of
|
||||
over 95%.
|
||||
* SOAP::Lite like look and feel
|
||||
o Where possible, SOAP::WSDL mimics SOAP::Lite's API to allow easy migrations
|
||||
* XML schema based class library for creating data objects
|
||||
@@ -25,8 +31,160 @@ Features:
|
||||
o Serializer plugins via SOAP::WSDL::Factory::Serializer
|
||||
o Deserializer plugins via SOAP::WSDL::Factory::Serializer
|
||||
|
||||
|
||||
The following changes have been made:
|
||||
|
||||
2.00_22
|
||||
----
|
||||
|
||||
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):
|
||||
|
||||
* [ 1817697 ] Dots in service/port names lead to broken interfaces
|
||||
* [ 1817699 ] Templates not found on all OS
|
||||
|
||||
The following uncategorized improvements have been made:
|
||||
|
||||
* Code cleanup. The XSD library has been cleaned up a bit. Should result
|
||||
in a minor speedup in serializing and deserializing XML messages,
|
||||
|
||||
|
||||
2.00_21 - not released
|
||||
----
|
||||
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):
|
||||
|
||||
* [ 1810058 ] .tt's pod indexed on CPAN (again)
|
||||
* [ 1809284 ] Rename SOAP::WSDL::Deserializer::SOAP11 to ::XSD
|
||||
|
||||
The following uncategorized improvements have been made:
|
||||
|
||||
* Requires at least perl 5.8.0. This is due to a bug in perls before -
|
||||
see http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/929746
|
||||
|
||||
2.00_20
|
||||
----
|
||||
The following features were added (the numbers in square brackets are the
|
||||
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||
|
||||
* [ 1815646 ] Only include last part of port name in interface
|
||||
* [ 1815648 ] Methods with empty body cannot be called as ->method()
|
||||
* [ 1815651 ] Empty complexType definitions not supported
|
||||
|
||||
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):
|
||||
|
||||
* [ 1815643 ] ComplexTypes cannot be freezed/thawed
|
||||
|
||||
The following uncategorized improvements have been made:
|
||||
|
||||
* WSDL definitions are decoded into utf8
|
||||
* fixed tests to use correct path on windows
|
||||
|
||||
2.00_19
|
||||
----
|
||||
The following features were added (the numbers in square brackets are the
|
||||
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||
|
||||
* [ 1810395 ] Implement complexType complexContent extension
|
||||
|
||||
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):
|
||||
|
||||
* [ 1813144 ] Typemap not used in interface class
|
||||
* [ 1810058 ] .tt's pod indexed on CPAN
|
||||
|
||||
The following uncategorized improvements have been made:
|
||||
|
||||
* Documentation improvements
|
||||
|
||||
2.00_18
|
||||
----
|
||||
The following features were added (the numbers in square brackets are the
|
||||
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||
|
||||
* [ 1790983 ] Create generator Plugin API
|
||||
Generator factory is SOAP::WSDL::Factory::Generator
|
||||
|
||||
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):
|
||||
|
||||
* [ 1805252 ] t/SOAP/WSDL/XSD/Typelib/Builtin/004_time.t fails
|
||||
The default timezone conversion has been fixed.
|
||||
|
||||
The following uncategorized improvements have been made:
|
||||
|
||||
* Documentation improvements
|
||||
* Test updates
|
||||
* readable() has been converted into a no-op, as it already had no effect
|
||||
any more
|
||||
|
||||
2.00_17
|
||||
----
|
||||
The following features were added (the numbers in square brackets are the
|
||||
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||
|
||||
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):
|
||||
|
||||
* [ 1772617 ] SOAP Header not working
|
||||
Added header support. Currently, SOAP headers are only supported with
|
||||
the SOM or the XSD (SOAP11) serializer.
|
||||
|
||||
* [ 1805238 ] Tests in t/SOAP/WSDL don't work when run from t/
|
||||
|
||||
* [ 1805241 ] explain() broken in SOAP::WSDL
|
||||
explain has been removed from SOAP::WSDL
|
||||
|
||||
The following uncategorized improvements have been made:
|
||||
|
||||
* Added limited support for complexType complexContent content model with
|
||||
restriction variety.
|
||||
SOAP::WSDL now supports this XML Schema definition variant, although no
|
||||
constraints are imposed on derived types yet.
|
||||
Derived types do not serialize with a xsi:type attribute (and the xsi:type
|
||||
attribute is not recognized by the XML parser), so you cannot use derived
|
||||
types as a substitute for theri parent, yet.
|
||||
|
||||
* Added support for complexType choice variety
|
||||
complexType definitions using the choice variety are now supported,
|
||||
even though the content is not checked (if you pass in invalid data,
|
||||
invalid XML will be generated).
|
||||
|
||||
* Added Loopback Transport backend.
|
||||
SOAP::WSDL::Tranport::Loopback just returns the request as respons, but
|
||||
allows testing the whole chain from user interface to transport backend.
|
||||
|
||||
* Fixed SOAP::WSDL::Factory::Transport prefer user-registered
|
||||
transport backend
|
||||
|
||||
* Fixed set_soap_version method in SOAP::WSDL::Client.
|
||||
Re-setting the SOAP version now invalidates (resets) serializer and
|
||||
deserializer, but not the transport backend.
|
||||
|
||||
* Fixed SOAP::WSDL::XSD::Typelib::Builtin::boolean to return false
|
||||
when false and true when true.
|
||||
|
||||
* SOAP::WSDL::XSD::Typelib::Builtin::normalizedString now replaces all
|
||||
occurences of tab, newline and carriage return by whitespce on set_value.
|
||||
|
||||
* Code cleanup
|
||||
o Lots of orphan methods now replaced by the SOAP::WSDL::Generator
|
||||
hierarchy have been removed.
|
||||
o Unused (and unusable) readable option checking has been removed in
|
||||
SOAP::WSDL::Serializer::SOAP11.
|
||||
o Unused XML Schema facet attributes have been removed from XSD Builtin
|
||||
classes
|
||||
o Methods common to all expat parser classes have been factored out
|
||||
into a common base class.
|
||||
|
||||
* XML serialization speedup for SOAP::WSDL::XSD::* objects
|
||||
|
||||
* Tests added to improve test coverage.
|
||||
|
||||
* A few documentation errors have been fixed
|
||||
|
||||
* Misspelled default Typemap and Interface prefixes have been corrected
|
||||
|
||||
2.00_16
|
||||
----
|
||||
The following features were added (the numbers in square brackets are the
|
||||
@@ -35,10 +193,13 @@ tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||
* [ 1761532 ] Support embedded atomic types
|
||||
SOAP::WSDL now supports a greater variety of XML Schema type definitions.
|
||||
Note that XML Schema support is still incomplete, though.
|
||||
|
||||
* [ 1797943 ] Create Perl Hash Deserializer
|
||||
There's a new deserializer which outputs perl hashes as data structures.
|
||||
Much like XML::Simple, but faster. No XML Attribute support, though.
|
||||
|
||||
* [ 1797678 ] Move Code generator from WSDL::Definitions to separate class
|
||||
|
||||
* [ 1803330 ] Create one interface per port
|
||||
SOAP::WSDL now creats one interface per port, not one per service.
|
||||
|
||||
@@ -48,8 +209,11 @@ tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||
* [ 1804441 ] parts from binding not regarded in SOAP::WSDL
|
||||
SOAP::WSDL (interpreter mode) now respects the body parts specified in the
|
||||
binding.
|
||||
|
||||
* [ 1803763 ] nonNegativeInteger misspelled in Schema::Builtin
|
||||
|
||||
* [ 1793965 ] _expand() does not work on non-root-node ns declarations
|
||||
|
||||
* [ 1792348 ] 006_client.t requires SOAP::Lite in 2.00_15
|
||||
SOAP::WSDL no longer attempts to load SOAP::WSDL::Deserializer::SOM when
|
||||
no_dispatch is set.
|
||||
|
||||
579
MANIFEST
579
MANIFEST
@@ -1,260 +1,319 @@
|
||||
benchmark/01_expat.t
|
||||
benchmark/smallprof.out
|
||||
benchmark/smallprof.out-whitespace
|
||||
benchmark/XSD/01_anyType.t
|
||||
benchmark/XSD/02_anySimpleType.t
|
||||
benchmark/XSD/03_string.t
|
||||
bin/wsdl2perl.pl
|
||||
Build.PL
|
||||
CHANGES
|
||||
example/fortune.pl
|
||||
example/lib/MyElements/CountCookies.pm
|
||||
example/lib/MyElements/CountCookiesResponse.pm
|
||||
example/lib/MyElements/GetCitiesByCountry.pm
|
||||
example/lib/MyElements/GetCitiesByCountryResponse.pm
|
||||
example/lib/MyElements/GetFortuneCookie.pm
|
||||
example/lib/MyElements/GetFortuneCookieResponse.pm
|
||||
example/lib/MyElements/GetSpecificCookie.pm
|
||||
example/lib/MyElements/GetSpecificCookieResponse.pm
|
||||
example/lib/MyElements/GetWeather.pm
|
||||
example/lib/MyElements/GetWeatherResponse.pm
|
||||
example/lib/MyElements/int.pm
|
||||
example/lib/MyElements/readNodeCount.pm
|
||||
example/lib/MyElements/readNodeCountResponse.pm
|
||||
example/lib/MyElements/string.pm
|
||||
example/lib/MyInterfaces/FullerData_x0020_Fortune_x0020_Cookie.pm
|
||||
example/lib/MyInterfaces/GlobalWeather.pm
|
||||
example/lib/MyTypemaps/FullerData_x0020_Fortune_x0020_Cookie.pm
|
||||
example/lib/MyTypemaps/GlobalWeather.pm
|
||||
example/visitor/visitor.pl
|
||||
example/weather.pl
|
||||
example/weather_wsdl.pl
|
||||
example/wsdl/FortuneCookie.xml
|
||||
example/wsdl/genericbarcode.xml
|
||||
example/wsdl/globalweather.xml
|
||||
HACKING
|
||||
lib/SOAP/WSDL.pm
|
||||
lib/SOAP/WSDL/Base.pm
|
||||
lib/SOAP/WSDL/Binding.pm
|
||||
lib/SOAP/WSDL/Client.pm
|
||||
lib/SOAP/WSDL/Client/Base.pm
|
||||
lib/SOAP/WSDL/Definitions.pm
|
||||
lib/SOAP/WSDL/Deserializer/Hash.pm
|
||||
lib/SOAP/WSDL/Deserializer/SOAP11.pm
|
||||
lib/SOAP/WSDL/Deserializer/SOM.pm
|
||||
lib/SOAP/WSDL/Expat/Message2Hash.pm
|
||||
lib/SOAP/WSDL/Expat/MessageParser.pm
|
||||
lib/SOAP/WSDL/Expat/MessageParser_BROKEN.pm
|
||||
lib/SOAP/WSDL/Expat/MessageStreamParser.pm
|
||||
lib/SOAP/WSDL/Expat/MessageSubParser.pm
|
||||
lib/SOAP/WSDL/Expat/SubParser.pm
|
||||
lib/SOAP/WSDL/Expat/WSDLParser.pm
|
||||
lib/SOAP/WSDL/Factory/Deserializer.pm
|
||||
lib/SOAP/WSDL/Factory/Serializer.pm
|
||||
lib/SOAP/WSDL/Factory/Transport.pm
|
||||
lib/SOAP/WSDL/Generator/Template.pm
|
||||
lib/SOAP/WSDL/Generator/Template/XSD.pm
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/_type_class.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/all.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/atomicTypes.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/contentModel.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/structure.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/element.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/element/POD/structure.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/Body.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/Header.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/Operation.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Element.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Message.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/method_info.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Operation.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Part.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Type.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/atomicType.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/contentModel.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/list.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/list.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/restriction.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/structure.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/restriction.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Typemap.tt
|
||||
lib/SOAP/WSDL/Generator/Visitor.pm
|
||||
lib/SOAP/WSDL/Generator/Visitor/Typelib.pm
|
||||
lib/SOAP/WSDL/Generator/Visitor/Typemap.pm
|
||||
lib/SOAP/WSDL/Manual.pod
|
||||
lib/SOAP/WSDL/Manual/Glossary.pod
|
||||
lib/SOAP/WSDL/Manual/WS_I.pod
|
||||
lib/SOAP/WSDL/Message.pm
|
||||
lib/SOAP/WSDL/Operation.pm
|
||||
lib/SOAP/WSDL/OpMessage.pm
|
||||
lib/SOAP/WSDL/Parser.pod
|
||||
lib/SOAP/WSDL/Part.pm
|
||||
lib/SOAP/WSDL/Port.pm
|
||||
lib/SOAP/WSDL/PortType.pm
|
||||
lib/SOAP/WSDL/Serializer/SOAP11.pm
|
||||
lib/SOAP/WSDL/Service.pm
|
||||
lib/SOAP/WSDL/SOAP/Address.pm
|
||||
lib/SOAP/WSDL/SOAP/Body.pm
|
||||
lib/SOAP/WSDL/SOAP/Header.pm
|
||||
lib/SOAP/WSDL/SOAP/HeaderFault.pm
|
||||
lib/SOAP/WSDL/SOAP/Operation.pm
|
||||
lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
||||
lib/SOAP/WSDL/Transport/HTTP.pm
|
||||
lib/SOAP/WSDL/Transport/Test.pm
|
||||
lib/SOAP/WSDL/TypeLookup.pm
|
||||
lib/SOAP/WSDL/Types.pm
|
||||
lib/SOAP/WSDL/XSD/Builtin.pm
|
||||
lib/SOAP/WSDL/XSD/ComplexType.pm
|
||||
lib/SOAP/WSDL/XSD/Element.pm
|
||||
lib/SOAP/WSDL/XSD/Schema.pm
|
||||
lib/SOAP/WSDL/XSD/Schema/Builtin.pm
|
||||
lib/SOAP/WSDL/XSD/SimpleType.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/boolean.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/byte.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/date.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/decimal.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/double.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/duration.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/float.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gDay.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonth.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonthDay.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gYear.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gYearMonth.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/ID.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/int.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/integer.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/language.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/list.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/long.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/Name.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/NCName.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/QName.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/short.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/string.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/time.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/token.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Element.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
||||
LICENSE
|
||||
MAINFEST
|
||||
Makefile.PL
|
||||
MANIFEST
|
||||
META.yml
|
||||
README
|
||||
t/001_use.t
|
||||
t/002_parse_wsdl.t
|
||||
t/003_wsdl_based_serializer.t
|
||||
t/004_parse_wsdl.t
|
||||
t/005_parse_contributed.t
|
||||
t/006_client.t
|
||||
t/007_envelope.t
|
||||
t/008_client_wsdl_complexType.t
|
||||
t/009_data_classes.t
|
||||
t/011_simpleType.t
|
||||
t/012_element.t
|
||||
t/013_complexType.t
|
||||
t/016_client_object.t
|
||||
t/017_generator.t
|
||||
t/020_storable.t
|
||||
t/098_pod.t
|
||||
t/acceptance/results/03_complexType-all.xml
|
||||
t/acceptance/results/03_complexType-sequence.xml
|
||||
t/acceptance/results/04_element-simpleType.xml
|
||||
t/acceptance/results/04_element.xml
|
||||
t/acceptance/results/05_simpleType-list.xml
|
||||
t/acceptance/results/05_simpleType-restriction.xml
|
||||
t/acceptance/results/05_simpleType-union.xml
|
||||
t/acceptance/results/11_helloworld.xml
|
||||
t/acceptance/wsdl/006_sax_client.wsdl
|
||||
t/acceptance/wsdl/008_complexType.wsdl
|
||||
t/acceptance/wsdl/02_port.wsdl
|
||||
t/acceptance/wsdl/03_complexType-all.wsdl
|
||||
t/acceptance/wsdl/03_complexType-element-ref.wsdl
|
||||
t/acceptance/wsdl/03_complexType-sequence.wsdl
|
||||
t/acceptance/wsdl/04_element-simpleType.wsdl
|
||||
t/acceptance/wsdl/04_element.wsdl
|
||||
t/acceptance/wsdl/05_simpleType-list.wsdl
|
||||
t/acceptance/wsdl/05_simpleType-restriction.wsdl
|
||||
t/acceptance/wsdl/05_simpleType-union.wsdl
|
||||
t/acceptance/wsdl/10_helloworld.asmx.xml
|
||||
t/acceptance/wsdl/11_helloworld.wsdl
|
||||
t/acceptance/wsdl/contributed/Axis.wsdl
|
||||
t/acceptance/wsdl/contributed/ETest.wsdl
|
||||
t/acceptance/wsdl/contributed/OITest.wsdl
|
||||
t/acceptance/wsdl/contributed/tools.wsdl
|
||||
t/acceptance/wsdl/elementAtomicComplexType.xml
|
||||
t/acceptance/wsdl/email_account.wsdl
|
||||
t/acceptance/wsdl/generator_test.wsdl
|
||||
t/acceptance/wsdl/generator_unsupported_test.wsdl
|
||||
t/acceptance/wsdl/message_gateway.wsdl
|
||||
t/contributed.wsdl
|
||||
t/Expat/01_expat.t
|
||||
t/Expat/02_sub_parser.t
|
||||
t/Expat/03_wsdl.t
|
||||
t/lib/MyComplexType.pm
|
||||
t/lib/MyElement.pm
|
||||
t/lib/MySimpleType.pm
|
||||
t/lib/Test/SOAPMessage.pm
|
||||
t/lib/Typelib/Base.pm
|
||||
t/lib/Typelib/TEnqueueMessage.pm
|
||||
t/lib/Typelib/TMessage.pm
|
||||
t/SOAP/WSDL/01_use.t
|
||||
t/SOAP/WSDL/02_port.t
|
||||
t/SOAP/WSDL/03_complexType-all.t
|
||||
t/SOAP/WSDL/03_complexType-choice.t
|
||||
t/SOAP/WSDL/03_complexType-complexContent.t
|
||||
t/SOAP/WSDL/03_complexType-element-ref.t
|
||||
t/SOAP/WSDL/03_complexType-group.t
|
||||
t/SOAP/WSDL/03_complexType-sequence.t
|
||||
t/SOAP/WSDL/03_complexType-simpleContent.t
|
||||
t/SOAP/WSDL/04_element-complexType.t
|
||||
t/SOAP/WSDL/04_element-simpleType.t
|
||||
t/SOAP/WSDL/04_element.t
|
||||
t/SOAP/WSDL/05_simpleType-list.t
|
||||
t/SOAP/WSDL/05_simpleType-restriction.t
|
||||
t/SOAP/WSDL/05_simpleType-union.t
|
||||
t/SOAP/WSDL/11_helloworld.NET.t
|
||||
t/SOAP/WSDL/12_binding.pl
|
||||
t/SOAP/WSDL/Deserializer/Hash.t
|
||||
t/SOAP/WSDL/Generator/Template.t
|
||||
t/SOAP/WSDL/Generator/Visitor/Typemap.t
|
||||
t/SOAP/WSDL/Generator/XSD.t
|
||||
t/SOAP/WSDL/Generator/XSD_unsupported.t
|
||||
t/SOAP/WSDL/Transport/01_Test.t
|
||||
t/SOAP/WSDL/Transport/acceptance/test2.xml
|
||||
t/SOAP/WSDL/Transport/acceptance/test3.xml
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/001_anyType.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/002_anySimpleType.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/003_date.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/004_time.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/005_dateTime.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/006_string.t
|
||||
t/test.wsdl
|
||||
TODO
|
||||
benchmark/01_expat.t
|
||||
benchmark/smallprof.out
|
||||
benchmark/smallprof.out-whitespace
|
||||
benchmark/XSD/01_anyType.t
|
||||
benchmark/XSD/02_anySimpleType.t
|
||||
benchmark/XSD/03_string.t
|
||||
bin/wsdl2perl.pl
|
||||
Build.PL
|
||||
CHANGES
|
||||
example/fortune.pl
|
||||
example/lib/MyElements/CountCookies.pm
|
||||
example/lib/MyElements/CountCookiesResponse.pm
|
||||
example/lib/MyElements/GetCitiesByCountry.pm
|
||||
example/lib/MyElements/GetCitiesByCountryResponse.pm
|
||||
example/lib/MyElements/GetFortuneCookie.pm
|
||||
example/lib/MyElements/GetFortuneCookieResponse.pm
|
||||
example/lib/MyElements/GetSpecificCookie.pm
|
||||
example/lib/MyElements/GetSpecificCookieResponse.pm
|
||||
example/lib/MyElements/GetWeather.pm
|
||||
example/lib/MyElements/GetWeatherResponse.pm
|
||||
example/lib/MyElements/int.pm
|
||||
example/lib/MyElements/readNodeCount.pm
|
||||
example/lib/MyElements/readNodeCountResponse.pm
|
||||
example/lib/MyElements/string.pm
|
||||
example/lib/MyInterfaces/FullerData_x0020_Fortune_x0020_Cookie.pm
|
||||
example/lib/MyInterfaces/GlobalWeather.pm
|
||||
example/lib/MyTypemaps/FullerData_x0020_Fortune_x0020_Cookie.pm
|
||||
example/lib/MyTypemaps/GlobalWeather.pm
|
||||
example/visitor/visitor.pl
|
||||
example/weather.pl
|
||||
example/weather_wsdl.pl
|
||||
example/wsdl/FortuneCookie.xml
|
||||
example/wsdl/genericbarcode.xml
|
||||
example/wsdl/globalweather.xml
|
||||
HACKING
|
||||
lib/SOAP/WSDL.pm
|
||||
lib/SOAP/WSDL/Base.pm
|
||||
lib/SOAP/WSDL/Binding.pm
|
||||
lib/SOAP/WSDL/Client.pm
|
||||
lib/SOAP/WSDL/Client/Base.pm
|
||||
lib/SOAP/WSDL/Definitions.pm
|
||||
lib/SOAP/WSDL/Deserializer/Hash.pm
|
||||
lib/SOAP/WSDL/Deserializer/XSD.pm
|
||||
lib/SOAP/WSDL/Deserializer/SOM.pm
|
||||
lib/SOAP/WSDL/Expat/Base.pm
|
||||
lib/SOAP/WSDL/Expat/Message2Hash.pm
|
||||
lib/SOAP/WSDL/Expat/MessageParser.pm
|
||||
lib/SOAP/WSDL/Expat/MessageStreamParser.pm
|
||||
lib/SOAP/WSDL/Expat/WSDLParser.pm
|
||||
lib/SOAP/WSDL/Factory/Deserializer.pm
|
||||
lib/SOAP/WSDL/Factory/Generator.pm
|
||||
lib/SOAP/WSDL/Factory/Serializer.pm
|
||||
lib/SOAP/WSDL/Factory/Transport.pm
|
||||
lib/SOAP/WSDL/Generator/Template.pm
|
||||
lib/SOAP/WSDL/Generator/Template/XSD.pm
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/_type_class.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/all.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/atomicTypes.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/complexContent.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/contentModel.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/extension.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/all.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/choice.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/complexContent.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/restriction.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/structure.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/restriction.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/variety.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/element.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/element/POD/structure.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/Body.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/Header.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/Operation.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Element.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Message.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/method_info.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Operation.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Part.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Type.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/atomicType.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/contentModel.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/list.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/list.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/restriction.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/structure.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/restriction.tt
|
||||
lib/SOAP/WSDL/Generator/Template/XSD/Typemap.tt
|
||||
lib/SOAP/WSDL/Generator/Visitor.pm
|
||||
lib/SOAP/WSDL/Generator/Visitor/Typelib.pm
|
||||
lib/SOAP/WSDL/Generator/Visitor/Typemap.pm
|
||||
lib/SOAP/WSDL/Manual.pod
|
||||
lib/SOAP/WSDL/Manual/Glossary.pod
|
||||
lib/SOAP/WSDL/Manual/Parser.pod
|
||||
lib/SOAP/WSDL/Manual/WS_I.pod
|
||||
lib/SOAP/WSDL/Manual/XSD.pod
|
||||
lib/SOAP/WSDL/Message.pm
|
||||
lib/SOAP/WSDL/Operation.pm
|
||||
lib/SOAP/WSDL/OpMessage.pm
|
||||
lib/SOAP/WSDL/Part.pm
|
||||
lib/SOAP/WSDL/Port.pm
|
||||
lib/SOAP/WSDL/PortType.pm
|
||||
lib/SOAP/WSDL/Serializer/XSD.pm
|
||||
lib/SOAP/WSDL/Service.pm
|
||||
lib/SOAP/WSDL/SOAP/Address.pm
|
||||
lib/SOAP/WSDL/SOAP/Body.pm
|
||||
lib/SOAP/WSDL/SOAP/Header.pm
|
||||
lib/SOAP/WSDL/SOAP/HeaderFault.pm
|
||||
lib/SOAP/WSDL/SOAP/Operation.pm
|
||||
lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
||||
lib/SOAP/WSDL/Transport/HTTP.pm
|
||||
lib/SOAP/WSDL/Transport/Loopback.pm
|
||||
lib/SOAP/WSDL/Transport/Test.pm
|
||||
lib/SOAP/WSDL/TypeLookup.pm
|
||||
lib/SOAP/WSDL/Types.pm
|
||||
lib/SOAP/WSDL/XSD/Builtin.pm
|
||||
lib/SOAP/WSDL/XSD/ComplexType.pm
|
||||
lib/SOAP/WSDL/XSD/Element.pm
|
||||
lib/SOAP/WSDL/XSD/Schema.pm
|
||||
lib/SOAP/WSDL/XSD/Schema/Builtin.pm
|
||||
lib/SOAP/WSDL/XSD/SimpleType.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/boolean.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/byte.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/date.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/decimal.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/double.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/duration.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/float.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gDay.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonth.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonthDay.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gYear.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/gYearMonth.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/ID.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/int.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/integer.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/language.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/list.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/long.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/Name.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/NCName.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/QName.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/short.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/string.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/time.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/token.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/Element.pm
|
||||
lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
||||
LICENSE
|
||||
MAINFEST
|
||||
Makefile.PL
|
||||
MANIFEST
|
||||
META.yml
|
||||
README
|
||||
t/001_use.t
|
||||
t/002_parse_wsdl.t
|
||||
t/003_wsdl_based_serializer.t
|
||||
t/004_parse_wsdl.t
|
||||
t/005_parse_contributed.t
|
||||
t/006_client.t
|
||||
t/007_envelope.t
|
||||
t/008_client_wsdl_complexType.t
|
||||
t/009_data_classes.t
|
||||
t/011_simpleType.t
|
||||
t/012_element.t
|
||||
t/013_complexType.t
|
||||
t/016_client_object.t
|
||||
t/017_generator.t
|
||||
t/018_compat_2_00_15-generator.t
|
||||
t/020_storable.t
|
||||
t/098_pod.t
|
||||
t/acceptance/results/03_complexType-all.xml
|
||||
t/acceptance/results/03_complexType-sequence.xml
|
||||
t/acceptance/results/04_element-simpleType.xml
|
||||
t/acceptance/results/04_element.xml
|
||||
t/acceptance/results/05_simpleType-list.xml
|
||||
t/acceptance/results/05_simpleType-restriction.xml
|
||||
t/acceptance/results/05_simpleType-union.xml
|
||||
t/acceptance/results/11_helloworld.xml
|
||||
t/acceptance/wsdl/006_sax_client.wsdl
|
||||
t/acceptance/wsdl/008_complexType.wsdl
|
||||
t/acceptance/wsdl/02_port.wsdl
|
||||
t/acceptance/wsdl/03_complexType-all.wsdl
|
||||
t/acceptance/wsdl/03_complexType-element-ref.wsdl
|
||||
t/acceptance/wsdl/03_complexType-sequence.wsdl
|
||||
t/acceptance/wsdl/04_element-simpleType.wsdl
|
||||
t/acceptance/wsdl/04_element.wsdl
|
||||
t/acceptance/wsdl/05_simpleType-list.wsdl
|
||||
t/acceptance/wsdl/05_simpleType-restriction.wsdl
|
||||
t/acceptance/wsdl/05_simpleType-union.wsdl
|
||||
t/acceptance/wsdl/10_helloworld.asmx.xml
|
||||
t/acceptance/wsdl/11_helloworld.wsdl
|
||||
t/acceptance/wsdl/contributed/Axis.wsdl
|
||||
t/acceptance/wsdl/contributed/ETest.wsdl
|
||||
t/acceptance/wsdl/contributed/OITest.wsdl
|
||||
t/acceptance/wsdl/contributed/tools.wsdl
|
||||
t/acceptance/wsdl/elementAtomicComplexType.xml
|
||||
t/acceptance/wsdl/email_account.wsdl
|
||||
t/acceptance/wsdl/generator_test.wsdl
|
||||
t/acceptance/wsdl/generator_unsupported_test.wsdl
|
||||
t/acceptance/wsdl/message_gateway.wsdl
|
||||
t/contributed.wsdl
|
||||
t/Expat/01_expat.t
|
||||
t/Expat/03_wsdl.t
|
||||
t/lib/MyComplexType.pm
|
||||
t/lib/MyElement.pm
|
||||
t/lib/MyElements/GetWeather.pm
|
||||
t/lib/MyElements/GetWeatherResponse.pm
|
||||
t/lib/MyInterfaces/GlobalWeather.pm
|
||||
t/lib/MySimpleType.pm
|
||||
t/lib/MyTypemaps/GlobalWeather.pm
|
||||
t/lib/Test/SOAPMessage.pm
|
||||
t/lib/Typelib/Base.pm
|
||||
t/lib/Typelib/TEnqueueMessage.pm
|
||||
t/lib/Typelib/TMessage.pm
|
||||
t/SOAP/WSDL/01_use.t
|
||||
t/SOAP/WSDL/02_port.t
|
||||
t/SOAP/WSDL/03_complexType-all.t
|
||||
t/SOAP/WSDL/03_complexType-choice.t
|
||||
t/SOAP/WSDL/03_complexType-complexContent.t
|
||||
t/SOAP/WSDL/03_complexType-element-ref.t
|
||||
t/SOAP/WSDL/03_complexType-group.t
|
||||
t/SOAP/WSDL/03_complexType-sequence.t
|
||||
t/SOAP/WSDL/03_complexType-simpleContent.t
|
||||
t/SOAP/WSDL/04_element-complexType.t
|
||||
t/SOAP/WSDL/04_element-simpleType.t
|
||||
t/SOAP/WSDL/04_element.t
|
||||
t/SOAP/WSDL/05_simpleType-list.t
|
||||
t/SOAP/WSDL/05_simpleType-restriction.t
|
||||
t/SOAP/WSDL/05_simpleType-union.t
|
||||
t/SOAP/WSDL/06_keep_alive.t
|
||||
t/SOAP/WSDL/11_helloworld.NET.t
|
||||
t/SOAP/WSDL/12_binding.t
|
||||
t/SOAP/WSDL/Deserializer/Hash.t
|
||||
t/SOAP/WSDL/Deserializer/SOM.t
|
||||
t/SOAP/WSDL/Deserializer/XSD.t
|
||||
t/SOAP/WSDL/Factory/Deserializer.t
|
||||
t/SOAP/WSDL/Factory/Serializer.t
|
||||
t/SOAP/WSDL/Factory/Transport.t
|
||||
t/SOAP/WSDL/Generator/Template.t
|
||||
t/SOAP/WSDL/Generator/Visitor.t
|
||||
t/SOAP/WSDL/Generator/Visitor/Typemap.t
|
||||
t/SOAP/WSDL/Generator/XCS.t
|
||||
t/SOAP/WSDL/Generator/XSD.t
|
||||
t/SOAP/WSDL/Generator/XSD_unsupported.t
|
||||
t/SOAP/WSDL/Transport/01_Test.t
|
||||
t/SOAP/WSDL/Transport/02_HTTP.t
|
||||
t/SOAP/WSDL/Transport/acceptance/test2.xml
|
||||
t/SOAP/WSDL/Transport/acceptance/test3.xml
|
||||
t/SOAP/WSDL/Typelib/Fault11.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/01_constructors.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/anyType.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/boolean.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/byte.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/date.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/decimal.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/double.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/float.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/ID.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/int.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/integer.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/long.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/Name.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/NCName.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/short.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/string.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/time.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/token.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.t
|
||||
t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.t
|
||||
t/test.wsdl
|
||||
TEST_COVERAGE
|
||||
TODO
|
||||
|
||||
SOAP-WSDL-2.00_21.ppd
|
||||
SOAP-WSDL-2.00_21.zip
|
||||
|
||||
477
META.yml
477
META.yml
@@ -1,226 +1,251 @@
|
||||
---
|
||||
name: SOAP-WSDL
|
||||
version: 2.00_16
|
||||
author: []
|
||||
abstract: SOAP with WSDL support
|
||||
license: artistic
|
||||
resources:
|
||||
license: http://opensource.org/licenses/artistic-license.php
|
||||
requires:
|
||||
Class::Std: v0.0.8
|
||||
Class::Std::Storable: 0
|
||||
Date::Format: 0
|
||||
Date::Parse: 0
|
||||
File::Basename: 0
|
||||
File::Path: 0
|
||||
Getopt::Long: 0
|
||||
LWP::UserAgent: 0
|
||||
List::Util: 0
|
||||
Template: 0
|
||||
Term::ReadKey: 0
|
||||
XML::Parser::Expat: 0
|
||||
provides:
|
||||
SOAP::WSDL:
|
||||
file: lib/SOAP/WSDL.pm
|
||||
version: 2.00_16
|
||||
SOAP::WSDL::Base:
|
||||
file: lib/SOAP/WSDL/Base.pm
|
||||
SOAP::WSDL::Binding:
|
||||
file: lib/SOAP/WSDL/Binding.pm
|
||||
SOAP::WSDL::Client:
|
||||
file: lib/SOAP/WSDL/Client.pm
|
||||
version: 2.00_16
|
||||
SOAP::WSDL::Client::Base:
|
||||
file: lib/SOAP/WSDL/Client/Base.pm
|
||||
SOAP::WSDL::Definitions:
|
||||
file: lib/SOAP/WSDL/Definitions.pm
|
||||
SOAP::WSDL::Deserializer::Hash:
|
||||
file: lib/SOAP/WSDL/Deserializer/Hash.pm
|
||||
version: 2.00_16
|
||||
SOAP::WSDL::Deserializer::SOAP11:
|
||||
file: lib/SOAP/WSDL/Deserializer/SOAP11.pm
|
||||
version: 2.00_13
|
||||
SOAP::WSDL::Deserializer::SOM:
|
||||
file: lib/SOAP/WSDL/Deserializer/SOM.pm
|
||||
version: 2.00_15
|
||||
SOAP::WSDL::Expat::Message2Hash:
|
||||
file: lib/SOAP/WSDL/Expat/Message2Hash.pm
|
||||
SOAP::WSDL::Expat::MessageParser:
|
||||
file: lib/SOAP/WSDL/Expat/MessageParser.pm
|
||||
SOAP::WSDL::Expat::MessageStreamParser:
|
||||
file: lib/SOAP/WSDL/Expat/MessageStreamParser.pm
|
||||
SOAP::WSDL::Expat::MessageSubParser:
|
||||
file: lib/SOAP/WSDL/Expat/MessageSubParser.pm
|
||||
SOAP::WSDL::Factory::Deserializer:
|
||||
file: lib/SOAP/WSDL/Factory/Deserializer.pm
|
||||
SOAP::WSDL::Factory::Serializer:
|
||||
file: lib/SOAP/WSDL/Factory/Serializer.pm
|
||||
SOAP::WSDL::Factory::Transport:
|
||||
file: lib/SOAP/WSDL/Factory/Transport.pm
|
||||
SOAP::WSDL::Generator::Template:
|
||||
file: lib/SOAP/WSDL/Generator/Template.pm
|
||||
SOAP::WSDL::Generator::Template::XSD:
|
||||
file: lib/SOAP/WSDL/Generator/Template/XSD.pm
|
||||
SOAP::WSDL::Generator::Visitor:
|
||||
file: lib/SOAP/WSDL/Generator/Visitor.pm
|
||||
SOAP::WSDL::Generator::Visitor::Typelib:
|
||||
file: lib/SOAP/WSDL/Generator/Visitor/Typelib.pm
|
||||
SOAP::WSDL::Generator::Visitor::Typemap:
|
||||
file: lib/SOAP/WSDL/Generator/Visitor/Typemap.pm
|
||||
SOAP::WSDL::Message:
|
||||
file: lib/SOAP/WSDL/Message.pm
|
||||
SOAP::WSDL::OpMessage:
|
||||
file: lib/SOAP/WSDL/OpMessage.pm
|
||||
SOAP::WSDL::Operation:
|
||||
file: lib/SOAP/WSDL/Operation.pm
|
||||
SOAP::WSDL::Part:
|
||||
file: lib/SOAP/WSDL/Part.pm
|
||||
SOAP::WSDL::Port:
|
||||
file: lib/SOAP/WSDL/Port.pm
|
||||
SOAP::WSDL::PortType:
|
||||
file: lib/SOAP/WSDL/PortType.pm
|
||||
SOAP::WSDL::SOAP::Address:
|
||||
file: lib/SOAP/WSDL/SOAP/Address.pm
|
||||
SOAP::WSDL::SOAP::Body:
|
||||
file: lib/SOAP/WSDL/SOAP/Body.pm
|
||||
SOAP::WSDL::SOAP::Header:
|
||||
file: lib/SOAP/WSDL/SOAP/Header.pm
|
||||
SOAP::WSDL::SOAP::HeaderFault:
|
||||
file: lib/SOAP/WSDL/SOAP/HeaderFault.pm
|
||||
SOAP::WSDL::SOAP::Operation:
|
||||
file: lib/SOAP/WSDL/SOAP/Operation.pm
|
||||
SOAP::WSDL::SOAP::Typelib::Fault11:
|
||||
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
||||
SOAP::WSDL::Serializer::SOAP11:
|
||||
file: lib/SOAP/WSDL/Serializer/SOAP11.pm
|
||||
version: 2.00_13
|
||||
SOAP::WSDL::Service:
|
||||
file: lib/SOAP/WSDL/Service.pm
|
||||
SOAP::WSDL::Transport::HTTP:
|
||||
file: lib/SOAP/WSDL/Transport/HTTP.pm
|
||||
SOAP::WSDL::Transport::Test:
|
||||
file: lib/SOAP/WSDL/Transport/Test.pm
|
||||
version: 2.00_14
|
||||
SOAP::WSDL::TypeLookup:
|
||||
file: lib/SOAP/WSDL/TypeLookup.pm
|
||||
SOAP::WSDL::Types:
|
||||
file: lib/SOAP/WSDL/Types.pm
|
||||
SOAP::WSDL::XSD::Builtin:
|
||||
file: lib/SOAP/WSDL/XSD/Builtin.pm
|
||||
SOAP::WSDL::XSD::ComplexType:
|
||||
file: lib/SOAP/WSDL/XSD/ComplexType.pm
|
||||
SOAP::WSDL::XSD::Element:
|
||||
file: lib/SOAP/WSDL/XSD/Element.pm
|
||||
SOAP::WSDL::XSD::Schema:
|
||||
file: lib/SOAP/WSDL/XSD/Schema.pm
|
||||
SOAP::WSDL::XSD::Schema::Builtin:
|
||||
file: lib/SOAP/WSDL/XSD/Schema/Builtin.pm
|
||||
SOAP::WSDL::XSD::SimpleType:
|
||||
file: lib/SOAP/WSDL/XSD/SimpleType.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::ENTITY:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::ID:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ID.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::IDREF:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::IDREFS:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::NCName:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NCName.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKENS:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::NOTATION:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::Name:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/Name.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::QName:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/QName.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::anyType:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::anyURI:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::base64Binary:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::boolean:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/boolean.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::byte:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/byte.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::date:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/date.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::dateTime:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::decimal:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/decimal.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::double:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/double.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::duration:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/duration.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::float:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/float.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gDay:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gDay.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gMonth:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonth.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonthDay.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gYear:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gYear.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gYearMonth.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::hexBinary:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::int:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/int.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::integer:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/integer.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::language:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/language.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::list:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/list.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::long:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/long.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::normalizedString:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::short:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/short.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::string:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/string.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::time:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/time.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::token:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/token.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
|
||||
version: 2.00_16
|
||||
SOAP::WSDL::XSD::Typelib::Element:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Element.pm
|
||||
SOAP::WSDL::XSD::Typelib::SimpleType:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
||||
SOAP::WSDL::XSD::Typelib::SimpleType::restriction:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
||||
generated_by: Module::Build version 0.2808
|
||||
meta-spec:
|
||||
url: http://module-build.sourceforge.net/META-spec-v1.2.html
|
||||
version: 1.2
|
||||
---
|
||||
name: SOAP-WSDL
|
||||
version: 2.00_22
|
||||
author: []
|
||||
abstract: SOAP with WSDL support
|
||||
license: artistic
|
||||
resources:
|
||||
license: http://opensource.org/licenses/artistic-license.php
|
||||
requires:
|
||||
Class::Std: v0.0.8
|
||||
Class::Std::Storable: 0
|
||||
Data::Dumper: 0
|
||||
Date::Format: 0
|
||||
Date::Parse: 0
|
||||
File::Basename: 0
|
||||
File::Path: 0
|
||||
Getopt::Long: 0
|
||||
LWP::UserAgent: 0
|
||||
List::Util: 0
|
||||
Template: 0
|
||||
Term::ReadKey: 0
|
||||
XML::Parser::Expat: 0
|
||||
perl: 5.8.0
|
||||
provides:
|
||||
SOAP::WSDL:
|
||||
file: lib/SOAP/WSDL.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Base:
|
||||
file: lib/SOAP/WSDL/Base.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Binding:
|
||||
file: lib/SOAP/WSDL/Binding.pm
|
||||
SOAP::WSDL::Client:
|
||||
file: lib/SOAP/WSDL/Client.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Client::Base:
|
||||
file: lib/SOAP/WSDL/Client/Base.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Definitions:
|
||||
file: lib/SOAP/WSDL/Definitions.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Deserializer::Hash:
|
||||
file: lib/SOAP/WSDL/Deserializer/Hash.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Deserializer::SOM:
|
||||
file: lib/SOAP/WSDL/Deserializer/SOM.pm
|
||||
version: 2.00_15
|
||||
SOAP::WSDL::Deserializer::XSD:
|
||||
file: lib/SOAP/WSDL/Deserializer/XSD.pm
|
||||
version: 2.00_21
|
||||
SOAP::WSDL::Expat::Base:
|
||||
file: lib/SOAP/WSDL/Expat/Base.pm
|
||||
SOAP::WSDL::Expat::Message2Hash:
|
||||
file: lib/SOAP/WSDL/Expat/Message2Hash.pm
|
||||
SOAP::WSDL::Expat::MessageParser:
|
||||
file: lib/SOAP/WSDL/Expat/MessageParser.pm
|
||||
SOAP::WSDL::Expat::MessageStreamParser:
|
||||
file: lib/SOAP/WSDL/Expat/MessageStreamParser.pm
|
||||
SOAP::WSDL::Factory::Deserializer:
|
||||
file: lib/SOAP/WSDL/Factory/Deserializer.pm
|
||||
SOAP::WSDL::Factory::Generator:
|
||||
file: lib/SOAP/WSDL/Factory/Generator.pm
|
||||
version: 2.00_18
|
||||
SOAP::WSDL::Factory::Serializer:
|
||||
file: lib/SOAP/WSDL/Factory/Serializer.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Factory::Transport:
|
||||
file: lib/SOAP/WSDL/Factory/Transport.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Generator::Template:
|
||||
file: lib/SOAP/WSDL/Generator/Template.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Generator::Template::XSD:
|
||||
file: lib/SOAP/WSDL/Generator/Template/XSD.pm
|
||||
SOAP::WSDL::Generator::Visitor:
|
||||
file: lib/SOAP/WSDL/Generator/Visitor.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Generator::Visitor::Typelib:
|
||||
file: lib/SOAP/WSDL/Generator/Visitor/Typelib.pm
|
||||
SOAP::WSDL::Generator::Visitor::Typemap:
|
||||
file: lib/SOAP/WSDL/Generator/Visitor/Typemap.pm
|
||||
SOAP::WSDL::Message:
|
||||
file: lib/SOAP/WSDL/Message.pm
|
||||
SOAP::WSDL::OpMessage:
|
||||
file: lib/SOAP/WSDL/OpMessage.pm
|
||||
SOAP::WSDL::Operation:
|
||||
file: lib/SOAP/WSDL/Operation.pm
|
||||
SOAP::WSDL::Part:
|
||||
file: lib/SOAP/WSDL/Part.pm
|
||||
SOAP::WSDL::Port:
|
||||
file: lib/SOAP/WSDL/Port.pm
|
||||
SOAP::WSDL::PortType:
|
||||
file: lib/SOAP/WSDL/PortType.pm
|
||||
SOAP::WSDL::SOAP::Address:
|
||||
file: lib/SOAP/WSDL/SOAP/Address.pm
|
||||
SOAP::WSDL::SOAP::Body:
|
||||
file: lib/SOAP/WSDL/SOAP/Body.pm
|
||||
SOAP::WSDL::SOAP::Header:
|
||||
file: lib/SOAP/WSDL/SOAP/Header.pm
|
||||
SOAP::WSDL::SOAP::HeaderFault:
|
||||
file: lib/SOAP/WSDL/SOAP/HeaderFault.pm
|
||||
SOAP::WSDL::SOAP::Operation:
|
||||
file: lib/SOAP/WSDL/SOAP/Operation.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::SOAP::Typelib::Fault11:
|
||||
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Serializer::XSD:
|
||||
file: lib/SOAP/WSDL/Serializer/XSD.pm
|
||||
version: 2.00_21
|
||||
SOAP::WSDL::Service:
|
||||
file: lib/SOAP/WSDL/Service.pm
|
||||
SOAP::WSDL::Transport::HTTP:
|
||||
file: lib/SOAP/WSDL/Transport/HTTP.pm
|
||||
SOAP::WSDL::Transport::Loopback:
|
||||
file: lib/SOAP/WSDL/Transport/Loopback.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::Transport::Test:
|
||||
file: lib/SOAP/WSDL/Transport/Test.pm
|
||||
version: 2.00_14
|
||||
SOAP::WSDL::TypeLookup:
|
||||
file: lib/SOAP/WSDL/TypeLookup.pm
|
||||
SOAP::WSDL::Types:
|
||||
file: lib/SOAP/WSDL/Types.pm
|
||||
SOAP::WSDL::XSD::Builtin:
|
||||
file: lib/SOAP/WSDL/XSD/Builtin.pm
|
||||
SOAP::WSDL::XSD::ComplexType:
|
||||
file: lib/SOAP/WSDL/XSD/ComplexType.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::XSD::Element:
|
||||
file: lib/SOAP/WSDL/XSD/Element.pm
|
||||
version: 2.00_22
|
||||
SOAP::WSDL::XSD::Schema:
|
||||
file: lib/SOAP/WSDL/XSD/Schema.pm
|
||||
SOAP::WSDL::XSD::Schema::Builtin:
|
||||
file: lib/SOAP/WSDL/XSD/Schema/Builtin.pm
|
||||
SOAP::WSDL::XSD::SimpleType:
|
||||
file: lib/SOAP/WSDL/XSD/SimpleType.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::XSD::Typelib::Builtin:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::ENTITY:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::ID:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ID.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::IDREF:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::IDREFS:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::NCName:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NCName.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKENS:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::NOTATION:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::Name:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/Name.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::QName:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/QName.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::anyType:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::anyURI:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::base64Binary:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::boolean:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/boolean.pm
|
||||
version: 2.00_17
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::byte:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/byte.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::date:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/date.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::dateTime:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::decimal:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/decimal.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::double:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/double.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::duration:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/duration.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::float:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/float.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gDay:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gDay.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gMonth:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonth.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonthDay.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gYear:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gYear.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gYearMonth.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::hexBinary:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::int:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/int.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::integer:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/integer.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::language:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/language.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::list:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/list.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::long:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/long.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::normalizedString:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::short:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/short.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::string:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/string.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::time:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/time.pm
|
||||
version: 2.00_18
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::token:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/token.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.pm
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
|
||||
version: 2.00_22
|
||||
SOAP::WSDL::XSD::Typelib::Element:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/Element.pm
|
||||
SOAP::WSDL::XSD::Typelib::SimpleType:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
||||
SOAP::WSDL::XSD::Typelib::SimpleType::restriction:
|
||||
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
||||
generated_by: Module::Build version 0.2808
|
||||
meta-spec:
|
||||
url: http://module-build.sourceforge.net/META-spec-v1.2.html
|
||||
version: 1.2
|
||||
no_index:
|
||||
directory: lib/SOAP/WSDL/Generator/Template/XSD/
|
||||
|
||||
62
Makefile.PL
62
Makefile.PL
@@ -1,31 +1,31 @@
|
||||
# Note: this file was auto-generated by Module::Build::Compat version 0.03
|
||||
|
||||
unless (eval "use Module::Build::Compat 0.02; 1" ) {
|
||||
print "This module requires Module::Build to install itself.\n";
|
||||
|
||||
require ExtUtils::MakeMaker;
|
||||
my $yn = ExtUtils::MakeMaker::prompt
|
||||
(' Install Module::Build now from CPAN?', 'y');
|
||||
|
||||
unless ($yn =~ /^y/i) {
|
||||
die " *** Cannot install without Module::Build. Exiting ...\n";
|
||||
}
|
||||
|
||||
require Cwd;
|
||||
require File::Spec;
|
||||
require CPAN;
|
||||
|
||||
# Save this 'cause CPAN will chdir all over the place.
|
||||
my $cwd = Cwd::cwd();
|
||||
|
||||
CPAN::Shell->install('Module::Build::Compat');
|
||||
CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate
|
||||
or die "Couldn't install Module::Build, giving up.\n";
|
||||
|
||||
chdir $cwd or die "Cannot chdir() back to $cwd: $!";
|
||||
}
|
||||
eval "use Module::Build::Compat 0.02; 1" or die $@;
|
||||
|
||||
Module::Build::Compat->run_build_pl(args => \@ARGV);
|
||||
require Module::Build;
|
||||
Module::Build::Compat->write_makefile(build_class => 'Module::Build');
|
||||
# Note: this file was auto-generated by Module::Build::Compat version 0.03
|
||||
|
||||
unless (eval "use Module::Build::Compat 0.02; 1" ) {
|
||||
print "This module requires Module::Build to install itself.\n";
|
||||
|
||||
require ExtUtils::MakeMaker;
|
||||
my $yn = ExtUtils::MakeMaker::prompt
|
||||
(' Install Module::Build now from CPAN?', 'y');
|
||||
|
||||
unless ($yn =~ /^y/i) {
|
||||
die " *** Cannot install without Module::Build. Exiting ...\n";
|
||||
}
|
||||
|
||||
require Cwd;
|
||||
require File::Spec;
|
||||
require CPAN;
|
||||
|
||||
# Save this 'cause CPAN will chdir all over the place.
|
||||
my $cwd = Cwd::cwd();
|
||||
|
||||
CPAN::Shell->install('Module::Build::Compat');
|
||||
CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate
|
||||
or die "Couldn't install Module::Build, giving up.\n";
|
||||
|
||||
chdir $cwd or die "Cannot chdir() back to $cwd: $!";
|
||||
}
|
||||
eval "use Module::Build::Compat 0.02; 1" or die $@;
|
||||
|
||||
Module::Build::Compat->run_build_pl(args => \@ARGV);
|
||||
require Module::Build;
|
||||
Module::Build::Compat->write_makefile(build_class => 'Module::Build');
|
||||
|
||||
15
SOAP-WSDL-2.00_21.ppd
Normal file
15
SOAP-WSDL-2.00_21.ppd
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOFTPKG NAME="SOAP-WSDL-2.00_21" VERSION="2,00_21,0,0">
|
||||
<TITLE>SOAP-WSDL-2.00_21</TITLE>
|
||||
<ABSTRACT>SOAP with WSDL support</ABSTRACT>
|
||||
<AUTHOR>Martin Kutter <MKUTTER@cpan.org></AUTHOR>
|
||||
<IMPLEMENTATION>
|
||||
<DEPENDENCY NAME="Class-Std" VERSION="v0,0,8,0" />
|
||||
<DEPENDENCY NAME="Class-Std-Storable" VERSION="0,0,0,0" />
|
||||
<DEPENDENCY NAME="Template-Toolkit" VERSION="0,0,0,0" />
|
||||
<DEPENDENCY NAME="TimeDate" VERSION="0,0,0,0" />
|
||||
<OS NAME="MSWin32" />
|
||||
<ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" />
|
||||
<CODEBASE HREF="SOAP-WSDL-2.00_21.zip" />
|
||||
</IMPLEMENTATION>
|
||||
</SOFTPKG>
|
||||
BIN
SOAP-WSDL-2.00_21.zip
Normal file
BIN
SOAP-WSDL-2.00_21.zip
Normal file
Binary file not shown.
11
TEST_COVERAGE
Normal file
11
TEST_COVERAGE
Normal file
@@ -0,0 +1,11 @@
|
||||
# Unfortunately, Build testcover reports test coverage wrong.
|
||||
#
|
||||
# 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):
|
||||
|
||||
cd t/
|
||||
|
||||
find . -type f -name '*.t' | xargs -n 1 /usr/bin/perl -MDevel::Cover=-silent,1,-summary,0 -I../lib
|
||||
|
||||
cover -ignore_re \.t$ -ignore_re ^lib -coverage="statement" -coverage=condition -coverage=subroutine -coverage="branch"
|
||||
|
||||
23
TODO
23
TODO
@@ -2,36 +2,25 @@ TODO list for SOAP::WSDL
|
||||
|
||||
2.00 Pre-releases
|
||||
--------
|
||||
* SOAP Header support (#1764845)
|
||||
|
||||
* Implement a interface similar to SOAP::Schema (#1783639)
|
||||
|
||||
* Check & probably fix simpleType support.
|
||||
The WS at http://www.webservicex.net/genericbarcode.asmx?wsdl should
|
||||
make up a good example for simpleType definitions.
|
||||
|
||||
* write inheritance Test for all XSD::Typelib::Builtin::* classes
|
||||
|
||||
* support embedded atomic types (#1761532)
|
||||
Implement by including a second (and third and fourth)
|
||||
|
||||
package type_prefix::complex_type::element_name;
|
||||
|
||||
element package.
|
||||
Maybe even allow unlimited depth? What does the specs say?
|
||||
|
||||
2.1 release
|
||||
--------
|
||||
|
||||
* Support namespaces in SOAP message payload
|
||||
|
||||
* Support the xsi:type attribute on derived types on the wire
|
||||
|
||||
* SOAP1.2 support
|
||||
|
||||
2.2 release
|
||||
--------
|
||||
* XML schema support ("minimal conformant") (#1764845)
|
||||
|
||||
* Support SOAP attachments
|
||||
|
||||
* Act as SOAP Server
|
||||
|
||||
3.0 release
|
||||
--------
|
||||
We're not thinking that far ahead right now.
|
||||
We're not thinking that far ahead right now.
|
||||
|
||||
@@ -5,7 +5,7 @@ use Pod::Usage;
|
||||
use Getopt::Long;
|
||||
use LWP::UserAgent;
|
||||
use SOAP::WSDL::Expat::WSDLParser;
|
||||
use SOAP::WSDL::Generator::Template::XSD;
|
||||
use SOAP::WSDL::Factory::Generator;
|
||||
use Term::ReadKey;
|
||||
|
||||
my %opt = (
|
||||
@@ -16,7 +16,8 @@ my %opt = (
|
||||
typemap_prefix => 'MyTypemaps',
|
||||
interface_prefix => 'MyInterfaces',
|
||||
base_path => 'lib/',
|
||||
proxy => undef
|
||||
proxy => undef,
|
||||
generator => 'XSD',
|
||||
);
|
||||
|
||||
{ # a block just to scope "no warnings"
|
||||
@@ -57,6 +58,7 @@ GetOptions(\%opt,
|
||||
keep_alive
|
||||
user=s
|
||||
password=s
|
||||
generator=s
|
||||
)
|
||||
);
|
||||
|
||||
@@ -91,20 +93,29 @@ if ($opt{typemap_include}) {
|
||||
%typemap = do $opt{typemap_include};
|
||||
}
|
||||
|
||||
my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
type_prefix => $opt{ type_prefix },
|
||||
typemap_prefix => $opt{ typemap_prefix },
|
||||
element_prefix => $opt{ element_prefix },
|
||||
interface_prefix => $opt{ interface_prefix },
|
||||
OUTPUT_PATH => $opt{ base_path },
|
||||
definitions => $definitions,
|
||||
});
|
||||
my $generator = SOAP::WSDL::Factory::Generator->get_generator({ type => $opt{'generator'} });
|
||||
|
||||
if (%typemap) {
|
||||
if ($generator->can('set_typemap')) {
|
||||
$generator->set_typemap( \%typemap );
|
||||
}
|
||||
else {
|
||||
warn "Typemap snippet given, but generator does not support it\n";
|
||||
}
|
||||
};
|
||||
|
||||
$generator->set_type_prefix( $opt{ type_prefix }) if $generator->can('set_type_prefix');
|
||||
$generator->set_typemap_prefix( $opt{ typemap_prefix }) if $generator->can('set_typemap_prefix');
|
||||
$generator->set_element_prefix($opt{ element_prefix }) if $generator->can('set_element_prefix');
|
||||
$generator->set_interface_prefix($opt{ interface_prefix }) if $generator->can('set_interface_prefix');
|
||||
$generator->set_OUTPUT_PATH($opt{ base_path }) if $generator->can('set_OUTPUT_PATH');
|
||||
$generator->set_definitions($definitions) if $generator->can('set_definitions');
|
||||
$generator->set_wsdl($xml) if $generator->can('set_wsdl');
|
||||
|
||||
# start with typelib, as errors will most likely occur here...
|
||||
$generator->generate_typelib();
|
||||
$generator->generate_interface();
|
||||
$generator->generate_typemap({ (%typemap) ? (typemap => \%typemap) : () });
|
||||
$generator->generate();
|
||||
|
||||
__END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -133,13 +144,15 @@ wsdl2perl.pl - create perl bindings for SOAP webservices.
|
||||
base_path b Path to create classes in.
|
||||
Default: .
|
||||
typemap_include mi File to include in typemap. Must eval() to a valid
|
||||
perl hash (not a has ref !).
|
||||
perl hash (not a hash ref !).
|
||||
proxy x HTTP(S) proxy to use (if any). wsdl2perl will also
|
||||
use the proxy settings specified via the HTTP_PROXY
|
||||
and HTTPS_PROXY environment variables.
|
||||
keep_alive Use http keep_alive.
|
||||
user Username for HTTP authentication
|
||||
password Password. wsdl2perl will prompt if not given.
|
||||
generator g Generator to use.
|
||||
Default: XSD
|
||||
help h Show help content
|
||||
|
||||
=head1 DESCRIPTION
|
||||
@@ -186,7 +199,10 @@ You need Crypt::SSLeay installed for accessing HTTPS URLs.
|
||||
=head2 Accessing protected documents
|
||||
|
||||
Use the -u option for specifying the user name. You will be prompted for a
|
||||
password. If the first attempt fails, wsdl2perl
|
||||
password.
|
||||
|
||||
Alternatively, you may specify a passowrd with --password on the command
|
||||
line.
|
||||
|
||||
=head2 Accessing documents protected by NTLM authentication
|
||||
|
||||
|
||||
105
lib/SOAP/WSDL.pm
105
lib/SOAP/WSDL.pm
@@ -10,12 +10,11 @@ use Class::Std;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
||||
use LWP::UserAgent;
|
||||
|
||||
our $VERSION='2.00_16';
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
my %no_dispatch_of :ATTR(:name<no_dispatch>);
|
||||
my %wsdl_of :ATTR(:name<wsdl>);
|
||||
my %proxy_of :ATTR(:name<proxy>);
|
||||
my %readable_of :ATTR(:name<readable>);
|
||||
my %autotype_of :ATTR(:name<autotype>);
|
||||
my %outputxml_of :ATTR(:name<outputxml> :default<0>);
|
||||
my %outputtree_of :ATTR(:name<outputtree>);
|
||||
@@ -31,7 +30,6 @@ my %binding_of :ATTR(:default<()>);
|
||||
my %service_of :ATTR(:default<()>);
|
||||
my %definitions_of :ATTR(:get<definitions> :default<()>);
|
||||
my %serialize_options_of :ATTR(:default<()>);
|
||||
my %explain_options_of :ATTR(:default<()>);
|
||||
|
||||
my %client_of :ATTR(:name<client> :default<()>);
|
||||
my %keep_alive_of :ATTR(:name<keep_alive> :default<0> );
|
||||
@@ -41,7 +39,6 @@ my %LOOKUP = (
|
||||
class_resolver => \%class_resolver_of,
|
||||
wsdl => \%wsdl_of,
|
||||
proxy => \%proxy_of,
|
||||
readable => \%readable_of,
|
||||
autotype => \%autotype_of,
|
||||
outputxml => \%outputxml_of,
|
||||
outputtree => \%outputtree_of,
|
||||
@@ -51,6 +48,15 @@ my %LOOKUP = (
|
||||
keep_alive => \%keep_alive_of,
|
||||
);
|
||||
|
||||
sub readable { warn <<EOT;
|
||||
'readable' has no effect any more. If you want formatted XML,
|
||||
copy the debug output to your favorite XML editor and run the
|
||||
source format command.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub set_readable; *set_readable = \&readable;
|
||||
|
||||
for my $method (keys %LOOKUP ) {
|
||||
no strict qw(refs);
|
||||
*{ $method } = sub {
|
||||
@@ -107,8 +113,9 @@ sub wsdlinit {
|
||||
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
$parser->parse_string( $response->content() );
|
||||
|
||||
my $wsdl_definitions = $parser->get_data();
|
||||
|
||||
# sanity checks
|
||||
my $wsdl_definitions = $parser->get_data() or die "unable to parse WSDL";
|
||||
my $types = $wsdl_definitions->first_types()
|
||||
or die "unable to extract schema from WSDL";
|
||||
my $ns = $wsdl_definitions->get_xmlns()
|
||||
@@ -122,12 +129,6 @@ sub wsdlinit {
|
||||
typelib => $types,
|
||||
namespace => $ns,
|
||||
};
|
||||
$explain_options_of{ $ident } = {
|
||||
readable => $self->readable(),
|
||||
wsdl => $wsdl_definitions,
|
||||
namespace => $ns,
|
||||
typelib => $types,
|
||||
};
|
||||
|
||||
$servicename_of{ $ident } = $opt{servicename} if $opt{servicename};
|
||||
$portname_of{ $ident } = $opt{portname} if $opt{portname};
|
||||
@@ -277,7 +278,7 @@ sub call {
|
||||
my $method_info = $method_info_of{ $ident }->{ $method };
|
||||
|
||||
# TODO serialize both header and body, not only header
|
||||
my $response = (blessed $data)
|
||||
my (@response) = (blessed $data)
|
||||
? $client->call( {
|
||||
operation => $method,
|
||||
soap_action => $method_info->{ soap_action },
|
||||
@@ -289,7 +290,6 @@ sub call {
|
||||
$content .= $part->serialize( $method, $data,
|
||||
{
|
||||
%{ $serialize_options_of{ $ident } },
|
||||
readable => $readable_of{ $ident },
|
||||
} );
|
||||
}
|
||||
$client->call(
|
||||
@@ -308,14 +308,8 @@ sub call {
|
||||
);
|
||||
};
|
||||
|
||||
return unless defined $response; # nothing to do for one-ways
|
||||
return $response;
|
||||
}
|
||||
|
||||
sub explain {
|
||||
my $ident = ident shift;
|
||||
my $opt = $explain_options_of{ $ident };
|
||||
return $definitions_of{ $ident }->explain( $opt );
|
||||
return unless @response; # nothing to do for one-ways
|
||||
return wantarray ? @response : $response[0];
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -340,7 +334,6 @@ SOAP client, which mimics L<SOAP::Lite|SOAP::Lite>'s API, read on.
|
||||
|
||||
my $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file://bla.wsdl',
|
||||
readable => 1,
|
||||
);
|
||||
|
||||
my $result = $soap->call('MyMethod', %data);
|
||||
@@ -384,6 +377,13 @@ Does not support SOAP header data.
|
||||
Does support SOAP header data. $body_ref and $header ref may either be
|
||||
hash refs or SOAP::WSDL::XSD::Typelib::* derived objects.
|
||||
|
||||
Result headers are accessible via the result SOAP::SOM object.
|
||||
|
||||
If outputtree or outputhash are set, you may also use the following to
|
||||
access response header data:
|
||||
|
||||
my ($body, $header) = $soap->call('method', $body_ref, $header_ref );
|
||||
|
||||
=back
|
||||
|
||||
=head2 wsdlinit
|
||||
@@ -412,7 +412,7 @@ When outputtree is set, SOAP::WSDL will return an object tree instead of a
|
||||
SOAP::SOM object.
|
||||
|
||||
You have to specify a class_resolver for this to work. See
|
||||
<class_resolver|class_resolver>
|
||||
L<class_resolver|class_resolver>
|
||||
|
||||
=head2 class_resolver
|
||||
|
||||
@@ -422,8 +422,8 @@ Class resolvers must implement the method get_class which has to return the
|
||||
name of the class name for deserializing a XML node at the current XPath
|
||||
location.
|
||||
|
||||
Class resolvers are typically generated by using the to_typemap method on a
|
||||
SOAP::WSDL::Definitions objects.
|
||||
Class resolvers are typically generated by using the generate_typemap method
|
||||
of a SOAP::WSDL::Generator subclass.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -483,15 +483,6 @@ SOAP call to the SOAP service. Handy for testing/debugging.
|
||||
Returns the SOAP client implementation used (normally a SOAP::WSDL::Client
|
||||
object).
|
||||
|
||||
Useful for enabling tracing:
|
||||
|
||||
# enable tracing via 'warn'
|
||||
$soap->get_client->set_trace(1);
|
||||
|
||||
# enable tracing via a custom facility -
|
||||
# Log::Log4perl in this case...
|
||||
$soap->get_client->set_trace(sub { Log::Log4perl->get_logger->info(@_) } );
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
See the examples/ directory.
|
||||
@@ -504,7 +495,7 @@ See the examples/ directory.
|
||||
|
||||
SOAP::WSDL 2 is a complete rewrite. While SOAP::WSDL 1.x attempted to
|
||||
process the WSDL file on the fly by using XPath queries, SOAP:WSDL 2 uses a
|
||||
SAX filter for parsing the WSDL and building up a object tree representing
|
||||
Expat handler for parsing the WSDL and building up a object tree representing
|
||||
it's content.
|
||||
|
||||
The object tree has two main functions: It knows how to serialize data passed
|
||||
@@ -515,12 +506,12 @@ L<SOAP::WSDL::Manual> for using it.
|
||||
|
||||
=item * no_dispatch
|
||||
|
||||
call() with outputtxml set to true now returns the complete SOAP
|
||||
call() with no_dispatch set to true now returns the complete SOAP request
|
||||
envelope, not only the body's content.
|
||||
|
||||
=item * outputxml
|
||||
|
||||
call() with outputxml set to true now returns the complete SOAP
|
||||
call() with outputxml set to true now returns the complete SOAP response
|
||||
envelope, not only the body's content.
|
||||
|
||||
=item * servicename/portname
|
||||
@@ -533,6 +524,14 @@ You may pass the servicename and portname as attributes to wsdlinit, though.
|
||||
|
||||
=head1 Differences to SOAP::Lite
|
||||
|
||||
=head2 readable
|
||||
|
||||
readable is a no-op in SOAP::WSDL. Actually, the XML output from SOAP::Lite
|
||||
is hardly readable, either with readable switched on.
|
||||
|
||||
If you need readable XML messages, I suggest using your favorite XML editor
|
||||
for displaying and formatting.
|
||||
|
||||
=head2 Message style/encoding
|
||||
|
||||
While SOAP::Lite supports rpc/encoded style/encoding only, SOAP::WSDL currently
|
||||
@@ -577,7 +576,7 @@ See below.
|
||||
SOAP::Lite returns only the content of the SOAP body when outputxml is set
|
||||
to true. SOAP::WSDL returns the complete XML response.
|
||||
|
||||
=head3 Auto-Dispatching
|
||||
=head2 Auto-Dispatching
|
||||
|
||||
SOAP::WSDL does B<does not> support auto-dispatching.
|
||||
|
||||
@@ -592,7 +591,7 @@ SOAP::WSDL::Client and implementing something like
|
||||
You may even do this in a class factory - see L<wsdl2perl.pl> for creating
|
||||
such interfaces.
|
||||
|
||||
=head3 Debugging / Tracing
|
||||
=head2 Debugging / Tracing
|
||||
|
||||
While SOAP::Lite features a global tracing facility, SOAP::WSDL
|
||||
allows to switch tracing on/of on a per-object base.
|
||||
@@ -605,9 +604,10 @@ details.
|
||||
|
||||
=over
|
||||
|
||||
=item * SOAP Headers are not supported
|
||||
=item * perl 5.8.0 or higher required
|
||||
|
||||
There's no way to use SOAP Headers with SOAP::WSDL yet.
|
||||
SOAP::WSDL needs perl 5.8.0 or higher. This is due to a bug in perls
|
||||
before - see http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/929746 for details.
|
||||
|
||||
=item * Apache SOAP datatypes are not supported
|
||||
|
||||
@@ -615,19 +615,24 @@ You currently can't use SOAP::WSDL with Apache SOAP datatypes like map.
|
||||
|
||||
If you want this changed, email me a copy of the specs, please.
|
||||
|
||||
=item * outputhash
|
||||
=item * Incomplete XML Schema definitions support
|
||||
|
||||
outputhash is not implemented yet.
|
||||
XML Schema attribute definitions are not supported yet.
|
||||
|
||||
=item * Unsupported XML Schema definitions
|
||||
Importing external definitions is not supported yet.
|
||||
|
||||
The following XML Schema definitions are not supported:
|
||||
The following XML Schema definitions varieties are not supported:
|
||||
|
||||
choice
|
||||
group
|
||||
union
|
||||
simpleContent
|
||||
complexContent
|
||||
|
||||
The following XML Schema definition content model is only partially
|
||||
supported:
|
||||
|
||||
complexContent - only restriction variety supported
|
||||
|
||||
See L<SOAP::WSDL::Manual::XSD> for details.
|
||||
|
||||
=item * Serialization of hash refs dos not work for ambiguos values
|
||||
|
||||
@@ -731,10 +736,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 288 $
|
||||
$Rev: 332 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: WSDL.pm 288 2007-09-29 19:34:20Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL.pm $
|
||||
$Id: WSDL.pm 332 2007-10-19 07:29:03Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@ use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
use List::Util qw(first);
|
||||
use Carp;
|
||||
use Carp qw(confess);
|
||||
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
my %id_of :ATTR(:name<id> :default<()>);
|
||||
my %name_of :ATTR(:name<name> :default<()>);
|
||||
@@ -111,18 +113,6 @@ sub init {
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub add_namespace {
|
||||
my ($self, $uri, $prefix ) = @_;
|
||||
return unless $uri;
|
||||
$self->{ namespace } ||= {};
|
||||
$self->{ namespace }->{ $uri } = $prefix;
|
||||
}
|
||||
|
||||
sub to_typemap {
|
||||
warn "to_typemap";
|
||||
return q{};
|
||||
}
|
||||
|
||||
sub expand {
|
||||
my ($self, , $qname) = @_;
|
||||
my ($prefix, $localname) = split /:/, $qname;
|
||||
@@ -132,60 +122,9 @@ sub expand {
|
||||
if (my $parent = $self->get_parent()) {
|
||||
return $parent->expand($qname);
|
||||
}
|
||||
die "unbound prefix $prefix found for $prefix:$localname";
|
||||
confess "unbound prefix $prefix found for $prefix:$localname";
|
||||
}
|
||||
sub _expand;
|
||||
*_expand = \&expand;
|
||||
|
||||
|
||||
sub to_class {
|
||||
my $self = shift;
|
||||
my $opt = shift;
|
||||
my $template = shift;
|
||||
|
||||
$opt->{ base_path } ||= '.';
|
||||
|
||||
my $element_prefix = $opt->{ element_prefix } || $opt->{ prefix };
|
||||
my $type_prefix = $opt->{ type_prefix } || $opt->{ prefix };
|
||||
|
||||
if (($type_prefix) && ($type_prefix !~m{ :: $ }xms ) ) {
|
||||
warn 'type_prefix should end with "::"';
|
||||
$type_prefix .= '::';
|
||||
}
|
||||
|
||||
if (($element_prefix) && ($element_prefix !~m{ :: $ }xms) ) {
|
||||
warn 'element_prefix should end with "::"';
|
||||
$element_prefix .= '::';
|
||||
}
|
||||
|
||||
# Be careful: a Element may be ComplexType, too
|
||||
# (but not vice versa)
|
||||
my $prefix = $self->isa('SOAP::WSDL::XSD::Element')
|
||||
? $element_prefix
|
||||
: $type_prefix;
|
||||
|
||||
die 'No prefix specified' if not $prefix;
|
||||
|
||||
my $filename = $prefix . $self->get_name() . '.pm';
|
||||
$filename =~s{::}{/}xmsg;
|
||||
|
||||
my $output = $opt->{ output } || $filename;
|
||||
|
||||
require Template;
|
||||
my $tt = Template->new(
|
||||
RELATIVE => 1,
|
||||
OUTPUT_PATH => $opt->{ base_path },
|
||||
);
|
||||
|
||||
my $code = $tt->process( \$template, {
|
||||
element_prefix => $element_prefix,
|
||||
type_prefix => $type_prefix,
|
||||
self => $self,
|
||||
nsmap => { reverse %{ $opt->{ wsdl }->get_xmlns() } },
|
||||
structure => $self->explain( { wsdl => $opt->{ wsdl } } ),
|
||||
},
|
||||
$output
|
||||
)
|
||||
or die $tt->error();
|
||||
}
|
||||
1;
|
||||
|
||||
@@ -11,7 +11,7 @@ use SOAP::WSDL::Factory::Serializer;
|
||||
use SOAP::WSDL::Factory::Transport;
|
||||
use SOAP::WSDL::Expat::MessageParser;
|
||||
|
||||
our $VERSION = '2.00_16';
|
||||
our $VERSION = '2.00_17';
|
||||
|
||||
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
||||
my %no_dispatch_of :ATTR(:name<no_dispatch> :default<()>);
|
||||
@@ -21,7 +21,6 @@ my %endpoint_of :ATTR(:name<endpoint> :default<()>);
|
||||
|
||||
my %soap_version_of :ATTR(:get<soap_version> :init_attr<soap_version> :default<'1.1'>);
|
||||
|
||||
my %trace_of :ATTR(:set<trace> :init_arg<trace> :default<()> );
|
||||
my %on_action_of :ATTR(:name<on_action> :default<()>);
|
||||
my %content_type_of :ATTR(:name<content_type> :default<text/xml; charset=utf8>); #/#trick editors
|
||||
my %serializer_of :ATTR(:name<serializer> :default<()>);
|
||||
@@ -37,15 +36,6 @@ sub BUILD {
|
||||
|
||||
}
|
||||
|
||||
sub get_trace {
|
||||
my $ident = ident $_[0];
|
||||
return $trace_of{ $ident }
|
||||
? ref $trace_of{ $ident } eq 'CODE'
|
||||
? $trace_of{ $ident }
|
||||
: sub { warn @_ }
|
||||
: ()
|
||||
}
|
||||
|
||||
sub get_proxy {
|
||||
return $_[0]->get_transport();
|
||||
}
|
||||
@@ -80,7 +70,6 @@ sub set_soap_version {
|
||||
# serializer object
|
||||
delete $serializer_of{ $ident };
|
||||
delete $deserializer_of{ $ident };
|
||||
delete $transport_of{ $ident };
|
||||
|
||||
$soap_version_of{ $ident } = shift;
|
||||
|
||||
@@ -159,10 +148,7 @@ sub call {
|
||||
content_type => $content_type_of{ $ident },
|
||||
envelope => $envelope,
|
||||
action => $soap_action,
|
||||
on_receive_chunk => sub {} # optional, may be used for parsing large responses as they arrive.
|
||||
# might not be supported by all transport layers...
|
||||
# and, of course, only is of interest for chunk parsers -
|
||||
# namely ExpatNB and XML::LibXML's Push parser interface...
|
||||
# on_receive_chunk => sub {} # optional, may be used for parsing large responses as they arrive.
|
||||
);
|
||||
|
||||
return $response if ($outputxml_of{ $ident } );
|
||||
@@ -179,8 +165,14 @@ sub call {
|
||||
# Try deserializing response - there may be some,
|
||||
# even if transport did not succeed (got a 500 response)
|
||||
if ( $response ) {
|
||||
my $result = eval { $deserializer_of{ $ident }->deserialize( $response ); };
|
||||
return $result if (not $@);
|
||||
my ($result_body, $result_header) = eval {
|
||||
$deserializer_of{ $ident }->deserialize( $response );
|
||||
};
|
||||
if (not $@) {
|
||||
return wantarray
|
||||
? ($result_body, $result_header)
|
||||
: $result_body;
|
||||
}
|
||||
return $deserializer_of{ $ident }->generate_fault({
|
||||
code => 'soap:Server',
|
||||
role => 'urn:localhost',
|
||||
@@ -373,10 +365,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 288 $
|
||||
$Rev: 303 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Client.pm 288 2007-09-29 19:34:20Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
|
||||
$Id: Client.pm 303 2007-10-01 18:51:50Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -4,9 +4,12 @@ use warnings;
|
||||
use base 'SOAP::WSDL::Client';
|
||||
use Scalar::Util qw(blessed);
|
||||
|
||||
our $VERSION = '2.00_17';
|
||||
|
||||
sub call {
|
||||
my ($self, $method, $body, $header) = @_;
|
||||
if (not blessed $body) {
|
||||
$body = {} if not defined $body;
|
||||
my $class = $method->{ body }->{ parts }->[0];
|
||||
eval "require $class" || die $@;
|
||||
$body = $class->new($body);
|
||||
@@ -23,28 +26,29 @@ sub call {
|
||||
return $self->SUPER::call($method, $body, $header);
|
||||
}
|
||||
|
||||
sub __create_new {
|
||||
my ($package, %args_of) = @_;
|
||||
|
||||
no strict qw(refs);
|
||||
|
||||
# TODO factor out and replace by generated START method
|
||||
*{ "$package\::new" } = sub {
|
||||
my $class = shift;
|
||||
my $self = $class->SUPER::new({
|
||||
proxy => $args_of{ proxy },
|
||||
class_resolver => $args_of{ class_resolver }
|
||||
});
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
}
|
||||
#sub __create_new {
|
||||
# my ($package, %args_of) = @_;
|
||||
#
|
||||
# no strict qw(refs);
|
||||
# no warnings qw(redefine);
|
||||
#
|
||||
# # TODO factor out and replace by generated START method
|
||||
# *{ "$package\::new" } = sub {
|
||||
# my $class = shift;
|
||||
# my $self = $class->SUPER::new({
|
||||
# proxy => $args_of{ proxy },
|
||||
# class_resolver => $args_of{ class_resolver }
|
||||
# });
|
||||
# bless $self, $class;
|
||||
# return $self;
|
||||
# }
|
||||
#}
|
||||
|
||||
sub __create_methods {
|
||||
my ($package, %info_of) = @_;
|
||||
|
||||
no strict qw(refs);
|
||||
|
||||
no warnings qw(redefine);
|
||||
for my $method (keys %info_of){
|
||||
my ($soap_action, @parts);
|
||||
|
||||
@@ -113,9 +117,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 283 $
|
||||
$Rev: 323 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Base.pm 283 2007-09-27 19:06:29Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client/Base.pm $
|
||||
$Id: Base.pm 323 2007-10-17 15:23:05Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client/Base.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -9,6 +9,8 @@ use List::Util qw(first);
|
||||
use Class::Std::Storable;
|
||||
use base qw(SOAP::WSDL::Base);
|
||||
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
my %types_of :ATTR(:name<types> :default<[]>);
|
||||
my %message_of :ATTR(:name<message> :default<()>);
|
||||
my %portType_of :ATTR(:name<portType> :default<()>);
|
||||
@@ -43,13 +45,13 @@ BLOCK: {
|
||||
}
|
||||
}
|
||||
|
||||
sub listify {
|
||||
my $data = shift;
|
||||
return if not defined $data;
|
||||
return [ $data ] if not ref $data;
|
||||
return [ $data ] if not ref $data eq 'ARRAY';
|
||||
return $data;
|
||||
}
|
||||
#sub listify {
|
||||
# my $data = shift;
|
||||
# return if not defined $data;
|
||||
# return [ $data ] if not ref $data;
|
||||
# return [ $data ] if not ref $data eq 'ARRAY';
|
||||
# return $data;
|
||||
#}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
@@ -8,19 +8,17 @@ use SOAP::WSDL::Expat::Message2Hash;
|
||||
use SOAP::WSDL::Factory::Deserializer;
|
||||
SOAP::WSDL::Factory::Deserializer->register( '1.1', __PACKAGE__ );
|
||||
|
||||
our $VERSION='2.00_16';
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
sub BUILD {
|
||||
my ($self, $ident, $args_of_ref) = @_;
|
||||
|
||||
# ignore all options except 'class_resolver'
|
||||
# ignore all options
|
||||
for (keys %{ $args_of_ref }) {
|
||||
delete $args_of_ref->{ $_ }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub deserialize {
|
||||
my ($self, $content) = @_;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package SOAP::WSDL::Deserializer::SOAP11;
|
||||
package SOAP::WSDL::Deserializer::XSD;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::SOAP::Typelib::Fault11;
|
||||
use SOAP::WSDL::Expat::MessageParser;
|
||||
|
||||
our $VERSION='2.00_13';
|
||||
our $VERSION='2.00_21';
|
||||
|
||||
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
||||
|
||||
@@ -19,7 +19,6 @@ sub BUILD {
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub deserialize {
|
||||
my ($self, $content) = @_;
|
||||
|
||||
@@ -35,7 +34,7 @@ sub deserialize {
|
||||
. "Message was: \n$content"
|
||||
});
|
||||
}
|
||||
return $parser->get_data();
|
||||
return ( $parser->get_data(), $parser->get_header() );
|
||||
}
|
||||
|
||||
sub generate_fault {
|
||||
42
lib/SOAP/WSDL/Expat/Base.pm
Normal file
42
lib/SOAP/WSDL/Expat/Base.pm
Normal file
@@ -0,0 +1,42 @@
|
||||
package SOAP::WSDL::Expat::Base;
|
||||
use strict;
|
||||
use warnings;
|
||||
use XML::Parser::Expat;
|
||||
|
||||
sub new {
|
||||
my ($class, $args) = @_;
|
||||
my $self = {};
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub parse {
|
||||
eval {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new( Namespaces => 1 ) )->parse( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
};
|
||||
$_[0]->{ parser }->xpcroak( $@ ) if $@;
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
sub parsefile {
|
||||
eval {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new(Namespaces => 1) )->parsefile( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
};
|
||||
$_[0]->{ parser }->xpcroak( $@ ) if $@;
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
# SAX-like aliases
|
||||
sub parse_string;
|
||||
*parse_string = \&parse;
|
||||
|
||||
sub parse_file;
|
||||
*parse_file = \&parsefile;
|
||||
|
||||
sub get_data {
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -2,14 +2,7 @@
|
||||
package SOAP::WSDL::Expat::Message2Hash;
|
||||
use strict;
|
||||
use warnings;
|
||||
use XML::Parser::Expat;
|
||||
|
||||
sub new {
|
||||
my ($class, $args) = @_;
|
||||
my $self = {};
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
use base qw(SOAP::WSDL::Expat::Base);
|
||||
|
||||
sub _initialize {
|
||||
my ($self, $parser) = @_;
|
||||
@@ -23,7 +16,7 @@ sub _initialize {
|
||||
$self->{ data } = $current;
|
||||
|
||||
# use "globals" for speed
|
||||
my ($_prefix, $_localname, $_element, $_method,
|
||||
my ($_element, $_method,
|
||||
$_class, $_parser, %_attrs) = ();
|
||||
|
||||
no strict qw(refs);
|
||||
@@ -56,8 +49,6 @@ sub _initialize {
|
||||
|
||||
End => sub {
|
||||
$_element = $_[1];
|
||||
($_prefix, $_localname) = split m{:}xms , $_element;
|
||||
$_localname ||= $_element; # for non-prefixed elements
|
||||
|
||||
# This one easily handles ignores for us, too...
|
||||
# return if not ref $$list[-1];
|
||||
@@ -78,42 +69,13 @@ sub _initialize {
|
||||
return $parser;
|
||||
}
|
||||
|
||||
sub parse {
|
||||
eval {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new( Namespaces => 1 ) )->parse( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
};
|
||||
die $@ if $@;
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
sub parsefile {
|
||||
eval {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new( Namespaces => 1 ) )->parsefile( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
};
|
||||
die $@, $_[1] if $@;
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
# SAX-like aliases
|
||||
sub parse_string;
|
||||
*parse_string = \&parse;
|
||||
|
||||
sub parse_file;
|
||||
*parse_file = \&parsefile;
|
||||
|
||||
sub get_data {
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SOAP::WSDL::Expat::MessageParser - Convert SOAP messages to custom object trees
|
||||
SOAP::WSDL::Expat::Message2Hash - Convert SOAP messages to perl hash refs
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -127,14 +89,7 @@ SOAP::WSDL::Expat::MessageParser - Convert SOAP messages to custom object trees
|
||||
|
||||
Real fast expat based SOAP message parser.
|
||||
|
||||
See L<SOAP::WSDL::Parser> for details.
|
||||
|
||||
=head2 Skipping unwanted items
|
||||
|
||||
Sometimes there's unneccessary information transported in SOAP messages.
|
||||
|
||||
To skip XML nodes (including all child nodes), just edit the type map for
|
||||
the message and set the type map entry to '__SKIP__'.
|
||||
See L<SOAP::WSDL::Manual::Parser> for details.
|
||||
|
||||
=head1 Bugs and Limitations
|
||||
|
||||
@@ -142,6 +97,8 @@ the message and set the type map entry to '__SKIP__'.
|
||||
|
||||
=item * Ignores all namespaces
|
||||
|
||||
=item * Ignores all attributes
|
||||
|
||||
=item * Does not handle mixed content
|
||||
|
||||
=item * The SOAP header is ignored
|
||||
|
||||
@@ -3,7 +3,7 @@ package SOAP::WSDL::Expat::MessageParser;
|
||||
use strict;
|
||||
use warnings;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use XML::Parser::Expat;
|
||||
use base qw(SOAP::WSDL::Expat::Base);
|
||||
|
||||
sub new {
|
||||
my ($class, $args) = @_;
|
||||
@@ -17,8 +17,8 @@ sub new {
|
||||
|
||||
sub class_resolver {
|
||||
my $self = shift;
|
||||
$self->{ class_resolver } = shift;
|
||||
return;
|
||||
$self->{ class_resolver } = shift if @_;
|
||||
return $self->{ class_resolver };
|
||||
}
|
||||
|
||||
sub _initialize {
|
||||
@@ -26,6 +26,7 @@ sub _initialize {
|
||||
$self->{ parser } = $parser;
|
||||
|
||||
delete $self->{ data }; # remove potential old results
|
||||
delete $self->{ header };
|
||||
|
||||
my $characters;
|
||||
#my @characters_from = ();
|
||||
@@ -48,6 +49,15 @@ sub _initialize {
|
||||
},
|
||||
1 => sub {
|
||||
$depth++;
|
||||
if ($_[1] eq 'Body') {
|
||||
if (exists $self->{ data }) { # there was header data
|
||||
$self->{ header } = $self->{ data };
|
||||
delete $self->{ data };
|
||||
$list = [];
|
||||
$path = [];
|
||||
undef $current;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
)
|
||||
@@ -123,7 +133,6 @@ sub _initialize {
|
||||
Char => $char_handler,
|
||||
|
||||
End => sub {
|
||||
|
||||
pop @{ $path }; # step up in path
|
||||
|
||||
if ($skip) {
|
||||
@@ -165,37 +174,9 @@ sub _initialize {
|
||||
return $parser;
|
||||
}
|
||||
|
||||
sub parse {
|
||||
eval {
|
||||
$_[0]->_initialize(
|
||||
XML::Parser::Expat->new(
|
||||
Namespaces => 1
|
||||
)
|
||||
)->parse( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
};
|
||||
$_[0]->{ parser }->xpcroak( $@ ) if $@;
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
sub parsefile {
|
||||
eval {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new(Namespaces => 1) )->parsefile( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
};
|
||||
die $@, $_[1] if $@;
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
# SAX-like aliases
|
||||
sub parse_string;
|
||||
*parse_string = \&parse;
|
||||
|
||||
sub parse_file;
|
||||
*parse_file = \&parsefile;
|
||||
|
||||
sub get_data {
|
||||
return $_[0]->{ data };
|
||||
sub get_header {
|
||||
return $_[0]->{ header };
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -218,7 +199,7 @@ SOAP::WSDL::Expat::MessageParser - Convert SOAP messages to custom object trees
|
||||
|
||||
Real fast expat based SOAP message parser.
|
||||
|
||||
See L<SOAP::WSDL::Parser> for details.
|
||||
See L<SOAP::WSDL::Manual::Parser> for details.
|
||||
|
||||
=head2 Skipping unwanted items
|
||||
|
||||
@@ -253,9 +234,9 @@ This module may be used under the same terms as perl itself.
|
||||
|
||||
$ID: $
|
||||
|
||||
$LastChangedDate: 2007-09-27 21:06:29 +0200 (Don, 27 Sep 2007) $
|
||||
$LastChangedRevision: 283 $
|
||||
$LastChangedDate: 2007-10-07 19:27:58 +0200 (So, 07 Okt 2007) $
|
||||
$LastChangedRevision: 313 $
|
||||
$LastChangedBy: kutterma $
|
||||
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $
|
||||
|
||||
|
||||
@@ -1,241 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
package SOAP::WSDL::Expat::MessageParser;
|
||||
use strict;
|
||||
use warnings;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use XML::Parser::Expat;
|
||||
|
||||
sub new {
|
||||
my ($class, $args) = @_;
|
||||
my $self = {
|
||||
class_resolver => $args->{ class_resolver },
|
||||
};
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub class_resolver {
|
||||
my $self = shift;
|
||||
$self->{ class_resolver } = shift;
|
||||
}
|
||||
|
||||
sub _initialize {
|
||||
my ($self, $parser) = @_;
|
||||
$self->{ parser } = $parser;
|
||||
|
||||
delete $self->{ data };
|
||||
|
||||
my $characters = q{};
|
||||
my $current = undef;
|
||||
my $list = []; # node list
|
||||
my $path = []; # current path
|
||||
my $current_part = q{}; # are we in header or body ?
|
||||
my $depth = 0;
|
||||
|
||||
# use "globals" for speed
|
||||
my ($_prefix, $_method,
|
||||
$_class) = ();
|
||||
|
||||
my @check_sub_from = (
|
||||
);
|
||||
|
||||
no strict qw(refs);
|
||||
$parser->setHandlers(
|
||||
Start => sub {
|
||||
# my ($parser, $element, %_attrs) = @_;
|
||||
#return if $skip; # skip inside __SKIP__
|
||||
return if exists $self->{ skip };
|
||||
|
||||
$_[1] =~s{ \w+: }{}xms;
|
||||
|
||||
if ($depth <=1) {
|
||||
if ($depth == 0) {
|
||||
die "Bad top node $_[1]" if $_[1] ne 'Envelope';
|
||||
# die "Bad namespace for SOAP envelope: " . $_[0]->recognized_string()
|
||||
# if $_[0]->namespace($_[1]) ne 'http://schemas.xmlsoap.org/soap/envelope/';
|
||||
$depth++;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
die "Bad node $_[1]. Expected (Header|Body)" if $_[1] !~ m{(:?Header|Body)}xms;
|
||||
$depth++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
push @{ $path }, $_[1]; # step down in path
|
||||
|
||||
# resolve class of this element
|
||||
$_class = $self->{ class_resolver }->get_class( $path )
|
||||
or do {
|
||||
die "Cannot resolve class for "
|
||||
. join('/', @{ $path }) . " via " . $self->{ class_resolver };
|
||||
};
|
||||
|
||||
return $self->{skip} = join('/', @{ $path }) if ($_class eq '__SKIP__');
|
||||
|
||||
push @$list, $current; # step down in tree ()remember current)
|
||||
|
||||
# $characters = q(); # empty characters
|
||||
|
||||
# Check whether we have a primitive - we implement them as classes
|
||||
# We could replace this with UNIVERSAL->isa() - but it's slow...
|
||||
# match is a bit faster if the string does not match, but WAY slower
|
||||
# if $class matches...
|
||||
|
||||
if (index $_class, 'SOAP::WSDL::XSD::Typelib::Builtin', 0 < 0) {
|
||||
# check wheter there is a non-empty ARRAY reference for $_class::ISA
|
||||
# or a "new" method
|
||||
# If not, require it - all classes required here MUST
|
||||
# define new() or inherit from something defining it.
|
||||
# This is not exactly the same as $class->can('new'), but it's way faster
|
||||
defined *{ "$_class\::new" }{ CODE }
|
||||
or scalar @{ *{ "$_class\::ISA" }{ ARRAY } }
|
||||
or eval "require $_class" ## no critic qw(ProhibitStringyEval)
|
||||
or die $@;
|
||||
}
|
||||
|
||||
# create new object and pass it all attributes - remember, we're
|
||||
# called with
|
||||
# ($parser, $element, %attrs) = @_, so we can just give it
|
||||
# everything from @_[2..$#_]...
|
||||
$current = $_class->new({ @_[2..$#_] }); # set new current object
|
||||
|
||||
# remember top level element
|
||||
defined $self->{ data }
|
||||
or $self->{ data } = $current;
|
||||
|
||||
$depth++; # step down (once again)
|
||||
},
|
||||
|
||||
Char => sub {
|
||||
return if exists $self->{skip};
|
||||
return if $_[1] =~ m{ \A \s* \z}xs;
|
||||
$characters .= $_[1];
|
||||
},
|
||||
|
||||
End => sub {
|
||||
pop @{ $path }; # step up in path
|
||||
|
||||
if (exists $self->{skip}) {
|
||||
return if $self->{skip} ne join '/', @{ $path }, $_[1];
|
||||
delete $self->{skip};
|
||||
return;
|
||||
}
|
||||
|
||||
# This one easily handles ignores for us, too...
|
||||
return if not ref $list->[-1];
|
||||
|
||||
# set characters in current if we are a simple type
|
||||
# we may have characters in complexTypes with simpleContent,
|
||||
# too - maybe we should rely on the presence of characters ?
|
||||
# may get a speedup by defining a ident method in anySimpleType
|
||||
# and looking it up via exists &$class::ident;
|
||||
|
||||
$current->set_value( $characters ) if (length $characters);
|
||||
$characters = q{};
|
||||
|
||||
# set appropriate attribute in last element
|
||||
# multiple values must be implemented in base class
|
||||
#$_method = "add_$_localname";
|
||||
$_method = "add_$_[1]";
|
||||
$list->[-1]->$_method( $current );
|
||||
|
||||
$current = pop @$list; # step up in object hierarchy...
|
||||
$depth--;
|
||||
# print $self->{ data };
|
||||
}
|
||||
);
|
||||
return $parser;
|
||||
}
|
||||
|
||||
sub parse {
|
||||
eval {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new() )->parse( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
};
|
||||
die $@ if $@;
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
sub parsefile {
|
||||
eval {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new() )->parsefile( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
};
|
||||
die $@, $_[1] if $@;
|
||||
return die $_[0]->{ data };
|
||||
}
|
||||
|
||||
# SAX-like aliases
|
||||
sub parse_string;
|
||||
*parse_string = \&parse;
|
||||
|
||||
sub parse_file;
|
||||
*parse_file = \&parsefile;
|
||||
|
||||
sub get_data {
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SOAP::WSDL::Expat::MessageParser - Convert SOAP messages to custom object trees
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'My::Resolver'
|
||||
});
|
||||
$parser->parse( $xml );
|
||||
my $obj = $parser->get_data();
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Real fast expat based SOAP message parser.
|
||||
|
||||
See L<SOAP::WSDL::Parser> for details.
|
||||
|
||||
=head2 Skipping unwanted items
|
||||
|
||||
Sometimes there's unneccessary information transported in SOAP messages.
|
||||
|
||||
To skip XML nodes (including all child nodes), just edit the type map for
|
||||
the message and set the type map entry to '__SKIP__'.
|
||||
|
||||
=head1 Bugs and Limitations
|
||||
|
||||
=over
|
||||
|
||||
=item * Ignores all namespaces
|
||||
|
||||
=item * Does not handle mixed content
|
||||
|
||||
=item * The SOAP header is ignored
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Replace the whitespace by @ for E-Mail Address.
|
||||
|
||||
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 COPYING
|
||||
|
||||
This module may be used under the same terms as perl itself.
|
||||
|
||||
=head1 Repository information
|
||||
|
||||
$ID: $
|
||||
|
||||
$LastChangedDate: 2007-09-19 13:05:07 +0200 (Mi, 19 Sep 2007) $
|
||||
$LastChangedRevision: 261 $
|
||||
$LastChangedBy: kutterma $
|
||||
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $
|
||||
|
||||
@@ -8,7 +8,7 @@ use base qw(SOAP::WSDL::Expat::MessageParser);
|
||||
|
||||
sub parse_start {
|
||||
my $self = shift;
|
||||
$self->{ parser } = $_[0]->_initialize( XML::Parser::ExpatNB->new() );
|
||||
$self->{ parser } = $_[0]->_initialize( XML::Parser::ExpatNB->new( Namespaces => 1 ) );
|
||||
}
|
||||
sub init;
|
||||
*init = \&parse_start;
|
||||
@@ -19,6 +19,7 @@ sub parse_more {
|
||||
|
||||
sub parse_done {
|
||||
$_[0]->{ parser }->parse_done();
|
||||
$_[0]->{ parser }->release();
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -47,7 +48,7 @@ SOAP::WSDL::Expat::MessageStreamParser - Convert SOAP messages to custom object
|
||||
|
||||
ExpatNB based parser for parsing huge documents.
|
||||
|
||||
See L<SOAP::WSDL::Parser> for details.
|
||||
See L<SOAP::WSDL::Manual::Parser> for details.
|
||||
|
||||
=head1 Bugs and Limitations
|
||||
|
||||
@@ -67,9 +68,9 @@ This module may be used under the same terms as perl itself.
|
||||
|
||||
$ID: $
|
||||
|
||||
$LastChangedDate: 2007-09-10 17:54:52 +0200 (Mon, 10 Sep 2007) $
|
||||
$LastChangedRevision: 214 $
|
||||
$LastChangedDate: 2007-10-07 19:27:58 +0200 (So, 07 Okt 2007) $
|
||||
$LastChangedRevision: 313 $
|
||||
$LastChangedBy: kutterma $
|
||||
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageStreamParser.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageStreamParser.pm $
|
||||
|
||||
|
||||
@@ -1,213 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
package SOAP::WSDL::Expat::MessageSubParser;
|
||||
use strict;
|
||||
use warnings;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use XML::Parser::Expat;
|
||||
|
||||
sub new {
|
||||
my ($class, $args) = @_;
|
||||
my $self = {};
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
|
||||
# create handlers via currying - XML::Compiled is a good teacher...
|
||||
#
|
||||
# A handler has to know
|
||||
# - the order of it's child elements
|
||||
# - the classes for these child elements
|
||||
# - the handlers for these child elements (sub refs)
|
||||
|
||||
# order is checked if provided
|
||||
|
||||
sub start_tag {
|
||||
my $self = shift;
|
||||
my $arg_ref = shift;
|
||||
|
||||
my $CHILD_ORDER = $arg_ref->{ order } || [];
|
||||
my $CHILD_CLASS = $arg_ref->{ class_of } || {};
|
||||
my $CHILD_HANDLER = $arg_ref->{ handler_of };
|
||||
my $CHILD_OCCURS = $arg_ref->{ occurs_of } || {};
|
||||
|
||||
my $CHILD_INDEX = 0;
|
||||
|
||||
|
||||
return sub {
|
||||
# parser, element, attrs
|
||||
my ($prefix, $localname) = split m{:}xms , $_[1];
|
||||
$localname ||= $_[1];
|
||||
|
||||
=pod
|
||||
|
||||
# # implement better checks...
|
||||
# if (@{ $CHILD_ORDER }) {
|
||||
# if ($CHILD_ORDER->[$CHILD_INDEX] ne $localname) {
|
||||
# if (! $CHILD_ORDER->[++$CHILD_INDEX]
|
||||
# || $CHILD_ORDER->[$CHILD_INDEX] ne $localname) {
|
||||
# die "misplaced xml element " . $parser->recognized_string()
|
||||
# . " at line "
|
||||
# . $parser->current_line()
|
||||
# . " column " . $parser->current_column() , "\n"
|
||||
# , "Element order: " . join(',' , @{ $CHILD_ORDER }), "\n"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# if (%{ $CHILD_OCCURS }) {
|
||||
# die "too many occurances of $localname at line "
|
||||
# . $parser->current_line()
|
||||
# . " column " . $parser->current_column() , "\n"
|
||||
# if (not --$CHILD_OCCURS->{ $localname }->{ max });
|
||||
#
|
||||
# # min must be checked in end_element !
|
||||
# $CHILD_OCCURS->{ $localname }->{ min }--
|
||||
# if ($CHILD_OCCURS->{ $localname }->{ min });
|
||||
# }
|
||||
|
||||
=cut
|
||||
|
||||
# remove this some day
|
||||
return if ($localname eq 'Envelope');
|
||||
return if ($localname eq 'Body');
|
||||
|
||||
# step down in tree (remember current)
|
||||
push @{ $self->{ list } }, $self->{ current };
|
||||
$self->{ current } = $CHILD_CLASS->{ $localname }->new({ @_[2..$#_] });
|
||||
|
||||
# Set (and remember) next state
|
||||
push @{ $self->{ handlers } }, $CHILD_HANDLER->{ $localname };
|
||||
$_[0]->setHandlers( %{ $CHILD_HANDLER->{ $localname } } );
|
||||
};
|
||||
}
|
||||
|
||||
# characters is a good candidate for replacement when not needed -
|
||||
# expat calls it for those whitespaces in non-mixed-content-elements, too
|
||||
sub characters {
|
||||
my $self = shift;
|
||||
return sub { $self->{ characters } .= $_[1] };
|
||||
}
|
||||
|
||||
# end_tag is a somewhat generic thingy - don't know whether we should
|
||||
# curry it, and whether this will speed us up...
|
||||
sub end_tag {
|
||||
my $self = shift;
|
||||
|
||||
return sub {
|
||||
# step down handler hierarchy
|
||||
pop @{ $self->{ handlers } };
|
||||
|
||||
# restore state: set handler to last handler
|
||||
$_[0]->setHandlers( %{ $self->{ handlers }->[ -1 ] } );
|
||||
|
||||
my ($prefix, $localname) = split m{:}xms , $_[1];
|
||||
$localname ||= $_[1]; # for non-prefixed elements
|
||||
|
||||
# we only have characters if we need them - if not Char handler
|
||||
# has to be set to undef
|
||||
$self->{ current }->set_value( $self->{ characters } )
|
||||
if ($self->{ characters });
|
||||
|
||||
# empty temp characters
|
||||
undef $self->{ characters };
|
||||
|
||||
# return if we're top node
|
||||
# This one easily handles ignores for us, too...
|
||||
#
|
||||
# Hmm... could be replaced by something else, maybe ???
|
||||
# Maybe by defining an empty end_tag handler for the top node ?
|
||||
# Can we do this ???
|
||||
return if not defined $self->{ list }->[-1];
|
||||
|
||||
# set appropriate attribute in last element
|
||||
# multiple values must be implemented in base class
|
||||
my $method = "add_$localname";
|
||||
$self->{ list }->[-1]->$method( $self->{ current } );
|
||||
|
||||
# step up in object hierarchy...
|
||||
$self->{ current } = pop @{ $self->{ list } };
|
||||
};
|
||||
}
|
||||
|
||||
sub end_top_tag {
|
||||
my $self = shift;
|
||||
return sub {};
|
||||
}
|
||||
|
||||
sub initialize {
|
||||
my ($self, $handler_of_ref, $parser ) = @_;
|
||||
$parser ||= XML::Parser::Expat->new();
|
||||
$self->{ list } = undef;
|
||||
$self->{ current } = undef;
|
||||
$self->{ characters } = q{}; # empty characters
|
||||
$self->{ handlers } = [ $handler_of_ref ];
|
||||
$parser->setHandlers( %$handler_of_ref );
|
||||
return $parser;
|
||||
}
|
||||
|
||||
sub get_data {
|
||||
return $_[0]->{ current };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SOAP::WSDL::Expat::MessageParser - Convert SOAP messages to custom object trees
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'My::Resolver'
|
||||
});
|
||||
$parser->parse( $xml );
|
||||
my $obj = $parser->get_data();
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Real fast expat based SOAP message parser.
|
||||
|
||||
See L<SOAP::WSDL::Parser> for details.
|
||||
|
||||
=head2 Skipping unwanted items
|
||||
|
||||
Sometimes there's unneccessary information transported in SOAP messages.
|
||||
|
||||
To skip XML nodes (including all child nodes), just edit the type map for
|
||||
the message and set the type map entry to '__SKIP__'.
|
||||
|
||||
=head1 Bugs and Limitations
|
||||
|
||||
=over
|
||||
|
||||
=item * Ignores all namespaces
|
||||
|
||||
=item * Does not handle mixed content
|
||||
|
||||
=item * The SOAP header is ignored
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Replace the whitespace by @ for E-Mail Address.
|
||||
|
||||
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 COPYING
|
||||
|
||||
This module may be used under the same terms as perl itself.
|
||||
|
||||
=head1 Repository information
|
||||
|
||||
$ID: $
|
||||
|
||||
$LastChangedDate: 2007-09-10 17:54:52 +0200 (Mon, 10 Sep 2007) $
|
||||
$LastChangedRevision: 214 $
|
||||
$LastChangedBy: kutterma $
|
||||
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageSubParser.pm $
|
||||
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
package SOAP::WSDL::Expat::MessageSubParser;
|
||||
use strict;
|
||||
use warnings;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use XML::Parser::Expat;
|
||||
|
||||
sub new {
|
||||
my ($class, $args) = @_;
|
||||
my $self = {
|
||||
class_resolver => $args->{ class_resolver }
|
||||
};
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub class_resolver {
|
||||
my $self = shift;
|
||||
$self->{ class_resolver } = shift;
|
||||
}
|
||||
|
||||
sub _start;
|
||||
|
||||
sub _initialize {
|
||||
my ($self, $parser) = @_;
|
||||
|
||||
delete $self->{ data };
|
||||
|
||||
my $characters;
|
||||
my $current = undef;
|
||||
my $ignore = [ 'Envelope', 'Body' ]; # top level elements to ignore
|
||||
my $list = []; # node list
|
||||
my $path = []; # current path (without
|
||||
# number)
|
||||
my $skip = 0; # skip elements
|
||||
|
||||
# use "globals" for speed
|
||||
my ($_prefix, $_localname, $_element, $_method,
|
||||
$_class, $_parser, %_attrs) = ();
|
||||
|
||||
no strict qw(refs);
|
||||
|
||||
my $start_sub = sub {
|
||||
($_parser, $_element, %_attrs) = @_;
|
||||
($_prefix, $_localname) = split m{:}xms , $_element;
|
||||
|
||||
# $parser->setHandlers( Start => \&_start );
|
||||
|
||||
$_localname ||= $_element; # for non-prefixed elements
|
||||
|
||||
# ignore top level elements
|
||||
if (@{ $ignore } && $_localname eq $ignore->[0]) {
|
||||
shift @{ $ignore };
|
||||
return;
|
||||
}
|
||||
|
||||
push @{ $path }, $_localname; # step down in path
|
||||
return if $skip; # skip inside __SKIP__
|
||||
|
||||
# resolve class of this element
|
||||
$_class = $self->{ class_resolver }->get_class( $path )
|
||||
or die "Cannot resolve class for "
|
||||
. join('/', @{ $path }) . " via $self->{ class_resolver }";
|
||||
|
||||
# maybe write as "return $skip = join ... if (...)" ?
|
||||
# would save a BLOCK...
|
||||
return $skip = join('/', @{ $path }) if ($_class eq '__SKIP__');
|
||||
|
||||
push @$list, $current; # step down in tree ()remember current)
|
||||
|
||||
$characters = q{}; # empty characters
|
||||
|
||||
# Check whether we have a primitive - we implement them as classes
|
||||
# We could replace this with UNIVERSAL->isa() - but it's slow...
|
||||
# match is a bit faster if the string does not match, but WAY slower
|
||||
# if $class matches...
|
||||
|
||||
if (index $_class, 'SOAP::WSDL::XSD::Typelib::Builtin', 0 < 0) {
|
||||
# check wheter there is a CODE reference for $class::new.
|
||||
# If not, require it - all classes required here MUST
|
||||
# define new()
|
||||
# This is the same as $class->can('new'), but it's way faster
|
||||
*{ "$_class\::new" }{ CODE }
|
||||
or eval "require $_class" ## no critic qw(ProhibitStringyEval)
|
||||
or die $@;
|
||||
}
|
||||
|
||||
$current = $_class->new({ %_attrs }); # set new current object
|
||||
|
||||
# remember top level element
|
||||
defined $self->{ data }
|
||||
or ($self->{ data } = $current);
|
||||
};
|
||||
|
||||
my $char_sub = sub {
|
||||
return if $skip;
|
||||
$characters .= $_[1];
|
||||
};
|
||||
|
||||
my $end_sub = sub {
|
||||
$_element = $_[1];
|
||||
|
||||
($_prefix, $_localname) = split m{:}xms , $_element;
|
||||
$_localname ||= $_element; # for non-prefixed elements
|
||||
|
||||
pop @{ $path }; # step up in path
|
||||
|
||||
if ($skip) {
|
||||
return if $skip ne join '/', @{ $path }, $_localname;
|
||||
$skip = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
# This one easily handles ignores for us, too...
|
||||
return if not ref $$list[-1];
|
||||
|
||||
# set characters in current if we are a simple type
|
||||
# we may have characters in complexTypes with simpleContent,
|
||||
# too - maybe we should rely on the presence of characters ?
|
||||
# may get a speedup by defining a ident method in anySimpleType
|
||||
# and looking it up via exists &$class::ident;
|
||||
if ( $current->isa('SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType') ) {
|
||||
$current->set_value( $characters );
|
||||
}
|
||||
|
||||
# set appropriate attribute in last element
|
||||
# multiple values must be implemented in base class
|
||||
$_method = "add_$_localname";
|
||||
$$list[-1]->$_method( $current );
|
||||
|
||||
$current = pop @$list; # step up in object hierarchy...
|
||||
};
|
||||
|
||||
$parser->setHandlers(
|
||||
Start => sub {
|
||||
$_[0]->setHandlers( Start => $start_sub );
|
||||
$start_sub->(@_) },
|
||||
Char => $char_sub,
|
||||
End => $end_sub,
|
||||
);
|
||||
return $parser;
|
||||
}
|
||||
|
||||
sub parse {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new() )->parse( $_[1] );
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
sub parsefile {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new() )->parsefile( $_[1] );
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
sub get_data {
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SOAP::WSDL::Expat::MessageParser - Convert SOAP messages to custom object trees
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'My::Resolver'
|
||||
});
|
||||
$parser->parse( $xml );
|
||||
my $obj = $parser->get_data();
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Real fast expat based SOAP message parser.
|
||||
|
||||
See L<SOAP::WSDL::Parser> for details.
|
||||
|
||||
=head2 Skipping unwanted items
|
||||
|
||||
Sometimes there's unneccessary information transported in SOAP messages.
|
||||
|
||||
To skip XML nodes (including all child nodes), just edit the type map for
|
||||
the message and set the type map entry to '__SKIP__'.
|
||||
|
||||
=head1 Bugs and Limitations
|
||||
|
||||
=over
|
||||
|
||||
=item * Ignores all namespaces
|
||||
|
||||
=item * Does not handle mixed content
|
||||
|
||||
=item * The SOAP header is ignored
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Replace the whitespace by @ for E-Mail Address.
|
||||
|
||||
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 COPYING
|
||||
|
||||
This module may be used under the same terms as perl itself.
|
||||
|
||||
=head1 Repository information
|
||||
|
||||
$ID: $
|
||||
|
||||
$LastChangedDate: 2007-09-10 17:54:52 +0200 (Mon, 10 Sep 2007) $
|
||||
$LastChangedRevision: 214 $
|
||||
$LastChangedBy: kutterma $
|
||||
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/SubParser.pm $
|
||||
|
||||
|
||||
@@ -3,14 +3,7 @@ use strict;
|
||||
use warnings;
|
||||
use Carp;
|
||||
use SOAP::WSDL::TypeLookup;
|
||||
use XML::Parser::Expat;
|
||||
|
||||
sub new {
|
||||
my ($class, $args) = @_;
|
||||
my $self = {};
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
use base qw(SOAP::WSDL::Expat::Base);
|
||||
|
||||
sub _initialize {
|
||||
my ($self, $parser) = @_;
|
||||
@@ -146,33 +139,5 @@ sub _fixup_attrs {
|
||||
return @attrs_from;
|
||||
}
|
||||
|
||||
sub parse {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new(
|
||||
Namespaces => 1
|
||||
) )->parse( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
sub parsefile {
|
||||
$_[0]->_initialize( XML::Parser::Expat->new(
|
||||
Namespaces => 1
|
||||
) )->parsefile( $_[1] );
|
||||
$_[0]->{ parser }->release();
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
# aliases to make it more SAX-like
|
||||
sub parse_file;
|
||||
*parse_file = \&parsefile;
|
||||
|
||||
sub parse_string;
|
||||
*parse_string = \&parse;
|
||||
|
||||
|
||||
sub get_data {
|
||||
return $_[0]->{ data };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
my %DESERIALIZER = (
|
||||
'1.1' => 'SOAP::WSDL::Deserializer::SOAP11',
|
||||
'1.1' => 'SOAP::WSDL::Deserializer::XSD',
|
||||
);
|
||||
|
||||
# class method
|
||||
@@ -64,7 +64,7 @@ SOAP::WSDL::Deserializer tries to load one of the following classes:
|
||||
|
||||
=back
|
||||
|
||||
By default, L<SOAP::WSDL::Deserializer::SOAP11|SOAP::WSDL::Deserializer::SOAP11>
|
||||
By default, L<SOAP::WSDL::Deserializer::XSD|SOAP::WSDL::Deserializer::XSD>
|
||||
is registered for SOAP1.1 messages.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
172
lib/SOAP/WSDL/Factory/Generator.pm
Normal file
172
lib/SOAP/WSDL/Factory/Generator.pm
Normal file
@@ -0,0 +1,172 @@
|
||||
package SOAP::WSDL::Factory::Generator;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
our $VERSION='2.00_18';
|
||||
|
||||
my %GENERATOR = (
|
||||
'XSD' => 'SOAP::WSDL::Generator::Template::XSD',
|
||||
);
|
||||
|
||||
# class method
|
||||
sub register {
|
||||
my ($class, $ref_type, $package) = @_;
|
||||
$GENERATOR{ $ref_type } = $package;
|
||||
}
|
||||
|
||||
sub get_generator {
|
||||
my ($self, $args_of_ref) = @_;
|
||||
|
||||
# sanity check
|
||||
# die "no generator registered for generation method $args_of_ref->{ type }"
|
||||
#
|
||||
my $generator_class = (exists ($GENERATOR{ $args_of_ref->{ type } }))
|
||||
? $GENERATOR{ $args_of_ref->{ type } }
|
||||
: $args_of_ref->{ type };
|
||||
|
||||
# load module
|
||||
eval "require $generator_class"
|
||||
or die "Cannot load generator $generator_class", $@;
|
||||
|
||||
return $generator_class->new();
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SOAP::WSDL::Factory:Generator - Factory for retrieving generator objects
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
# from SOAP::WSDL::Client:
|
||||
$generator = SOAP::WSDL::Factory::Generator->get_generator({
|
||||
soap_version => $soap_version,
|
||||
});
|
||||
|
||||
# in generator class:
|
||||
package MyWickedGenerator;
|
||||
use SOAP::WSDL::Factory::Generator;
|
||||
|
||||
# register as generator for SOAP1.2 messages
|
||||
SOAP::WSDL::Factory::Generator->register( '1.2' , __PACKAGE__ );
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SOAP::WSDL::Factory::Generator serves as factory for retrieving
|
||||
generator objects for SOAP::WSDL.
|
||||
|
||||
The actual work is done by specific generator classes.
|
||||
|
||||
SOAP::WSDL::Generator tries to load one of the following classes:
|
||||
|
||||
=over
|
||||
|
||||
=item * the class registered for the scheme via register()
|
||||
|
||||
=back
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 register
|
||||
|
||||
SOAP::WSDL::Generator->register('Lite', 'MyWickedGenerator');
|
||||
|
||||
Globally registers a class for use as generator class.
|
||||
|
||||
=head2 get_generator
|
||||
|
||||
Returns an object of the generator class for this endpoint.
|
||||
|
||||
=head1 WRITING YOUR OWN GENERATOR CLASS
|
||||
|
||||
=head2 Registering a generator
|
||||
|
||||
Generator classes may register with SOAP::WSDL::Factory::Generator.
|
||||
|
||||
Registering a generator class with SOAP::WSDL::Factory::Generator is done
|
||||
by executing the following code where $version is the SOAP version the
|
||||
class should be used for, and $class is the class name.
|
||||
|
||||
SOAP::WSDL::Factory::Generator->register( $version, $class);
|
||||
|
||||
To auto-register your transport class on loading, execute register() in
|
||||
your generator class (see L<SYNOPSIS|SYNOPSIS> above).
|
||||
|
||||
=head2 Generator package layout
|
||||
|
||||
Generator modules must be named equal to the generator class they contain.
|
||||
There can only be one generator class per generator module.
|
||||
|
||||
=head2 Methods to implement
|
||||
|
||||
Generator classes must implement the following methods:
|
||||
|
||||
=over
|
||||
|
||||
=item * new
|
||||
|
||||
Constructor.
|
||||
|
||||
=item * generate
|
||||
|
||||
Generate SOAP interface
|
||||
|
||||
=back
|
||||
|
||||
Generators may implements one or more of the following configuration
|
||||
methods. All of them are tried via can() by wsdl2perl.
|
||||
|
||||
=over
|
||||
|
||||
=item * set_wsdl
|
||||
|
||||
Set the raw WSDL XML. Implement if you have your own WSDL parser.
|
||||
|
||||
=item * set_definitions
|
||||
|
||||
Sets the (parsed) SOAP::WSDL::Definitions object.
|
||||
|
||||
=item * set_type_prefix
|
||||
|
||||
Sets the prefix for XML Schema type classes
|
||||
|
||||
=item * set_element_prefix
|
||||
|
||||
Sets the prefix for XML Schema element classes
|
||||
|
||||
=item * set_typemap_prefix
|
||||
|
||||
Sets the prefix for typemap classes (class resolvers).
|
||||
|
||||
=item * set_interface_prefix
|
||||
|
||||
Sets the prefix for interface classes
|
||||
|
||||
=item * set_typemap
|
||||
|
||||
Set user-defined typemap snippet
|
||||
|
||||
=back
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Copyright (c) 2004-2007 Martin Kutter.
|
||||
|
||||
This file is part of SOAP-WSDL. You may distribute/modify it under the same
|
||||
terms as perl itself
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 302 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Generator.pm 302 2007-09-30 19:25:25Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Generator.pm $
|
||||
|
||||
=cut
|
||||
@@ -2,8 +2,10 @@ package SOAP::WSDL::Factory::Serializer;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
my %SERIALIZER = (
|
||||
'1.1' => 'SOAP::WSDL::Serializer::SOAP11',
|
||||
'1.1' => 'SOAP::WSDL::Serializer::XSD',
|
||||
);
|
||||
|
||||
# class method
|
||||
@@ -16,7 +18,7 @@ sub get_serializer {
|
||||
my ($self, $args_of_ref) = @_;
|
||||
|
||||
# sanity check
|
||||
die "no deserializer registered for SOAP version $args_of_ref->{ soap_version }"
|
||||
die "no serializer registered for SOAP version $args_of_ref->{ soap_version }"
|
||||
if not exists ($SERIALIZER{ $args_of_ref->{ soap_version } });
|
||||
|
||||
# load module
|
||||
@@ -93,7 +95,7 @@ class should be used for, and $class is the class name.
|
||||
SOAP::WSDL::Factory::Serializer->register( $version, $class);
|
||||
|
||||
To auto-register your transport class on loading, execute register() in
|
||||
your tranport class (see L<SYNOPSIS|SYNOPSIS> above).
|
||||
your tranport class (see L</SYNOPSIS> above).
|
||||
|
||||
=head2 Serializer package layout
|
||||
|
||||
@@ -136,9 +138,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 265 $
|
||||
$Rev: 329 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Serializer.pm 265 2007-09-20 21:51:31Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||
$Id: Serializer.pm 329 2007-10-18 19:42:09Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -2,6 +2,8 @@ package SOAP::WSDL::Factory::Transport;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
# class data
|
||||
my %registered_transport_of = ();
|
||||
|
||||
@@ -34,8 +36,9 @@ sub get_transport {
|
||||
|
||||
$scheme =~s{ \A ([^\:]+) \: .+ }{$1}smx;
|
||||
|
||||
if (exists $registered_transport_of{ $scheme }) {
|
||||
eval "require $registered_transport_of{ $scheme }" or die $@;
|
||||
if ($registered_transport_of{ $scheme }) {
|
||||
eval "require $registered_transport_of{ $scheme }"
|
||||
or die "Cannot load transport class $registered_transport_of{ $scheme } : $@";
|
||||
|
||||
# try "foo::Client" class first - SOAP::Tranport always requires
|
||||
# a package withoug the ::Client appended, and then
|
||||
@@ -45,12 +48,12 @@ sub get_transport {
|
||||
# sparse resource ...
|
||||
# ... 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 $@;
|
||||
# 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 );
|
||||
}
|
||||
|
||||
@@ -65,7 +68,8 @@ sub get_transport {
|
||||
}
|
||||
|
||||
if (exists $SOAP_WSDL_TRANSPORT_OF{ $scheme }) {
|
||||
eval "require $SOAP_WSDL_TRANSPORT_OF{ $scheme }" or die $@;
|
||||
eval "require $SOAP_WSDL_TRANSPORT_OF{ $scheme }"
|
||||
or die "Cannot load transport class $SOAP_WSDL_TRANSPORT_OF{ $scheme } : $@";
|
||||
return $SOAP_WSDL_TRANSPORT_OF{ $scheme }->new( %attrs );
|
||||
}
|
||||
|
||||
@@ -232,9 +236,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 265 $
|
||||
$Rev: 304 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Transport.pm 265 2007-09-20 21:51:31Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Transport.pm $
|
||||
$Id: Transport.pm 304 2007-10-02 20:07:21Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Transport.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -3,10 +3,12 @@ use strict;
|
||||
use Template;
|
||||
use Class::Std::Storable;
|
||||
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
my %tt_of :ATTR(:get<tt>);
|
||||
my %definitions_of :ATTR(:name<definitions> :default<()>);
|
||||
my %interface_prefix_of :ATTR(:name<interface_prefix> :default<MyInterface>);
|
||||
my %typemap_prefix_of :ATTR(:name<typemap_prefix> :default<MyTypemap>);
|
||||
my %interface_prefix_of :ATTR(:name<interface_prefix> :default<MyInterfaces>);
|
||||
my %typemap_prefix_of :ATTR(:name<typemap_prefix> :default<MyTypemaps>);
|
||||
my %type_prefix_of :ATTR(:name<type_prefix> :default<MyTypes>);
|
||||
my %element_prefix_of :ATTR(:name<element_prefix> :default<MyElements>);
|
||||
my %INCLUDE_PATH_of :ATTR(:name<INCLUDE_PATH> :default<()>);
|
||||
@@ -16,18 +18,18 @@ my %OUTPUT_PATH_of :ATTR(:name<OUTPUT_PATH> :default<.>);
|
||||
|
||||
sub START {
|
||||
my ($self, $ident, $arg_ref) = @_;
|
||||
$tt_of{$ident} = Template->new(
|
||||
}
|
||||
|
||||
sub _process :PROTECTED {
|
||||
my ($self, $template, $arg_ref, $output) = @_;
|
||||
my $ident = ident $self;
|
||||
my $tt = $tt_of{$ident} ||= Template->new(
|
||||
DEBUG => 1,
|
||||
EVAL_PERL => $EVAL_PERL_of{ $ident },
|
||||
RECURSION => $RECURSION_of{ $ident },
|
||||
INCLUDE_PATH => $INCLUDE_PATH_of{ $ident },
|
||||
OUTPUT_PATH => $OUTPUT_PATH_of{ $ident },
|
||||
);
|
||||
}
|
||||
|
||||
sub _process :PROTECTED {
|
||||
my ($self, $template, $arg_ref, $output) = @_;
|
||||
my $tt = $self->get_tt();
|
||||
$tt->process( $template,
|
||||
{
|
||||
definitions => $self->get_definitions,
|
||||
@@ -40,7 +42,7 @@ sub _process :PROTECTED {
|
||||
%{ $arg_ref }
|
||||
},
|
||||
$output)
|
||||
or die $tt->error();
|
||||
or die $INCLUDE_PATH_of{ $ident }, '\\', $template, ' ', $tt->error();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ use SOAP::WSDL::Generator::Visitor::Typemap;
|
||||
use SOAP::WSDL::Generator::Visitor::Typelib;
|
||||
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<({})>);
|
||||
|
||||
sub BUILD {
|
||||
my ($self, $ident, $arg_ref) = @_;
|
||||
@@ -17,10 +18,40 @@ sub BUILD {
|
||||
$self->set_RECURSION(1);
|
||||
$self->set_INCLUDE_PATH( exists $arg_ref->{INCLUDE_PATH}
|
||||
? $arg_ref->{INCLUDE_PATH}
|
||||
: File::Spec->rel2abs( dirname __FILE__ ). '/XSD/'
|
||||
: do {
|
||||
# ignore uninitialized warnings - File::Spec warns about
|
||||
# uninitialized values, probably because we have no filename
|
||||
local $SIG{__WARN__} = sub {
|
||||
return if ($_[0]=~m{\buninitialized\b});
|
||||
CORE::warn @_;
|
||||
};
|
||||
|
||||
# makeup path for the OS we're running on
|
||||
my ($volume, $dir, $file) = File::Spec->splitpath(
|
||||
File::Spec->rel2abs( dirname __FILE__ )
|
||||
);
|
||||
$dir = File::Spec->catdir($dir, $file, 'XSD');
|
||||
# return path put together...
|
||||
my $path = File::Spec->catpath( $volume, $dir );
|
||||
|
||||
# Fixup path for windows - / works fine, \ does
|
||||
# not...
|
||||
if ( eval { &Win32::BuildNumber } ) {
|
||||
$path =~s{\\}{/}g;
|
||||
}
|
||||
$path;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
sub generate {
|
||||
my $self = shift;
|
||||
my $opt = shift;
|
||||
$self->generate_typelib( $opt );
|
||||
$self->generate_interface( $opt );
|
||||
$self->generate_typemap( $opt );
|
||||
}
|
||||
|
||||
sub generate_typelib {
|
||||
my ($self) = @_;
|
||||
|
||||
@@ -46,17 +77,24 @@ sub generate_interface {
|
||||
next if not $port->first_address;
|
||||
next if not $port->first_address->isa('SOAP::WSDL::SOAP::Address');
|
||||
|
||||
my $port_name = $port->get_name;
|
||||
$port_name =~s{ \A .+\. }{}xms;
|
||||
my $output = $arg_ref->{ output }
|
||||
? $arg_ref->{ output }
|
||||
: $self->_generate_filename( $self->get_interface_prefix(), $service->get_name(), $port->get_name );
|
||||
|
||||
: $self->_generate_filename(
|
||||
$self->get_interface_prefix(),
|
||||
$service->get_name(),
|
||||
$port_name,
|
||||
);
|
||||
print "Creating interface class $output\n";
|
||||
|
||||
$self->_process('Interface.tt',
|
||||
{
|
||||
service => $service,
|
||||
port => $port,
|
||||
NO_POD => $arg_ref->{ NO_POD } ? 1 : 0 ,
|
||||
},
|
||||
$output);
|
||||
},
|
||||
$output, binmode => ':utf8');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,7 +111,8 @@ sub generate_typemap {
|
||||
'Fault/faultcode' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI',
|
||||
'Fault/faultactor' => 'SOAP::WSDL::XSD::Typelib::Builtin::TOKEN',
|
||||
'Fault/faultstring' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'Fault/detail' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'Fault/detail' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
%{ $typemap_of{ident $self }},
|
||||
}
|
||||
});
|
||||
for my $service (@{ $self->get_definitions->get_service }) {
|
||||
@@ -81,6 +120,8 @@ sub generate_typemap {
|
||||
my $output = $arg_ref->{ output }
|
||||
? $arg_ref->{ output }
|
||||
: $self->_generate_filename( $self->get_typemap_prefix(), $service->get_name() );
|
||||
|
||||
print "Creating typemap class $output\n";
|
||||
$self->_process('Typemap.tt',
|
||||
{
|
||||
service => $service,
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
package [% interface_prefix %]::[% service.get_name %]::[% port.get_name %];
|
||||
package [% interface_prefix %]::[% service.get_name.replace('\.', '::') %]::[% port.get_name.replace('^.+\.','') %];
|
||||
use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
use base qw(SOAP::WSDL::Client::Base);
|
||||
|
||||
# only load if it hasn't been loaded before
|
||||
require [% typemap_prefix %]::[% service.get_name.replace('\.', '::') %]
|
||||
if not [% typemap_prefix %]::[% service.get_name.replace('\.', '::') %]->can('get_class');
|
||||
|
||||
sub START {
|
||||
$_[0]->set_proxy('[% port.first_address.get_location %]') if not $_[2]->{proxy};
|
||||
$_[0]->set_class_resolver('[% typemap_prefix %]::[% service.get_name %]')
|
||||
$_[0]->set_class_resolver('[% typemap_prefix %]::[% service.get_name.replace('\.', '::') %]')
|
||||
if not $_[2]->{class_resolver};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
[%
|
||||
RETURN IF NOT item;
|
||||
message = definitions.find_message( item.expand( item.get_message ) );
|
||||
message_name = item.get_message;
|
||||
IF NOT message_name;
|
||||
THROW BAD_WSDL "missing <message> attribute in header for operation ${operation.get_name}";
|
||||
END;
|
||||
message = definitions.find_message( item.expand( message_name ) );
|
||||
PERL %]
|
||||
my $message = $stash->{ message };
|
||||
my $item = $stash->{ item };
|
||||
@@ -12,17 +16,23 @@
|
||||
$_->get_name eq $lname
|
||||
&& $_->get_targetNamespace eq $ns } @{ $message->get_part( ) };
|
||||
my $part_class = do {
|
||||
my $name;
|
||||
($name = $part->get_element)
|
||||
? "$element_prefix::$name"
|
||||
: ($name = $part->get_type)
|
||||
? "$type_prefix::$name"
|
||||
: die "input must have either type or element";
|
||||
};
|
||||
my $name;
|
||||
($name = $part->get_element)
|
||||
? do {
|
||||
$name =~s{ ^[^:]+: }{}xms;
|
||||
$element_prefix . '::' . $name;
|
||||
}
|
||||
: ($name = $part->get_type)
|
||||
? do {
|
||||
$name =~s{ ^[^:]+: }{}xms;
|
||||
$type_prefix . '::' . $name;
|
||||
}
|
||||
: die "input must have either type or element"
|
||||
};
|
||||
$stash->{ part_class } = $part_class;
|
||||
[% END;
|
||||
%]
|
||||
'use' => '[% item.get_use %]',
|
||||
namespace => '[% item.get_namespace %]',
|
||||
encodingStyle => '[% item.get_encodingStyle %]',
|
||||
parts => '[qw( [% part_class %] )]',
|
||||
parts => [qw( [% part_class %] )],
|
||||
@@ -1,11 +1,7 @@
|
||||
[%- INDENT = INDENT _ ' ';
|
||||
IF type.isa('SOAP::WSDL::XSD::ComplexType'); -%]
|
||||
{ #[% IF (type.get_name); %][% TYPE_PREFIX %]::[% type.get_name %][% ELSE; %]__ATOMIC__[% END;
|
||||
FOREACH element = type.get_element;
|
||||
INCLUDE Interface/POD/Element.tt( element = element );
|
||||
END %]
|
||||
[% INDENT; %]}
|
||||
[%- ELSE -%]
|
||||
$someValue,
|
||||
[%- END;
|
||||
INDENT.replace('\s{2}$',''); %]
|
||||
[%- indent = ' ';
|
||||
IF type.isa('SOAP::WSDL::XSD::ComplexType');
|
||||
INCLUDE complexType/POD/structure.tt(complexType = type);
|
||||
ELSE;
|
||||
INCLUDE simpleType/POD/structure.tt(simpleType = type);
|
||||
END;
|
||||
indent.replace('\s{2}$',''); %]
|
||||
@@ -1,7 +1,6 @@
|
||||
package [% type_prefix %]::[% complexType.get_name %];
|
||||
use strict;
|
||||
use warnings;
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
[% INCLUDE complexType/contentModel.tt %]
|
||||
[%#
|
||||
# Don't include any perl source here - there may be sub-packages...
|
||||
@@ -18,7 +17,7 @@ use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Perl data type class for the XML Schema defined complextype
|
||||
[% complexType.get_name %] from the namespace [% complexType.get_xmlns %].
|
||||
[% complexType.get_name %] from the namespace [% complexType.get_targetNamespace %].
|
||||
|
||||
=head2 PROPERTIES
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
[% indent %]{
|
||||
[%- IF complexType.get_name %] # [% type_prefix %]::[% complexType.get_name %][% END %]
|
||||
[%- indent = indent _ ' ';
|
||||
FOREACH element = complexType.get_element %]
|
||||
[% indent %][% element.get_name %] => [% INCLUDE element/POD/structure.tt -%]
|
||||
[% END %]
|
||||
[% indent.replace('\s{2}$', ''); %]}
|
||||
@@ -0,0 +1,9 @@
|
||||
[% indent %]{
|
||||
[%- IF complexType.get_name %] # [% type_prefix %]::[% complexType.get_name %][% END %]
|
||||
[%- indent = indent _ ' ' %]
|
||||
[% indent %]# One of the following elements.
|
||||
[% indent %]# No occurance checks yet, so be sure to pass just one...
|
||||
[%- FOREACH element = complexType.get_element %]
|
||||
[% indent %][% element.get_name %] => [% INCLUDE element/POD/structure.tt -%]
|
||||
[% END %]
|
||||
[% indent.replace('\s{2}$', ''); %]}
|
||||
@@ -0,0 +1,9 @@
|
||||
[% IF (complexType.get_variety == 'restriction');
|
||||
INCLUDE complexType/POD/restriction.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety == 'sequence');
|
||||
THROW NOT_IMPLEMENTED, "${ complexType.get_name } - complexType complexContent extension not implemented yet";
|
||||
ELSE;
|
||||
THROW UNKNOWN, "unknown variety ${ complexType.get_variety }";
|
||||
END;
|
||||
|
||||
%]
|
||||
@@ -0,0 +1,7 @@
|
||||
[% indent %]{
|
||||
[%- IF complexType.get_name %] # [% type_prefix %]::[% complexType.get_name %][% END %]
|
||||
[%- indent = indent _ ' ';
|
||||
FOREACH element = complexType.get_element %]
|
||||
[% indent %][% element.get_name %] => [% INCLUDE element/POD/structure.tt -%]
|
||||
[% END %]
|
||||
[% indent.replace('\s{2}$', ''); %]}
|
||||
@@ -1,7 +1,13 @@
|
||||
[% indent %]{
|
||||
[%- IF complexType.get_name %] # [% type_prefix %]::[% complexType.get_name %][% END %]
|
||||
[%- indent = indent _ ' ';
|
||||
FOREACH element = complexType.get_element %]
|
||||
[% indent %][% element.get_name %] => [% INCLUDE element/POD/structure.tt -%]
|
||||
[% END %]
|
||||
[% indent.replace('\s{2}$', ''); %]}
|
||||
[% IF (complexType.get_variety == 'all');
|
||||
INCLUDE complexType/POD/all.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety == 'sequence');
|
||||
INCLUDE complexType/POD/all.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety == 'group');
|
||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType group not implemented yet";
|
||||
ELSIF (complexType.get_variety == 'choice');
|
||||
INCLUDE complexType/POD/choice.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_contentModel == 'simpleContent');
|
||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType simpleContent not implemented yet";
|
||||
ELSIF (complexType.get_contentModel == 'complexContent');
|
||||
INCLUDE complexType/POD/complexContent.tt(complexType = complexType);
|
||||
END %]
|
||||
@@ -1,3 +1,6 @@
|
||||
use Class::Std::Storable;
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
|
||||
{ # BLOCK to scope variables
|
||||
[%
|
||||
atomic_types = [];
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[% IF (complexType.get_variety == 'restriction');
|
||||
INCLUDE complexType/restriction.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety == 'sequence');
|
||||
INCLUDE complexType/extension.tt(complexType = complexType);
|
||||
ELSE;
|
||||
THROW UNKNOWN, "unknown variety ${ complexType.get_variety }";
|
||||
END;
|
||||
%]
|
||||
@@ -1,13 +1,7 @@
|
||||
[% IF (complexType.get_variety == 'all');
|
||||
INCLUDE complexType/all.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety == 'sequence');
|
||||
INCLUDE complexType/all.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety == 'group');
|
||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType group not implemented yet";
|
||||
ELSIF (complexType.get_variety == 'choice');
|
||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType choice not implemented yet";
|
||||
ELSIF (complexType.get_variety == 'simpleContent');
|
||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType choice not implemented yet";
|
||||
ELSIF (complexType.get_variety == 'complexContent');
|
||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType choice not implemented yet";
|
||||
[% IF (complexType.get_contentModel == 'simpleContent');
|
||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType simpleContent not implemented yet";
|
||||
ELSIF (complexType.get_contentModel == 'complexContent');
|
||||
INCLUDE complexType/complexContent.tt(complexType = complexType);
|
||||
ELSE;
|
||||
INCLUDE complexType/variety.tt(complexType = complexType);
|
||||
END %]
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
[%
|
||||
|
||||
base_name=complexType.expand( complexType.get_base);
|
||||
base_type = definitions.first_types.find_type( base_name );
|
||||
|
||||
element_from = complexType.get_element;
|
||||
|
||||
#
|
||||
# Sanity check: All original elements must be noted first
|
||||
#
|
||||
FOREACH element = base_type.get_element;
|
||||
IF element_from.${ loop.index }.get_name != element.get_name;
|
||||
THROW WSDL "${element.get_name} not found at position ${ loop.index } in extension type ${ complexType.get_name }";
|
||||
END;
|
||||
END;
|
||||
|
||||
|
||||
-%]
|
||||
use base qw([% type_prefix %]::[% base_name.1.replace('\.', '::') %]);
|
||||
[%
|
||||
|
||||
INCLUDE complexType/variety.tt(complexType = complexType);
|
||||
|
||||
%]
|
||||
@@ -0,0 +1,8 @@
|
||||
[% IF (base=complexType.get_base);
|
||||
base_name=complexType.expand(base);
|
||||
-%]
|
||||
use base qw([% type_prefix %]::[% base_name.1.replace('\.', '::') %]);
|
||||
[%
|
||||
ELSE;
|
||||
THROW NOT_IMPLEMENTED, "restriction without base not supported";
|
||||
END %]
|
||||
15
lib/SOAP/WSDL/Generator/Template/XSD/complexType/variety.tt
Normal file
15
lib/SOAP/WSDL/Generator/Template/XSD/complexType/variety.tt
Normal file
@@ -0,0 +1,15 @@
|
||||
[%
|
||||
IF (complexType.get_variety == 'all');
|
||||
INCLUDE complexType/all.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety == 'sequence');
|
||||
INCLUDE complexType/all.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety == 'group');
|
||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType group not implemented yet";
|
||||
ELSIF (complexType.get_variety == 'choice');
|
||||
INCLUDE complexType/all.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety);
|
||||
THROW NOT_IMPLEMENTED, "Unknown variety ${ complexType.get_variety } in ${ complexType.get_name } (${ element.get_name })";
|
||||
ELSE;
|
||||
# There's no variety - might be empty complexType
|
||||
END;
|
||||
%]
|
||||
@@ -3,6 +3,8 @@ use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
|
||||
our $VERSION = '2.00_17';
|
||||
|
||||
my %definitions_of :ATTR(:name<definitions> :default<()>);
|
||||
my %type_prefix_of :ATTR(:name<type_prefix> :default<()>);
|
||||
my %element_prefix_of :ATTR(:name<element_prefix> :default<()>);
|
||||
@@ -196,14 +198,10 @@ schema implementation.
|
||||
|
||||
=head2 Implementation
|
||||
|
||||
=head3 _accept
|
||||
=head3 accept
|
||||
|
||||
SOAP::WSDL::Base defines an _accept method which expects a Visitor as only
|
||||
parameter. The method is named _accept (and not the common "accept") to avoid
|
||||
interferance with possible XML names (XML names must not start with a _).
|
||||
|
||||
Don't let the _ prefix fool you: The method is B<not> private (though it is
|
||||
meant to be called by Visitors only).
|
||||
SOAP::WSDL::Base defines an accept method which expects a Visitor as only
|
||||
parameter.
|
||||
|
||||
The method visit_Foo_Bar is called on the visitor, whith the self object as
|
||||
parameter.
|
||||
@@ -232,7 +230,41 @@ to generate C# code from it...
|
||||
|
||||
To write your own code generating visitor, you should subclass
|
||||
SOAP::WSDL::Generator::Visitor. It implements (empty) default methods for all
|
||||
SOAP::WSDL data classes.
|
||||
SOAP::WSDL data classes:
|
||||
|
||||
=over
|
||||
|
||||
=item * visit_Definitions
|
||||
|
||||
=item * visit_Binding
|
||||
|
||||
=item * visit_Message
|
||||
|
||||
=item * visit_Operation
|
||||
|
||||
=item * visit_OpMessage
|
||||
|
||||
=item * visit_Part
|
||||
|
||||
=item * visit_Port
|
||||
|
||||
=item * visit_PortType
|
||||
|
||||
=item * visit_Service
|
||||
|
||||
=item * visit_SoapOperation
|
||||
|
||||
=item * visit_Types
|
||||
|
||||
=item * visit_XSD_Schema
|
||||
|
||||
=item * visit_XSD_ComplexType
|
||||
|
||||
=item * visit_XSD_Element
|
||||
|
||||
=item * visit_XSD_SimpleType
|
||||
|
||||
=back
|
||||
|
||||
In your Visitor, you must implement visit_Foo methods for all classes you wish
|
||||
to visit.
|
||||
|
||||
@@ -210,7 +210,7 @@ sub visit_XSD_ComplexType {
|
||||
# TODO is this allowed ? or should we better die ?
|
||||
return if not $content_model; # empty complexType
|
||||
|
||||
if ( grep { $_ eq $content_model} qw(all sequence) )
|
||||
if ( grep { $_ eq $content_model} qw(all sequence choice) )
|
||||
{
|
||||
# visit child elements
|
||||
for (@{ $type->get_element() }) {
|
||||
|
||||
@@ -30,8 +30,8 @@ service).
|
||||
|
||||
print $result;
|
||||
|
||||
C<perldoc MyInterface::SERVICE_NAME> should give you some overview about the
|
||||
service's interface structure.
|
||||
C<perldoc MyInterface::SERVICE_NAME::PORT_NAME> should give you some overview
|
||||
about the service's interface structure.
|
||||
|
||||
The results of all calls to your service object's methods (except new) are
|
||||
objects based on SOAP::WSDL's XML schema implementation.
|
||||
@@ -227,7 +227,7 @@ L<SOAP::WSDL::XSD::Typelib::ComplexType>, L<SOAP::WSDL::XSD::Typelib::SimpleType
|
||||
L<SOAP::WSDL::XSD::Typelib::Element> tell you how to create subclasses of XML schema
|
||||
types.
|
||||
|
||||
L<SOAP::WSDL::Parser> will tell you how to create a typemap class.
|
||||
L<SOAP::WSDL::Manual::Parser> will tell you how to create a typemap class.
|
||||
|
||||
=back
|
||||
|
||||
@@ -273,7 +273,7 @@ class. This unfortunately means that you have to set the endpoint URL, too:
|
||||
|
||||
You may, of course, decide to just hack the generated class. Be advised that
|
||||
subclassing might be a more appropriate solution - re-generating overwrites
|
||||
your changes.
|
||||
changes in interface classes.
|
||||
|
||||
=head3 Accessing HTTPS webservices protected by certificate authentication
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SOAP::WSDL::Parser - How SOAP::WSDL parses XML messages
|
||||
SOAP::WSDL::Manual::Parser - How SOAP::WSDL parses XML messages
|
||||
|
||||
=head1 Which XML message does SOAP::WSDL parse ?
|
||||
|
||||
@@ -306,8 +306,6 @@ element, yet.
|
||||
|
||||
=head1 RULES NOT CONFIRMED
|
||||
|
||||
|
||||
|
||||
=head2 R4001
|
||||
|
||||
A RECEIVER MUST accept messages that include the Unicode Byte Order Mark
|
||||
@@ -432,12 +430,8 @@ be used.
|
||||
|
||||
TODO become "minimal conformant".
|
||||
|
||||
|
||||
|
||||
=head1 RULES NOT APPLICABLE
|
||||
|
||||
|
||||
|
||||
=head2 R0004
|
||||
|
||||
A MESSAGE MAY contain conformance claims, as specified in the conformance claim schema.
|
||||
|
||||
333
lib/SOAP/WSDL/Manual/XSD.pod
Normal file
333
lib/SOAP/WSDL/Manual/XSD.pod
Normal file
@@ -0,0 +1,333 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SOAP::WSDL::Manual::XSD - SOAP::WSDL's XML Schema implementation
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SOAP::WSDL's XML Schema implementation translates XML Schema definitions into
|
||||
perl classes.
|
||||
|
||||
Every top-level type or element in a XML schema is translated into a perl
|
||||
class (usually in it's own file).
|
||||
|
||||
Atomic types are either directly included in the class of their parent's
|
||||
node, or as sub-package in their parent class' file.
|
||||
|
||||
While the implementation is still incomplete, it covers the XML schema
|
||||
definitions used by most object mappers.
|
||||
|
||||
=head1 USAGE
|
||||
|
||||
You can use SOAP::WSDL::XSD based classes just like any perl class - you may
|
||||
instantiate it, inherit from it etc.
|
||||
|
||||
You should be aware, that SOAP::WSDL::XSD based classes are inside-out
|
||||
classes using Class::Std, though - things you would expect from hash-based
|
||||
classes like using the blessed hash ref as data storage won't work.
|
||||
|
||||
Moreover, most classes override Class::Std's default constructor for speed -
|
||||
you should not expect BUILD or START methods to work, unless you call them
|
||||
yourself (or define a new constructor).
|
||||
|
||||
All SOAP::WSDL::XSD based complexType classes allow a hash ref mathing their
|
||||
data structure as only parameter to new(). You may mix hash and list refs and
|
||||
objects in the structure passed to new - as long as the structure matches, it
|
||||
will work fine.
|
||||
|
||||
All SOAP::WSDL::XSD based simpleType (and builtin) classes accept a single
|
||||
hash ref with the only key "value" and the value to be set as value.
|
||||
|
||||
=head1 HOW IT WORKS
|
||||
|
||||
=head2 Base classes
|
||||
|
||||
SOAP::WSDL::XSD provides a set of base classes for the construction of XML
|
||||
schema defined type classes.
|
||||
|
||||
=head3 Builtin types
|
||||
|
||||
SOAP::WSDL::XSD provides classes for all builtin XML Schema datatypes.
|
||||
|
||||
For a list and reference on these classes, see
|
||||
SOAP::WSDL::XSD::Typelib::Builtin.
|
||||
|
||||
=head3 Derivation classes
|
||||
|
||||
For derivation by list, the list derivation class
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::list exists.
|
||||
|
||||
Derivation by restriction is handled without the help of additional classes.
|
||||
|
||||
=head3 Element construction class
|
||||
|
||||
For the construction of element classes, the element superclass
|
||||
SOAP::WSDL::XSD::Typelib::Element exists. All elements are ultimately derived
|
||||
from this class. Elements may inherit from type classes, too - see
|
||||
L</TRANSLATION RULES> for details.
|
||||
|
||||
=head3 complexType construction class
|
||||
|
||||
For the construction of complexType classes, the construction class
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType is provided. It provides a __factory
|
||||
method for placing attributes in generated classes, and generating
|
||||
appropriate setter/getter accessors.
|
||||
|
||||
The setters are special: They handle complex data structures of any type
|
||||
(meaning hash refs, list refs and objects, and any combination of them), as
|
||||
long as their structure matches the expected structure.
|
||||
|
||||
=head1 TRANSLATION RULES
|
||||
|
||||
=head2 element
|
||||
|
||||
TODO add more elaborate description
|
||||
|
||||
=head3 element with type attribute
|
||||
|
||||
Elements defined by referencing a builtin or user defined type inherit
|
||||
from SOAP::WSDL::XSD::Typelib::Element and from the corresponding type class.
|
||||
|
||||
Element Type
|
||||
base class class
|
||||
^ ^
|
||||
| |
|
||||
------------
|
||||
|
|
||||
Element type="" class
|
||||
|
||||
=head3 element with ref attribute
|
||||
|
||||
Elements defined by referencing another element inherit from the
|
||||
corresponding element class.
|
||||
|
||||
referenced Element class
|
||||
^
|
||||
|
|
||||
Element ref="" class
|
||||
|
||||
=head3 element with atomic simpleType
|
||||
|
||||
Elements defined by a atomic simpleType from
|
||||
SOAP::WSDL::XSD::Typelib::Element and from the base type of the atomic type.
|
||||
|
||||
Element atomic Type
|
||||
base class base class
|
||||
^ ^
|
||||
| |
|
||||
--------------
|
||||
|
|
||||
element simpleType class
|
||||
|
||||
=head3 element with atomic complexType
|
||||
|
||||
Elements defined with a atomic complexType inherit from
|
||||
SOAP::WSDL::XSD::Typelib::Element and from
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType.
|
||||
|
||||
Element complexType
|
||||
base class base class
|
||||
^ ^
|
||||
| |
|
||||
--------------
|
||||
|
|
||||
element complexType class
|
||||
|
||||
=head2 complexType
|
||||
|
||||
TODO add more elaborate description
|
||||
|
||||
Some content models are not implemented yet. The content models
|
||||
implemented are described below.
|
||||
|
||||
=head3 complexType with "all" variety
|
||||
|
||||
Complex types with "all" variety inherit from
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType, and call it's factory method for
|
||||
creating fields and accessors/mutators for the complexType's elements.
|
||||
|
||||
All element's type classes are loaded. Complex type classes have a "has a"
|
||||
relationship to their element fields.
|
||||
|
||||
Element fields may either be element classes (for element ref="") or type
|
||||
classes (for element type=""). No extra element classes are created for
|
||||
a complexType's elements.
|
||||
|
||||
complexType
|
||||
base class
|
||||
^
|
||||
|
|
||||
complexType all
|
||||
---------------- has a
|
||||
element name="a" ------------> Element or type class object
|
||||
element name="b" ------------> Element or type class object
|
||||
|
||||
The implementation for all does enforce the order of elements as described
|
||||
in the WSDL, even though this is not required by the XML Schema
|
||||
specification.
|
||||
|
||||
=head3 complexType with "sequence" variety
|
||||
|
||||
The implementation of the "sequence" variety is the same as for all.
|
||||
|
||||
=head3 complexType with "choice" variety
|
||||
|
||||
The implementation for choice currently is the same as for all - which means,
|
||||
no check for occurence are made.
|
||||
|
||||
=head3 complexType with complexContent content model
|
||||
|
||||
Note that complexType classes with complexContent content model don't exhibit
|
||||
their type via the xsi:type attribute yet, so they currently cannot be used
|
||||
as a replacement for their base type.
|
||||
|
||||
SOAP::WSDL's XSD deserializer backend does not recognize the xsi:type=""
|
||||
attribute either yet.
|
||||
|
||||
=over
|
||||
|
||||
=item * restriction variety
|
||||
|
||||
ComplexType classes with restriction variety inherit from their base type.
|
||||
No additional processing or content checking is performed yet.
|
||||
|
||||
complexType
|
||||
base type class
|
||||
^
|
||||
|
|
||||
complexType
|
||||
restriction
|
||||
|
||||
=item * extension variety
|
||||
|
||||
ComplexType classes with extension variety inherit from the XSD base
|
||||
complexType class and from their base type.
|
||||
|
||||
Extension classes are checked for (re-)defining all elements of their parent
|
||||
class.
|
||||
|
||||
Note that a derived type's elements (=properties) overrides the getter /
|
||||
setter methods for all inherited elements. All object data is stored in the
|
||||
derived type's class, not in the defining class (See L<Class::Std> for a
|
||||
discussion on inside out object data storage).
|
||||
|
||||
No additional processing or content checking is performed yet.
|
||||
|
||||
complexType complexType
|
||||
base class base type class
|
||||
^ ^
|
||||
| |
|
||||
-----------------
|
||||
|
|
||||
complexType
|
||||
extension
|
||||
|
||||
=back
|
||||
|
||||
=head2 SimpleType
|
||||
|
||||
TODO add more elaborate description
|
||||
|
||||
Some derivation methods are not implemented yet. The derivation methods
|
||||
implemented are described below.
|
||||
|
||||
=head3 Derivation by list
|
||||
|
||||
Derivation by list is implemented by inheriting from both the base type and
|
||||
SOAP::WSDL::XSD::Typelib::XSD::list.
|
||||
|
||||
=head3 Derivation by restriction
|
||||
|
||||
Derivation by restriction is implemented by inheriting from a base type and
|
||||
applying the required restrictions.
|
||||
|
||||
=head1 FACETS
|
||||
|
||||
XML Schema facets are not implemented yet.
|
||||
|
||||
They will probably implemented some day by putting constant methods into
|
||||
the correspondent classes.
|
||||
|
||||
=head1 ATTRIBUTES
|
||||
|
||||
XML attributes are not implemented yet. If you have a good idea on how to
|
||||
implement them, feel free to email me a proposal.
|
||||
|
||||
=head1 BUGS AND LIMITATIONS
|
||||
|
||||
The following XML Schema declaration elements are not supported yet:
|
||||
|
||||
=over
|
||||
|
||||
=item * Declaration elements
|
||||
|
||||
attribute
|
||||
notation
|
||||
|
||||
=item * Type definition elements
|
||||
|
||||
simpleContent
|
||||
union
|
||||
|
||||
=item * Content model definition elements
|
||||
|
||||
any
|
||||
anyAttribute
|
||||
attributeGroup
|
||||
group
|
||||
|
||||
=item * Identity definition elements
|
||||
|
||||
field
|
||||
key
|
||||
keyref
|
||||
selector
|
||||
unique
|
||||
|
||||
=item * Inclusion elements
|
||||
|
||||
import
|
||||
include
|
||||
redefine
|
||||
|
||||
=back
|
||||
|
||||
The following XML Schema declaration elements are supported, but have no
|
||||
effect yet:
|
||||
|
||||
=over
|
||||
|
||||
=item * Factes
|
||||
|
||||
enumeration
|
||||
fractionDigits
|
||||
lenght
|
||||
maxExclusive
|
||||
maxInclusiove
|
||||
maxLength
|
||||
minExclusive
|
||||
minInclusive
|
||||
minLength
|
||||
pattern
|
||||
totalDigits
|
||||
whitespace
|
||||
|
||||
=item * Documentation elements
|
||||
|
||||
appinfo
|
||||
|
||||
=back
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Copyright 2007 Martin Kutter.
|
||||
|
||||
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||
the same terms as perl itself
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=cut
|
||||
@@ -4,19 +4,9 @@ use warnings;
|
||||
use Class::Std::Storable;
|
||||
use base qw(SOAP::WSDL::Base);
|
||||
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
my %style_of :ATTR(:name<style> :default<()>);
|
||||
my %soapAction_of :ATTR(:name<soapAction> :default<()>);
|
||||
|
||||
sub explain {
|
||||
my $self = shift;
|
||||
my $opt = shift;
|
||||
my $txt = '';
|
||||
$opt->{ indent } ||= '';
|
||||
|
||||
$txt .= $opt->{ indent } . "soapAction: " . $self->soapAction() . "\n"
|
||||
if ( $self->soapAction() );
|
||||
|
||||
return $txt;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -2,7 +2,8 @@ package SOAP::WSDL::SOAP::Typelib::Fault11;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
use Data::Dumper;
|
||||
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
@@ -17,9 +18,6 @@ my %faultstring_of :ATTR(:get<faultstring>);
|
||||
my %faultactor_of :ATTR(:get<faultactor>);
|
||||
my %detail_of :ATTR(:get<detail>);
|
||||
|
||||
# always return false in boolean context - a fault is never true...
|
||||
sub as_bool :BOOLIFY { return; }
|
||||
|
||||
__PACKAGE__->_factory(
|
||||
[ qw(faultcode faultstring faultactor detail) ],
|
||||
{
|
||||
@@ -44,6 +42,10 @@ __PACKAGE__->__set_minOccurs();
|
||||
__PACKAGE__->__set_maxOccurs();
|
||||
__PACKAGE__->__set_ref('');
|
||||
|
||||
# always return false in boolean context - a fault is never true...
|
||||
sub as_bool : BOOLIFY { return; }
|
||||
|
||||
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/perl -w
|
||||
package SOAP::WSDL::Serializer::SOAP11;
|
||||
package SOAP::WSDL::Serializer::XSD;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
|
||||
our $VERSION='2.00_13';
|
||||
our $VERSION='2.00_21';
|
||||
|
||||
my $SOAP_NS = 'http://schemas.xmlsoap.org/soap/envelope/';
|
||||
my $XML_INSTANCE_NS = 'http://www.w3.org/2001/XMLSchema-instance';
|
||||
@@ -31,18 +31,14 @@ sub serialize {
|
||||
|
||||
while (my ($uri, $prefix) = each %{ $opt->{ namespace } })
|
||||
{
|
||||
$xml .= "\n\t" if ($opt->{'readable'});
|
||||
$xml .= "xmlns:$prefix=\"$uri\" ";
|
||||
}
|
||||
|
||||
# TODO insert encoding
|
||||
$xml.='>';
|
||||
$xml .= $self->serialize_header($args_of_ref->{ method }, $args_of_ref->{ header }, $opt);
|
||||
$xml .= "\n" if ($opt->{ readable });
|
||||
$xml .= $self->serialize_body($args_of_ref->{ method }, $args_of_ref->{ body }, $opt);
|
||||
$xml .= "\n" if ($opt->{ readable });
|
||||
$xml .= '</' . $soap_prefix .':Envelope>';
|
||||
$xml .= "\n" if ($opt->{ readable });
|
||||
return $xml;
|
||||
}
|
||||
|
||||
@@ -51,7 +47,7 @@ sub serialize_header {
|
||||
|
||||
# header is optional. Leave out if there's no header data
|
||||
return q{} if not $data;
|
||||
return join ( ($opt->{ readable }) ? "\n" : q{},
|
||||
return join ( q{},
|
||||
"<$opt->{ namespace }->{ $SOAP_NS }\:Header>",
|
||||
"$data",
|
||||
"</$opt->{ namespace }->{ $SOAP_NS }\:Header>",
|
||||
@@ -63,7 +59,7 @@ sub serialize_body {
|
||||
|
||||
# Body is NOT optional. Serialize to empty body
|
||||
# if we have no data.
|
||||
return join ( ($opt->{ readable }) ? "\n" : q{},
|
||||
return join ( q{},
|
||||
"<$opt->{ namespace }->{ $SOAP_NS }\:Body>",
|
||||
defined $data ? "$data" : (),
|
||||
"</$opt->{ namespace }->{ $SOAP_NS }\:Body>",
|
||||
@@ -90,7 +90,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 288 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: HTTP.pm 288 2007-09-29 19:34:20Z kutterma $
|
||||
$HeadURL: http://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
|
||||
|
||||
|
||||
81
lib/SOAP/WSDL/Transport/Loopback.pm
Normal file
81
lib/SOAP/WSDL/Transport/Loopback.pm
Normal file
@@ -0,0 +1,81 @@
|
||||
package SOAP::WSDL::Transport::Loopback;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::Factory::Transport;
|
||||
|
||||
our $VERSION = '2.00_17';
|
||||
|
||||
SOAP::WSDL::Factory::Transport->register( http => __PACKAGE__ );
|
||||
SOAP::WSDL::Factory::Transport->register( https => __PACKAGE__ );
|
||||
|
||||
my %code_of :ATTR(:name<code> :default<()>);
|
||||
my %status_of :ATTR(:name<status> :default<()>);
|
||||
my %message_of :ATTR(:name<message> :default<()>);
|
||||
my %is_success_of :ATTR(:name<is_success> :default<()>);
|
||||
|
||||
{
|
||||
no warnings qw(redefine);
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
return bless \my ($o), $class;
|
||||
}
|
||||
}
|
||||
|
||||
# create methods normally inherited from SOAP::Client
|
||||
SUBFACTORY: {
|
||||
no strict qw(refs);
|
||||
foreach my $method ( qw(code message status is_success) ) {
|
||||
*{ $method } = *{ "get_$method" };
|
||||
}
|
||||
}
|
||||
|
||||
sub send_receive {
|
||||
my ($self, %parameters) = @_;
|
||||
return $parameters{envelope};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SOAP::WSDL::Transport::Test - Loopback transport class for SOAP::WSDL
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use SOAP::WSDL::Client;
|
||||
use SOAP::WSDL::Transport::Loopback;
|
||||
|
||||
my $soap = SOAP::WSDL::Client->new()
|
||||
$soap->get_transport->set_base_dir('.');
|
||||
$soap->call('method', \%body, \%header);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SOAP::WSDL::Transport::Loopback is a loopback test transport backend for
|
||||
SOAP::WSDL.
|
||||
|
||||
When SOAP::WSDL::Transport::Loopback is used as transport backend, the
|
||||
request is returned as response. No data ever goes over the wire.
|
||||
This is particularly useful for testing SOAP::WSDL plugins and applications.
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Copyright 2004-2007 Martin Kutter.
|
||||
|
||||
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||
the same terms as perl itself
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 218 $
|
||||
$LastChangedBy: 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 $
|
||||
|
||||
=cut
|
||||
@@ -124,18 +124,22 @@ my %TYPES = (
|
||||
},
|
||||
simpleContent => {
|
||||
type => 'METHOD',
|
||||
method => 'set_flavor',
|
||||
method => 'set_contentModel',
|
||||
value => 'simpleContent'
|
||||
},
|
||||
complexContent => {
|
||||
type => 'METHOD',
|
||||
method => 'set_flavor',
|
||||
method => 'set_contentModel',
|
||||
value => 'complexContent'
|
||||
},
|
||||
restriction => {
|
||||
type => 'METHOD',
|
||||
method => 'set_restriction',
|
||||
},
|
||||
extension => {
|
||||
type => 'METHOD',
|
||||
method => 'set_extension',
|
||||
},
|
||||
list => {
|
||||
type => 'METHOD',
|
||||
method => 'set_list',
|
||||
@@ -174,7 +178,7 @@ my %TYPES = (
|
||||
|
||||
sub lookup {
|
||||
my $self = shift;
|
||||
my $namespace = shift || 'http://schemas.xmlsoap.org/wsdl/';
|
||||
my $namespace = shift || 'http://schemas.xmlsoap.org/wsdl/';
|
||||
my $name = shift;
|
||||
return $TYPES{ $namespace }->{ $name };
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
use base qw(SOAP::WSDL::Base);
|
||||
use Data::Dumper;
|
||||
|
||||
sub serialize {
|
||||
my ($self, $name, $value, $opt) = @_;
|
||||
|
||||
@@ -5,7 +5,8 @@ use Carp;
|
||||
use Class::Std::Storable;
|
||||
use Scalar::Util qw(blessed);
|
||||
use base qw/SOAP::WSDL::Base/;
|
||||
use Data::Dumper;
|
||||
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
my %annotation_of :ATTR(:name<annotation> :default<()>);
|
||||
my %element_of :ATTR(:name<element> :default<()>);
|
||||
@@ -17,20 +18,10 @@ my %abstract_of :ATTR(:name<abstract> :default<()>);
|
||||
my %mixed_of :ATTR(:name<mixed> :default<()>); # default is false
|
||||
|
||||
# is set to simpleContent/complexContent
|
||||
my %content_Model_of :ATTR(:name<contentModel> :default<()>);
|
||||
my %content_model_of :ATTR(:name<contentModel> :default<NONE>);
|
||||
|
||||
sub get_variety; *get_variety = \&get_flavor;
|
||||
|
||||
sub find_element {
|
||||
my ($self, @args) = @_;
|
||||
my @found_at = grep {
|
||||
$_->get_targetNamespace() eq $args[0] &&
|
||||
$_->get_name() eq $args[1]
|
||||
}
|
||||
@{ $element_of{ ident $self } };
|
||||
return $found_at[0];
|
||||
}
|
||||
|
||||
sub push_element {
|
||||
my $self = shift;
|
||||
my $element = shift;
|
||||
@@ -54,6 +45,12 @@ sub set_restriction {
|
||||
$base_of{ ident $self } = $element->{ Value };
|
||||
}
|
||||
|
||||
sub set_extension {
|
||||
my $self = shift;
|
||||
my $element = shift;
|
||||
$flavor_of{ ident $self } = 'extension';
|
||||
$base_of{ ident $self } = $element->{ Value };
|
||||
}
|
||||
|
||||
sub init {
|
||||
my $self = shift;
|
||||
@@ -123,9 +120,5 @@ sub serialize {
|
||||
return $xml;
|
||||
}
|
||||
|
||||
|
||||
sub _check_value {
|
||||
my $self = shift;
|
||||
}
|
||||
1;
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
use base qw(SOAP::WSDL::Base);
|
||||
use Data::Dumper;
|
||||
|
||||
our $VERSION='2.00_22';
|
||||
|
||||
my %annotation_of :ATTR(:name<annotation> :default<()>);
|
||||
my %simpleType_of :ATTR(:name<simpleType> :default<()>);
|
||||
@@ -22,13 +23,6 @@ my %nillable_of :ATTR(:name<nillable> :default<()>);
|
||||
my %ref_of :ATTR(:name<ref> :default<()>);
|
||||
my %substitutionGroup_of :ATTR(:name<substitutionGroup> :default<()>);
|
||||
|
||||
sub first_type {
|
||||
my $result_ref = $complexType_of{ ident shift };
|
||||
return if not $result_ref;
|
||||
return $result_ref if (not ref $result_ref eq 'ARRAY');
|
||||
return $result_ref->[0];
|
||||
}
|
||||
|
||||
sub first_simpleType {
|
||||
my $result_ref = $simpleType_of{ ident shift };
|
||||
return if not $result_ref;
|
||||
|
||||
@@ -4,10 +4,11 @@ use warnings;
|
||||
use Class::Std::Storable;
|
||||
use base qw(SOAP::WSDL::Base);
|
||||
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
my %annotation_of :ATTR(:name<annotation> :default<()>);
|
||||
my %base_of :ATTR(:name<base> :default<()>);
|
||||
my %itemType_of :ATTR(:name<itemType> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
# is set to simpleContent/complexContent
|
||||
# my %content_model_of :ATTR(:name<contentModel> :default<()>);
|
||||
|
||||
@@ -54,17 +55,6 @@ sub set_union {
|
||||
}
|
||||
}
|
||||
|
||||
sub push_enumeration {
|
||||
my $self = shift;
|
||||
my @attr = @_;
|
||||
my @attributes = @_;
|
||||
$self->set_flavor( 'enumeration' );
|
||||
for (@attributes) {
|
||||
next if (not $_->{ LocalName } eq 'value');
|
||||
push @{ $enumeration_of{ ident $self } }, $_->{ 'Value' };
|
||||
}
|
||||
}
|
||||
|
||||
sub serialize {
|
||||
my $self = shift;
|
||||
my $name = shift;
|
||||
@@ -74,9 +64,7 @@ sub serialize {
|
||||
|
||||
$opt->{ attributes } ||= [];
|
||||
$opt->{ indent } ||= q{};
|
||||
|
||||
$self->_check_value( $value );
|
||||
|
||||
|
||||
return $self->_serialize_single($name, $value , $opt)
|
||||
if ( $flavor_of{ $ident } eq 'restriction'
|
||||
or $flavor_of{ $ident } eq 'union'
|
||||
@@ -110,8 +98,4 @@ sub _serialize_single {
|
||||
return $xml;
|
||||
}
|
||||
|
||||
sub _check_value {
|
||||
my $self = shift;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -3,6 +3,8 @@ use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
|
||||
our $VERSION="2.00_17";
|
||||
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::anyType;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::anyURI;
|
||||
@@ -33,6 +35,8 @@ use SOAP::WSDL::XSD::Typelib::Builtin::long;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::Name;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::NCName;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::NMTOKENS;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::normalizedString;
|
||||
@@ -136,6 +140,7 @@ as first item in the base class list.
|
||||
- byte
|
||||
- double
|
||||
- anyURI
|
||||
- NOTATION
|
||||
- string
|
||||
- normalizedString
|
||||
- language
|
||||
@@ -145,8 +150,9 @@ as first item in the base class list.
|
||||
- IDREF
|
||||
- IDREFS [list]
|
||||
- ENTITY
|
||||
- NMTOKEN
|
||||
- NMTOKENS [list]
|
||||
- token
|
||||
- NMTOKEN
|
||||
- NMTOKENS [list]
|
||||
|
||||
=head1 OVERLOADED OPERATORS
|
||||
|
||||
@@ -199,6 +205,11 @@ Returns true/false in boolean context.
|
||||
|
||||
Returns 1 / 0 in numeric context.
|
||||
|
||||
boolean objects have a special method for deleteing their value, because
|
||||
calling C<setl_value(undef)> results in the value being set to false.
|
||||
|
||||
$obj->delete_value();
|
||||
|
||||
=head2 SOAP::WSDL::XSD::Typelib::Builtin::byte
|
||||
|
||||
byte integer objects.
|
||||
@@ -289,6 +300,9 @@ Derived by SOAP::WSDL::XSD::Typelib::Builtin::list.
|
||||
|
||||
=head2 SOAP::WSDL::XSD::Typelib::Builtin::normalizedString
|
||||
|
||||
Tab, newline and carriage return characters are replaced by whitespace in
|
||||
set_value.
|
||||
|
||||
=head2 SOAP::WSDL::XSD::Typelib::Builtin::NOTATION
|
||||
|
||||
=head2 SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger
|
||||
@@ -299,6 +313,10 @@ Derived by SOAP::WSDL::XSD::Typelib::Builtin::list.
|
||||
|
||||
=head2 SOAP::WSDL::XSD::Typelib::Builtin::string
|
||||
|
||||
String values are XML-escaped on serialization.
|
||||
|
||||
The following characters are escaped: <, >, &
|
||||
|
||||
=head2 SOAP::WSDL::XSD::Typelib::Builtin::time
|
||||
|
||||
time values are automatically converted into XML time strings during setting:
|
||||
|
||||
@@ -2,13 +2,6 @@ package SOAP::WSDL::XSD::Typelib::Builtin::NOTATION;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %length_of :ATTR(:name<length> :default<()>);
|
||||
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
use Class::Std::Storable;
|
||||
|
||||
@@ -23,12 +23,5 @@ BEGIN {
|
||||
|
||||
}
|
||||
|
||||
my %length_of :ATTR(:name<length> :default<()>);
|
||||
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
|
||||
1;
|
||||
|
||||
|
||||
@@ -32,18 +32,10 @@ sub serialize {
|
||||
, $_[0]->end_tag($_[1]);
|
||||
}
|
||||
|
||||
# TODO disallow serializing !
|
||||
sub as_bool :BOOLIFY {
|
||||
return $value_of { ident $_[0] };
|
||||
}
|
||||
|
||||
sub _get_handlers {
|
||||
my $parser = $_[1];
|
||||
return {
|
||||
Char => $parser->characters(),
|
||||
}
|
||||
}
|
||||
|
||||
Class::Std::initialize(); # make :BOOLIFY overloading serializable
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@ use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
|
||||
my %xmlns_of :ATTR(:get<xmlns> :init_arg<xmlns> :default<()>);
|
||||
|
||||
sub set_xmlns { $xmlns_of{ ident $_[0] } = $_[1] };
|
||||
sub get_xmlns { 'http://www.w3.org/2001/XMLSchema' };
|
||||
|
||||
# use $_[1] for performance
|
||||
sub start_tag {
|
||||
|
||||
@@ -22,12 +22,4 @@ BEGIN {
|
||||
};
|
||||
}
|
||||
|
||||
my %length_of :ATTR(:name<length> :default<()>);
|
||||
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
|
||||
|
||||
1;
|
||||
|
||||
@@ -24,12 +24,14 @@ BEGIN {
|
||||
|
||||
}
|
||||
|
||||
my %length_of :ATTR(:name<length> :default<()>);
|
||||
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
# XML Schema facets. We don't know how to implement them yet, but they're
|
||||
# her, just in case you wanted to know.
|
||||
#my %length_of :ATTR(:name<length> :default<()>);
|
||||
#my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||
#my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||
#my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
#my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
#my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
|
||||
1;
|
||||
|
||||
|
||||
@@ -3,10 +3,9 @@ use strict;
|
||||
use warnings;
|
||||
use Class::Std::Storable;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %value_of :ATTR(:get<value> :init_attr<value> :default<()>);
|
||||
our $VERSION='2.00_17';
|
||||
|
||||
my %value_of :ATTR(:get<value> :init_attr<value> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
@@ -21,14 +20,13 @@ BEGIN {
|
||||
*{ __PACKAGE__ . '::new' } = sub {
|
||||
my $self = bless \do { my $foo } , shift;
|
||||
if (@_) {
|
||||
$value_of{ ident $self } = $_[0]->{ value }
|
||||
$self->set_value( $_[0]->{ value } )
|
||||
if exists $_[0]->{ value }
|
||||
}
|
||||
return $self;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
sub serialize {
|
||||
my ($self, $opt) = @_;
|
||||
my $ident = ident $self;
|
||||
@@ -48,12 +46,12 @@ sub as_num :NUMERIFY :BOOLIFY {
|
||||
sub set_value {
|
||||
my ($self, $value) = @_;
|
||||
$value_of{ ident $self } = defined $value
|
||||
? ($value ne 'false' or ($value))
|
||||
? ($value ne 'false' && ($value) )
|
||||
? 1 : 0
|
||||
: 0;
|
||||
}
|
||||
|
||||
|
||||
sub delete_value { undef $value_of{ ident $_[0] }; return }
|
||||
|
||||
Class::Std::initialize(); # make :BOOLIFY overloading serializable
|
||||
|
||||
|
||||
@@ -5,14 +5,6 @@ use warnings;
|
||||
use Date::Parse;
|
||||
use Date::Format;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
use Class::Std::Storable;
|
||||
|
||||
@@ -6,13 +6,17 @@ use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||
use Date::Parse;
|
||||
use Date::Format;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# XML Schema facets. We don't know how to implement them yet, but they're
|
||||
# her, just in case you wanted to know.
|
||||
#
|
||||
#my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
#my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
#my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
#my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
#my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
#my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
#my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
@@ -37,6 +41,7 @@ BEGIN {
|
||||
sub set_value {
|
||||
# use set_value from base class if we have a XML-DateTime format
|
||||
#2037-12-31T00:00:00.0000000+01:00
|
||||
return if not $_[1];
|
||||
return $_[0]->SUPER::set_value($_[1]) if (
|
||||
$_[1] =~ m{ ^\d{4} \- \d{2} \- \d{2}
|
||||
T \d{2} \: \d{2} \: \d{2} (:? \. \d{1,7} )?
|
||||
@@ -46,7 +51,8 @@ sub set_value {
|
||||
|
||||
# strptime sets empty values to undef - and strftime doesn't like that...
|
||||
my @time_from = map { ! defined $_ ? 0 : $_ } strptime($_[1]);
|
||||
undef $time_from[-1];
|
||||
return if not (@time_from);
|
||||
undef $time_from[$#time_from];
|
||||
|
||||
my $time_str = strftime( '%Y-%m-%dT%H:%M:%S%z', @time_from );
|
||||
substr $time_str, -2, 0, ':';
|
||||
|
||||
@@ -2,16 +2,6 @@ package SOAP::WSDL::XSD::Typelib::Builtin::decimal;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %totalDigits_of :ATTR(:name<totalDigits> :default<()>);
|
||||
my %fractionDigits_of :ATTR(:name<fractionDigits> :default<()>);
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
use Class::Std::Storable;
|
||||
|
||||
@@ -22,13 +22,4 @@ BEGIN {
|
||||
|
||||
};
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
|
||||
1;
|
||||
|
||||
@@ -2,14 +2,6 @@ package SOAP::WSDL::XSD::Typelib::Builtin::float;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
use Class::Std::Storable;
|
||||
|
||||
@@ -2,14 +2,6 @@ package SOAP::WSDL::XSD::Typelib::Builtin::gDay;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
use Class::Std::Storable;
|
||||
|
||||
@@ -2,14 +2,6 @@ package SOAP::WSDL::XSD::Typelib::Builtin::gMonth;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
use Class::Std::Storable;
|
||||
|
||||
@@ -2,14 +2,6 @@ package SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
use Class::Std::Storable;
|
||||
|
||||
@@ -2,14 +2,6 @@ package SOAP::WSDL::XSD::Typelib::Builtin::gYear;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
use Class::Std::Storable;
|
||||
|
||||
@@ -2,14 +2,6 @@ package SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
use Class::Std::Storable;
|
||||
|
||||
@@ -22,11 +22,4 @@ BEGIN {
|
||||
};
|
||||
};
|
||||
|
||||
my %length_of :ATTR(:name<length> :default<()>);
|
||||
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
|
||||
1;
|
||||
|
||||
@@ -23,7 +23,6 @@ BEGIN {
|
||||
|
||||
};
|
||||
|
||||
|
||||
sub as_num :NUMERIFY {
|
||||
return $_[0]->get_value();
|
||||
}
|
||||
|
||||
@@ -23,4 +23,11 @@ BEGIN {
|
||||
|
||||
};
|
||||
|
||||
# replace all \t, \r, \n by \s
|
||||
sub set_value {
|
||||
my $value = $_[1];
|
||||
$value =~ s{ [\r\n\t] }{ }xmsg if defined($value);
|
||||
$_[0]->SUPER::set_value($value);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -23,15 +23,6 @@ BEGIN {
|
||||
|
||||
}
|
||||
|
||||
my %length_of :ATTR(:name<length> :default<()>);
|
||||
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
|
||||
|
||||
|
||||
my %char2entity = (
|
||||
q{&} => q{&},
|
||||
q{<} => q{<},
|
||||
|
||||
@@ -4,13 +4,7 @@ use warnings;
|
||||
use Date::Parse;
|
||||
use Date::Format;
|
||||
|
||||
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||
our $VERSION='2.00_18';
|
||||
|
||||
# Speed up. Class::Std::new is slow - and we don't need it's functionality...
|
||||
BEGIN {
|
||||
@@ -48,8 +42,16 @@ sub set_value {
|
||||
# We leave out the optional nanoseconds part, as it would always be empty.
|
||||
else {
|
||||
# strptime sets empty values to undef - and strftime doesn't like that...
|
||||
# we even need to set it to 1 to prevent a "Day '0' out of range 1..31" warning...
|
||||
my @time_from = map { ! defined $_ ? 1 : $_ } strptime($_[1]);
|
||||
# we even need to set it to 1 to prevent a "Day '0' out of range 1..31" warning..
|
||||
|
||||
# we need to set the current date for correct TZ conversion -
|
||||
# could be daylight savings time
|
||||
my @now = localtime;
|
||||
my @time_from = map { my $alternative = shift @now;
|
||||
! defined $_
|
||||
? $alternative
|
||||
: $_ } strptime($_[1]);
|
||||
undef $time_from[-1];
|
||||
my $time_str = strftime( '%H:%M:%S%z', @time_from );
|
||||
substr $time_str, -2, 0, ':';
|
||||
$_[0]->SUPER::set_value($time_str);
|
||||
|
||||
@@ -5,12 +5,11 @@ use warnings;
|
||||
use Carp;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use Scalar::Util qw(blessed refaddr);
|
||||
use Data::Dumper;
|
||||
use Class::Std::Storable;
|
||||
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
|
||||
|
||||
our $VERSION = '2.00_16';
|
||||
our $VERSION = '2.00_22';
|
||||
|
||||
my %ELEMENTS_FROM;
|
||||
my %ATTRIBUTES_OF;
|
||||
@@ -19,6 +18,8 @@ my %CLASSES_OF;
|
||||
# STORABLE_ methods for supporting Class::Std::Storable.
|
||||
# We could also handle them via AUTOMETHOD,
|
||||
# but AUTOMETHOD should always croak...
|
||||
# Do we really need this ?
|
||||
# ... looks like we do...
|
||||
sub STORABLE_freeze_pre {}
|
||||
sub STORABLE_freeze_post {}
|
||||
sub STORABLE_thaw_pre {}
|
||||
@@ -115,7 +116,8 @@ sub _factory {
|
||||
: $is_ref eq $type
|
||||
? $_[1]
|
||||
: die croak "cannot use $is_ref reference as value for $name - $type required"
|
||||
: $type->new({ value => $_[1] });
|
||||
: $type->new({ value => $_[1] });
|
||||
return;
|
||||
};
|
||||
|
||||
*{ "$class\::add_$name" } = sub {
|
||||
@@ -124,29 +126,29 @@ sub _factory {
|
||||
if not defined $_[1];
|
||||
|
||||
# first call
|
||||
return $attribute_ref->{ $ident } = $_[1]
|
||||
if not defined $attribute_ref->{ $ident };
|
||||
|
||||
# second call: listify previous value if it's no list
|
||||
$attribute_ref->{ $ident } = [ $attribute_ref->{ $ident } ]
|
||||
if not ref $attribute_ref->{ $ident } eq 'ARRAY';
|
||||
if (not defined $attribute_ref->{ $ident }) {
|
||||
$attribute_ref->{ $ident } = $_[1];
|
||||
return;
|
||||
}
|
||||
|
||||
if (not ref $attribute_ref->{ $ident } eq 'ARRAY') {
|
||||
# second call: listify previous value if it's no list
|
||||
$attribute_ref->{ $ident } = [ $attribute_ref->{ $ident } ];
|
||||
return;
|
||||
}
|
||||
|
||||
# second and following: add to list
|
||||
return push @{ $attribute_ref->{ $ident } }, $_[1];
|
||||
push @{ $attribute_ref->{ $ident } }, $_[1];
|
||||
return;
|
||||
};
|
||||
|
||||
*{ "$class\::$name" } = *{ "$class\::add_$name" };
|
||||
}
|
||||
|
||||
# TODO Could be moved as normal method into base class, e.g. here.
|
||||
# Hmm. let's see...
|
||||
*{ "$class\::new" } = sub {
|
||||
my $self = bless \my ($o), $_[0];
|
||||
$self->BUILD( ident $self, $_[1] ) if exists &BUILD;
|
||||
$self->_init( ident $self, $_[1] );
|
||||
$self->START( ident $self, $_[1] ) if exists &START;
|
||||
return $self;
|
||||
};
|
||||
|
||||
*{ "$class\::_init" } = sub {
|
||||
# We're working on @_ for speed.
|
||||
# Normally, the first line would look like this:
|
||||
# my ($self, $ident, $args_of) = @_;
|
||||
@@ -158,7 +160,7 @@ sub _factory {
|
||||
map { ($ATTRIBUTES_OF{ $class }->{ $_ })
|
||||
? do {
|
||||
my $method = "set_$_";
|
||||
$_[0]->$method( $_[2]->{ $_ } ); # ( $args_of->{ $_ } );
|
||||
$self->$method( $_[1]->{ $_ } ); # ( $args_of->{ $_ } );
|
||||
}
|
||||
: $_ =~ m{ \A # beginning of string
|
||||
xmlns # xmlns
|
||||
@@ -168,8 +170,8 @@ sub _factory {
|
||||
croak "unknown field $_ in $class. Valid fields are:\n"
|
||||
. join(', ', @{ $ELEMENTS_FROM{ $class } }) . "\n"
|
||||
. "Structure given:\n" . Dumper @_ };
|
||||
} keys %{ $_[2] }; # %$args_of;
|
||||
return $_[0]; # $self;
|
||||
} keys %{ $_[1] }; # %$args_of;
|
||||
return $self;
|
||||
};
|
||||
|
||||
|
||||
@@ -179,7 +181,6 @@ sub _factory {
|
||||
# But what about choice, extension ?
|
||||
*{ "$class\::_serialize" } = sub {
|
||||
my $ident = ident $_[0];
|
||||
# my $class = ref $_[0];
|
||||
# return concatenated return value of serialize call of all
|
||||
# elements retrieved from get_elements expanding list refs.
|
||||
# get_elements is inlined for performance.
|
||||
@@ -214,14 +215,13 @@ sub _factory {
|
||||
};
|
||||
|
||||
*{ "$class\::serialize" } = sub {
|
||||
my ($self, $opt) = @_;
|
||||
$opt ||= {};
|
||||
$_[1] ||= {}; # maybe even replace by assigning a constant var
|
||||
|
||||
# do we have a empty element ?
|
||||
return $self->start_tag({ %$opt, empty => 1 })
|
||||
return $_[0]->start_tag({ %{ $_[1] }, empty => 1 })
|
||||
if not defined $ELEMENTS_FROM{ $class } or not @{ $ELEMENTS_FROM{ $class } };
|
||||
return join q{}, $self->start_tag($opt),
|
||||
$self->_serialize(), $self->end_tag();
|
||||
return join q{}, $_[0]->start_tag($_[1]),
|
||||
$_[0]->_serialize(), $_[0]->end_tag();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -381,10 +381,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 270 $
|
||||
$Rev: 337 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: ComplexType.pm 270 2007-09-20 21:55:36Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm $
|
||||
$Id: ComplexType.pm 337 2007-10-22 20:04:59Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ my %REF;
|
||||
my %MIN_OCCURS;
|
||||
my %MAX_OCCURS;
|
||||
|
||||
# TODO replace by generated methods?
|
||||
#
|
||||
# Class data - remember, we're the base class for a class factory or for
|
||||
# generated code...
|
||||
# use BLOCK: for scoping
|
||||
@@ -33,29 +35,43 @@ BLOCK: {
|
||||
}
|
||||
};
|
||||
|
||||
# use $_[0] and $_[1] for speed.
|
||||
|
||||
sub start_tag {
|
||||
my ($self, $opt, $value) = @_;
|
||||
my $class = ref $self;
|
||||
my $ending = '>';
|
||||
# my ($self, $opt, $value) = @_;
|
||||
my $ending = ($_[1]->{ empty }) ? '/>' : '>';
|
||||
my @attr_from = ();
|
||||
my $name = $opt->{ name } || $NAME{$class};
|
||||
$ending = '/>' if ($opt->{ empty });
|
||||
|
||||
if ($opt->{qualified}) {
|
||||
push @attr_from, 'xmlns="' . $self->get_xmlns . '"';
|
||||
}
|
||||
if ($opt->{ nil }) {
|
||||
return q{} if not $NILLABLE{ $class };
|
||||
if ($_[1]->{ nil }) {
|
||||
return q{} if not $NILLABLE{ ref $_[1] };
|
||||
push @attr_from, 'xsi:nil="true"';
|
||||
$ending = '/>';
|
||||
}
|
||||
return join q{ }, "<$name" , @attr_from , $ending;
|
||||
if ($_[1]->{qualified}) {
|
||||
push @attr_from, 'xmlns="' . $_[0]->get_xmlns . '"';
|
||||
}
|
||||
|
||||
# do we need to check for name ? Element ref="" should have it's own
|
||||
# start_tag. If we don't need to check, we can speed things up
|
||||
return join q{ }, "<$_[1]->{ name }" , @attr_from , $ending if $_[1]->{ name };
|
||||
return join q{ }, "<$NAME{ ref $_[0]}" , @attr_from , $ending;
|
||||
}
|
||||
|
||||
# use $_[0] and $_[1] for speed.
|
||||
#
|
||||
# read it as:
|
||||
#
|
||||
# my ($self, $opt) = @_;
|
||||
# my $class = ref $self;
|
||||
# return "</$opt->{name}>" if $opt->{name};
|
||||
# return "</"$NAME{$class}>";
|
||||
#
|
||||
# do we need to check for name ? Element ref="" should have it's own
|
||||
# end_tag. If we don't need to check, we can speed things up by defining
|
||||
# end tag with () prototype - perl will inline it for us if we do...
|
||||
sub end_tag {
|
||||
my ($class, $opt) = (ref $_[0], $_[1]);
|
||||
my $name = $opt->{ name } || $NAME{$class};
|
||||
return "</$name>";
|
||||
return "</$_[1]->{name}>" if $_[1]->{name};
|
||||
return "</$NAME{ ref $_[0] }>";
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -7,8 +7,8 @@ use lib '../lib';
|
||||
my @modules = qw(
|
||||
SOAP::WSDL
|
||||
SOAP::WSDL::Client
|
||||
SOAP::WSDL::Serializer::SOAP11
|
||||
SOAP::WSDL::Deserializer::SOAP11
|
||||
SOAP::WSDL::Serializer::XSD
|
||||
SOAP::WSDL::Deserializer::XSD
|
||||
SOAP::WSDL::Transport::HTTP
|
||||
SOAP::WSDL::Definitions
|
||||
SOAP::WSDL::Message
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Test::More tests => 3; # qw/no_plan/; # TODO: change to tests => N;
|
||||
use Test::More tests => 17; # qw/no_plan/; # TODO: change to tests => N;
|
||||
use lib '../lib';
|
||||
|
||||
eval {
|
||||
@@ -19,7 +19,6 @@ use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
||||
readable => 1,
|
||||
outputxml => 1, # required, if not set ::SOM serializer will be loaded on
|
||||
# call
|
||||
)->wsdlinit();
|
||||
@@ -27,6 +26,8 @@ my $soap = SOAP::WSDL->new(
|
||||
$soap->servicename('MessageGateway');
|
||||
|
||||
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
||||
ok $soap->get_client();
|
||||
ok ! $soap->get_client()->get_proxy();
|
||||
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
@@ -50,3 +51,61 @@ sub skip_without_test_xml {
|
||||
my $number = shift || 1;
|
||||
skip("Test::XML not available", $number) if (not $Test::XML::VERSION);
|
||||
}
|
||||
|
||||
# test whether call sets proxy
|
||||
$soap->call( 'EnqueueMessage' , EnqueueMessage => {
|
||||
'MMessage' => {
|
||||
'MRecipientURI' => 'mailto:test@example.com' ,
|
||||
'MMessageContent' => 'TestContent for Message' ,
|
||||
}
|
||||
}
|
||||
);
|
||||
ok $soap->get_client()->get_proxy();
|
||||
ok $soap->get_client()->get_transport();
|
||||
|
||||
# serializer & deserializer must be set after call()
|
||||
ok $soap->get_client()->get_serializer();
|
||||
# ok $soap->get_client()->get_deserializer(); # no deserializer with outputxml
|
||||
|
||||
# set_soap_version invalidates serializer and deserializer
|
||||
ok $soap->get_client()->set_soap_version('1.1');
|
||||
ok ! $soap->get_client()->get_serializer();
|
||||
|
||||
$soap->call( 'EnqueueMessage' , EnqueueMessage => {
|
||||
'MMessage' => {
|
||||
'MRecipientURI' => 'mailto:test@example.com' ,
|
||||
'MMessageContent' => 'TestContent for Message' ,
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
# serializer & deserializer come back after call()
|
||||
ok $soap->get_client()->get_serializer();
|
||||
# ok $soap->get_client()->get_deserializer(); # no deserializer with outputxml
|
||||
|
||||
|
||||
SKIP: {
|
||||
eval "require SOAP::Lite"
|
||||
or skip 'cannot test SOAP::Deserializer::SOM without SOAP::Lite', 4;
|
||||
require SOAP::WSDL::Transport::Loopback;
|
||||
$soap->outputxml(0);
|
||||
$soap->no_dispatch(0);
|
||||
ok my $result = $soap->call( 'EnqueueMessage' , EnqueueMessage => {
|
||||
'MMessage' => {
|
||||
'MRecipientURI' => 'mailto:test@example.com' ,
|
||||
'MMessageContent' => 'TestContent for Message' ,
|
||||
}
|
||||
}
|
||||
);
|
||||
ok $result->isa('SOAP::SOM');
|
||||
is $result->result()->{MMessageContent}, 'TestContent for Message';
|
||||
is $result->result()->{MRecipientURI}, 'mailto:test@example.com';
|
||||
};
|
||||
|
||||
use_ok 'SOAP::WSDL::Client';
|
||||
my $client = SOAP::WSDL::Client->new();
|
||||
eval {
|
||||
$client->set_proxy([ 'http://example.org', keep_alive => 1 ]);
|
||||
$client->set_proxy('http://example.org', keep_alive => 1 );
|
||||
};
|
||||
ok ! $@;
|
||||
@@ -10,7 +10,7 @@ eval {
|
||||
import Test::XML;
|
||||
};
|
||||
|
||||
use_ok qw/SOAP::WSDL::Serializer::SOAP11/;
|
||||
use_ok qw/SOAP::WSDL::Serializer::XSD/;
|
||||
|
||||
my $opt = {
|
||||
readable => 1,
|
||||
@@ -18,7 +18,7 @@ my $opt = {
|
||||
},
|
||||
};
|
||||
my $xml;
|
||||
ok( $xml = SOAP::WSDL::Serializer::SOAP11->serialize(
|
||||
ok( $xml = SOAP::WSDL::Serializer::XSD->serialize(
|
||||
undef, undef, $opt
|
||||
),
|
||||
"serialize empty envelope"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 4;
|
||||
use Test::More tests => 5;
|
||||
use lib 't/lib';
|
||||
use lib '../lib';
|
||||
use lib 'lib';
|
||||
@@ -21,6 +21,8 @@ my $parser;
|
||||
ok $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => FakeResolver->new(),
|
||||
}), "Object creation";
|
||||
ok $parser->class_resolver()->isa('FakeResolver');
|
||||
ok $parser->class_resolver('FakeResolver');
|
||||
|
||||
# TODO factor out into bool test
|
||||
|
||||
@@ -37,14 +39,12 @@ else
|
||||
# TODO factor out into different test
|
||||
|
||||
my $soap = SOAP::WSDL->new(
|
||||
readable => 1,
|
||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
||||
)->wsdlinit();
|
||||
|
||||
$soap->servicename('MessageGateway');
|
||||
|
||||
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
||||
ok( $soap->readable( 0 ) , "Set readable");
|
||||
|
||||
sub xml {
|
||||
q{<SOAP-ENV:Envelope
|
||||
|
||||
@@ -4,6 +4,7 @@ use strict;
|
||||
use lib 'lib/';
|
||||
use lib '../lib/';
|
||||
use lib 't/lib';
|
||||
use Storable;
|
||||
|
||||
use_ok qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
use_ok qw( MyComplexType );
|
||||
@@ -37,8 +38,11 @@ ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||
, 'inherited class (on the fly-factory object)';
|
||||
is $obj, '<MyTestName >test</MyTestName><MyTestName >test2</MyTestName>',
|
||||
'stringification (on the fly-factory object)';
|
||||
# print Dumper $obj->get_MyTestName();
|
||||
|
||||
# TODO factor out into complexType test
|
||||
|
||||
eval { $obj->get_ZUMSL };
|
||||
like $@, qr{Valid\smethods}xm, 'error message (invalid method)';
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
7
t/018_compat_2_00_15-generator.t
Normal file
7
t/018_compat_2_00_15-generator.t
Normal file
@@ -0,0 +1,7 @@
|
||||
use Test::More tests => 2;
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
|
||||
use_ok q(MyInterfaces::GlobalWeather);
|
||||
|
||||
ok MyInterfaces::GlobalWeather->new();
|
||||
@@ -1,335 +0,0 @@
|
||||
package TopElement;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||
use Memoize;
|
||||
|
||||
memoize('_get_handlers');
|
||||
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
{
|
||||
my %TestElement_of :ATTR();
|
||||
my $CLASS_OF_REF = { TestElement => 'TestElement' };
|
||||
|
||||
__PACKAGE__->_factory( [ 'TestElement' ],
|
||||
{ 'TestElement' => \%TestElement_of, },
|
||||
{ TestElement => 'TestElement' },
|
||||
);
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
__PACKAGE__->__set_name('TopElement');
|
||||
__PACKAGE__->__set_nillable(1);
|
||||
|
||||
sub _get_handlers {
|
||||
my $self = shift;
|
||||
my $parser = shift;
|
||||
|
||||
return {
|
||||
Start => $parser->start_tag({
|
||||
class_of => $CLASS_OF_REF,
|
||||
handler_of => {
|
||||
TestElement => TestElement->_get_handlers( $parser ),
|
||||
}
|
||||
}),
|
||||
End => $parser->end_top_tag( ),
|
||||
Char => undef,
|
||||
};
|
||||
}
|
||||
}
|
||||
1;
|
||||
|
||||
package TestElement;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||
|
||||
use Memoize;
|
||||
memoize('_get_handlers');
|
||||
|
||||
use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
{
|
||||
my %test_of :ATTR();
|
||||
my %test2_of :ATTR();
|
||||
|
||||
my $CLASS_OF_REF = {
|
||||
test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string'
|
||||
};
|
||||
|
||||
__PACKAGE__->_factory( [ 'test', 'test2' ],
|
||||
{ test => \%test_of, test2 => \%test2_of, },
|
||||
$CLASS_OF_REF,
|
||||
);
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
__PACKAGE__->__set_name('TestElement');
|
||||
__PACKAGE__->__set_nillable(1);
|
||||
|
||||
sub _get_handlers {
|
||||
my $self = shift;
|
||||
my $parser = shift;
|
||||
|
||||
return {
|
||||
Start => $parser->start_tag({
|
||||
class_of => $CLASS_OF_REF,
|
||||
handler_of =>
|
||||
{
|
||||
map { ( $_ => $CLASS_OF_REF->{$_}->_get_handlers( $parser ) )}
|
||||
keys %{ $CLASS_OF_REF }
|
||||
},
|
||||
}),
|
||||
End => $parser->end_tag(),
|
||||
Char => undef,
|
||||
};
|
||||
}
|
||||
}
|
||||
1;
|
||||
|
||||
package TestResolver;
|
||||
|
||||
sub get_class {
|
||||
my $path = join('/', @{ $_[1] });
|
||||
my $class = {
|
||||
'TestElement' => 'TestElement',
|
||||
'TestElement/test' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'TestElement/test2' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'TopElement' => 'TopElement',
|
||||
'TopElement/TestElement' => 'TestElement',
|
||||
'TopElement/TestElement/test' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'TopElement/TestElement/test2' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
};
|
||||
return $class->{ $path };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
package main;
|
||||
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../../lib';
|
||||
|
||||
use_ok('SOAP::WSDL::Expat::MessageParser');
|
||||
use_ok('SOAP::WSDL::Expat::MessageSubParser');
|
||||
my $obj;
|
||||
|
||||
ok($obj = SOAP::WSDL::Expat::MessageSubParser->new(), "Object creation");
|
||||
|
||||
#my $test = $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# },
|
||||
# handler_of => {
|
||||
# test => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# test2 => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# }
|
||||
#});
|
||||
#
|
||||
#my $handlers = {
|
||||
# Start => $test,
|
||||
# End => $obj->end_tag(),
|
||||
#};
|
||||
#
|
||||
#my $parser = $obj->initialize( $handlers );
|
||||
#
|
||||
#$parser->parsestring('<test>Test</test>');
|
||||
#is $obj->get_data(), 'Test', 'Parse simple XML';
|
||||
#
|
||||
#my $element = $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# TestElement => 'TestElement',
|
||||
# },
|
||||
# handler_of => {
|
||||
# TestElement => {
|
||||
# Start => $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# },
|
||||
# handler_of => {
|
||||
# test => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# test2 => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# }
|
||||
# }),
|
||||
# End => $obj->end_tag(),
|
||||
# Char => undef,
|
||||
# }
|
||||
# }
|
||||
#});
|
||||
#
|
||||
#
|
||||
#$handlers = {
|
||||
# Start => $element,
|
||||
# End => $obj->end_tag(),
|
||||
# Char => undef,
|
||||
#};
|
||||
#
|
||||
#$parser = $obj->initialize( TestElement->_get_parser( $obj ) );
|
||||
#
|
||||
#my $xml = '<TestElement xmlns="urn:Test">
|
||||
# <test>Test</test>
|
||||
# <test2>Test2</test2>
|
||||
#</TestElement>';
|
||||
#
|
||||
#$parser->parsestring($xml);
|
||||
#
|
||||
#is $obj->get_data()
|
||||
# , '<TestElement xmlns="urn:Test" ><test >Test</test ><test2 >Test2</test2 ></TestElement>'
|
||||
# , 'Parse && serialize ComplexType Element';
|
||||
#
|
||||
|
||||
#my $mp = SOAP::WSDL::Expat::MessageParser->new({
|
||||
# class_resolver => 'TestResolver',
|
||||
#});
|
||||
#
|
||||
#$mp->parse( $xml );
|
||||
|
||||
#use Benchmark;
|
||||
#
|
||||
#timethese 1000 , {
|
||||
# mp => sub { $mp->parse($xml) },
|
||||
# 'sub_p' => sub { $obj->initialize( $handlers )->parse( $xml ) },
|
||||
#
|
||||
#};
|
||||
|
||||
#my $top = $obj->start_tag({
|
||||
# order => [],
|
||||
# class_of => {
|
||||
# TopElement => 'TopElement',
|
||||
# },
|
||||
# handler_of => {
|
||||
# TopElement => {
|
||||
# Start => $obj->start_tag({
|
||||
# order => [ 'TestElement', ],
|
||||
# class_of => {
|
||||
# TestElement => 'TestElement',
|
||||
# },
|
||||
# handler_of => {
|
||||
# TestElement => {
|
||||
# Start => $obj->start_tag({
|
||||
# order => ['test', 'test2'],
|
||||
# class_of => {
|
||||
# test => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# test2 => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
# },
|
||||
# handler_of => {
|
||||
# test => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# test2 => {
|
||||
# Char => $obj->characters(),
|
||||
# },
|
||||
# },
|
||||
# occurs_of => {
|
||||
# test => { max => 1 },
|
||||
# }
|
||||
# }),
|
||||
# End => $obj->end_tag(),
|
||||
# Char => undef,
|
||||
# }
|
||||
# }
|
||||
# })
|
||||
# }
|
||||
# }
|
||||
#});
|
||||
|
||||
my $top = $obj->start_tag({
|
||||
class_of => {
|
||||
TopElement => 'TopElement',
|
||||
},
|
||||
handler_of => {
|
||||
TopElement => TopElement->_get_handlers( $obj ),
|
||||
}
|
||||
});
|
||||
|
||||
my $parser = $obj->initialize( { Start => $top , End => $obj->end_tag() , Char => undef } );
|
||||
|
||||
my $xml = '
|
||||
<TopElement xmlns="urn:Test">
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
<TestElement>
|
||||
<test>Test</test>
|
||||
<test2>Test2</test2>
|
||||
</TestElement>
|
||||
</TopElement>';
|
||||
|
||||
$parser->parsestring($xml);
|
||||
|
||||
# print $obj->get_data();
|
||||
|
||||
__END__
|
||||
|
||||
# TODO factor out into benchmark suite
|
||||
|
||||
use XML::Simple;
|
||||
use Benchmark;
|
||||
|
||||
my $mp = SOAP::WSDL::Expat::MessageParser->new({
|
||||
class_resolver => 'TestResolver',
|
||||
});
|
||||
$mp->parse( $xml );
|
||||
|
||||
$top = $obj->start_tag({
|
||||
class_of => {
|
||||
TopElement => 'TopElement',
|
||||
},
|
||||
handler_of => {
|
||||
TopElement => TopElement->_get_handlers( $obj ),
|
||||
}
|
||||
});
|
||||
my $top_end = $obj->end_top_tag();
|
||||
$parser = $obj->initialize( { Start => $top , End => $top_end, , Char => undef } );
|
||||
$parser->parse( $xml ),
|
||||
|
||||
print "DATA:" . $obj->get_data(), "\n";
|
||||
|
||||
|
||||
# $XML::Simple::PREFERRED_PARSER = 'XML::SAX::Expat';
|
||||
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
|
||||
|
||||
timethese 500 , {
|
||||
'typemap' => sub { $mp->parse($xml) },
|
||||
'sub_tree' => sub {
|
||||
my $parser = $obj->initialize( { Start => $top , End => $top_end, , Char => undef } );
|
||||
$parser->parse( $xml ),
|
||||
},
|
||||
'XML::Simple' => sub { XMLin( $xml ); }
|
||||
};
|
||||
@@ -3,7 +3,6 @@ use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Test::More tests => 7;
|
||||
use Data::Dumper;
|
||||
use lib '../lib';
|
||||
|
||||
eval {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
use Test::More tests => 2;
|
||||
use Test::More tests => 3;
|
||||
use lib '../lib';
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
ok( SOAP::WSDL->new(), 'Instantiated object' );
|
||||
ok( SOAP::WSDL->new(), 'Instantiated object' );
|
||||
|
||||
eval { SOAP::WSDL->new( grzlmpfh => 'unknown')};
|
||||
ok $@, 'die on illegal parameter';
|
||||
@@ -4,26 +4,16 @@ use warnings;
|
||||
use diagnostics;
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use Data::Dumper;
|
||||
use File::Spec;
|
||||
use lib '../lib';
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
# chdir to my location
|
||||
my $cwd = cwd;
|
||||
my $path = dirname( $0 );
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
chdir $path;
|
||||
|
||||
$path = cwd;
|
||||
|
||||
$path =~s{/SOAP/WSDL}{}xms;
|
||||
|
||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||
my $soap;
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||
wsdl => 'file:///' . $path . '/../../acceptance/wsdl/02_port.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
ok( ($soap->servicename('testService') ), 'set service' );
|
||||
|
||||
@@ -4,9 +4,8 @@ use warnings;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use File::Spec;
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
@@ -14,12 +13,13 @@ if ($@)
|
||||
$SKIP = "Test::Differences required for testing. ";
|
||||
}
|
||||
|
||||
my $path = cwd();
|
||||
my $name = basename $0;
|
||||
$name =~s/\.t$//;
|
||||
$name =~s/^t\///;
|
||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||
my ($volume, $dir) = File::Spec->splitpath($path, 1);
|
||||
my @dir_from = File::Spec->splitdir($dir);
|
||||
unshift @dir_from, $volume if $volume;
|
||||
my $url = join '/', @dir_from;
|
||||
|
||||
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||
# print $url;
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
@@ -30,11 +30,9 @@ my $soap;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file://' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl',
|
||||
readable =>1,
|
||||
wsdl => 'file://' . $url . '/../../acceptance/wsdl/03_complexType-all.wsdl',
|
||||
), 'Instantiated object' );
|
||||
|
||||
|
||||
#3
|
||||
ok $soap->wsdlinit(
|
||||
checkoccurs => 1,
|
||||
|
||||
@@ -7,6 +7,6 @@ my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <choice> support";
|
||||
local $TODO="implement tests";
|
||||
fail "serialize choice element";
|
||||
}
|
||||
@@ -17,6 +17,6 @@ my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <complexContent> support";
|
||||
local $TODO="implement <complexContent> tests";
|
||||
fail "serialize complexContent element";
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user