Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ba2f93e44 | ||
|
|
099c83b6bc | ||
|
|
f63138fc87 | ||
|
|
fd0854e34a |
@@ -4,7 +4,7 @@ Module::Build->new(
|
|||||||
create_makefile_pl => 'passthrough',
|
create_makefile_pl => 'passthrough',
|
||||||
dist_abstract => 'SOAP with WSDL support',
|
dist_abstract => 'SOAP with WSDL support',
|
||||||
dist_name => 'SOAP-WSDL',
|
dist_name => 'SOAP-WSDL',
|
||||||
dist_version => '2.00_11',
|
dist_version => '2.00_15',
|
||||||
module_name => 'SOAP::WSDL',
|
module_name => 'SOAP::WSDL',
|
||||||
license => 'artistic',
|
license => 'artistic',
|
||||||
requires => {
|
requires => {
|
||||||
@@ -35,6 +35,7 @@ Module::Build->new(
|
|||||||
'Getopt::Long' => 0,
|
'Getopt::Long' => 0,
|
||||||
'Cwd' => 0,
|
'Cwd' => 0,
|
||||||
'File::Find' => 0,
|
'File::Find' => 0,
|
||||||
|
'Storable' => 0,
|
||||||
},
|
},
|
||||||
recursive_test_files => 1,
|
recursive_test_files => 1,
|
||||||
)->create_build_script;
|
)->create_build_script;
|
||||||
|
|||||||
@@ -1,778 +1,207 @@
|
|||||||
------------------------------------------------------------------------
|
Release notes for SOAP::WSDL 2.00_15
|
||||||
r176 | kutterma | 2007-08-31 17:28:29 +0200 (Fr, 31 Aug 2007) | 2 lines
|
-------
|
||||||
|
|
||||||
- set SVN keywords
|
I'm very happy to present a new pre-release version of SOAP::WSDL.
|
||||||
- updated docs
|
|
||||||
------------------------------------------------------------------------
|
SOAP::WSDL is a toolkit for creating SOAP interfaces in perl.
|
||||||
r175 | kutterma | 2007-08-31 17:05:42 +0200 (Fr, 31 Aug 2007) | 6 lines
|
|
||||||
|
Features:
|
||||||
- modified SOAP::WSDL::Client to allow passing the SOAPAction header to call()
|
|
||||||
- modified SOAP::WSDL::Definitions's generator to emit interfaces which include
|
* WSDL based SOAP client
|
||||||
soap_action and style information for every operation
|
o SOAP1.1 support
|
||||||
- re-generated GetWeather example interface
|
o Supports document/literal message style/encoding
|
||||||
- fixed wsdl2perl.pl (typo)
|
* Code generator for generating WSDL-based interface classes
|
||||||
|
o Generated code includes usage documentation for the web service interface
|
||||||
------------------------------------------------------------------------
|
* Easy-to use API. SOAP::WSDL is much easier to use than SOAP::Lite.
|
||||||
r174 | kutterma | 2007-08-31 15:49:04 +0200 (Fr, 31 Aug 2007) | 2 lines
|
o Automatically encodes perl data structures as message data
|
||||||
|
o Automatically sets HTTP headers right
|
||||||
- SOAPAction header is now always quoted.
|
* SOAP::Lite like look and feel.
|
||||||
- updated docs
|
o Where possible, SOAP::WSDL mimics SOAP::Lite's API to allow easy migrations
|
||||||
------------------------------------------------------------------------
|
* XML schema based class library for creating data objects
|
||||||
r173 | kutterma | 2007-08-31 15:48:10 +0200 (Fr, 31 Aug 2007) | 1 line
|
* High-performance XML parser
|
||||||
|
* Plugin support. SOAP::WSDL can be extended through plugins in various aspects.
|
||||||
- added WS-I basic profile compliance docs. Looks like we're far from being compliant...
|
The following plugins are supported:
|
||||||
------------------------------------------------------------------------
|
o Transport plugins via SOAP::WSDL::Factory::Transport
|
||||||
r172 | kutterma | 2007-08-30 22:58:41 +0200 (Do, 30 Aug 2007) | 1 line
|
o Serializer plugins via SOAP::WSDL::Factory::Serializer
|
||||||
|
o Deserializer plugins via SOAP::WSDL::Factory::Serializer
|
||||||
- updated TODO list
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r170 | kutterma | 2007-08-30 22:32:56 +0200 (Do, 30 Aug 2007) | 1 line
|
The following changes have been made:
|
||||||
|
|
||||||
- added RELEASE_NOTES
|
2.00_15
|
||||||
------------------------------------------------------------------------
|
----
|
||||||
r169 | kutterma | 2007-08-30 21:33:50 +0200 (Do, 30 Aug 2007) | 1 line
|
|
||||||
|
The following bugs have been fixed (the numbers in square brackets are the
|
||||||
- fixed SOAP11 serializer package name
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||||
------------------------------------------------------------------------
|
|
||||||
r168 | kutterma | 2007-08-30 21:32:39 +0200 (Do, 30 Aug 2007) | 4 lines
|
* [ 1792321 ] 2.00_14 requires SOAP::Lite for passing tests
|
||||||
|
Fixed.
|
||||||
- added Serializer factory
|
|
||||||
- modified client to use serializer
|
2.00_14
|
||||||
- moved old SOAP::WSDL::Envelope into Serializer namespace
|
----
|
||||||
- moved Tranport factory into Factory namespace
|
|
||||||
------------------------------------------------------------------------
|
The following bugs have been fixed (the numbers in square brackets are the
|
||||||
r167 | kutterma | 2007-08-30 21:30:17 +0200 (Do, 30 Aug 2007) | 1 line
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||||
|
|
||||||
- fixed Envelope to comply to new serializer scheme
|
* [ 1792235 ] SOAP::WSDL::Transport::Test missing from 2.00_13
|
||||||
------------------------------------------------------------------------
|
The package has been re-added
|
||||||
r166 | kutterma | 2007-08-30 18:44:48 +0200 (Do, 30 Aug 2007) | 1 line
|
|
||||||
|
* [ 1792221 ] class_resolver not set from ::Client in 2.00_13
|
||||||
- re-fixed Transport factory
|
Changed to set class_resolver correctly.
|
||||||
------------------------------------------------------------------------
|
|
||||||
r165 | kutterma | 2007-08-30 18:43:36 +0200 (Do, 30 Aug 2007) | 1 line
|
The following uncategorized improvements have been made:
|
||||||
|
|
||||||
- added HTTP Transport class (really)
|
* The ::SOM deserializer has been simplified to be just a subclass
|
||||||
------------------------------------------------------------------------
|
of SOAP::Deserializer from SOAP::Lite
|
||||||
r164 | kutterma | 2007-08-30 14:38:47 +0200 (Do, 30 Aug 2007) | 1 line
|
* Factories now emit more useful error messages when no class is registered
|
||||||
|
for the protocol/soap_version requested
|
||||||
- first try at serializer factory.
|
* Documentation has been improved
|
||||||
------------------------------------------------------------------------
|
- refined ::Factory:: modules' documentation
|
||||||
r163 | kutterma | 2007-08-30 10:34:00 +0200 (Do, 30 Aug 2007) | 1 line
|
* Several tests have been added
|
||||||
|
* XSD classes have been improved for testability
|
||||||
- updated docs (reference to homepage and forum)
|
|
||||||
------------------------------------------------------------------------
|
2.00_13
|
||||||
r162 | kutterma | 2007-08-30 10:29:49 +0200 (Do, 30 Aug 2007) | 1 line
|
----
|
||||||
|
The following features were added (the numbers in square brackets are the
|
||||||
- updated docs
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||||
------------------------------------------------------------------------
|
|
||||||
r161 | kutterma | 2007-08-30 10:17:28 +0200 (Do, 30 Aug 2007) | 2 lines
|
* [ 1790619 ] Test transport backend
|
||||||
|
A test transport backend has been implemented (SOAP::WSDL::Transport::Test).
|
||||||
- modified client to use SOAP::WSDL::Transport factory
|
It returns the contents from a file and discards the response.
|
||||||
- fixed SOAP::WSDL::Transport factory
|
The filename is determined from the soap_action field.
|
||||||
------------------------------------------------------------------------
|
|
||||||
r160 | kutterma | 2007-08-30 00:20:09 +0200 (Do, 30 Aug 2007) | 1 line
|
* [ 1785196 ] Replace outputsom(1) by deserializer plugin
|
||||||
|
outputsom(1) in SOAP::WSDL is now implemented via using the deserializer
|
||||||
- added weird SOAP::Lite nameing scheme to registered && SOAP::Lite Transport instantiations
|
plugin SOAP::WSDL::Deserializer::SOM.
|
||||||
------------------------------------------------------------------------
|
|
||||||
r159 | kutterma | 2007-08-30 00:00:15 +0200 (Do, 30 Aug 2007) | 1 line
|
* [1785195] Support deserializer plugins
|
||||||
|
Deserializer plugin API added via SOAP::WSDL::Factory::Deserializer.
|
||||||
- first try at Transport factory and Transport::HTTP implementation class.
|
|
||||||
------------------------------------------------------------------------
|
The following bugs have been fixed (the numbers in square brackets are the
|
||||||
r158 | kutterma | 2007-08-29 22:36:34 +0200 (Mi, 29 Aug 2007) | 1 line
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||||
|
|
||||||
- updated TODO list
|
* [1789581] Support ComplexType mixed
|
||||||
------------------------------------------------------------------------
|
WSDL parser now supports using the mixed="true" attribute in complexType
|
||||||
r153 | kutterma | 2007-08-29 11:24:40 +0200 (Mi, 29 Aug 2007) | 4 lines
|
definitions. Mixed content in messages is only supported via SOAP::SOM yet.
|
||||||
|
|
||||||
- removed XML::LibXML dependencies (is now required, not used in test scripts)
|
* [1787975] 016_client_object.t fails due to testing XML as string
|
||||||
- fixed WSDLParser to switch on expat namespace support when parsing files
|
Removed string test.
|
||||||
- added expat based tests ported from XML::LibXML based WSDL parser tests
|
|
||||||
- updated docs
|
* [1787959] Test wsdl seems to be broken
|
||||||
------------------------------------------------------------------------
|
Corrected typo.
|
||||||
r152 | kutterma | 2007-08-28 23:28:06 +0200 (Di, 28 Aug 2007) | 3 lines
|
|
||||||
|
* [1787955] ::XSD::Typelib::date is broken
|
||||||
- updated Build.PL
|
SOAP::WSDL::XSD::Typelib::Builtin::date now converts time-zoned dates properly,
|
||||||
- updated CHANGES
|
and adds the local time zone if none is given.
|
||||||
- updated MANIFEST
|
|
||||||
------------------------------------------------------------------------
|
* [1785646] SOAPAction header not set from soap:operation soapAction
|
||||||
r151 | kutterma | 2007-08-28 23:07:14 +0200 (Di, 28 Aug 2007) | 1 line
|
SOAP::WSDL now sets the SOAPAction header correctly.
|
||||||
|
|
||||||
- fixed namespace test
|
The following uncategorized improvements have been made:
|
||||||
------------------------------------------------------------------------
|
|
||||||
r150 | kutterma | 2007-08-28 23:06:00 +0200 (Di, 28 Aug 2007) | 1 line
|
* Documentation improvements
|
||||||
|
|
||||||
- renamed tests to better meet their content
|
2.00_12
|
||||||
------------------------------------------------------------------------
|
----
|
||||||
r149 | kutterma | 2007-08-28 23:03:30 +0200 (Di, 28 Aug 2007) | 1 line
|
|
||||||
|
The following bugs have been fixed (the numbers in square brackets are the
|
||||||
- cleanup
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||||
------------------------------------------------------------------------
|
|
||||||
r148 | kutterma | 2007-08-28 23:02:01 +0200 (Di, 28 Aug 2007) | 2 lines
|
* [1787146] SOAP::WSDL still uses XML::LibXML
|
||||||
|
The superficious usage of XML::LibXML has been removed. XML::LibXML with
|
||||||
- added namespace test
|
sax filter has been replaced by SOAP::WSDL::Expat::WSDLParser.
|
||||||
- removed SAX handler from usage test
|
|
||||||
------------------------------------------------------------------------
|
* [1787054] Test suite requires XML::LibXML in 2.00_11
|
||||||
r147 | kutterma | 2007-08-28 22:57:48 +0200 (Di, 28 Aug 2007) | 1 line
|
The test suite no longer requires XML::LibXML to pass.
|
||||||
|
|
||||||
- added namespace support
|
* [1785678] SOAP envelope not checked for namespace
|
||||||
------------------------------------------------------------------------
|
The SOAP envelope is now checked for the correct namespace.
|
||||||
r146 | kutterma | 2007-08-28 21:56:35 +0200 (Di, 28 Aug 2007) | 1 line
|
|
||||||
|
* [1786644] SOAP::WSDL::Manual - doc error
|
||||||
- removed POD directive from template, so the CPAN indexer won't show it...
|
Documentation improvements
|
||||||
------------------------------------------------------------------------
|
|
||||||
r145 | kutterma | 2007-08-28 16:35:18 +0200 (Di, 28 Aug 2007) | 5 lines
|
The following uncategorized improvements have been made
|
||||||
|
|
||||||
- XML::SAX::Base and XML::SAX::ParserFactory and Pod::Simple::Text dependencies to ease testing
|
* The SOAPAction header is now alway quoted (R1109 in WS-I BP 1.0).
|
||||||
- removed unneccessary performance test
|
|
||||||
- Added Expat-based WSDL parser and test to get rid of XML::LibXML dependency some day...
|
2.00_11
|
||||||
- needs further work: namespaces are not processed correctly, yet
|
----
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
The following features were added (the numbers in square brackets are the
|
||||||
r144 | kutterma | 2007-08-14 11:05:40 +0200 (Di, 14 Aug 2007) | 1 line
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||||
|
|
||||||
- added missing prerequisite 'Template' to Build.PL
|
* [1767963] Transport plugins via SOAP::WSDL::Factory::Transport.
|
||||||
------------------------------------------------------------------------
|
SOAP::WSDL uses SOAP::Lite's tranport modules as default, with a
|
||||||
r143 | kutterma | 2007-08-13 20:43:20 +0200 (Mo, 13 Aug 2007) | 3 lines
|
lightweight HTTP(S) transport plugin as fallback.
|
||||||
|
Custom transport modules can be registered via SOAP::WSDL::Factory::Transport.
|
||||||
- fixed POD (#1772710)
|
|
||||||
- fixed Makefile.PL - now try the passthrough variant first. If too many CPAN testers still fail, we may switch to traditional, some day...
|
* [ 1772730 ] Serializer plugins via SOAP::WSDL::Factory::Serializer
|
||||||
- prepared 2.00_10 pre-release
|
The default serializer for SOAP1.1 is SOAP::WSDL::Serializer::SOAP11.
|
||||||
------------------------------------------------------------------------
|
Custom serializers classes can be registered via
|
||||||
r142 | kutterma | 2007-08-13 15:55:45 +0200 (Mo, 13 Aug 2007) | 1 line
|
SOAP::WSDL::Factory::Serializer or set via SOAP::WSDL's set_serializer
|
||||||
|
method.
|
||||||
typo
|
|
||||||
------------------------------------------------------------------------
|
The following bugs have been fixed (the numbers in square brackets are the
|
||||||
r141 | kutterma | 2007-08-12 21:45:51 +0200 (So, 12 Aug 2007) | 2 lines
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||||
|
|
||||||
- corrected POD error
|
* [ 1764854 ] Port WSDL parser to expat and remove XML::LibXML dependency
|
||||||
- little speedup in add_FOO methods
|
SOAP::WSDL now requires only XML::Parser to be installed.
|
||||||
------------------------------------------------------------------------
|
XML::LibXML is not required any more, though XML::LibXML based modules still
|
||||||
r140 | kutterma | 2007-08-12 21:27:58 +0200 (So, 12 Aug 2007) | 1 line
|
exist.
|
||||||
|
|
||||||
- corrected POD error
|
The following uncategorized improvements have been made
|
||||||
------------------------------------------------------------------------
|
|
||||||
r139 | kutterma | 2007-08-12 21:15:59 +0200 (So, 12 Aug 2007) | 1 line
|
* The number of dependencies has been reduced. SOAP::WSDL no longer requires the
|
||||||
|
following modules to be installed:
|
||||||
- adder repository information
|
- XML::SAX::Base
|
||||||
------------------------------------------------------------------------
|
- XML::SAX::ParserFactory
|
||||||
r138 | kutterma | 2007-08-12 21:13:08 +0200 (So, 12 Aug 2007) | 1 line
|
- Pod::Simple::Text
|
||||||
|
- XML::LibXML
|
||||||
- typo
|
|
||||||
------------------------------------------------------------------------
|
* The missing prerequisite Template has been added.
|
||||||
r137 | kutterma | 2007-08-12 21:12:20 +0200 (So, 12 Aug 2007) | 3 lines
|
* Documentation has been improved:
|
||||||
|
- WS-I Compliance document added.
|
||||||
- updated docs
|
|
||||||
- added svn information
|
|
||||||
- cosmetics
|
2.00_10
|
||||||
------------------------------------------------------------------------
|
----
|
||||||
r136 | kutterma | 2007-08-12 15:11:50 +0200 (So, 12 Aug 2007) | 2 lines
|
* Changed Makefile.PL to use Module::Build (passthrough mode)
|
||||||
|
* fixed element ref="" handling
|
||||||
- fixed element ref="" top level- elements in code generator
|
|
||||||
- prepared 2.00_09 pre-release
|
2.00_09
|
||||||
------------------------------------------------------------------------
|
----
|
||||||
r135 | kutterma | 2007-08-12 14:44:06 +0200 (So, 12 Aug 2007) | 1 line
|
* SOAP::WSDL::XSD::Typelib::Builtin::boolean objects now return their numerical
|
||||||
|
value in bool context, not "true" or "false" (always true...)
|
||||||
- prepared 2.00_09 pre-release
|
* date/time test are now timezone-sensitive
|
||||||
------------------------------------------------------------------------
|
* examples added
|
||||||
r134 | kutterma | 2007-08-12 14:30:33 +0200 (So, 12 Aug 2007) | 2 lines
|
|
||||||
|
2.00_08
|
||||||
- updated README
|
---
|
||||||
- bumped up version
|
* SOAP::WSDL::XSD::Typelib::ComplexType objects now check the class of their
|
||||||
------------------------------------------------------------------------
|
child objects.
|
||||||
r133 | kutterma | 2007-08-12 14:27:17 +0200 (So, 12 Aug 2007) | 1 line
|
This provides early feedback to developers.
|
||||||
|
* SOAP message parser can skip unwanted parts of the message to improve parsing
|
||||||
- fixed Build.PL to leave Makefile.PL untouched.
|
speed - see SOAP::WSDL::Expat::MessageParser for details.
|
||||||
------------------------------------------------------------------------
|
* HTTP Content-Type is configurable
|
||||||
r132 | kutterma | 2007-08-12 14:21:24 +0200 (So, 12 Aug 2007) | 1 line
|
* SOAP::WSDL::XSD::Typelib::ComplexType based objects accept any combination of
|
||||||
|
hash refs, list refs and objects as parameter to set_value() and new().
|
||||||
- now really added Makefile.PL
|
* SOAP::WSDL::XSD::Typelib::Builtin::dateTime and ::date convert date
|
||||||
------------------------------------------------------------------------
|
strings into XML date strings
|
||||||
r131 | kutterma | 2007-08-12 14:18:59 +0200 (So, 12 Aug 2007) | 3 lines
|
* SOAP::WSDL::Definitions::create now
|
||||||
|
- converts '.' in service names to '::' (.NET class separator to perl class
|
||||||
- fixed documentation for generated code with element ref="" declarations
|
separator)
|
||||||
- fixed element ref="" test for generated code
|
- outputs Typemaps and Interface classes in UTF8 to allow proper inclusion
|
||||||
- added (generated) Makefile.PL to make CPAN testers happy
|
of UTF8 documentation from WSDL
|
||||||
------------------------------------------------------------------------
|
* SOAP::WSDL::Definitions::create() includes doc in generated interface classes
|
||||||
r130 | kutterma | 2007-08-10 15:57:12 +0200 (Fr, 10 Aug 2007) | 1 line
|
* WSDLHandler now handles <wsdl:documentation> tags
|
||||||
|
* fixed explain in SimpleType, ComplexType and Element
|
||||||
- first try at truely callback-based parser (inspired by XML::Compile)
|
|
||||||
------------------------------------------------------------------------
|
2.00_07 and below
|
||||||
r129 | kutterma | 2007-08-07 17:53:40 +0200 (Di, 07 Aug 2007) | 1 line
|
---
|
||||||
|
* Implemented a Code generator for creating SOAP interfaces based on WSDL definitions
|
||||||
- moved duplicate sub generation out of loop
|
* Implemented a high-speed stream based SOAP message parser
|
||||||
------------------------------------------------------------------------
|
SOAP message parser returns a objects based on XML schema based class library
|
||||||
r128 | kutterma | 2007-08-07 14:16:28 +0200 (Di, 07 Aug 2007) | 1 line
|
* Implemented a XML schema based class library
|
||||||
|
* Implemented a stream based WSDL parser.
|
||||||
- bool now returns numerical value in bool context, not "true" or "false" (always true...)
|
Parses WSDL into objects. Objects can serialize data, and explain how to use the
|
||||||
------------------------------------------------------------------------
|
service(s) they make up (output documentation).
|
||||||
r127 | kutterma | 2007-08-07 11:45:23 +0200 (Di, 07 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- fixed test to be timezone sensitive
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r126 | kutterma | 2007-08-07 11:09:51 +0200 (Di, 07 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- made test timezone-sensitive
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r125 | kutterma | 2007-08-07 11:09:16 +0200 (Di, 07 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- made test timezone-sensitive
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r124 | kutterma | 2007-08-06 18:05:02 +0200 (Mo, 06 Aug 2007) | 2 lines
|
|
||||||
|
|
||||||
- fixed element ref handling in code generator in ComplexType.
|
|
||||||
- top-level element ref still not supported/tested
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r123 | kutterma | 2007-08-06 17:48:57 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- test now dies and outputs code to eval on eval errors
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r122 | kutterma | 2007-08-06 17:29:46 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- fixed element ref="" handling in complexType
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r121 | kutterma | 2007-08-06 17:29:14 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- added test data for element ref inside complexType
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r120 | kutterma | 2007-08-06 17:28:54 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- added test for element ref inside complexType
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r119 | kutterma | 2007-08-06 17:13:03 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- fixed element ref handling
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r118 | kutterma | 2007-08-06 17:12:47 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- added element ref test data
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r117 | kutterma | 2007-08-06 17:12:36 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- added element ref test
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r116 | kutterma | 2007-08-06 15:47:30 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- refined docs
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r115 | kutterma | 2007-08-06 15:39:39 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- updated docs. Hope the CPAN indexer ignores "=for developers"...
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r114 | kutterma | 2007-08-06 14:12:28 +0200 (Mo, 06 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- removed annoying pod
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r113 | kutterma | 2007-08-05 18:42:09 +0200 (So, 05 Aug 2007) | 5 lines
|
|
||||||
|
|
||||||
- removed SOAP::Lite dependency
|
|
||||||
- updated docs
|
|
||||||
- changed SOAP::WSDL::XSD::Typelib::ComplexType to require the actuall class for element data, not just the base class (good for finding errors earlier)
|
|
||||||
- implemented returning SOAP::SOM objects in SOAP::WSDL
|
|
||||||
- added SOAP::WSDL example(weather_wsdl.pl)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r112 | kutterma | 2007-08-03 16:12:57 +0200 (Fr, 03 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
updated docs
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r111 | kutterma | 2007-08-03 16:12:04 +0200 (Fr, 03 Aug 2007) | 1 line
|
|
||||||
|
|
||||||
- added "skip"
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r110 | kutterma | 2007-07-31 22:27:25 +0200 (Di, 31 Jul 2007) | 2 lines
|
|
||||||
|
|
||||||
- further work on removing SOAP::Lite dependency
|
|
||||||
- Note: SOAP::WSDL may be broken !
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r109 | kutterma | 2007-07-31 21:10:40 +0200 (Di, 31 Jul 2007) | 3 lines
|
|
||||||
|
|
||||||
- finished move from XSD::Primitive to Builtin
|
|
||||||
- fixed a few tests
|
|
||||||
- removed typo namespace from TypeLookupt
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r108 | kutterma | 2007-07-31 21:02:43 +0200 (Di, 31 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- removed unneeded example stuff
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r107 | kutterma | 2007-07-31 20:32:43 +0200 (Di, 31 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- rename to Builtin
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r106 | kutterma | 2007-07-31 20:32:11 +0200 (Di, 31 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- prepared rename to Builtin
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r105 | kutterma | 2007-07-31 13:17:52 +0200 (Di, 31 Jul 2007) | 2 lines
|
|
||||||
|
|
||||||
- added configurable ContentType / charset
|
|
||||||
- maybe split up charset and content type into two methods ?
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r104 | kutterma | 2007-07-31 00:16:15 +0200 (Di, 31 Jul 2007) | 3 lines
|
|
||||||
|
|
||||||
- removed optional nanoseconds from dateTime conversions
|
|
||||||
- added conversion to date objects
|
|
||||||
- removed fetching WSDL via SOAP::Schema in SOAP::WSDL. SOAP::Lite is still used as base class.
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r103 | kutterma | 2007-07-30 13:25:06 +0200 (Mo, 30 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- updated TODO
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r102 | kutterma | 2007-07-30 13:23:09 +0200 (Mo, 30 Jul 2007) | 2 lines
|
|
||||||
|
|
||||||
- updated Build.PL dependencies
|
|
||||||
- update TODO
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r101 | kutterma | 2007-07-30 13:22:05 +0200 (Mo, 30 Jul 2007) | 2 lines
|
|
||||||
|
|
||||||
- added dateTime test
|
|
||||||
- fixed pod test
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r100 | kutterma | 2007-07-27 16:03:15 +0200 (Fr, 27 Jul 2007) | 2 lines
|
|
||||||
|
|
||||||
- allow passing list refs of hash refs to set_value.
|
|
||||||
I hope I got all combinations by now - start getting ugly...
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r99 | kutterma | 2007-07-26 23:18:35 +0200 (Do, 26 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- added SOAP::Lite usage (to be removed later)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r98 | kutterma | 2007-07-26 23:16:30 +0200 (Do, 26 Jul 2007) | 3 lines
|
|
||||||
|
|
||||||
- removed SOAP::Lite dependency
|
|
||||||
- added set_trace and tracing facility support via callback in call()
|
|
||||||
- added fault_class property to allow different Fault classes (somewhen later on)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r97 | kutterma | 2007-07-25 16:59:49 +0200 (Mi, 25 Jul 2007) | 3 lines
|
|
||||||
|
|
||||||
- dateTime now converts date strings into XML date strings
|
|
||||||
- updated docs
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r96 | kutterma | 2007-07-23 11:17:36 +0200 (Mo, 23 Jul 2007) | 3 lines
|
|
||||||
|
|
||||||
- SOAP::WSDL::Definitions::create now
|
|
||||||
- converts '.' in service names to '::' (.NET class separator to perl class separator)
|
|
||||||
- outputs Typemaps and Interface classes in UTF8 to allow proper inclusion of UTF8 documentation from WSDL
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r95 | kutterma | 2007-07-23 10:26:59 +0200 (Mo, 23 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- typo
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r94 | kutterma | 2007-07-23 10:11:46 +0200 (Mo, 23 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- typo
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r93 | kutterma | 2007-07-22 23:24:12 +0200 (So, 22 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
updated TODO
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r92 | kutterma | 2007-07-22 23:19:15 +0200 (So, 22 Jul 2007) | 3 lines
|
|
||||||
|
|
||||||
- WSDLHandler now handles <wsdl:documentation> tags
|
|
||||||
- SOAP::WSDL::Definitions now includes some usable doc in generated interface classes
|
|
||||||
- fixed explain in SimpleType, ComplexType and Element (someway)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r91 | kutterma | 2007-07-22 21:18:21 +0200 (So, 22 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- updated docs
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r90 | kutterma | 2007-07-22 15:42:23 +0200 (So, 22 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- updated docs
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r89 | kutterma | 2007-07-22 15:38:25 +0200 (So, 22 Jul 2007) | 2 lines
|
|
||||||
|
|
||||||
- updated docs
|
|
||||||
- removed useless docs from "internally used only" - modules
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r88 | kutterma | 2007-07-22 09:17:57 +0200 (So, 22 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
typo
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r87 | kutterma | 2007-07-21 23:57:46 +0200 (Sa, 21 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- updated docs
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r86 | kutterma | 2007-07-21 23:24:24 +0200 (Sa, 21 Jul 2007) | 5 lines
|
|
||||||
|
|
||||||
- removed irritating pod from SOAP::WSDL::XSD::Typelib::Builtin::* classes and put int into SOAP::WSDL::XSD::Typelib::Builtin
|
|
||||||
- added fast constructor creation BEGIN block to all SOAP::WSDL::XSD::Typelib::Builtin::* classes
|
|
||||||
- added examples
|
|
||||||
- updated docs
|
|
||||||
- prepared 2.00_07 pre-release
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r85 | kutterma | 2007-07-21 18:12:49 +0200 (Sa, 21 Jul 2007) | 4 lines
|
|
||||||
|
|
||||||
- added wsdl2perl code generation script - works against FortuneCookie web service at fullerdata.com
|
|
||||||
- fixed SOAP::WSDL::Client::Base to work as base class for generated classes
|
|
||||||
- added interface generation facility to SOAP::WSDL::Definitions
|
|
||||||
- updated docs (a few)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r84 | kutterma | 2007-07-20 15:37:40 +0200 (Fr, 20 Jul 2007) | 9 lines
|
|
||||||
|
|
||||||
- added Expat-based parser
|
|
||||||
- made Expat-based parser the default
|
|
||||||
- added fast "new" method to most important "Builtin" types
|
|
||||||
- added Parser POD
|
|
||||||
- fixed propagating element names in complex types to element elements - element ref="element" should work on
|
|
||||||
class level now (don't know whether typelib supports it yet)
|
|
||||||
- updated tests
|
|
||||||
- updated HACKING
|
|
||||||
- prepared 2.00_06 release
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r83 | kutterma | 2007-07-19 13:09:33 +0200 (Do, 19 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- fixed element class generation (removed additional ::)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r82 | kutterma | 2007-07-17 22:17:02 +0200 (Di, 17 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- updated README and HACKING
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r81 | kutterma | 2007-07-17 22:00:14 +0200 (Di, 17 Jul 2007) | 5 lines
|
|
||||||
|
|
||||||
- added parent ref in SOAP::WSDL::Base - now we have a real tree, and maybe can completely support namespaces some day
|
|
||||||
- replaced grep by List::Util::first where appropriate
|
|
||||||
- code cleanup
|
|
||||||
- fixed test for Code Generation
|
|
||||||
- updated a few tests
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r80 | kutterma | 2007-07-17 17:00:48 +0200 (Di, 17 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- improved pod in generated classes
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r79 | kutterma | 2007-07-17 14:41:44 +0200 (Di, 17 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- made explain look nicer
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r78 | kutterma | 2007-07-15 12:25:03 +0200 (So, 15 Jul 2007) | 7 lines
|
|
||||||
|
|
||||||
- SOAP::WSDL::Definitions can now generate
|
|
||||||
- Typemaps
|
|
||||||
- Type and Element classes
|
|
||||||
- fixed SOAP::WSDL::XSD::Typelib::ComplexType to support elements with type="ComplexType" definitions
|
|
||||||
- moved toClass method in SOAP::WSDL::XSD::ComplexType, Element and SimpleType to to_class and added compatibility wrapper with warning for toClass calls
|
|
||||||
- added generator test
|
|
||||||
- updated docs
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r77 | kutterma | 2007-07-14 10:46:54 +0200 (Sa, 14 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- started working on high-level code generator
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r76 | kutterma | 2007-07-13 09:21:33 +0200 (Fr, 13 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- fixed handling of complex data (hashes with lists embedded lists of objects)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r75 | kutterma | 2007-07-10 12:08:39 +0200 (Di, 10 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- removed unneeded SOAP::Lite calls
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r74 | kutterma | 2007-07-10 12:08:10 +0200 (Di, 10 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- updated to new SOAP::Lite API
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r73 | kutterma | 2007-07-10 12:00:25 +0200 (Di, 10 Jul 2007) | 6 lines
|
|
||||||
|
|
||||||
- re-integrated old SOAP::WSDL tests
|
|
||||||
- updated docs
|
|
||||||
- SOAP::WSDL::XSD::Typelib::Builtin::string now escapes XML builtin entities on serialization
|
|
||||||
- SOAP::WSDL::XSD::Element now supports generating classes for elements and types into different namespaces
|
|
||||||
- SOAP::WSDL::Definitions now supports different namespaces for elements and types when generating typmaps
|
|
||||||
- 2.00_05 release preparation
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r72 | kutterma | 2007-07-06 11:20:56 +0200 (Fr, 06 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- fixed detail (typo)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r71 | kutterma | 2007-07-05 16:13:28 +0200 (Do, 05 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- TODO comments added
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r70 | kutterma | 2007-07-04 16:14:50 +0200 (Mi, 04 Jul 2007) | 2 lines
|
|
||||||
|
|
||||||
- updated docs
|
|
||||||
- prepared 2.00_04 release
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r69 | kutterma | 2007-07-04 16:07:54 +0200 (Mi, 04 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- ComplexType now ignores xmlns - TODO: check xmlns, don't ignore...
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r68 | kutterma | 2007-07-04 11:25:31 +0200 (Mi, 04 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- made builtin types with overloads serializable
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r67 | kutterma | 2007-07-04 09:51:06 +0200 (Mi, 04 Jul 2007) | 4 lines
|
|
||||||
|
|
||||||
- updated docs
|
|
||||||
- removed unneeded uses from test
|
|
||||||
- added Build requirements from tests
|
|
||||||
- prepared 2.00_03 release
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r66 | kutterma | 2007-07-04 00:06:29 +0200 (Mi, 04 Jul 2007) | 3 lines
|
|
||||||
|
|
||||||
- split up builtin type lib into single files for Class::Std::Storable
|
|
||||||
- fixed more tests
|
|
||||||
- fixed complexType serialization for non-objecs
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r65 | kutterma | 2007-07-03 16:52:54 +0200 (Di, 03 Jul 2007) | 2 lines
|
|
||||||
|
|
||||||
- fixed a few tests
|
|
||||||
- added performance improvements
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r64 | kutterma | 2007-07-03 15:09:27 +0200 (Di, 03 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- small performance improvements
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r63 | kutterma | 2007-07-03 14:37:28 +0200 (Di, 03 Jul 2007) | 3 lines
|
|
||||||
|
|
||||||
- fixed serializing complextypes correctly
|
|
||||||
- fixed handling has attribute refs in new
|
|
||||||
- fixed performance problems in MessageHandler
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r62 | kutterma | 2007-07-03 14:37:14 +0200 (Di, 03 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
- re-added
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r61 | kutterma | 2007-07-03 14:36:59 +0200 (Di, 03 Jul 2007) | 1 line
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r60 | kutterma | 2007-07-01 09:52:41 +0200 (So, 01 Jul 2007) | 2 lines
|
|
||||||
|
|
||||||
- fixed lots of tests
|
|
||||||
- attic tests may be re-integrated now...
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r59 | kutterma | 2007-06-28 13:07:35 +0200 (Do, 28 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- added ignore for dist tar.gz
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r58 | kutterma | 2007-06-28 13:06:25 +0200 (Do, 28 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- updated buildrequires
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r57 | kutterma | 2007-06-28 13:05:03 +0200 (Do, 28 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- typo
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r56 | kutterma | 2007-06-28 11:15:24 +0200 (Do, 28 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- pre-release 2.00_01
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r55 | kutterma | 2007-06-28 10:23:20 +0200 (Do, 28 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- moved old tests to attic
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r54 | kutterma | 2007-06-28 10:15:41 +0200 (Do, 28 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- fixed a few typos
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r53 | kutterma | 2007-06-28 10:10:41 +0200 (Do, 28 Jun 2007) | 3 lines
|
|
||||||
|
|
||||||
- fixed MessageHandler to support deserializing into objects which return false in boolean context
|
|
||||||
- updated docs
|
|
||||||
- fixed Fault11 (named detail correctly)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r52 | kutterma | 2007-06-27 17:36:01 +0200 (Mi, 27 Jun 2007) | 3 lines
|
|
||||||
|
|
||||||
- added Fault for SOAP 1.1 implementation
|
|
||||||
- fixed ComplexType - though it doesn't work quite for faults yet...
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r51 | kutterma | 2007-06-27 13:27:59 +0200 (Mi, 27 Jun 2007) | 13 lines
|
|
||||||
|
|
||||||
- added test for sending objects via call()
|
|
||||||
- modified Client to accept objects of type SOAP::WSDL::XSD::Typelib::Builtin::anyType as message content
|
|
||||||
without checking the WSDL objects
|
|
||||||
Note:
|
|
||||||
- SOAPAction is just guessed - needs to be replaced by something better
|
|
||||||
- The method should be looked up from the typelib, too, and serialized according to the rules specified in the WSDL
|
|
||||||
and dumped into the typelib.
|
|
||||||
|
|
||||||
- updated to_typelib to include top element
|
|
||||||
- fixed element and complextype templates for toClass
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r50 | kutterma | 2007-06-27 00:01:32 +0200 (Mi, 27 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- added xsi xmlns to envelope
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r49 | kutterma | 2007-06-26 23:52:18 +0200 (Di, 26 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- cosmetics and a few doc updates
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r48 | kutterma | 2007-06-26 22:47:52 +0200 (Di, 26 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- refactored element serializing to make it somewhat more consistent
|
|
||||||
- added nillable implementation for Elements
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r47 | kutterma | 2007-06-26 18:06:59 +0200 (Di, 26 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- removed shebang
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r46 | kutterma | 2007-06-26 18:06:33 +0200 (Di, 26 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- added warnings
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r45 | kutterma | 2007-06-26 17:39:09 +0200 (Di, 26 Jun 2007) | 3 lines
|
|
||||||
|
|
||||||
- got toClass working for generating WSDL based type libraries.
|
|
||||||
- changed typelib base class behavior to qualify first element called.
|
|
||||||
TODO (a bigger one): Fully support namespaces...
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r44 | kutterma | 2007-06-26 12:10:33 +0200 (Di, 26 Jun 2007) | 14 lines
|
|
||||||
|
|
||||||
- changed Typelib::Element to work as attribute of a type (serialize serializes start_tag and end_tag provided by Typelib::Element around it's vontent, if present)
|
|
||||||
- worked on toClass functionality with embedded templates.
|
|
||||||
There's much to do - current impl should support:
|
|
||||||
* <element name="name" type="type"
|
|
||||||
* <element name="name"><simpleType>
|
|
||||||
* <element name="name"><complexType>
|
|
||||||
|
|
||||||
* <simpleType ...><list>
|
|
||||||
* <simpleType ...><restriction>
|
|
||||||
|
|
||||||
* <complexType ...><all>
|
|
||||||
* <complexType ...><sequence>
|
|
||||||
|
|
||||||
All other variants are not completely supported yet.
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r43 | kutterma | 2007-06-25 18:58:56 +0200 (Mo, 25 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- broke element again...
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r42 | kutterma | 2007-06-25 17:30:34 +0200 (Mo, 25 Jun 2007) | 3 lines
|
|
||||||
|
|
||||||
- fixed to_typemap to report atomic simple and complex types correctly
|
|
||||||
- update tests
|
|
||||||
- renamed WSDLFilter to WSDLHandler
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r41 | kutterma | 2007-06-25 17:29:41 +0200 (Mo, 25 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r40 | kutterma | 2007-06-25 14:15:40 +0200 (Mo, 25 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- Client.pm now uses XML::LibXML as default and falls back on XML::SAX::ParserFactory if not present
|
|
||||||
- fixed tests
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r39 | kutterma | 2007-06-25 14:07:28 +0200 (Mo, 25 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- typo in Element
|
|
||||||
- fixed tests
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r38 | kutterma | 2007-06-25 10:31:20 +0200 (Mo, 25 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- made WSDLFilter.pm a inside out class and let it run without XML::SAX::Base (This probably breaks a lot of tests - we need to implement XML::LibXML semantics in all tests / classes which use it)
|
|
||||||
- first swag at to_typemap Typemap generation. to_typemap implemented throughout the WSDL:: modules. Some implementations (Elenenet.pm, ComplexType.pm) need further work for correctly handling atomic simpleType / complexType definitions.
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r37 | kutterma | 2007-06-24 09:15:22 +0200 (So, 24 Jun 2007) | 3 lines
|
|
||||||
|
|
||||||
- added test for on-the-fly created ComplexType
|
|
||||||
- fixed ComplexType factory to really work
|
|
||||||
- startet working on Element facets
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r36 | kutterma | 2007-06-24 09:14:46 +0200 (So, 24 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- added test for on-the-fly created ComplexType
|
|
||||||
- startet working on Element facets
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r35 | kutterma | 2007-06-24 08:13:32 +0200 (So, 24 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- implemented ComplexType as class factory to get rid of the annoying START every subclass had to implement.
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r34 | kutterma | 2007-06-23 23:22:35 +0200 (Sa, 23 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- added XSD Typelib SimpleType, Element and ComplexType base classes (stereotypes).
|
|
||||||
ComplexType's not yet complete (no restriction / extension etc. handling).
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r33 | kutterma | 2007-06-23 11:04:56 +0200 (Sa, 23 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- added SOAP::WSDL::XSD::Typelib::Builtin implementation of builtin XML Schema datatypes with built-in stringification, boolification and numerification.
|
|
||||||
- SAX::MessageHandler now deserializes simple types in SOAP messages into SOAP::WSDL::XSD::Typelib::Builtin (provided these are named in the ClassResolver...)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r32 | kutterma | 2007-06-23 02:14:16 +0200 (Sa, 23 Jun 2007) | 4 lines
|
|
||||||
|
|
||||||
- added pod
|
|
||||||
- added ref handling for elements
|
|
||||||
- added abstract handling for elements (easy...)
|
|
||||||
- added storing of content model (simpleContent/complexContent) to simpleType and complexType, though the attribute is still ignored in serializing
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r31 | kutterma | 2007-06-23 00:37:18 +0200 (Sa, 23 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- renamed MessageFilter to MessageHandler
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r30 | kutterma | 2007-06-23 00:35:54 +0200 (Sa, 23 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- renamed MessageFilter to MessageHandler
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r29 | kutterma | 2007-06-23 00:35:16 +0200 (Sa, 23 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- switched to Class::Std::Storable
|
|
||||||
- renamed MessageFilter to MessageHandler
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r28 | kutterma | 2007-06-22 18:56:28 +0200 (Fr, 22 Jun 2007) | 3 lines
|
|
||||||
|
|
||||||
- optimised SOAP::WSDL::SAX::MessageFilter for performance
|
|
||||||
- moved Typelob into own directory and load it dynamically from test script
|
|
||||||
- added some pod
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r27 | kutterma | 2007-06-22 15:34:28 +0200 (Fr, 22 Jun 2007) | 5 lines
|
|
||||||
|
|
||||||
- modified SOAP::WSDL::XSD lib to allow serializing of object hierarchies
|
|
||||||
- added SOAP::WSDL::SAX::MessageFilter for creating object hierarchies from SOAP messages
|
|
||||||
- moved Builtin XML Schema types to SOAP::WSDL:XSD::Schema::Builtin
|
|
||||||
- added test + benchmark for serializing /deserializing SOAP messages into object trees
|
|
||||||
- fixed Client to use SOAP::WSDL::Types as typelib, not first SOAP::WSDL::XSD::Schema
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r26 | kutterma | 2007-06-21 23:35:30 +0200 (Do, 21 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- first swag at a typed SOAP Message parser.
|
|
||||||
Typelib is still to be implemented...
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r25 | kutterma | 2007-06-21 18:14:49 +0200 (Do, 21 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- added missing files from last commit
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r24 | kutterma | 2007-06-19 00:29:36 +0200 (Di, 19 Jun 2007) | 3 lines
|
|
||||||
|
|
||||||
- worked a bit on explain
|
|
||||||
- introduced handling of multiple schema definitions in one WSDL file
|
|
||||||
- fixed propagating targetNamespace to child elements in WSDLFilter
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r23 | kutterma | 2007-06-16 14:48:30 +0200 (Sa, 16 Jun 2007) | 1 line
|
|
||||||
|
|
||||||
- updated new SOAP::WSDL framework to use inside out classes based on Class::Std (not yet complete)
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r22 | kutterma | 2007-06-12 23:19:41 +0200 (Di, 12 Jun 2007) | 4 lines
|
|
||||||
|
|
||||||
- updated a few tests
|
|
||||||
- fixed a few WSDLs
|
|
||||||
- fixed handling of elements with minOccurs 0
|
|
||||||
- fixed setting of minOccurs/maxOccurs for all/sequence complexTypes
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r21 | kutterma | 2007-06-08 21:38:41 +0200 (Fr, 08 Jun 2007) | 2 lines
|
|
||||||
|
|
||||||
- updated a few tests
|
|
||||||
- fixed namespaces in tests
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r19 | kutterma | 2007-05-31 16:58:18 +0200 (Do, 31 Mai 2007) | 10 lines
|
|
||||||
|
|
||||||
- first swag at a WSDL-generated Object-tree based SOAP client.
|
|
||||||
|
|
||||||
Works as following:
|
|
||||||
a) a sax filter transforms the sax stream from a wsdl into a perl object tree
|
|
||||||
b) the perl object tree has methods for performing the following tasks:
|
|
||||||
a) explain: Tell what services and methods are there, and how to use them
|
|
||||||
b) serialize: Serialize data structures to the XML defined in the WSDL & schema
|
|
||||||
c) The client uses the generated XML to call the SOAP Server. Unfortunately, SOAP::Lite
|
|
||||||
does not allow custom XML to be rendered as a method's "value", so we have to replace
|
|
||||||
call() completely and generate the envelope on our own (which is not complete yet).
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r9 | kutterma | 2007-05-28 17:08:41 +0200 (Mo, 28 Mai 2007) | 1 line
|
|
||||||
|
|
||||||
- first try at bindings support - see t/12/bindings on how we could find out bindings and portname from a target URL
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
r4 | kutterma | 2007-05-28 15:15:03 +0200 (Mo, 28 Mai 2007) | 1 line
|
|
||||||
|
|
||||||
- move from private repository to sourceforge
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
benchmark/01_expat.t
|
||||||
|
benchmark/XSD/01_anyType.t
|
||||||
|
benchmark/XSD/02_anySimpleType.t
|
||||||
|
benchmark/XSD/03_string.t
|
||||||
bin/wsdl2perl.pl
|
bin/wsdl2perl.pl
|
||||||
Build.PL
|
Build.PL
|
||||||
CHANGES
|
CHANGES
|
||||||
@@ -22,7 +26,6 @@ example/lib/MyTypemaps/FullerData_x0020_Fortune_x0020_Cookie.pm
|
|||||||
example/lib/MyTypemaps/GlobalWeather.pm
|
example/lib/MyTypemaps/GlobalWeather.pm
|
||||||
example/weather.pl
|
example/weather.pl
|
||||||
example/weather_wsdl.pl
|
example/weather_wsdl.pl
|
||||||
example/weather_xml_compile.pl
|
|
||||||
example/wsdl/FortuneCookie.xml
|
example/wsdl/FortuneCookie.xml
|
||||||
example/wsdl/genericbarcode.xml
|
example/wsdl/genericbarcode.xml
|
||||||
example/wsdl/globalweather.xml
|
example/wsdl/globalweather.xml
|
||||||
@@ -33,16 +36,19 @@ lib/SOAP/WSDL/Binding.pm
|
|||||||
lib/SOAP/WSDL/Client.pm
|
lib/SOAP/WSDL/Client.pm
|
||||||
lib/SOAP/WSDL/Client/Base.pm
|
lib/SOAP/WSDL/Client/Base.pm
|
||||||
lib/SOAP/WSDL/Definitions.pm
|
lib/SOAP/WSDL/Definitions.pm
|
||||||
|
lib/SOAP/WSDL/Deserializer/SOAP11.pm
|
||||||
|
lib/SOAP/WSDL/Deserializer/SOM.pm
|
||||||
lib/SOAP/WSDL/Expat/MessageParser.pm
|
lib/SOAP/WSDL/Expat/MessageParser.pm
|
||||||
lib/SOAP/WSDL/Expat/MessageStreamParser.pm
|
lib/SOAP/WSDL/Expat/MessageStreamParser.pm
|
||||||
lib/SOAP/WSDL/Expat/MessageSubParser.pm
|
lib/SOAP/WSDL/Expat/MessageSubParser.pm
|
||||||
lib/SOAP/WSDL/Expat/SubParser.pm
|
lib/SOAP/WSDL/Expat/SubParser.pm
|
||||||
lib/SOAP/WSDL/Expat/WSDLParser.pm
|
lib/SOAP/WSDL/Expat/WSDLParser.pm
|
||||||
|
lib/SOAP/WSDL/Factory/Deserializer.pm
|
||||||
lib/SOAP/WSDL/Factory/Serializer.pm
|
lib/SOAP/WSDL/Factory/Serializer.pm
|
||||||
lib/SOAP/WSDL/Factory/Transport.pm
|
lib/SOAP/WSDL/Factory/Transport.pm
|
||||||
lib/SOAP/WSDL/Manual.pod
|
lib/SOAP/WSDL/Manual.pod
|
||||||
lib/SOAP/WSDL/Manual/Glossary.pod
|
lib/SOAP/WSDL/Manual/Glossary.pod
|
||||||
lib/SOAP/WSDL/Manual/WS_I_BasicProfile_Compliance.pod
|
lib/SOAP/WSDL/Manual/WS_I.pod
|
||||||
lib/SOAP/WSDL/Message.pm
|
lib/SOAP/WSDL/Message.pm
|
||||||
lib/SOAP/WSDL/Operation.pm
|
lib/SOAP/WSDL/Operation.pm
|
||||||
lib/SOAP/WSDL/OpMessage.pm
|
lib/SOAP/WSDL/OpMessage.pm
|
||||||
@@ -50,7 +56,6 @@ lib/SOAP/WSDL/Parser.pod
|
|||||||
lib/SOAP/WSDL/Part.pm
|
lib/SOAP/WSDL/Part.pm
|
||||||
lib/SOAP/WSDL/Port.pm
|
lib/SOAP/WSDL/Port.pm
|
||||||
lib/SOAP/WSDL/PortType.pm
|
lib/SOAP/WSDL/PortType.pm
|
||||||
lib/SOAP/WSDL/RELEASE_NOTES
|
|
||||||
lib/SOAP/WSDL/SAX/MessageHandler.pm
|
lib/SOAP/WSDL/SAX/MessageHandler.pm
|
||||||
lib/SOAP/WSDL/SAX/WSDLHandler.pm
|
lib/SOAP/WSDL/SAX/WSDLHandler.pm
|
||||||
lib/SOAP/WSDL/Serializer/SOAP11.pm
|
lib/SOAP/WSDL/Serializer/SOAP11.pm
|
||||||
@@ -58,6 +63,7 @@ lib/SOAP/WSDL/Service.pm
|
|||||||
lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
||||||
lib/SOAP/WSDL/SoapOperation.pm
|
lib/SOAP/WSDL/SoapOperation.pm
|
||||||
lib/SOAP/WSDL/Transport/HTTP.pm
|
lib/SOAP/WSDL/Transport/HTTP.pm
|
||||||
|
lib/SOAP/WSDL/Transport/Test.pm
|
||||||
lib/SOAP/WSDL/TypeLookup.pm
|
lib/SOAP/WSDL/TypeLookup.pm
|
||||||
lib/SOAP/WSDL/Types.pm
|
lib/SOAP/WSDL/Types.pm
|
||||||
lib/SOAP/WSDL/XSD/Builtin.pm
|
lib/SOAP/WSDL/XSD/Builtin.pm
|
||||||
@@ -118,7 +124,7 @@ lib/SOAP/WSDL/XSD/Typelib/Element.pm
|
|||||||
lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
||||||
LICENSE
|
LICENSE
|
||||||
Makefile.PL
|
Makefile.PL
|
||||||
MANIFEST This list of files
|
MANIFEST
|
||||||
META.yml
|
META.yml
|
||||||
README
|
README
|
||||||
t/001_use.t
|
t/001_use.t
|
||||||
@@ -201,8 +207,14 @@ t/SOAP/WSDL/05_simpleType-restriction.t
|
|||||||
t/SOAP/WSDL/05_simpleType-union.t
|
t/SOAP/WSDL/05_simpleType-union.t
|
||||||
t/SOAP/WSDL/11_helloworld.NET.t
|
t/SOAP/WSDL/11_helloworld.NET.t
|
||||||
t/SOAP/WSDL/12_binding.pl
|
t/SOAP/WSDL/12_binding.pl
|
||||||
t/SOAP/WSDL/XSD/Typelib/Builtin/001_string.t
|
t/SOAP/WSDL/Transport/01_Test.t
|
||||||
t/SOAP/WSDL/XSD/Typelib/Builtin/002_dateTime.t
|
t/SOAP/WSDL/Transport/acceptance/test2.xml
|
||||||
t/SOAP/WSDL/XSD/Typelib/Builtin/002_time.t
|
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/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.pl
|
||||||
TODO
|
TODO
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: SOAP-WSDL
|
name: SOAP-WSDL
|
||||||
version: 2.00_11
|
version: 2.00_15
|
||||||
author:
|
author:
|
||||||
abstract: SOAP with WSDL support
|
abstract: SOAP with WSDL support
|
||||||
license: artistic
|
license: artistic
|
||||||
@@ -23,23 +23,32 @@ meta-spec:
|
|||||||
provides:
|
provides:
|
||||||
SOAP::WSDL:
|
SOAP::WSDL:
|
||||||
file: lib/SOAP/WSDL.pm
|
file: lib/SOAP/WSDL.pm
|
||||||
version: 2.00_10
|
version: 2.00_13
|
||||||
SOAP::WSDL::Base:
|
SOAP::WSDL::Base:
|
||||||
file: lib/SOAP/WSDL/Base.pm
|
file: lib/SOAP/WSDL/Base.pm
|
||||||
SOAP::WSDL::Binding:
|
SOAP::WSDL::Binding:
|
||||||
file: lib/SOAP/WSDL/Binding.pm
|
file: lib/SOAP/WSDL/Binding.pm
|
||||||
SOAP::WSDL::Client:
|
SOAP::WSDL::Client:
|
||||||
file: lib/SOAP/WSDL/Client.pm
|
file: lib/SOAP/WSDL/Client.pm
|
||||||
|
version: 2.00_14
|
||||||
SOAP::WSDL::Client::Base:
|
SOAP::WSDL::Client::Base:
|
||||||
file: lib/SOAP/WSDL/Client/Base.pm
|
file: lib/SOAP/WSDL/Client/Base.pm
|
||||||
SOAP::WSDL::Definitions:
|
SOAP::WSDL::Definitions:
|
||||||
file: lib/SOAP/WSDL/Definitions.pm
|
file: lib/SOAP/WSDL/Definitions.pm
|
||||||
|
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::MessageParser:
|
SOAP::WSDL::Expat::MessageParser:
|
||||||
file: lib/SOAP/WSDL/Expat/MessageParser.pm
|
file: lib/SOAP/WSDL/Expat/MessageParser.pm
|
||||||
SOAP::WSDL::Expat::MessageStreamParser:
|
SOAP::WSDL::Expat::MessageStreamParser:
|
||||||
file: lib/SOAP/WSDL/Expat/MessageStreamParser.pm
|
file: lib/SOAP/WSDL/Expat/MessageStreamParser.pm
|
||||||
SOAP::WSDL::Expat::MessageSubParser:
|
SOAP::WSDL::Expat::MessageSubParser:
|
||||||
file: lib/SOAP/WSDL/Expat/MessageSubParser.pm
|
file: lib/SOAP/WSDL/Expat/MessageSubParser.pm
|
||||||
|
SOAP::WSDL::Factory::Deserializer:
|
||||||
|
file: lib/SOAP/WSDL/Factory/Deserializer.pm
|
||||||
SOAP::WSDL::Factory::Serializer:
|
SOAP::WSDL::Factory::Serializer:
|
||||||
file: lib/SOAP/WSDL/Factory/Serializer.pm
|
file: lib/SOAP/WSDL/Factory/Serializer.pm
|
||||||
SOAP::WSDL::Factory::Transport:
|
SOAP::WSDL::Factory::Transport:
|
||||||
@@ -62,12 +71,16 @@ provides:
|
|||||||
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
||||||
SOAP::WSDL::Serializer::SOAP11:
|
SOAP::WSDL::Serializer::SOAP11:
|
||||||
file: lib/SOAP/WSDL/Serializer/SOAP11.pm
|
file: lib/SOAP/WSDL/Serializer/SOAP11.pm
|
||||||
|
version: 2.00_13
|
||||||
SOAP::WSDL::Service:
|
SOAP::WSDL::Service:
|
||||||
file: lib/SOAP/WSDL/Service.pm
|
file: lib/SOAP/WSDL/Service.pm
|
||||||
SOAP::WSDL::SoapOperation:
|
SOAP::WSDL::SoapOperation:
|
||||||
file: lib/SOAP/WSDL/SoapOperation.pm
|
file: lib/SOAP/WSDL/SoapOperation.pm
|
||||||
SOAP::WSDL::Transport::HTTP:
|
SOAP::WSDL::Transport::HTTP:
|
||||||
file: lib/SOAP/WSDL/Transport/HTTP.pm
|
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:
|
SOAP::WSDL::TypeLookup:
|
||||||
file: lib/SOAP/WSDL/TypeLookup.pm
|
file: lib/SOAP/WSDL/TypeLookup.pm
|
||||||
SOAP::WSDL::Types:
|
SOAP::WSDL::Types:
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ TODO list for SOAP::WSDL
|
|||||||
|
|
||||||
* Implement a interface similar to SOAP::Schema (#1783639)
|
* Implement a interface similar to SOAP::Schema (#1783639)
|
||||||
|
|
||||||
* (#1785195) Support deserializer plugins
|
|
||||||
* Support XML::Compiled as one serializer/deserializer
|
|
||||||
|
|
||||||
* Check & probably fix simpleType support.
|
* Check & probably fix simpleType support.
|
||||||
The WS at http://www.webservicex.net/genericbarcode.asmx?wsdl should
|
The WS at http://www.webservicex.net/genericbarcode.asmx?wsdl should
|
||||||
make up a good example for simpleType definitions.
|
make up a good example for simpleType definitions.
|
||||||
@@ -29,7 +26,11 @@ Maybe even allow unlimited depth? What does the specs say?
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
|
|
||||||
Past 2.1 release
|
2.2 release
|
||||||
--------
|
--------
|
||||||
* XML schema support ("minimal conformant") (#1764845)
|
* XML schema support ("minimal conformant") (#1764845)
|
||||||
* Support SOAP attachments
|
* Support SOAP attachments
|
||||||
|
|
||||||
|
3.0 release
|
||||||
|
--------
|
||||||
|
We're not thinking that far ahead right now.
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use lib '../t/lib';
|
||||||
|
use SOAP::WSDL::SAX::MessageHandler;
|
||||||
|
|
||||||
|
use Benchmark;
|
||||||
|
use SOAP::WSDL::Expat::MessageParser;
|
||||||
|
use XML::Simple;
|
||||||
|
use XML::LibXML;
|
||||||
|
use MyComplexType;
|
||||||
|
use MyElement;
|
||||||
|
use MySimpleType;
|
||||||
|
|
||||||
|
my $xml = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||||
|
<SOAP-ENV:Body><MyAtomicComplexTypeElement xmlns="urn:Test" >
|
||||||
|
<test>Test</test>
|
||||||
|
<test2 >Test2</test2>
|
||||||
|
</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
||||||
|
|
||||||
|
|
||||||
|
my $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||||
|
class_resolver => 'FakeResolver'
|
||||||
|
});
|
||||||
|
|
||||||
|
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
|
||||||
|
|
||||||
|
my $libxml = XML::LibXML->new();
|
||||||
|
|
||||||
|
timethese 1000,
|
||||||
|
{
|
||||||
|
'SOAP::WSDL' => sub { $parser->parse( $xml ) },
|
||||||
|
#'XML::Simple (Hash)' => sub { XMLin $xml },
|
||||||
|
'XML::LibXML (DOM)' => sub { my $dom = $libxml->parse_string( $xml ) },
|
||||||
|
};
|
||||||
|
|
||||||
|
use Test::More tests => 1;
|
||||||
|
is $parser->get_data(), q{<MyAtomicComplexTypeElement xmlns="urn:Test" >}
|
||||||
|
. q{<test >Test</test><test2 >Test2</test2></MyAtomicComplexTypeElement>}
|
||||||
|
, 'Content comparison';
|
||||||
|
|
||||||
|
$parser->class_resolver( 'FakeResolver2' );
|
||||||
|
|
||||||
|
|
||||||
|
# data classes reside in t/lib/Typelib/
|
||||||
|
BEGIN {
|
||||||
|
package FakeResolver;
|
||||||
|
{
|
||||||
|
my %class_list = (
|
||||||
|
'MyAtomicComplexTypeElement' => 'MyAtomicComplexTypeElement',
|
||||||
|
'MyAtomicComplexTypeElement/test' => 'MyTestElement',
|
||||||
|
'MyAtomicComplexTypeElement/test2' => 'MyTestElement2',
|
||||||
|
);
|
||||||
|
|
||||||
|
sub get_map { return \%class_list };
|
||||||
|
|
||||||
|
sub new { return bless {}, 'FakeResolver' };
|
||||||
|
|
||||||
|
sub get_class {
|
||||||
|
my $name = join('/', @{ $_[1] });
|
||||||
|
return ($class_list{ $name }) ? $class_list{ $name }
|
||||||
|
: warn "no class found for $name";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Benchmark;
|
||||||
|
use lib '../../lib';
|
||||||
|
use SOAP::WSDL::XSD::Typelib::Builtin::anyType;
|
||||||
|
|
||||||
|
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::anyType->new();
|
||||||
|
|
||||||
|
timethese 10000, {
|
||||||
|
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anyType->new() },
|
||||||
|
'new with params' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anyType->new({
|
||||||
|
xmlns => 'urn:Test'
|
||||||
|
}) },
|
||||||
|
'set_FOO' => sub { $obj->set_xmlns('Test') },
|
||||||
|
};
|
||||||
|
|
||||||
|
my $data;
|
||||||
|
timethese 1000000, {
|
||||||
|
'set_FOO' => sub { $obj->set_xmlns('Test') },
|
||||||
|
'get_FOO' => sub { $data = $obj->get_xmlns() },
|
||||||
|
};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Benchmark;
|
||||||
|
use lib '../../lib';
|
||||||
|
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
||||||
|
|
||||||
|
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new();
|
||||||
|
|
||||||
|
timethese 10000, {
|
||||||
|
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new() },
|
||||||
|
'new + params' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({
|
||||||
|
xmlns => 'urn:Test',
|
||||||
|
value => 'Teststring'
|
||||||
|
}) },
|
||||||
|
'set_FOO' => sub { $obj->set_xmlns('Test') },
|
||||||
|
};
|
||||||
|
|
||||||
|
my $data;
|
||||||
|
timethese 1000000, {
|
||||||
|
'set_FOO' => sub { $obj->set_xmlns('Test') },
|
||||||
|
'get_FOO' => sub { $data = $obj->get_xmlns() },
|
||||||
|
};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Benchmark;
|
||||||
|
use lib '../../lib';
|
||||||
|
use SOAP::WSDL::XSD::Typelib::Builtin::string;
|
||||||
|
|
||||||
|
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::string->new();
|
||||||
|
|
||||||
|
timethese 10000, {
|
||||||
|
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::string->new() },
|
||||||
|
'new + params' => sub { SOAP::WSDL::XSD::Typelib::Builtin::string->new({
|
||||||
|
xmlns => 'urn:Test',
|
||||||
|
value => 'Teststring'
|
||||||
|
}) },
|
||||||
|
'set_FOO' => sub { $obj->set_xmlns('Test') },
|
||||||
|
};
|
||||||
|
|
||||||
|
my $data;
|
||||||
|
timethese 1000000, {
|
||||||
|
'set_FOO' => sub { $obj->set_xmlns('Test') },
|
||||||
|
'get_FOO' => sub { $data = $obj->get_xmlns() },
|
||||||
|
};
|
||||||
+15
-11
@@ -11,29 +11,33 @@
|
|||||||
|
|
||||||
use lib 'lib/';
|
use lib 'lib/';
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use SOAP::WSDL;
|
|
||||||
use File::Basename qw(dirname);
|
use File::Basename qw(dirname);
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
my $path = File::Spec->rel2abs( dirname __FILE__);
|
my $path = File::Spec->rel2abs( dirname __FILE__);
|
||||||
|
|
||||||
|
# SOAP::WSDL variant
|
||||||
|
use SOAP::WSDL;
|
||||||
my $soap = SOAP::WSDL->new();
|
my $soap = SOAP::WSDL->new();
|
||||||
my $som = $soap->wsdl("file:///$path/wsdl/globalweather.xml")
|
my $som = $soap->wsdl("file:///$path/wsdl/globalweather.xml")
|
||||||
->call('GetWeather', GetWeather => { CountryName => 'Germany', CityName => 'Munich' });
|
->call('GetWeather', GetWeather =>
|
||||||
|
{ CountryName => 'Germany', CityName => 'Munich' }
|
||||||
die $som->message() if $som->fault();
|
);
|
||||||
|
|
||||||
|
die "Error" if $som->fault();
|
||||||
print $som->result();
|
print $som->result();
|
||||||
|
|
||||||
|
|
||||||
# SOAP::Lite variant:
|
# SOAP::Lite variant:
|
||||||
|
# Note that you have to look both the proxy and the xmlns attribute
|
||||||
|
# set on the GetWeather SOAP::Data object from the WSDL.
|
||||||
|
|
||||||
use SOAP::Lite;
|
use SOAP::Lite; # +trace;
|
||||||
my $soap = SOAP::Lite->new()->on_action( sub { join'/', @_ } )
|
$soap = SOAP::Lite->new()->on_action( sub { join'/', @_ } )
|
||||||
->proxy("http://www.webservicex.net/globalweather.asmx");
|
->proxy("http://www.webservicex.net/globalweather.asmx"); # from WSDL
|
||||||
my $som = $soap->call(
|
$som = $soap->call(
|
||||||
SOAP::Data->name('GetWeather')->attr({ xmlns => 'http://www.webserviceX.NET' }),
|
SOAP::Data->name('GetWeather')
|
||||||
|
->attr({ xmlns => 'http://www.webserviceX.NET' }), # from WSDL
|
||||||
SOAP::Data->name('CountryName')->value('Germany'),
|
SOAP::Data->name('CountryName')->value('Germany'),
|
||||||
SOAP::Data->name('CityName')->value('Munich')
|
SOAP::Data->name('CityName')->value('Munich')
|
||||||
);
|
);
|
||||||
|
die "Error" if $som->fault();
|
||||||
print $som->result();
|
print $som->result();
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
# Accessing the globalweather service at
|
|
||||||
# www.webservicex.net/GlobalWeather/GlobalWeather.asmx
|
|
||||||
#
|
|
||||||
# Note that the GlobalWeather web service returns a (quoted) XML structure -
|
|
||||||
# don't be surprised by the response's format.
|
|
||||||
#
|
|
||||||
# I have no connection to www.webservicex.net
|
|
||||||
# Use this script at your own risk.
|
|
||||||
#
|
|
||||||
# This script demonstrates the use of SOAP::WSDL in SOAP::Lite style.
|
|
||||||
=for later
|
|
||||||
use lib 'lib/';
|
|
||||||
use lib '../lib';
|
|
||||||
use SOAP::WSDL;
|
|
||||||
use File::Basename qw(dirname);
|
|
||||||
use File::Spec;
|
|
||||||
my $path = File::Spec->rel2abs( dirname __FILE__);
|
|
||||||
|
|
||||||
my $soap = SOAP::WSDL->new();
|
|
||||||
my $som = $soap->wsdl("file:///$path/wsdl/globalweather.xml")->no_dispatch(1)
|
|
||||||
->call('GetWeather', GetWeather => { CountryName => 'Germany', CityName => 'Munich' });
|
|
||||||
|
|
||||||
print $som;
|
|
||||||
|
|
||||||
=for later use
|
|
||||||
|
|
||||||
die $som->message() if $som->fault();
|
|
||||||
|
|
||||||
print $som->result();
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
use Carp;
|
|
||||||
use diagnostics;
|
|
||||||
|
|
||||||
use XML::Compile::WSDL;
|
|
||||||
my $schema = XML::Compile::WSDL->new('wsdl/globalweather.xml',
|
|
||||||
schema_dirs => 'D:/Test/XMLC/'
|
|
||||||
);
|
|
||||||
|
|
||||||
my $operation = $schema->prepare('GetWeather', role => 'CLIENT', port => 'GlobalWeatherSoap');
|
|
||||||
use Data::Dumper;
|
|
||||||
print Dumper $operation;
|
|
||||||
+67
-29
@@ -5,20 +5,19 @@ use vars qw($AUTOLOAD);
|
|||||||
use Carp;
|
use Carp;
|
||||||
use Scalar::Util qw(blessed);
|
use Scalar::Util qw(blessed);
|
||||||
use SOAP::WSDL::Client;
|
use SOAP::WSDL::Client;
|
||||||
use SOAP::WSDL::Envelope;
|
use SOAP::WSDL::Expat::WSDLParser;
|
||||||
use SOAP::WSDL::SAX::WSDLHandler;
|
|
||||||
use Class::Std;
|
use Class::Std;
|
||||||
use XML::LibXML;
|
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
||||||
use LWP::UserAgent;
|
use LWP::UserAgent;
|
||||||
|
|
||||||
our $VERSION='2.00_10';
|
our $VERSION='2.00_13';
|
||||||
|
|
||||||
my %no_dispatch_of :ATTR(:name<no_dispatch>);
|
my %no_dispatch_of :ATTR(:name<no_dispatch>);
|
||||||
my %wsdl_of :ATTR(:name<wsdl>);
|
my %wsdl_of :ATTR(:name<wsdl>);
|
||||||
my %proxy_of :ATTR(:name<proxy>);
|
my %proxy_of :ATTR(:name<proxy>);
|
||||||
my %readable_of :ATTR(:name<readable>);
|
my %readable_of :ATTR(:name<readable>);
|
||||||
my %autotype_of :ATTR(:name<autotype>);
|
my %autotype_of :ATTR(:name<autotype>);
|
||||||
my %outputxml_of :ATTR(:name<outputxml>);
|
my %outputxml_of :ATTR(:name<outputxml> :default<0>);
|
||||||
my %outputtree_of :ATTR(:name<outputtree>);
|
my %outputtree_of :ATTR(:name<outputtree>);
|
||||||
my %outputhash_of :ATTR(:name<outputhash>);
|
my %outputhash_of :ATTR(:name<outputhash>);
|
||||||
my %servicename_of :ATTR(:name<servicename>);
|
my %servicename_of :ATTR(:name<servicename>);
|
||||||
@@ -98,13 +97,11 @@ sub wsdlinit {
|
|||||||
croak $response->message() if ($response->code != 200);
|
croak $response->message() if ($response->code != 200);
|
||||||
|
|
||||||
# TODO: Port parser to expat and remove XML::LibXML dependency
|
# TODO: Port parser to expat and remove XML::LibXML dependency
|
||||||
my $parser = XML::LibXML->new();
|
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||||
my $filter = SOAP::WSDL::SAX::WSDLHandler->new();
|
|
||||||
$parser->set_handler( $filter );
|
|
||||||
$parser->parse_string( $response->content() );
|
$parser->parse_string( $response->content() );
|
||||||
|
|
||||||
# sanity checks
|
# sanity checks
|
||||||
my $wsdl_definitions = $filter->get_data() or die "unable to parse WSDL";
|
my $wsdl_definitions = $parser->get_data() or die "unable to parse WSDL";
|
||||||
my $types = $wsdl_definitions->first_types()
|
my $types = $wsdl_definitions->first_types()
|
||||||
or die "unable to extract schema from WSDL";
|
or die "unable to extract schema from WSDL";
|
||||||
my $ns = $wsdl_definitions->get_xmlns()
|
my $ns = $wsdl_definitions->get_xmlns()
|
||||||
@@ -222,10 +219,14 @@ sub _wsdl_init_methods :PRIVATE {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub call {
|
sub call {
|
||||||
my $self = shift;
|
my ($self, $method, @data_from) = @_;
|
||||||
my $ident = ident $self;
|
my $ident = ident $self;
|
||||||
my $method = shift;
|
|
||||||
my $data = ref $_[0] ? $_[0] : { @_ };
|
my ($data, $header) = ref $data_from[0]
|
||||||
|
? ($data_from[0], $data_from[1] )
|
||||||
|
: (@data_from>1)
|
||||||
|
? ( { @data_from }, undef )
|
||||||
|
: ( $data_from[0], undef );
|
||||||
|
|
||||||
$self->wsdlinit() if not ($definitions_of{ $ident });
|
$self->wsdlinit() if not ($definitions_of{ $ident });
|
||||||
$self->_wsdl_init_methods() if not ($method_info_of{ $ident });
|
$self->_wsdl_init_methods() if not ($method_info_of{ $ident });
|
||||||
@@ -233,34 +234,54 @@ sub call {
|
|||||||
my $client = $client_of{ $ident };
|
my $client = $client_of{ $ident };
|
||||||
$client->set_proxy( $proxy_of{ $ident } || $port_of{ $ident }->get_location() );
|
$client->set_proxy( $proxy_of{ $ident } || $port_of{ $ident }->get_location() );
|
||||||
$client->set_no_dispatch( $no_dispatch_of{ $ident } );
|
$client->set_no_dispatch( $no_dispatch_of{ $ident } );
|
||||||
$client->set_outputxml( $outputtree_of{ $ident } ? 0 : 1 );
|
|
||||||
|
|
||||||
|
$client->set_outputxml( $outputxml_of{ $ident } ? 1 : 0 );
|
||||||
|
|
||||||
|
# maybe we should introduce something like $output{ $ident } with a fixed
|
||||||
|
# set of values - m{^(TREE|HASH|XML|SOM)$}xms ?
|
||||||
|
if ( ( ! $outputtree_of{ $ident } )
|
||||||
|
&& ( ! $outputhash_of{ $ident } )
|
||||||
|
&& ( ! $outputxml_of{ $ident } ) ) {
|
||||||
|
require SOAP::WSDL::Deserializer::SOM;
|
||||||
|
$client->set_deserializer( SOAP::WSDL::Deserializer::SOM->new() );
|
||||||
|
};
|
||||||
|
|
||||||
|
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( $method, $data )
|
? $client->call( {
|
||||||
|
operation => $method,
|
||||||
|
soap_action => $method_info->{ soap_action },
|
||||||
|
}, $data )
|
||||||
: do {
|
: do {
|
||||||
my $content = '';
|
my $content = '';
|
||||||
# TODO support RPC-encoding: Top-Level element + namespace...
|
# TODO support RPC-encoding: Top-Level element + namespace...
|
||||||
foreach my $part ( @{ $method_info_of{ $ident }->{ $method }->{ parts } } ) {
|
foreach my $part ( @{ $method_info->{ parts } } ) {
|
||||||
$client->set_on_action( sub { $part->get_targetNamespace() . '/' . $_[1] } );
|
|
||||||
$content .= $part->serialize( $method, $data,
|
$content .= $part->serialize( $method, $data,
|
||||||
{
|
{
|
||||||
%{ $serialize_options_of{ $ident } },
|
%{ $serialize_options_of{ $ident } },
|
||||||
readable => $readable_of{ $ident },
|
readable => $readable_of{ $ident },
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
$client->call($method, $content);
|
$client->call(
|
||||||
|
{
|
||||||
|
operation => $method,
|
||||||
|
soap_action => $method_info->{ soap_action }
|
||||||
|
},
|
||||||
|
# absolutely stupid, but we need a reference which
|
||||||
|
# serializes to XML on stringification...
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({
|
||||||
|
value => $content
|
||||||
|
}),
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({
|
||||||
|
value => $header
|
||||||
|
})
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return $response if (
|
return unless defined $response; # nothing to do for one-ways
|
||||||
$outputxml_of{ $ident }
|
return $response;
|
||||||
# || $outputhash_of{ $ident }
|
|
||||||
|| $outputtree_of{ $ident }
|
|
||||||
|| $no_dispatch_of{ $ident } );
|
|
||||||
|
|
||||||
return unless $response; # nothing to do for one-ways
|
|
||||||
# now convert into SOAP::SOM - bah !
|
|
||||||
require SOAP::Lite;
|
|
||||||
return SOAP::Deserializer->new()->deserialize( $response );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub explain {
|
sub explain {
|
||||||
@@ -318,8 +339,25 @@ Performs a SOAP call. The result is either an object tree (with outputtree),
|
|||||||
a hash reference (with outputhash), plain XML (with outputxml) or a SOAP::SOM
|
a hash reference (with outputhash), plain XML (with outputxml) or a SOAP::SOM
|
||||||
object (with neither of the above set).
|
object (with neither of the above set).
|
||||||
|
|
||||||
|
call() can be called in different ways:
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item * Old-style idiom
|
||||||
|
|
||||||
my $result = $soap->call('method', %data);
|
my $result = $soap->call('method', %data);
|
||||||
|
|
||||||
|
Does not support SOAP header data.
|
||||||
|
|
||||||
|
=item * New-style idiom
|
||||||
|
|
||||||
|
my $result = $soap->call('method', $body_ref, $header_ref );
|
||||||
|
|
||||||
|
Does support SOAP header data. $body_ref and $header ref may either be
|
||||||
|
hash refs or SOAP::WSDL::XSD::Typelib::* derived objects.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
=head2 wsdlinit
|
=head2 wsdlinit
|
||||||
|
|
||||||
Reads the WSDL file and initializes SOAP::WSDL for working with it.
|
Reads the WSDL file and initializes SOAP::WSDL for working with it.
|
||||||
@@ -662,9 +700,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 176 $
|
$Rev: 218 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: WSDL.pm 176 2007-08-31 15:28:29Z kutterma $
|
$Id: WSDL.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.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
+62
-68
@@ -8,10 +8,12 @@ use LWP::UserAgent;
|
|||||||
use HTTP::Request;
|
use HTTP::Request;
|
||||||
use Scalar::Util qw(blessed);
|
use Scalar::Util qw(blessed);
|
||||||
|
|
||||||
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
use SOAP::WSDL::Factory::Serializer;
|
use SOAP::WSDL::Factory::Serializer;
|
||||||
use SOAP::WSDL::Factory::Transport;
|
use SOAP::WSDL::Factory::Transport;
|
||||||
use SOAP::WSDL::Expat::MessageParser;
|
use SOAP::WSDL::Expat::MessageParser;
|
||||||
use SOAP::WSDL::SOAP::Typelib::Fault11;
|
|
||||||
|
our $VERSION = '2.00_14';
|
||||||
|
|
||||||
# Package global for speed and memory savings.
|
# Package global for speed and memory savings.
|
||||||
# But should be factored out into serializer/deserializer...
|
# But should be factored out into serializer/deserializer...
|
||||||
@@ -25,11 +27,11 @@ my %endpoint_of :ATTR(:name<endpoint> :default<()>);
|
|||||||
|
|
||||||
my %soap_version_of :ATTR(:get<soap_version> :init_attr<soap_version> :default<'1.1'>);
|
my %soap_version_of :ATTR(:get<soap_version> :init_attr<soap_version> :default<'1.1'>);
|
||||||
|
|
||||||
my %fault_class_of :ATTR(:name<fault_class> :default<SOAP::WSDL::SOAP::Typelib::Fault11>);
|
|
||||||
my %trace_of :ATTR(:set<trace> :init_arg<trace> :default<()> );
|
my %trace_of :ATTR(:set<trace> :init_arg<trace> :default<()> );
|
||||||
my %on_action_of :ATTR(:name<on_action> :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 %content_type_of :ATTR(:name<content_type> :default<text/xml; charset=utf8>); #/#trick editors
|
||||||
my %serializer_of :ATTR(:name<serializer> :default<()>);
|
my %serializer_of :ATTR(:name<serializer> :default<()>);
|
||||||
|
my %deserializer_of :ATTR(:name<deserializer> :default<()>);
|
||||||
|
|
||||||
# TODO remove when preparing 2.01
|
# TODO remove when preparing 2.01
|
||||||
sub outputtree { warn 'outputtree is deprecated and'
|
sub outputtree { warn 'outputtree is deprecated and'
|
||||||
@@ -87,6 +89,9 @@ sub set_soap_version {
|
|||||||
# re-setting the soap version invalidates the
|
# re-setting the soap version invalidates the
|
||||||
# serializer object
|
# serializer object
|
||||||
delete $serializer_of{ $ident };
|
delete $serializer_of{ $ident };
|
||||||
|
delete $deserializer_of{ $ident };
|
||||||
|
delete $transport_of{ $ident };
|
||||||
|
|
||||||
$soap_version_of{ $ident } = shift;
|
$soap_version_of{ $ident } = shift;
|
||||||
|
|
||||||
return $soap_version;
|
return $soap_version;
|
||||||
@@ -108,32 +113,30 @@ SUBFACTORY: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN {
|
|
||||||
$PARSER = SOAP::WSDL::Expat::MessageParser->new();
|
|
||||||
}
|
|
||||||
|
|
||||||
sub call {
|
sub call {
|
||||||
my $self = shift;
|
my ($self, $method, @data_from) = @_;
|
||||||
my $method = shift;
|
|
||||||
my $ident = ident $self;
|
my $ident = ident $self;
|
||||||
my $data = ref $_[0]
|
|
||||||
? $_[0]
|
|
||||||
: (@_>1)
|
|
||||||
? { @_ }
|
|
||||||
: $_[0];
|
|
||||||
my $header = {};
|
|
||||||
|
|
||||||
my ($soap_action, $operation);
|
# the only valid idiom for calling a method with both a header and a body
|
||||||
my $trace_sub = $self->get_trace();
|
# is
|
||||||
|
# ->call($method, $body_ref, $header_ref);
|
||||||
if (ref $method eq 'HASH') {
|
#
|
||||||
$soap_action = $method->{ soap_action };
|
# These other idioms all assume an empty header:
|
||||||
$operation = $method->{ operation }
|
# ->call($method, %body_of); # %body_of is a hash
|
||||||
}
|
# ->call($method, $body); # $body is a scalar
|
||||||
else {
|
my ($data, $header) = ref $data_from[0]
|
||||||
$operation = $method;
|
? ($data_from[0], $data_from[1] )
|
||||||
}
|
: (@data_from>1)
|
||||||
|
? ( { @data_from }, undef )
|
||||||
|
: ( $data_from[0], undef );
|
||||||
|
|
||||||
|
# get operation name and soap_action
|
||||||
|
my ($operation, $soap_action) = (ref $method eq 'HASH')
|
||||||
|
? ( $method->{ operation }, $method->{ soap_action } )
|
||||||
|
: (blessed $data
|
||||||
|
&& $data->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType'))
|
||||||
|
? ( $method , (join '/', $data->get_xmlns(), $method) )
|
||||||
|
: ( $method, q{} );
|
||||||
|
|
||||||
$serializer_of{ $ident } ||= SOAP::WSDL::Factory::Serializer->get_serializer({
|
$serializer_of{ $ident } ||= SOAP::WSDL::Factory::Serializer->get_serializer({
|
||||||
soap_version => $self->get_soap_version(),
|
soap_version => $self->get_soap_version(),
|
||||||
@@ -147,20 +150,15 @@ sub call {
|
|||||||
|
|
||||||
return $envelope if $self->no_dispatch();
|
return $envelope if $self->no_dispatch();
|
||||||
|
|
||||||
# try to guess soap_action if not given
|
|
||||||
if (not defined $soap_action) {
|
|
||||||
$soap_action = (blessed $data
|
|
||||||
&& $data->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType'))
|
|
||||||
? $soap_action = join '/', $data->get_xmlns(), $operation
|
|
||||||
: ($on_action_of{$ident})
|
|
||||||
? $soap_action = $on_action_of{$ident}->( $self, $operation )
|
|
||||||
: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
# always quote SOAPAction header.
|
# always quote SOAPAction header.
|
||||||
# WS-I BP 1.0 R1109
|
# WS-I BP 1.0 R1109
|
||||||
$soap_action =~s{\A(:?"|')?}{"}xms;
|
if ($soap_action) {
|
||||||
$soap_action =~s{(:?"|')?\Z}{"}xms;
|
$soap_action =~s{\A(:?"|')?}{"}xms;
|
||||||
|
$soap_action =~s{(:?"|')?\Z}{"}xms;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$soap_action = q{""};
|
||||||
|
}
|
||||||
|
|
||||||
# get response via transport layer.
|
# get response via transport layer.
|
||||||
# Normally, SOAP::Lite's transport layer is used, though users
|
# Normally, SOAP::Lite's transport layer is used, though users
|
||||||
@@ -177,47 +175,43 @@ sub call {
|
|||||||
# namely ExpatNB and XML::LibXML's Push parser interface...
|
# namely ExpatNB and XML::LibXML's Push parser interface...
|
||||||
);
|
);
|
||||||
|
|
||||||
return $response if ($self->outputxml() );
|
return $response if ($outputxml_of{ $ident } );
|
||||||
|
|
||||||
$PARSER->class_resolver( $self->get_class_resolver() );
|
# get deserializer
|
||||||
|
$deserializer_of{ $ident } ||= SOAP::WSDL::Factory::Deserializer->get_deserializer({
|
||||||
|
soap_version => $soap_version_of{ $ident },
|
||||||
|
});
|
||||||
|
|
||||||
|
# set class resolver if serializer supports it
|
||||||
|
$deserializer_of{ $ident }->set_class_resolver( $class_resolver_of{ $ident } )
|
||||||
|
if ( $deserializer_of{ $ident }->can('set_class_resolver') );
|
||||||
|
|
||||||
|
# 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 $@);
|
||||||
|
return $deserializer_of{ $ident }->generate_fault({
|
||||||
|
code => 'soap:Server',
|
||||||
|
role => 'urn:localhost',
|
||||||
|
message => "Error deserializing message: $@. \n"
|
||||||
|
. "Message was: \n$response"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
# if we had no success (Transport layer error status code)
|
# if we had no success (Transport layer error status code)
|
||||||
# or if transport layer failed
|
# or if transport layer failed
|
||||||
if ( ! $transport->is_success() ) {
|
if ( ! $transport->is_success() ) {
|
||||||
# Try deserializing response - there may be some
|
|
||||||
if ( $response ) {
|
|
||||||
eval { $PARSER->parse( $response ); };
|
|
||||||
return $PARSER->get_data() if (not $@);
|
|
||||||
return $fault_class_of{$ident}->new({
|
|
||||||
faultcode => 'soap:Server',
|
|
||||||
faultactor => 'urn:localhost',
|
|
||||||
faultstring => "Error deserializing message: $@. \n"
|
|
||||||
. "Message was: \n$response"
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
# generate & return fault if we cannot serialize response
|
# generate & return fault if we cannot serialize response
|
||||||
# or have none...
|
# or have none...
|
||||||
return $fault_class_of{$ident}->new({
|
return $deserializer_of{ $ident }->generate_fault({
|
||||||
faultcode => 'soap:Server',
|
code => 'soap:Server',
|
||||||
faultactor => 'urn:localhost',
|
role => 'urn:localhost',
|
||||||
faultstring => 'Error sending / receiving message: '
|
message => 'Error sending / receiving message: '
|
||||||
. $transport->message()
|
. $transport->message()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
eval { $PARSER->parse( $response ) };
|
|
||||||
|
|
||||||
# return fault if we cannot deserialize response
|
|
||||||
if ($@) {
|
|
||||||
return $fault_class_of{$ident}->new({
|
|
||||||
faultcode => 'soap:Server',
|
|
||||||
faultactor => 'urn:localhost',
|
|
||||||
faultstring => "Error deserializing message: $@. \n"
|
|
||||||
. "Message was: \n$response"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return $PARSER->get_data();
|
|
||||||
} ## end sub call
|
} ## end sub call
|
||||||
|
|
||||||
1;
|
1;
|
||||||
@@ -381,9 +375,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 176 $
|
$Rev: 239 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Client.pm 176 2007-08-31 15:28:29Z kutterma $
|
$Id: Client.pm 239 2007-09-11 09:45:42Z kutterma $
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -93,9 +93,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 176 $
|
$Rev: 214 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Base.pm 176 2007-08-31 15:28:29Z kutterma $
|
$Id: Base.pm 214 2007-09-10 15:54:52Z kutterma $
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client/Base.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client/Base.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package SOAP::WSDL::Deserializer::SOAP11;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use SOAP::WSDL::SOAP::Typelib::Fault11;
|
||||||
|
|
||||||
|
our $VERSION='2.00_13';
|
||||||
|
|
||||||
|
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
||||||
|
|
||||||
|
sub BUILD {
|
||||||
|
my ($self, $ident, $args_of_ref) = @_;
|
||||||
|
|
||||||
|
# ignore all options except 'class_resolver'
|
||||||
|
for (keys %{ $args_of_ref }) {
|
||||||
|
delete $args_of_ref->{ $_ } if $_ ne 'class_resolver';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub deserialize {
|
||||||
|
my ($self, $content) = @_;
|
||||||
|
|
||||||
|
my $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||||
|
class_resolver => $class_resolver_of{ ident $self },
|
||||||
|
});
|
||||||
|
eval { $parser->parse_string( $content ) };
|
||||||
|
if ($@) {
|
||||||
|
return $self->generate_fault({
|
||||||
|
code => 'soap:Server',
|
||||||
|
role => 'urn:localhost',
|
||||||
|
message => "Error deserializing message: $@. \n"
|
||||||
|
. "Message was: \n$content"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return $parser->get_data();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub generate_fault {
|
||||||
|
my ($self, $args_from_ref) = @_;
|
||||||
|
return SOAP::WSDL::SOAP::Typelib::Fault11->new({
|
||||||
|
faultcode => $args_from_ref->{ code } || 'soap:Client',
|
||||||
|
faultactor => $args_from_ref->{ role } || 'urn:localhost',
|
||||||
|
faultstring => $args_from_ref->{ message } || "Unknown error"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
package SOAP::WSDL::Deserializer::SOM;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
our $VERSION = '2.00_15';
|
||||||
|
our @ISA;
|
||||||
|
|
||||||
|
eval {
|
||||||
|
require SOAP::Lite;
|
||||||
|
push @ISA, 'SOAP::Deserializer';
|
||||||
|
}
|
||||||
|
or die "Cannot load SOAP::Lite.
|
||||||
|
Cannot deserialize to SOM object without SOAP::Lite.
|
||||||
|
Please install SOAP::Lite.";
|
||||||
|
|
||||||
|
sub generate_fault {
|
||||||
|
my ($self, $args_from_ref) = @_;
|
||||||
|
# code, message, detail, actor
|
||||||
|
die SOAP::Fault->new(
|
||||||
|
faultcode => $args_from_ref->{ code },
|
||||||
|
faultstring => $args_from_ref->{ message },
|
||||||
|
faultactor => $args_from_ref->{ role },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::Deserializer::SOM - Deserializer SOAP messages into SOM objects
|
||||||
|
|
||||||
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
use SOAP::WSDL;
|
||||||
|
use SOAP::WSDL::Deserializer::SOM;
|
||||||
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
|
SOAP::WSDL::Factory::Deserializer->register( '1.1', __PACKAGE__ );
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Deserializer for creating SOAP::Lite's SOM object as result of a SOAP call.
|
||||||
|
|
||||||
|
This package is here for two reasons:
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item * Compatibility
|
||||||
|
|
||||||
|
You don't have to change the rest of your SOAP::Lite based app when switching
|
||||||
|
to SOAP::WSDL, but can just use SOAP::WSDL::Deserializer::SOM to get back the
|
||||||
|
same objects as you were used to.
|
||||||
|
|
||||||
|
=item * Completeness
|
||||||
|
|
||||||
|
SOAP::Lite covers much more of the SOAP specification than SOAP::WSDL.
|
||||||
|
|
||||||
|
SOAP::WSDL::Deserializer::SOM can be used for content which cannot be
|
||||||
|
deserialized by L<SOAP::WSDL::Deserializer::SOAP11|SOAP::WSDL::Deserializer::SOAP11>.
|
||||||
|
This may be XML including mixed content, attachements and other XML data not
|
||||||
|
(yet) handled by L<SOAP::WSDL::Deserializer::SOAP11|SOAP::WSDL::Deserializer::SOAP11>.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
SOAP::WSDL::Deserializer::SOM is a subclass of L<SOAP::Deserializer|SOAP::Deserializer>
|
||||||
|
from the L<SOAP::Lite|SOAP::Lite> package.
|
||||||
|
|
||||||
|
You may
|
||||||
|
|
||||||
|
=head1 USAGE
|
||||||
|
|
||||||
|
SOAP::WSDL::Deserializer will not auroregister itself - to use it for a particular
|
||||||
|
SOAP version just use the following lines:
|
||||||
|
|
||||||
|
my $soap_version = '1.1'; # or '1.2', further versions may appear.
|
||||||
|
|
||||||
|
use SOAP::WSDL::Deserializer::SOM;
|
||||||
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
|
SOAP::WSDL::Factory::Deserializer->register( $soap_version, __PACKAGE__ );
|
||||||
|
|
||||||
|
=head1 DIFFERENCES FROM OTHER CLASSES
|
||||||
|
|
||||||
|
=head2 Differences from SOAP::Lite
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item * No on_fault handler
|
||||||
|
|
||||||
|
You cannot specify what to do when an error occurs - SOAP::WSDL will die
|
||||||
|
with a SOAP::Fault object on transport errors.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=head2 Differences from other SOAP::WSDL::Deserializer classes
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item * generate_fault
|
||||||
|
|
||||||
|
SOAP::WSDL::Deserializer::SOM will die with a SOAP::Fault object on calls
|
||||||
|
to generate_fault.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=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: 176 $
|
||||||
|
$LastChangedBy: kutterma $
|
||||||
|
$Id: Serializer.pm 176 2007-08-31 15:28:29Z kutterma $
|
||||||
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -8,7 +8,7 @@ use XML::Parser::Expat;
|
|||||||
sub new {
|
sub new {
|
||||||
my ($class, $args) = @_;
|
my ($class, $args) = @_;
|
||||||
my $self = {
|
my $self = {
|
||||||
class_resolver => $args->{ class_resolver }
|
class_resolver => $args->{ class_resolver },
|
||||||
};
|
};
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
return $self;
|
return $self;
|
||||||
@@ -20,9 +20,9 @@ sub class_resolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub _initialize {
|
sub _initialize {
|
||||||
my ($self, $parser) = @_;
|
my ($self, $parser) = @_;
|
||||||
|
|
||||||
delete $self->{ data };
|
delete $self->{ data }; # remove potential old results
|
||||||
|
|
||||||
my $characters;
|
my $characters;
|
||||||
my $current = undef;
|
my $current = undef;
|
||||||
@@ -45,6 +45,14 @@ sub _initialize {
|
|||||||
|
|
||||||
# ignore top level elements
|
# ignore top level elements
|
||||||
if (@{ $ignore } && $_localname eq $ignore->[0]) {
|
if (@{ $ignore } && $_localname eq $ignore->[0]) {
|
||||||
|
CHECK_ENVELOPE: {
|
||||||
|
last CHECK_ENVELOPE if $_localname ne 'Envelope';
|
||||||
|
last CHECK_ENVELOPE if exists $_attrs{ 'xmlns' }
|
||||||
|
&& $_attrs{ 'xmlns' } eq 'http://schemas.xmlsoap.org/soap/envelope/';
|
||||||
|
last CHECK_ENVELOPE if $_attrs{ "xmlns:$_prefix"}
|
||||||
|
eq 'http://schemas.xmlsoap.org/soap/envelope/';
|
||||||
|
die "Bad namespace for SOAP envelope: " . $parser->recognized_string();
|
||||||
|
}
|
||||||
shift @{ $ignore };
|
shift @{ $ignore };
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -55,7 +63,7 @@ sub _initialize {
|
|||||||
# resolve class of this element
|
# resolve class of this element
|
||||||
$_class = $self->{ class_resolver }->get_class( $path )
|
$_class = $self->{ class_resolver }->get_class( $path )
|
||||||
or die "Cannot resolve class for "
|
or die "Cannot resolve class for "
|
||||||
. join('/', @{ $path }) . " via $self->{ class_resolver }";
|
. join('/', @{ $path }) . " via " . $self->{ class_resolver };
|
||||||
|
|
||||||
# maybe write as "return $skip = join ... if (...)" ?
|
# maybe write as "return $skip = join ... if (...)" ?
|
||||||
# would save a BLOCK...
|
# would save a BLOCK...
|
||||||
@@ -71,13 +79,15 @@ sub _initialize {
|
|||||||
# if $class matches...
|
# if $class matches...
|
||||||
|
|
||||||
if (index $_class, 'SOAP::WSDL::XSD::Typelib::Builtin', 0 < 0) {
|
if (index $_class, 'SOAP::WSDL::XSD::Typelib::Builtin', 0 < 0) {
|
||||||
# check wheter there is a CODE reference for $class::new.
|
# 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
|
# If not, require it - all classes required here MUST
|
||||||
# define new()
|
# define new()
|
||||||
# This is the same as $class->can('new'), but it's way faster
|
# This is not exactly the same as $class->can('new'), but it's way faster
|
||||||
*{ "$_class\::new" }{ CODE }
|
defined *{ "$_class\::new" }{ CODE }
|
||||||
|
or scalar @{ *{ "$_class\::ISA" }{ ARRAY } }
|
||||||
or eval "require $_class" ## no critic qw(ProhibitStringyEval)
|
or eval "require $_class" ## no critic qw(ProhibitStringyEval)
|
||||||
or die $@;
|
or die $@;
|
||||||
}
|
}
|
||||||
|
|
||||||
$current = $_class->new({ %_attrs }); # set new current object
|
$current = $_class->new({ %_attrs }); # set new current object
|
||||||
@@ -208,8 +218,8 @@ This module may be used under the same terms as perl itself.
|
|||||||
|
|
||||||
$ID: $
|
$ID: $
|
||||||
|
|
||||||
$LastChangedDate: 2007-08-31 17:28:29 +0200 (Fr, 31 Aug 2007) $
|
$LastChangedDate: 2007-09-10 18:19:23 +0200 (Mo, 10 Sep 2007) $
|
||||||
$LastChangedRevision: 176 $
|
$LastChangedRevision: 218 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
|
|
||||||
$HeadURL: https://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 $
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ This module may be used under the same terms as perl itself.
|
|||||||
|
|
||||||
$ID: $
|
$ID: $
|
||||||
|
|
||||||
$LastChangedDate: 2007-08-31 17:28:29 +0200 (Fr, 31 Aug 2007) $
|
$LastChangedDate: 2007-09-10 17:54:52 +0200 (Mo, 10 Sep 2007) $
|
||||||
$LastChangedRevision: 176 $
|
$LastChangedRevision: 214 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
|
|
||||||
$HeadURL: https://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 $
|
||||||
|
|||||||
@@ -204,8 +204,8 @@ This module may be used under the same terms as perl itself.
|
|||||||
|
|
||||||
$ID: $
|
$ID: $
|
||||||
|
|
||||||
$LastChangedDate: 2007-08-31 17:28:29 +0200 (Fr, 31 Aug 2007) $
|
$LastChangedDate: 2007-09-10 17:54:52 +0200 (Mo, 10 Sep 2007) $
|
||||||
$LastChangedRevision: 176 $
|
$LastChangedRevision: 214 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
|
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageSubParser.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageSubParser.pm $
|
||||||
|
|||||||
@@ -210,8 +210,8 @@ This module may be used under the same terms as perl itself.
|
|||||||
|
|
||||||
$ID: $
|
$ID: $
|
||||||
|
|
||||||
$LastChangedDate: 2007-08-31 17:28:29 +0200 (Fr, 31 Aug 2007) $
|
$LastChangedDate: 2007-09-10 17:54:52 +0200 (Mo, 10 Sep 2007) $
|
||||||
$LastChangedRevision: 176 $
|
$LastChangedRevision: 214 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
|
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/SubParser.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/SubParser.pm $
|
||||||
|
|||||||
@@ -0,0 +1,152 @@
|
|||||||
|
package SOAP::WSDL::Factory::Deserializer;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my %DESERIALIZER = (
|
||||||
|
'1.1' => 'SOAP::WSDL::Deserializer::SOAP11',
|
||||||
|
);
|
||||||
|
|
||||||
|
# class method
|
||||||
|
sub register {
|
||||||
|
my ($class, $ref_type, $package) = @_;
|
||||||
|
$DESERIALIZER{ $ref_type } = $package;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub get_deserializer {
|
||||||
|
my ($self, $args_of_ref) = @_;
|
||||||
|
|
||||||
|
# sanity check
|
||||||
|
die "no deserializer registered for SOAP version $args_of_ref->{ soap_version }"
|
||||||
|
if not exists ($DESERIALIZER{ $args_of_ref->{ soap_version } });
|
||||||
|
|
||||||
|
# load module
|
||||||
|
eval "require $DESERIALIZER{ $args_of_ref->{ soap_version } }"
|
||||||
|
or die "Cannot load serializer $DESERIALIZER{ $args_of_ref->{ soap_version } }", $@;
|
||||||
|
|
||||||
|
return $DESERIALIZER{ $args_of_ref->{ soap_version } }->new($args_of_ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::Factory::Deserializer - Factory for retrieving Deserializer objects
|
||||||
|
|
||||||
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
# from SOAP::WSDL::Client:
|
||||||
|
$deserializer = SOAP::WSDL::Factory::Deserializer->get_deserializer({
|
||||||
|
soap_version => $soap_version,
|
||||||
|
class_resolver => $class_resolver,
|
||||||
|
});
|
||||||
|
|
||||||
|
# in deserializer class:
|
||||||
|
package MyWickedDeserializer;
|
||||||
|
use SOAP::WSDL::Factory::Deserializer;
|
||||||
|
|
||||||
|
# register class as deserializer for SOAP1.2 messages
|
||||||
|
SOAP::WSDL::Factory::Deserializer->register( '1.2' , __PACKAGE__ );
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
SOAP::WSDL::Factory::Deserializer serves as factory for retrieving
|
||||||
|
deserializer objects for SOAP::WSDL.
|
||||||
|
|
||||||
|
The actual work is done by specific deserializer classes.
|
||||||
|
|
||||||
|
SOAP::WSDL::Deserializer tries to load one of the following classes:
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item * The class registered for the scheme via register()
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
By default, L<SOAP::WSDL::Deserializer::SOAP11|SOAP::WSDL::Deserializer::SOAP11>
|
||||||
|
is registered for SOAP1.1 messages.
|
||||||
|
|
||||||
|
=head1 METHODS
|
||||||
|
|
||||||
|
=head2 register
|
||||||
|
|
||||||
|
SOAP::WSDL::Deserializer->register('1.1', 'MyWickedDeserializer');
|
||||||
|
|
||||||
|
Globally registers a class for use as deserializer class.
|
||||||
|
|
||||||
|
=head2 get_deserializer
|
||||||
|
|
||||||
|
Returns an object of the deserializer class for this endpoint.
|
||||||
|
|
||||||
|
=head1 WRITING YOUR OWN DESERIALIZER CLASS
|
||||||
|
|
||||||
|
Deserializer classes may register with SOAP::WSDL::Factory::Deserializer.
|
||||||
|
|
||||||
|
=head2 Registering a deserializer
|
||||||
|
|
||||||
|
Registering a deserializer class with SOAP::WSDL::Factory::Deserializer
|
||||||
|
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::Deserializer->register( $version, $class);
|
||||||
|
|
||||||
|
To auto-register your transport class on loading, execute register()
|
||||||
|
in your tranport class (see L<SYNOPSIS|SYNOPSIS> above).
|
||||||
|
|
||||||
|
=head2 Deserializer package layout
|
||||||
|
|
||||||
|
Deserializer modules must be named equal to the deserializer class they
|
||||||
|
contain. There can only be one deserializer class per deserializer module.
|
||||||
|
|
||||||
|
=head2 Methods to implement
|
||||||
|
|
||||||
|
Deserializer classes must implement the following methods:
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item * new
|
||||||
|
|
||||||
|
Constructor.
|
||||||
|
|
||||||
|
=item * deserialize
|
||||||
|
|
||||||
|
Deserialize data from XML to arbitrary formats.
|
||||||
|
|
||||||
|
deserialize() must return a fault indicating that deserializing failed if
|
||||||
|
any error is encountered during the process of deserializing the XML message.
|
||||||
|
|
||||||
|
The following positional parameters are passed to the deserialize method:
|
||||||
|
|
||||||
|
$content - the xml message
|
||||||
|
|
||||||
|
=item * generate_fault
|
||||||
|
|
||||||
|
Generate a fault in the supported format. The following named parameters are
|
||||||
|
passed as a single hash ref:
|
||||||
|
|
||||||
|
code - The fault code, e.g. 'soap:Server' or the like
|
||||||
|
role - The fault role (actor in SOAP1.1)
|
||||||
|
message - The fault message (faultstring in SOAP1.1)
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=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: 176 $
|
||||||
|
$LastChangedBy: kutterma $
|
||||||
|
$Id: Serializer.pm 176 2007-08-31 15:28:29Z kutterma $
|
||||||
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -14,7 +14,15 @@ sub register {
|
|||||||
|
|
||||||
sub get_serializer {
|
sub get_serializer {
|
||||||
my ($self, $args_of_ref) = @_;
|
my ($self, $args_of_ref) = @_;
|
||||||
eval "require $SERIALIZER{ $args_of_ref->{ soap_version } }" or die $@;
|
|
||||||
|
# sanity check
|
||||||
|
die "no deserializer registered for SOAP version $args_of_ref->{ soap_version }"
|
||||||
|
if not exists ($SERIALIZER{ $args_of_ref->{ soap_version } });
|
||||||
|
|
||||||
|
# load module
|
||||||
|
eval "require $SERIALIZER{ $args_of_ref->{ soap_version } }"
|
||||||
|
or die "Cannot load serializer $SERIALIZER{ $args_of_ref->{ soap_version } }", $@;
|
||||||
|
|
||||||
return $SERIALIZER{ $args_of_ref->{ soap_version } }->new();
|
return $SERIALIZER{ $args_of_ref->{ soap_version } }->new();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,7 +32,7 @@ sub get_serializer {
|
|||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
SOAP::WSDL::Factory::Serializer - factory for retrieving serializer objects
|
SOAP::WSDL::Factory::Serializer - Factory for retrieving serializer objects
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
@@ -37,7 +45,7 @@ SOAP::WSDL::Factory::Serializer - factory for retrieving serializer objects
|
|||||||
package MyWickedSerializer;
|
package MyWickedSerializer;
|
||||||
use SOAP::WSDL::Factory::Serializer;
|
use SOAP::WSDL::Factory::Serializer;
|
||||||
|
|
||||||
# u don't know the SOAP 1.2 recommendation? poor boy...
|
# register as serializer for SOAP1.2 messages
|
||||||
SOAP::WSDL::Factory::Serializer->register( '1.2' , __PACKAGE__ );
|
SOAP::WSDL::Factory::Serializer->register( '1.2' , __PACKAGE__ );
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
@@ -49,7 +57,11 @@ The actual work is done by specific serializer classes.
|
|||||||
|
|
||||||
SOAP::WSDL::Serializer tries to load one of the following classes:
|
SOAP::WSDL::Serializer tries to load one of the following classes:
|
||||||
|
|
||||||
a) the class registered for the scheme via register()
|
=over
|
||||||
|
|
||||||
|
=item * the class registered for the scheme via register()
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
=head1 METHODS
|
=head1 METHODS
|
||||||
|
|
||||||
@@ -65,28 +77,32 @@ Returns an object of the serializer class for this endpoint.
|
|||||||
|
|
||||||
=head1 WRITING YOUR OWN SERIALIZER CLASS
|
=head1 WRITING YOUR OWN SERIALIZER CLASS
|
||||||
|
|
||||||
|
=head2 Registering a deserializer
|
||||||
|
|
||||||
Serializer classes may register with SOAP::WSDL::Factory::Serializer.
|
Serializer classes may register with SOAP::WSDL::Factory::Serializer.
|
||||||
|
|
||||||
Serializer objects may also be passed directly to SOAP::WSDL::Client
|
Serializer objects may also be passed directly to SOAP::WSDL::Client by
|
||||||
by using the set_serializer method. Note that serializers objects set
|
using the set_serializer method. Note that serializers objects set via
|
||||||
via SOAP::WSDL::Client's set_serializer method are discarded when the
|
SOAP::WSDL::Client's set_serializer method are discarded when the SOAP
|
||||||
SOAP version is changed via set_soap_version.
|
version is changed via set_soap_version.
|
||||||
|
|
||||||
Registering a serializer class with SOAP::WSDL::Factory::Serializer
|
Registering a serializer class with SOAP::WSDL::Factory::Serializer is done
|
||||||
is done by executing the following code where $version is the
|
by executing the following code where $version is the SOAP version the
|
||||||
SOAP version the class should be used for, and $class is the class
|
class should be used for, and $class is the class name.
|
||||||
name.
|
|
||||||
|
|
||||||
SOAP::WSDL::Factory::Serializer->register( $version, $class);
|
SOAP::WSDL::Factory::Serializer->register( $version, $class);
|
||||||
|
|
||||||
To auto-register your transport class on loading, execute register()
|
To auto-register your transport class on loading, execute register() in
|
||||||
in your tranport class (see L<SYNOPSIS|SYNOPSIS> above).
|
your tranport class (see L<SYNOPSIS|SYNOPSIS> above).
|
||||||
|
|
||||||
Serializer modules must be named equal to the serializer
|
=head2 Serializer package layout
|
||||||
class they contain. There can only be one serializer class per
|
|
||||||
serializer module.
|
|
||||||
|
|
||||||
Serializer class must implement the following methods:
|
Serializer modules must be named equal to the serializer class they contain.
|
||||||
|
There can only be one serializer class per serializer module.
|
||||||
|
|
||||||
|
=head2 Methods to implement
|
||||||
|
|
||||||
|
Serializer classes must implement the following methods:
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
@@ -96,8 +112,8 @@ Constructor.
|
|||||||
|
|
||||||
=item * serialize
|
=item * serialize
|
||||||
|
|
||||||
Serializes data to XML. The following named parameters are passed to
|
Serializes data to XML. The following named parameters are passed to the
|
||||||
the serialize method in a anonymous hash ref:
|
serialize method in a anonymous hash ref:
|
||||||
|
|
||||||
{
|
{
|
||||||
method => $operation_name,
|
method => $operation_name,
|
||||||
@@ -120,9 +136,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 176 $
|
$Rev: 225 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Serializer.pm 176 2007-08-31 15:28:29Z kutterma $
|
$Id: Serializer.pm 225 2007-09-10 19:04:57Z kutterma $
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ my %SOAP_WSDL_TRANSPORT_OF = (
|
|||||||
# class methods only
|
# class methods only
|
||||||
sub register {
|
sub register {
|
||||||
my ($class, $scheme, $package) = @_;
|
my ($class, $scheme, $package) = @_;
|
||||||
|
die "cannot use reference as scheme" if ref $scheme;
|
||||||
$registered_transport_of{ $scheme } = $package;
|
$registered_transport_of{ $scheme } = $package;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +78,7 @@ sub get_transport {
|
|||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
SOAP::WSDL::Factory::Transport - factory for retrieving transport objects
|
SOAP::WSDL::Factory::Transport - Factory for retrieving transport objects
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
@@ -88,22 +89,29 @@ SOAP::WSDL::Factory::Transport - factory for retrieving transport objects
|
|||||||
package MyWickedTransport;
|
package MyWickedTransport;
|
||||||
use SOAP::WSDL::Factory::Transport;
|
use SOAP::WSDL::Factory::Transport;
|
||||||
|
|
||||||
# u don't know the httpr protocol? poor boy...
|
# register class as transport module for httpr and https
|
||||||
|
# (httpr is "reliable http", a protocol developed by IBM).
|
||||||
SOAP::WSDL::Factory::Transport->register( 'httpr' , __PACKAGE__ );
|
SOAP::WSDL::Factory::Transport->register( 'httpr' , __PACKAGE__ );
|
||||||
SOAP::WSDL::Factory::Transport->register( 'https' , __PACKAGE__ );
|
SOAP::WSDL::Factory::Transport->register( 'https' , __PACKAGE__ );
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
SOAP::WSDL::Transport serves as factory for retrieving
|
SOAP::WSDL::Transport serves as factory for retrieving transport objects for
|
||||||
transport objects for SOAP::WSDL.
|
SOAP::WSDL.
|
||||||
|
|
||||||
The actual work is done by specific transport classes.
|
The actual work is done by specific transport classes.
|
||||||
|
|
||||||
SOAP::WSDL::Transport tries to load one of the following classes:
|
SOAP::WSDL::Transport tries to load one of the following classes:
|
||||||
|
|
||||||
a) the class registered for the scheme via register()
|
=over
|
||||||
b) the SOAP::Lite class matching the scheme
|
|
||||||
c) the SOAP::WSDL class matching the scheme
|
=item * the class registered for the scheme via register()
|
||||||
|
|
||||||
|
=item * the SOAP::Lite class matching the scheme
|
||||||
|
|
||||||
|
=item * the SOAP::WSDL class matching the scheme
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
=head1 METHODS
|
=head1 METHODS
|
||||||
|
|
||||||
@@ -131,31 +139,34 @@ Gets the current transport object.
|
|||||||
|
|
||||||
=head1 WRITING YOUR OWN TRANSPORT CLASS
|
=head1 WRITING YOUR OWN TRANSPORT CLASS
|
||||||
|
|
||||||
|
=head2 Registering a transport class
|
||||||
|
|
||||||
Transport classes must be registered with SOAP::WSDL::Factory::Transport.
|
Transport classes must be registered with SOAP::WSDL::Factory::Transport.
|
||||||
|
|
||||||
This is done by executing the following code where $scheme is the
|
This is done by executing the following code where $scheme is the URL scheme
|
||||||
URL scheme the class should be used for, and $module is the class'
|
the class should be used for, and $module is the class' module name.
|
||||||
module name.
|
|
||||||
|
|
||||||
SOAP::WSDL::Factory::Transport->register( $scheme, $module);
|
SOAP::WSDL::Factory::Transport->register( $scheme, $module);
|
||||||
|
|
||||||
To auto-register your transport class on loading, execute register()
|
To auto-register your transport class on loading, execute register() in your
|
||||||
in your tranport class (see L<SYNOPSIS|SYNOPSIS> above).
|
tranport class (see L<SYNOPSIS|SYNOPSIS> above).
|
||||||
|
|
||||||
Multiple protocols ore multiple classes are registered by multiple calls to
|
Multiple protocols ore multiple classes are registered by multiple calls to
|
||||||
register().
|
register().
|
||||||
|
|
||||||
|
=head2 Transport plugin package layout
|
||||||
|
|
||||||
You may only use transport classes whose name is either
|
You may only use transport classes whose name is either
|
||||||
the module name or the module name with '::Client' appended.
|
the module name or the module name with '::Client' appended.
|
||||||
|
|
||||||
Transport classes must implement the interface required for
|
=head2 Methods to implement
|
||||||
SOAP::Lite transport classes.
|
|
||||||
|
|
||||||
See L<SOAP::Lite::Transport> for details,
|
Transport classes must implement the interface required for SOAP::Lite
|
||||||
L<SOAP::WSDL::Transport::HTTP|SOAP::WSDL::Transport::HTTP>
|
transport classes (see L<SOAP::Lite::Transport> for details,
|
||||||
for an example.
|
L<SOAP::WSDL::Transport::HTTP|SOAP::WSDL::Transport::HTTP> for an example).
|
||||||
|
|
||||||
Transport modules must implement the following methods:
|
To provide this interface, transport modules must implement the following
|
||||||
|
methods:
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
@@ -199,15 +210,14 @@ SOAP::WSDL does not require you to follow these restrictions.
|
|||||||
|
|
||||||
There is only one restriction in SOAP::WSDL:
|
There is only one restriction in SOAP::WSDL:
|
||||||
|
|
||||||
You may only use transport classes whose name is either
|
You may only use transport classes whose name is either the module name or
|
||||||
the module name or the module name with '::Client' appended.
|
the module name with '::Client' appended.
|
||||||
|
|
||||||
SOAP::WSDL will try to instantiate an object of your
|
SOAP::WSDL will try to instantiate an object of your transport class with
|
||||||
transport class with '::Client' appended to allow using transport
|
'::Client' appended to allow using transport classes written for SOAP::Lite.
|
||||||
classes written for SOAP::Lite.
|
|
||||||
|
|
||||||
This may lead to errors when a different module with the name
|
This may lead to errors when a different module with the name of your
|
||||||
of your transport module suffixed with ::Client is also loaded.
|
transport module suffixed with ::Client is also loaded.
|
||||||
|
|
||||||
=head1 LICENSE
|
=head1 LICENSE
|
||||||
|
|
||||||
@@ -222,9 +232,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 176 $
|
$Rev: 225 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Transport.pm 176 2007-08-31 15:28:29Z kutterma $
|
$Id: Transport.pm 225 2007-09-10 19:04:57Z kutterma $
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Transport.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Transport.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -35,9 +35,6 @@ the service's interface structure.
|
|||||||
The results of all calls to your service object's methods (except new)
|
The results of all calls to your service object's methods (except new)
|
||||||
are objects based on SOAP::WSDL's XML schema implementation.
|
are objects based on SOAP::WSDL's XML schema implementation.
|
||||||
|
|
||||||
These objects are false in boolean context, and serialize to XML when
|
|
||||||
printed.
|
|
||||||
|
|
||||||
To access the object's properties use get_NAME / set_NAME getter/setter
|
To access the object's properties use get_NAME / set_NAME getter/setter
|
||||||
methods whith NAME corresponding to the XML tag name.
|
methods whith NAME corresponding to the XML tag name.
|
||||||
|
|
||||||
|
|||||||
+16
-17
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
SOAP::WSDL WS-I Basic Profile Compliance - How SOAP::WSDL complies to WS-I Basic Profile 1.0
|
SOAP::WSDL::Manual::WS_I - How SOAP::WSDL complies to WS-I Basic Profile 1.0
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
@@ -44,8 +44,6 @@ parts to web service SOAP::WSDL does not implement.
|
|||||||
|
|
||||||
=head1 RULES CONFIRMED
|
=head1 RULES CONFIRMED
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=head2 R1005
|
=head2 R1005
|
||||||
|
|
||||||
A MESSAGE MUST NOT contain soap:encodingStyle attributes on any of the elements
|
A MESSAGE MUST NOT contain soap:encodingStyle attributes on any of the elements
|
||||||
@@ -66,13 +64,13 @@ element.
|
|||||||
|
|
||||||
A MESSAGE MUST NOT contain a Document Type Declaration.
|
A MESSAGE MUST NOT contain a Document Type Declaration.
|
||||||
|
|
||||||
SOAP::WSDL::Serializer::SOAP11 does not DTDs.
|
SOAP::WSDL::Serializer::SOAP11 does not add DTDs.
|
||||||
|
|
||||||
=head2 R1009
|
=head2 R1009
|
||||||
|
|
||||||
A MESSAGE MUST NOT contain Processing Instructions.
|
A MESSAGE MUST NOT contain Processing Instructions.
|
||||||
|
|
||||||
SOAP::WSDL::Serializer::SOAP11 does not Processing Instructions
|
SOAP::WSDL::Serializer::SOAP11 does not add Processing Instructions
|
||||||
|
|
||||||
=head2 R1010
|
=head2 R1010
|
||||||
|
|
||||||
@@ -85,7 +83,7 @@ SOAP::WSDL::Expat::MessageParser allows the use of XML Declarations.
|
|||||||
A MESSAGE MUST NOT have any element children of soap:Envelope following
|
A MESSAGE MUST NOT have any element children of soap:Envelope following
|
||||||
the soap:Body element.
|
the soap:Body element.
|
||||||
|
|
||||||
SOAP::WSDL::Serializer::SOAP11 does emit children of soap:Envelope following
|
SOAP::WSDL::Serializer::SOAP11 does not emit children of soap:Envelope following
|
||||||
the soap:Body element. Other serializers may behave differentls.
|
the soap:Body element. Other serializers may behave differentls.
|
||||||
|
|
||||||
=head2 R1012
|
=head2 R1012
|
||||||
@@ -100,7 +98,7 @@ SOAP::WSDL::Serializer::SOAP11 serializes messages as UTF-8.
|
|||||||
encoding, using the charset parameter.
|
encoding, using the charset parameter.
|
||||||
|
|
||||||
SOAP::WSDL::Transport::HTTP sets the Content-type header to
|
SOAP::WSDL::Transport::HTTP sets the Content-type header to
|
||||||
"text/xml; charset=utf8". SOAP::Transport::Lite does, too. Other transport
|
"text/xml; charset=utf8". SOAP::Transport does, too. Other transport
|
||||||
backends may behave different.
|
backends may behave different.
|
||||||
|
|
||||||
=head2 R1014
|
=head2 R1014
|
||||||
@@ -294,6 +292,17 @@ SOAP::WSDL::Client always assures the SOAPaction header is quoted, thus
|
|||||||
automatically inserts the empty string if no SOAPAction header is defined.
|
automatically inserts the empty string if no SOAPAction header is defined.
|
||||||
|
|
||||||
|
|
||||||
|
=head2 R1015
|
||||||
|
|
||||||
|
A RECEIVER MUST generate a fault if they encounter a message whose document
|
||||||
|
element has a local name of "Envelope" but a namespace name that is not
|
||||||
|
"http://schemas.xmlsoap.org/soap/envelope/".
|
||||||
|
|
||||||
|
SOAP::WSDL::Expat::MessageParser checks the namespace of the SOAP envelope.
|
||||||
|
|
||||||
|
SOAP::WSDL::Expat::MessageParser does not check that Envelope is the root
|
||||||
|
element, yet.
|
||||||
|
|
||||||
|
|
||||||
=head1 RULES NOT CONFIRMED
|
=head1 RULES NOT CONFIRMED
|
||||||
|
|
||||||
@@ -347,16 +356,6 @@ However, rpc-literal bindings are not supported, yet.
|
|||||||
|
|
||||||
TODO support rpc-literal bindings.
|
TODO support rpc-literal bindings.
|
||||||
|
|
||||||
=head2 R1015
|
|
||||||
|
|
||||||
A RECEIVER MUST generate a fault if they encounter a message whose document
|
|
||||||
element has a local name of "Envelope" but a namespace name that is not
|
|
||||||
"http://schemas.xmlsoap.org/soap/envelope/".
|
|
||||||
|
|
||||||
SOAP::WSDL::Expat::MessageParser does not check the namespace of the SOAP envelope.
|
|
||||||
|
|
||||||
TODO implement checking namespace of the SOAP envelope and emit fault if not "http://schemas.xmlsoap.org/soap/envelope/".
|
|
||||||
|
|
||||||
=head2 R2008
|
=head2 R2008
|
||||||
|
|
||||||
In a DESCRIPTION the value of the location attribute of a wsdl:import element
|
In a DESCRIPTION the value of the location attribute of a wsdl:import element
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
Release notes for SOAP::WSDL 2.00_11
|
|
||||||
-------
|
|
||||||
|
|
||||||
I'm happy to present a new pre-release version of SOAP::WSDL.
|
|
||||||
|
|
||||||
The following features were added (the numbers in brackets are the tracker IDs
|
|
||||||
from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
|
||||||
|
|
||||||
* [1767963] Transport plugins via SOAP::WSDL::Factory::Transport.
|
|
||||||
SOAP::WSDL uses SOAP::Lite's tranport modules as default, with a
|
|
||||||
lightweight HTTP(S) transport plugin as fallback.
|
|
||||||
Custom transport modules can be registered via
|
|
||||||
SOAP::WSDL::Factory::Transport.
|
|
||||||
|
|
||||||
* [ 1772730 ] Serializer plugins via SOAP::WSDL::Factory::Serializer
|
|
||||||
The default serializer for SOAP1.1 is SOAP::WSDL::Serializer::SOAP11.
|
|
||||||
Custom serializers classes can be registered via
|
|
||||||
SOAP::WSDL::Factory::Serializer or set via SOAP::Lite's set_serializer
|
|
||||||
method.
|
|
||||||
|
|
||||||
The following bugs have been fixed (the numbers in brackets are the tracker IDs
|
|
||||||
from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
|
||||||
|
|
||||||
* [ 1764854 ] Port WSDL parser to expat and remove XML::LibXML dependency
|
|
||||||
SOAP::WSDL now requires only XML::Parser to be installed.
|
|
||||||
XML::LibXML is not required any more, though XML::LibXML based modules still
|
|
||||||
exist.
|
|
||||||
|
|
||||||
The following uncategorized improvements have been made
|
|
||||||
|
|
||||||
* The number of dependencies has been reduced. SOAP::WSDL no longer requires the
|
|
||||||
following modules to be installed:
|
|
||||||
- XML::SAX::Base
|
|
||||||
- XML::SAX::ParserFactory
|
|
||||||
- Pod::Simple::Text
|
|
||||||
|
|
||||||
* The missing prerequisite Template has been added.
|
|
||||||
* Documentation has been improved.
|
|
||||||
|
|
||||||
The following changes were made in former pre-relase versions:
|
|
||||||
|
|
||||||
2.00_10
|
|
||||||
----
|
|
||||||
* Changed Makefile.PL to use Module::Build (passthrough mode)
|
|
||||||
* fixed element ref="" handling
|
|
||||||
|
|
||||||
2.00_09
|
|
||||||
----
|
|
||||||
* SOAP::WSDL::XSD::Typelib::Builtin::boolean objects now return their numerical
|
|
||||||
value in bool context, not "true" or "false" (always true...)
|
|
||||||
* date/time test are now timezone-sensitive
|
|
||||||
* examples added
|
|
||||||
|
|
||||||
2.00_08
|
|
||||||
---
|
|
||||||
* SOAP message parser may skip unwanted parts of the message - see
|
|
||||||
SOAP::WSDL::Expat::MessageParser for details.
|
|
||||||
* HTTP Content-Type is configurable now
|
|
||||||
* SOAP::WSDL::XSD::Typelib::ComplexType based objects now accept a
|
|
||||||
list ref of hash refs as parameter to set_value.
|
|
||||||
* SOAP::WSDL::XSD::Typelib::Builtin::dateTime and ::date now converts date
|
|
||||||
strings into XML date strings
|
|
||||||
* SOAP::WSDL::Definitions::create now
|
|
||||||
- converts '.' in service names to '::' (.NET class separator to perl class
|
|
||||||
separator)
|
|
||||||
- outputs Typemaps and Interface classes in UTF8 to allow proper inclusion
|
|
||||||
of UTF8 documentation from WSDL
|
|
||||||
* WSDLHandler now handles <wsdl:documentation> tags
|
|
||||||
* SOAP::WSDL::Definitions now includes some usable doc in generated interface classes
|
|
||||||
* fixed explain in SimpleType, ComplexType and Element (someway)
|
|
||||||
|
|
||||||
@@ -273,8 +273,8 @@ This module may be used under the same terms as perl itself.
|
|||||||
|
|
||||||
$ID: $
|
$ID: $
|
||||||
|
|
||||||
$LastChangedDate: 2007-08-31 17:28:29 +0200 (Fr, 31 Aug 2007) $
|
$LastChangedDate: 2007-09-10 17:54:52 +0200 (Mo, 10 Sep 2007) $
|
||||||
$LastChangedRevision: 176 $
|
$LastChangedRevision: 214 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
|
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/SAX/MessageHandler.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/SAX/MessageHandler.pm $
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ package SOAP::WSDL::Serializer::SOAP11;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
# use base qw/SOAP::WSDL::Base/;
|
|
||||||
|
our $VERSION='2.00_13';
|
||||||
|
|
||||||
my $SOAP_NS = 'http://schemas.xmlsoap.org/soap/envelope/';
|
my $SOAP_NS = 'http://schemas.xmlsoap.org/soap/envelope/';
|
||||||
my $XML_INSTANCE_NS = 'http://www.w3.org/2001/XMLSchema-instance';
|
my $XML_INSTANCE_NS = 'http://www.w3.org/2001/XMLSchema-instance';
|
||||||
@@ -46,26 +47,25 @@ sub serialize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub serialize_header {
|
sub serialize_header {
|
||||||
my $xml = '';
|
my ($self, $name, $data, $opt) = @_;
|
||||||
return $xml;
|
|
||||||
|
# header is optional. Leave out if there's no header data
|
||||||
|
return q{} if not $data;
|
||||||
|
return join ( ($opt->{ readable }) ? "\n" : q{},
|
||||||
|
"<$opt->{ namespace }->{ $SOAP_NS }\:Header>",
|
||||||
|
"$data",
|
||||||
|
"</$opt->{ namespace }->{ $SOAP_NS }\:Header>",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub serialize_body {
|
sub serialize_body {
|
||||||
my $self = shift;
|
my ($self, $name, $data, $opt) = @_;
|
||||||
my $name = shift;
|
|
||||||
my $data = shift;
|
|
||||||
my $opt = shift;
|
|
||||||
|
|
||||||
my $soap_prefix = $opt->{ namespace }->{ $SOAP_NS };
|
# Body is NOT optional. Serialize to empty body
|
||||||
|
# if we have no data.
|
||||||
my $xml = '';
|
return join ( ($opt->{ readable }) ? "\n" : q{},
|
||||||
$xml .= "\n" if ($opt->{ readable });
|
"<$opt->{ namespace }->{ $SOAP_NS }\:Body>",
|
||||||
$xml .= "<$soap_prefix\:Body>";
|
defined $data ? "$data" : (),
|
||||||
$xml .= "\n" if ($opt->{ readable });
|
"</$opt->{ namespace }->{ $SOAP_NS }\:Body>",
|
||||||
|
);
|
||||||
# include parts
|
|
||||||
$xml .= $data if ( defined($data) );
|
|
||||||
|
|
||||||
$xml .= "</$soap_prefix\:Body>";
|
|
||||||
return $xml;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,14 +56,8 @@ sub send_receive {
|
|||||||
],
|
],
|
||||||
$envelope );
|
$envelope );
|
||||||
|
|
||||||
use Data::Dumper;
|
|
||||||
warn Dumper $request;
|
|
||||||
|
|
||||||
my $response = $self->request( $request );
|
my $response = $self->request( $request );
|
||||||
|
|
||||||
warn Dumper $response;
|
|
||||||
|
|
||||||
|
|
||||||
$self->code( $response->code);
|
$self->code( $response->code);
|
||||||
$self->message( $response->message);
|
$self->message( $response->message);
|
||||||
$self->is_success($response->is_success);
|
$self->is_success($response->is_success);
|
||||||
@@ -98,9 +92,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 176 $
|
$Rev: 218 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: HTTP.pm 176 2007-08-31 15:28:29Z kutterma $
|
$Id: HTTP.pm 218 2007-09-10 16:19:23Z kutterma $
|
||||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -0,0 +1,129 @@
|
|||||||
|
package SOAP::WSDL::Transport::Test;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use SOAP::WSDL::Factory::Transport;
|
||||||
|
|
||||||
|
our $VERSION = '2.00_14';
|
||||||
|
|
||||||
|
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<()>);
|
||||||
|
my %base_dir_of :ATTR(:name<base_dir> :init_arg<base_dir> :default<.>);
|
||||||
|
|
||||||
|
# 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) = @_;
|
||||||
|
my ($envelope, $soap_action, $endpoint, $encoding, $content_type) =
|
||||||
|
@parameters{qw(envelope action endpoint encoding content_type)};
|
||||||
|
|
||||||
|
my $filename = $soap_action;
|
||||||
|
$filename =~s{ \A(:?'|") }{}xms;
|
||||||
|
$filename =~s{ (:?'|")\z }{}xms;
|
||||||
|
$filename =~s{ \A [^:]+ : (:? /{2})? }{}xms;
|
||||||
|
|
||||||
|
$filename = join '/', $base_dir_of{ ident $self }, "$filename.xml";
|
||||||
|
|
||||||
|
if (not -r $filename) {
|
||||||
|
warn "cannot access $filename";
|
||||||
|
$self->set_code( 500 );
|
||||||
|
$self->set_message( "Failed" );
|
||||||
|
$self->set_is_success(0);
|
||||||
|
$self->set_status("500 Failed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
open my $fh, '<', $filename or die "cannot open $filename: $!";
|
||||||
|
binmode $fh;
|
||||||
|
my $response = <$fh>;
|
||||||
|
close $fh or die "cannot close $filename: $!";
|
||||||
|
|
||||||
|
$self->set_code( 200 );
|
||||||
|
$self->set_message( "OK" );
|
||||||
|
$self->set_is_success(1);
|
||||||
|
$self->set_status("200 OK");
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::Transport::Test - Test transport class for SOAP::WSDL
|
||||||
|
|
||||||
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
use SOAP::WSDL::Client;
|
||||||
|
use SOAP::WSDL::Transport::Test;
|
||||||
|
|
||||||
|
my $soap = SOAP::WSDL::Client->new()
|
||||||
|
$soap->get_transport->set_base_dir('.');
|
||||||
|
$soap->call('method', \%body, \%header);
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
SOAP::WSDL::Transport::Test is a file-based test transport backend for
|
||||||
|
SOAP::WSDL.
|
||||||
|
|
||||||
|
When SOAP::WSDL::Transport::Test is used as transport backend, the reponse is
|
||||||
|
read from a XML file and the request message is discarded. This is particularly
|
||||||
|
useful for testing SOAP::WSDL plugins.
|
||||||
|
|
||||||
|
=head2 Filename resolution
|
||||||
|
|
||||||
|
SOAP::WSDL::Transport makes up the response XML file name from the SOAPAction
|
||||||
|
of the request. The following filename is used:
|
||||||
|
|
||||||
|
base_dir / soap_action .xml
|
||||||
|
|
||||||
|
The protocol scheme (e.g. http:) and two heading slashes (//) are stripped from
|
||||||
|
the soap_action.
|
||||||
|
|
||||||
|
base_dir defaults to '.'
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
SOAPAction: http://somewhere.over.the.rainbow/webservice/webservice.asmx
|
||||||
|
Filename: ./somewhere.over.the.rainbow/webservice/webservice.asmx.xml
|
||||||
|
|
||||||
|
SOAPAction: uri:MyWickedService/test
|
||||||
|
Filename: ./MyWickedService/test.xml
|
||||||
|
|
||||||
|
|
||||||
|
=head1 METHODS
|
||||||
|
|
||||||
|
=head2 set_base_dir
|
||||||
|
|
||||||
|
Sets the base directory SOAP::WSDL::Transport::Test should look for response
|
||||||
|
files.
|
||||||
|
|
||||||
|
=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
|
||||||
@@ -14,6 +14,8 @@ my %base_of :ATTR(:name<base> :default<()>);
|
|||||||
my %itemType_of :ATTR(:name<itemType> :default<()>);
|
my %itemType_of :ATTR(:name<itemType> :default<()>);
|
||||||
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
my %abstract_of :ATTR(:name<abstract> :default<()>);
|
my %abstract_of :ATTR(:name<abstract> :default<()>);
|
||||||
|
my %mixed_of :ATTR(:name<mixed> :default<()>); # default is false
|
||||||
|
|
||||||
# is set to simpleContent/complexContent
|
# is set to simpleContent/complexContent
|
||||||
my %content_Model_of :ATTR(:name<contentModel> :default<()>);
|
my %content_Model_of :ATTR(:name<contentModel> :default<()>);
|
||||||
|
|
||||||
@@ -181,7 +183,7 @@ sub to_class {
|
|||||||
my $template = <<'EOT';
|
my $template = <<'EOT';
|
||||||
package [% type_prefix %][% self.get_name %];
|
package [% type_prefix %][% self.get_name %];
|
||||||
use strict;
|
use strict;
|
||||||
use Class::Std::Storable;
|
|
||||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||||
use base qw(
|
use base qw(
|
||||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ sub to_class {
|
|||||||
my $template = <<'EOT';
|
my $template = <<'EOT';
|
||||||
package [% element_prefix %][% self.get_name %];
|
package [% element_prefix %][% self.get_name %];
|
||||||
use strict;
|
use strict;
|
||||||
use Class::Std::Storable;
|
|
||||||
use SOAP::WSDL::XSD::Typelib::Element;
|
use SOAP::WSDL::XSD::Typelib::Element;
|
||||||
|
|
||||||
[% IF (type = self.first_simpleType) %]
|
[% IF (type = self.first_simpleType) %]
|
||||||
|
|||||||
@@ -215,13 +215,20 @@ All input variants supported by Date::Parse are supported. You may even pass
|
|||||||
in dateTime strings - the time part will be ignored. Note that
|
in dateTime strings - the time part will be ignored. Note that
|
||||||
set_value is around 100 times slower when setting non-XML-time strings
|
set_value is around 100 times slower when setting non-XML-time strings
|
||||||
|
|
||||||
|
When setting dates before the beginning of the epoch (negative UNIX timestamp),
|
||||||
|
you should use the XML date string format for setting dates. The behaviour of
|
||||||
|
Date::Parse for dates before the epoch is system dependent.
|
||||||
|
|
||||||
=head2 SOAP::WSDL::XSD::Typelib::Builtin::dateTime
|
=head2 SOAP::WSDL::XSD::Typelib::Builtin::dateTime
|
||||||
|
|
||||||
dateTime values are automatically converted into XML dateTime strings during setting:
|
dateTime values are automatically converted into XML dateTime strings during setting:
|
||||||
|
|
||||||
YYYY-MM-DDThh:mm:ss.nnnnnnn+zz:zz
|
YYYY-MM-DDThh:mm:ss.nnnnnnn+zz:zz
|
||||||
|
|
||||||
The optional nanoseconds parts is excluded in converted values, as it would always be 0.
|
The fraction of seconds (nnnnnnn) part is optional. Fractions of seconds may
|
||||||
|
be given with arbitrary precision
|
||||||
|
|
||||||
|
The fraction of seconds part is excluded in converted values, as it would always be 0.
|
||||||
|
|
||||||
All input variants supported by Date::Parse are supported. Note that
|
All input variants supported by Date::Parse are supported. Note that
|
||||||
set_value is around 100 times slower when setting non-XML-time strings
|
set_value is around 100 times slower when setting non-XML-time strings
|
||||||
|
|||||||
@@ -13,15 +13,23 @@ my %value_of :ATTR(:get<value> :init_arg<value> :default<()>);
|
|||||||
# and we don't need to return the last value...
|
# and we don't need to return the last value...
|
||||||
sub set_value { $value_of{ ident $_[0] } = $_[1] }
|
sub set_value { $value_of{ ident $_[0] } = $_[1] }
|
||||||
|
|
||||||
|
# use $_[n] for speed.
|
||||||
|
# This is less readable, but notably faster.
|
||||||
|
#
|
||||||
|
# use postfix-if for speed. This is slightly faster, as it saves
|
||||||
|
# perl from creating a pad (variable context).
|
||||||
|
#
|
||||||
|
# The methods below may get called zillions of times, so
|
||||||
|
# every little statement matters...
|
||||||
|
|
||||||
sub serialize {
|
sub serialize {
|
||||||
my ($self, $opt) = @_;
|
no warnings qw(uninitialized);
|
||||||
my $ident = ident $self;
|
my $ident = ident $_[0];
|
||||||
$opt ||= {};
|
$_[1]->{ nil } = 1 if not defined $value_of{ $ident };
|
||||||
return $self->start_tag({ %$opt, nil => 1})
|
return join q{}
|
||||||
if not defined $value_of{ $ident };
|
, $_[0]->start_tag($_[1], $value_of{ $ident })
|
||||||
return join q{}, $self->start_tag($opt, $value_of{ $ident })
|
|
||||||
, $value_of{ $ident }
|
, $value_of{ $ident }
|
||||||
, $self->end_tag($opt);
|
, $_[0]->end_tag($_[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO disallow serializing !
|
# TODO disallow serializing !
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
|
|
||||||
my %xmlns_of :ATTR(:name<xmlns> :default<()>);
|
my %xmlns_of :ATTR(:get<xmlns> :init_arg<xmlns> :default<()>);
|
||||||
|
|
||||||
|
sub set_xmlns { $xmlns_of{ ident $_[0] } = $_[1] };
|
||||||
|
|
||||||
# use $_[1] for performance
|
# use $_[1] for performance
|
||||||
sub start_tag {
|
sub start_tag {
|
||||||
@@ -19,6 +21,8 @@ sub end_tag {
|
|||||||
: q{};
|
: q{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sub serialize { q{} };
|
||||||
|
|
||||||
sub serialize_qualified :STRINGIFY {
|
sub serialize_qualified :STRINGIFY {
|
||||||
return $_[0]->serialize( { qualified => 1 } );
|
return $_[0]->serialize( { qualified => 1 } );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,27 +39,39 @@ sub set_value {
|
|||||||
#2037-12-31+01:00
|
#2037-12-31+01:00
|
||||||
if (
|
if (
|
||||||
$_[1] =~ m{ ^\d{4} \- \d{2} \- \d{2}
|
$_[1] =~ m{ ^\d{4} \- \d{2} \- \d{2}
|
||||||
(:? [\+\-] \d{2} \: \d{2} )?$
|
(:? [\+\-] \d{2} \: \d{2} )$
|
||||||
}xms
|
}xms
|
||||||
) {
|
) {
|
||||||
$_[0]->SUPER::set_value($_[1])
|
$_[0]->SUPER::set_value($_[1])
|
||||||
}
|
}
|
||||||
# use a combination of strptime and strftime for converting the date
|
# converting a date is hard work: It needs a timezone, because
|
||||||
# Unfortunately, strftime outputs the time zone as [+-]0000, whereas XML
|
# 2007-12-30+12:00 and 2007-12-31-12:00 mean the same day - just in
|
||||||
# whants it as [+-]00:00
|
# different locations.
|
||||||
# We know that the latter part of the TZ is always :00 (there's no time
|
# strftime actually prints out the correct date, but always prints the
|
||||||
# zone whith minute offset yet), so we just use substr to get the part
|
# local timezone with %z.
|
||||||
# up to the last 2 timezone digits and append :00
|
# So, if our timezone is not 0, we strftime it without timezone and
|
||||||
# We leave out the optional nanoseconds part, as it would always be empty.
|
# append it by hand by the following formula:
|
||||||
|
# The timezone hours are the int (timesone seconds / 3600)
|
||||||
|
# The timezone minutes (if someone ever specifies something like that)
|
||||||
|
# are int( (seconds % 3600) / 60 )
|
||||||
|
# say, int( (seconds modulo 3600) / 60 )
|
||||||
|
#
|
||||||
|
# If we have no timezone (meaning the timezone is
|
||||||
else {
|
else {
|
||||||
# strptime sets empty values to undef - and strftime doesn't like that...
|
# strptime sets empty values to undef - and strftime doesn't like that...
|
||||||
my @time_from = map { ! defined $_ ? 0 : $_ } strptime($_[1]);
|
my @time_from = strptime($_[1]);
|
||||||
|
my $time_zone_seconds = $time_from[6];
|
||||||
|
@time_from = map { (! defined $_) ? 0 : $_ } @time_from;
|
||||||
# use Data::Dumper;
|
# use Data::Dumper;
|
||||||
# die Dumper \@time_from;
|
# warn Dumper \@time_from, sprintf('%+03d%02d', $time_from[6] / 3600, $time_from[6] % 60 );
|
||||||
my $time_str = strftime( '%Y-%m-%d%z', @time_from );
|
my $time_str = defined $time_zone_seconds
|
||||||
|
? strftime( '%Y-%m-%d', @time_from )
|
||||||
|
. sprintf('%+03d%02d', int($time_from[6] / 3600), int ( ($time_from[6] % 3600) / 60 ) )
|
||||||
|
: do {
|
||||||
|
strftime( '%Y-%m-%d%z', @time_from );
|
||||||
|
};
|
||||||
substr $time_str, -2, 0, ':';
|
substr $time_str, -2, 0, ':';
|
||||||
$_[0]->SUPER::set_value($time_str);
|
$_[0]->SUPER::set_value($time_str);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,29 +37,20 @@ BEGIN {
|
|||||||
sub set_value {
|
sub set_value {
|
||||||
# use set_value from base class if we have a XML-DateTime format
|
# use set_value from base class if we have a XML-DateTime format
|
||||||
#2037-12-31T00:00:00.0000000+01:00
|
#2037-12-31T00:00:00.0000000+01:00
|
||||||
if (
|
return $_[0]->SUPER::set_value($_[1]) if (
|
||||||
$_[1] =~ m{ ^\d{4} \- \d{2} \- \d{2}
|
$_[1] =~ m{ ^\d{4} \- \d{2} \- \d{2}
|
||||||
T \d{2} \: \d{2} \: \d{2} (:? \. \d{1,7} )?
|
T \d{2} \: \d{2} \: \d{2} (:? \. \d{1,7} )?
|
||||||
[\+\-] \d{2} \: \d{2} $
|
[\+\-] \d{2} \: \d{2} $
|
||||||
}xms
|
}xms
|
||||||
) {
|
);
|
||||||
$_[0]->SUPER::set_value($_[1])
|
|
||||||
}
|
|
||||||
# use a combination of strptime and strftime for converting the date
|
|
||||||
# strptime does not emit timezone info, so we're pretty fucked up here.
|
|
||||||
#
|
|
||||||
# Unfortunately, strftime outputs the time zone as [+-]0000, whereas XML
|
|
||||||
# whants it as [+-]00:00
|
|
||||||
# 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...
|
|
||||||
my @time_from = map { ! defined $_ ? 0 : $_ } strptime($_[1]);
|
|
||||||
undef $time_from[-1];
|
|
||||||
|
|
||||||
my $time_str = strftime( '%Y-%m-%dT%H:%M:%S%z', @time_from );
|
# strptime sets empty values to undef - and strftime doesn't like that...
|
||||||
substr $time_str, -2, 0, ':';
|
my @time_from = map { ! defined $_ ? 0 : $_ } strptime($_[1]);
|
||||||
$_[0]->SUPER::set_value($time_str);
|
undef $time_from[-1];
|
||||||
}
|
|
||||||
|
my $time_str = strftime( '%Y-%m-%dT%H:%M:%S%z', @time_from );
|
||||||
|
substr $time_str, -2, 0, ':';
|
||||||
|
$_[0]->SUPER::set_value($time_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Carp;
|
use Carp;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
use Scalar::Util qw(blessed);
|
use Scalar::Util qw(blessed refaddr);
|
||||||
use Class::Std::Storable;
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ sub _factory {
|
|||||||
my $is_list = $type->isa('SOAP::WSDL::XSD::Typelib::Builtin::list');
|
my $is_list = $type->isa('SOAP::WSDL::XSD::Typelib::Builtin::list');
|
||||||
|
|
||||||
*{ "$class\::set_$name" } = sub {
|
*{ "$class\::set_$name" } = sub {
|
||||||
my ($self, $value) = @_;
|
# my ($self, $value) = @_;
|
||||||
|
|
||||||
# The structure below looks rather weird, but is optimized for performance.
|
# The structure below looks rather weird, but is optimized for performance.
|
||||||
#
|
#
|
||||||
@@ -93,11 +93,11 @@ sub _factory {
|
|||||||
# for GLOB references, feel free to add them.
|
# for GLOB references, feel free to add them.
|
||||||
# d) we should also die for non-blessed non-ARRAY/HASH references in lists but don't do yet - oh my !
|
# d) we should also die for non-blessed non-ARRAY/HASH references in lists but don't do yet - oh my !
|
||||||
|
|
||||||
my $is_ref = ref $value;
|
my $is_ref = ref $_[1];
|
||||||
$attribute_ref->{ ident $self } = ($is_ref)
|
$attribute_ref->{ ident $_[0] } = ($is_ref)
|
||||||
? $is_ref eq 'ARRAY'
|
? $is_ref eq 'ARRAY'
|
||||||
? $is_list # remembered from outside closure
|
? $is_list # remembered from outside closure
|
||||||
? $type->new({ value => $value }) # list element - can take list ref as value
|
? $type->new({ value => $_[1] }) # list element - can take list ref as value
|
||||||
: [ map {
|
: [ map {
|
||||||
ref $_
|
ref $_
|
||||||
? ref $_ eq 'HASH'
|
? ref $_ eq 'HASH'
|
||||||
@@ -106,20 +106,20 @@ sub _factory {
|
|||||||
? $_
|
? $_
|
||||||
: croak "cannot use " . ref($_) . " reference as value for $name - $type required"
|
: croak "cannot use " . ref($_) . " reference as value for $name - $type required"
|
||||||
: $type->new({ value => $_ })
|
: $type->new({ value => $_ })
|
||||||
} @{ $value }
|
} @{ $_[1] }
|
||||||
]
|
]
|
||||||
: $is_ref eq 'HASH'
|
: $is_ref eq 'HASH'
|
||||||
? $type->new( $value )
|
? $type->new( $_[1] )
|
||||||
: $is_ref eq $type
|
: $is_ref eq $type
|
||||||
? $value
|
? $_[1]
|
||||||
: die croak "cannot use $is_ref reference as value for $name - $type required"
|
: die croak "cannot use $is_ref reference as value for $name - $type required"
|
||||||
: $type->new({ value => $value });
|
: $type->new({ value => $_[1] });
|
||||||
};
|
};
|
||||||
|
|
||||||
*{ "$class\::add_$name" } = sub {
|
*{ "$class\::add_$name" } = sub {
|
||||||
my $ident = ident $_[0];
|
my $ident = ident $_[0];
|
||||||
warn "attempting to add empty value to " . ref $_[0]
|
warn "attempting to add empty value to " . ref $_[0]
|
||||||
if (not defined $_[1]);
|
if not defined $_[1];
|
||||||
|
|
||||||
# first call
|
# first call
|
||||||
return $attribute_ref->{ $ident } = $_[1]
|
return $attribute_ref->{ $ident } = $_[1]
|
||||||
@@ -133,16 +133,30 @@ sub _factory {
|
|||||||
return push @{ $attribute_ref->{ $ident } }, $_[1];
|
return push @{ $attribute_ref->{ $ident } }, $_[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
*{ "$class\::$name" } = *{ "$class\::add_$name" };
|
||||||
}
|
}
|
||||||
|
|
||||||
*{ "$class\::START" } = sub {
|
*{ "$class\::new" } = sub {
|
||||||
my ($self, $ident, $args_of) = @_;
|
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) = @_;
|
||||||
|
#
|
||||||
|
# The hanging side comment show you what would be there, then.
|
||||||
|
|
||||||
# iterate over keys of arguments
|
# iterate over keys of arguments
|
||||||
# and call set appropriate field in clase
|
# and call set appropriate field in clase
|
||||||
map { ($ATTRIBUTES_OF{ $class }->{ $_ })
|
map { ($ATTRIBUTES_OF{ $class }->{ $_ })
|
||||||
? do {
|
? do {
|
||||||
my $method = "set_$_";
|
my $method = "set_$_";
|
||||||
$self->$method( $args_of->{ $_ } );
|
$_[0]->$method( $_[2]->{ $_ } ); # ( $args_of->{ $_ } );
|
||||||
}
|
}
|
||||||
: $_ =~ m{ \A # beginning of string
|
: $_ =~ m{ \A # beginning of string
|
||||||
xmlns # xmlns
|
xmlns # xmlns
|
||||||
@@ -152,8 +166,8 @@ sub _factory {
|
|||||||
croak "unknown field $_ in $class. Valid fields are:\n"
|
croak "unknown field $_ in $class. Valid fields are:\n"
|
||||||
. join(', ', @{ $ELEMENTS_FROM{ $class } }) . "\n"
|
. join(', ', @{ $ELEMENTS_FROM{ $class } }) . "\n"
|
||||||
. "Structure given:\n" . Dumper @_ };
|
. "Structure given:\n" . Dumper @_ };
|
||||||
} keys %$args_of;
|
} keys %{ $_[2] }; # %$args_of;
|
||||||
return $self;
|
return $_[0]; # $self;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
package SOAP::WSDL::XSD::Typelib::Element;
|
package SOAP::WSDL::XSD::Typelib::Element;
|
||||||
use strict;
|
use strict;
|
||||||
use Class::Std::Storable;
|
|
||||||
use Data::Dumper;
|
|
||||||
|
|
||||||
my %NAME;
|
my %NAME;
|
||||||
my %NILLABLE;
|
my %NILLABLE;
|
||||||
|
|||||||
+8
-2
@@ -1,11 +1,15 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
use Test::More; # TODO: change to tests => N;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
chdir 't/' if (-d 't/');
|
|
||||||
|
|
||||||
my @modules = qw(
|
my @modules = qw(
|
||||||
|
SOAP::WSDL
|
||||||
|
SOAP::WSDL::Client
|
||||||
|
SOAP::WSDL::Serializer::SOAP11
|
||||||
|
SOAP::WSDL::Deserializer::SOAP11
|
||||||
|
SOAP::WSDL::Transport::HTTP
|
||||||
SOAP::WSDL::Definitions
|
SOAP::WSDL::Definitions
|
||||||
SOAP::WSDL::Message
|
SOAP::WSDL::Message
|
||||||
SOAP::WSDL::Operation
|
SOAP::WSDL::Operation
|
||||||
@@ -22,6 +26,8 @@ my @modules = qw(
|
|||||||
SOAP::WSDL::XSD::Schema
|
SOAP::WSDL::XSD::Schema
|
||||||
);
|
);
|
||||||
|
|
||||||
|
plan tests => 2* scalar @modules;
|
||||||
|
|
||||||
for my $module (@modules)
|
for my $module (@modules)
|
||||||
{
|
{
|
||||||
use_ok($module);
|
use_ok($module);
|
||||||
|
|||||||
+12
-10
@@ -1,30 +1,24 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 18; # qw/no_plan/; # TODO: change to tests => N;
|
use Test::More tests => 17;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
|
|
||||||
use XML::LibXML;
|
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
require Test::XML;
|
require Test::XML;
|
||||||
import Test::XML;
|
import Test::XML;
|
||||||
};
|
};
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||||
|
|
||||||
my $filter;
|
my $filter;
|
||||||
|
|
||||||
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(
|
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||||
), "Object creation");
|
|
||||||
|
|
||||||
my $parser = XML::LibXML->new();
|
|
||||||
$parser->set_handler( $filter );
|
|
||||||
|
|
||||||
$parser->parse_string( xml() );
|
$parser->parse_string( xml() );
|
||||||
|
|
||||||
my $wsdl;
|
my $wsdl;
|
||||||
ok( $wsdl = $filter->get_data() , "get object tree");
|
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||||
|
|
||||||
my $types = $wsdl->first_types();
|
my $types = $wsdl->first_types();
|
||||||
|
|
||||||
@@ -193,6 +187,14 @@ sub xml
|
|||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="mixed" mixed="true">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="length" type="tns:length3"/>
|
||||||
|
<xsd:element name="int" type="xsd:int"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
|
||||||
<xsd:element name="TestElement" type="xsd:int"/>
|
<xsd:element name="TestElement" type="xsd:int"/>
|
||||||
<xsd:element name="TestElementComplexType" type="tns:length3"/>
|
<xsd:element name="TestElementComplexType" type="tns:length3"/>
|
||||||
<xsd:simpleType name="testSimpleType1">
|
<xsd:simpleType name="testSimpleType1">
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
use Test::More tests => 11;
|
use Test::More tests => 11;
|
||||||
use Data::Dumper;
|
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use XML::LibXML;
|
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||||
|
|
||||||
my $filter;
|
my $filter;
|
||||||
|
|
||||||
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
|
my $parser;
|
||||||
|
|
||||||
my $parser = XML::LibXML->new();
|
ok($parser = SOAP::WSDL::Expat::WSDLParser->new() );
|
||||||
$parser->set_handler( $filter );
|
|
||||||
|
|
||||||
eval { $parser->parse_string( xml() ) };
|
eval { $parser->parse_string( xml() ) };
|
||||||
if ($@)
|
if ($@)
|
||||||
@@ -24,8 +21,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $wsdl;
|
my $wsdl;
|
||||||
ok( $wsdl = $filter->get_data() , "get object tree");
|
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||||
|
|
||||||
|
|
||||||
my $schema = $wsdl->first_types();
|
my $schema = $wsdl->first_types();
|
||||||
|
|
||||||
|
|||||||
+4
-9
@@ -4,21 +4,16 @@ use warnings;
|
|||||||
use Test::More tests => 5;
|
use Test::More tests => 5;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
|
|
||||||
use XML::LibXML;
|
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
require Test::XML;
|
require Test::XML;
|
||||||
import Test::XML;
|
import Test::XML;
|
||||||
};
|
};
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||||
|
|
||||||
my $filter;
|
my $parser;
|
||||||
|
|
||||||
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
|
ok($parser = SOAP::WSDL::Expat::WSDLParser->new(), "Object creation");
|
||||||
|
|
||||||
my $parser = XML::LibXML->new();
|
|
||||||
$parser->set_handler( $filter );
|
|
||||||
|
|
||||||
eval { $parser->parse_string( xml() ) };
|
eval { $parser->parse_string( xml() ) };
|
||||||
if ($@)
|
if ($@)
|
||||||
@@ -32,7 +27,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $wsdl;
|
my $wsdl;
|
||||||
ok( $wsdl = $filter->get_data() , "get object tree");
|
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||||
|
|
||||||
my $schema = $wsdl->get_types()->[0]->get_schema()->[0] || die "No schema !";
|
my $schema = $wsdl->get_types()->[0]->get_schema()->[0] || die "No schema !";
|
||||||
|
|
||||||
|
|||||||
@@ -2,21 +2,13 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||||
use Data::Dumper;
|
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use XML::LibXML;
|
|
||||||
|
|
||||||
use diagnostics;
|
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
my $parser;
|
||||||
|
|
||||||
my $filter;
|
|
||||||
|
|
||||||
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
|
|
||||||
|
|
||||||
my $parser = XML::LibXML->new();
|
|
||||||
$parser->set_handler( $filter );
|
|
||||||
|
|
||||||
|
ok($parser = SOAP::WSDL::Expat::WSDLParser->new(), "Object creation");
|
||||||
eval { $parser->parse_string( xml() ) };
|
eval { $parser->parse_string( xml() ) };
|
||||||
if ($@)
|
if ($@)
|
||||||
{
|
{
|
||||||
@@ -29,7 +21,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $wsdl;
|
my $wsdl;
|
||||||
ok( $wsdl = $filter->get_data() , "get object tree");
|
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||||
|
|
||||||
my $opt = {
|
my $opt = {
|
||||||
namespace => $wsdl->get_xmlns(),
|
namespace => $wsdl->get_xmlns(),
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ else {
|
|||||||
plan skip_all => "Cannot test without XML::LibXML";
|
plan skip_all => "Cannot test without XML::LibXML";
|
||||||
}
|
}
|
||||||
|
|
||||||
use diagnostics;
|
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
||||||
|
|
||||||
my $filter;
|
my $filter;
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ eval {
|
|||||||
import Test::XML
|
import Test::XML
|
||||||
};
|
};
|
||||||
|
|
||||||
use diagnostics;
|
|
||||||
|
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
|
||||||
my $path = cwd;
|
my $path = cwd;
|
||||||
|
|||||||
+2
-2
@@ -10,7 +10,7 @@ eval {
|
|||||||
import Test::XML;
|
import Test::XML;
|
||||||
};
|
};
|
||||||
|
|
||||||
use_ok qw/SOAP::WSDL::Envelope/;
|
use_ok qw/SOAP::WSDL::Serializer::SOAP11/;
|
||||||
|
|
||||||
my $opt = {
|
my $opt = {
|
||||||
readable => 1,
|
readable => 1,
|
||||||
@@ -18,7 +18,7 @@ my $opt = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
my $xml;
|
my $xml;
|
||||||
ok( $xml = SOAP::WSDL::Envelope->serialize(
|
ok( $xml = SOAP::WSDL::Serializer::SOAP11->serialize(
|
||||||
undef, undef, $opt
|
undef, undef, $opt
|
||||||
),
|
),
|
||||||
"serialize empty envelope"
|
"serialize empty envelope"
|
||||||
|
|||||||
@@ -40,8 +40,6 @@ is $obj, '<MyAtomicComplexTypeElement xmlns="urn:Test" ><test >Test</test>'
|
|||||||
. '</MyAtomicComplexTypeElement>'
|
. '</MyAtomicComplexTypeElement>'
|
||||||
, 'multi value stringification';
|
, 'multi value stringification';
|
||||||
|
|
||||||
use diagnostics;
|
|
||||||
|
|
||||||
ok $obj = MyComplexTypeElement->new({ MyTestName => 'test' });
|
ok $obj = MyComplexTypeElement->new({ MyTestName => 'test' });
|
||||||
is $obj, '<MyComplexTypeElement xmlns="urn:Test" ><MyTestName >test</MyTestName ></MyComplexTypeElement>';
|
is $obj, '<MyComplexTypeElement xmlns="urn:Test" ><MyTestName >test</MyTestName ></MyComplexTypeElement>';
|
||||||
|
|
||||||
|
|||||||
+5
-17
@@ -1,30 +1,18 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More;
|
use Test::More tests => 5;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
|
|
||||||
if (eval "require XML::LibXML") {
|
|
||||||
plan tests => 5;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
plan skip_all => "Cannot test without XML::LibXML";
|
|
||||||
}
|
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
require Test::XML;
|
require Test::XML;
|
||||||
import Test::XML;
|
import Test::XML;
|
||||||
};
|
};
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
|
||||||
|
|
||||||
my $filter;
|
my $parser;
|
||||||
|
|
||||||
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
|
|
||||||
|
|
||||||
my $parser = XML::LibXML->new();
|
|
||||||
$parser->set_handler( $filter );
|
|
||||||
|
|
||||||
|
ok($parser = SOAP::WSDL::Expat::WSDLParser->new(), "Object creation");
|
||||||
eval { $parser->parse_string( xml() ) };
|
eval { $parser->parse_string( xml() ) };
|
||||||
if ($@)
|
if ($@)
|
||||||
{
|
{
|
||||||
@@ -37,7 +25,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $wsdl;
|
my $wsdl;
|
||||||
ok( $wsdl = $filter->get_data() , "get object tree");
|
ok( $wsdl = $parser->get_data() , "get object tree");
|
||||||
|
|
||||||
ok $wsdl->to_typemap( { prefix => 'CP::EAI::Typelib::' } ), 'typemap';
|
ok $wsdl->to_typemap( { prefix => 'CP::EAI::Typelib::' } ), 'typemap';
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
+11
-9
@@ -1,11 +1,11 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use Test::More tests => 9;
|
use Test::More tests => 9;
|
||||||
use strict;
|
use strict;
|
||||||
use diagnostics;
|
|
||||||
use lib 'lib/';
|
use lib 'lib/';
|
||||||
use lib '../lib/';
|
use lib '../lib/';
|
||||||
use lib 't/lib';
|
use lib 't/lib';
|
||||||
|
|
||||||
|
use_ok qw(SOAP::WSDL::SOAP::Typelib::Fault11);
|
||||||
use_ok qw(SOAP::WSDL::XSD::Typelib::Element);
|
use_ok qw(SOAP::WSDL::XSD::Typelib::Element);
|
||||||
use_ok qw( MyElement );
|
use_ok qw( MyElement );
|
||||||
use_ok qw( SOAP::WSDL::Client );
|
use_ok qw( SOAP::WSDL::Client );
|
||||||
@@ -30,14 +30,16 @@ my $soap = SOAP::WSDL::Client->new( {
|
|||||||
->proxy('http://bla')
|
->proxy('http://bla')
|
||||||
->no_dispatch(1);
|
->no_dispatch(1);
|
||||||
|
|
||||||
is $soap->call('Test', $obj), q{<SOAP-ENV:Envelope }
|
# TODO: use Test::XML for testing and re-integrate
|
||||||
. q{xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" }
|
|
||||||
. q{xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >}
|
# is $soap->call('Test', $obj), q{<SOAP-ENV:Envelope }
|
||||||
. q{<SOAP-ENV:Body><MyAtomicComplexTypeElement xmlns="urn:Test" >}
|
# . q{xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" }
|
||||||
. q{<test >Test</test>}
|
# . q{xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >}
|
||||||
. q{<test2 >Test2</test2>}
|
# . q{<SOAP-ENV:Body><MyAtomicComplexTypeElement xmlns="urn:Test" >}
|
||||||
. q{</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
# . q{<test >Test</test>}
|
||||||
, 'SOAP Envelope generation with objects';
|
# . q{<test2 >Test2</test2>}
|
||||||
|
# . q{</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
||||||
|
# , 'SOAP Envelope generation with objects';
|
||||||
|
|
||||||
my $result = $soap->proxy('http://bla')
|
my $result = $soap->proxy('http://bla')
|
||||||
->no_dispatch(0)
|
->no_dispatch(0)
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ TODO: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SKIP: {
|
SKIP: {
|
||||||
eval "require Test::Pod";
|
eval "require Test::Pod; ";
|
||||||
skip 'Cannot test generated POD without Test::POD' , 6 if $@;
|
skip 'Cannot test generated POD without Test::POD' , 12 if $@;
|
||||||
|
|
||||||
foreach my $module (Test::Pod::all_pod_files( "$path/testlib")) {
|
foreach my $module (Test::Pod::all_pod_files( "$path/testlib")) {
|
||||||
Test::Pod::pod_file_ok( $module )
|
Test::Pod::pod_file_ok( $module )
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ TODO: {
|
|||||||
|
|
||||||
SKIP: {
|
SKIP: {
|
||||||
eval "require Test::Pod";
|
eval "require Test::Pod";
|
||||||
skip 'Cannot test generated POD without Test::POD' , 6 if $@;
|
skip 'Cannot test generated POD without Test::POD' , 12 if $@;
|
||||||
|
|
||||||
foreach my $module (Test::Pod::all_pod_files( "$path/testlib")) {
|
foreach my $module (Test::Pod::all_pod_files( "$path/testlib")) {
|
||||||
Test::Pod::pod_file_ok( $module )
|
Test::Pod::pod_file_ok( $module )
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ ok $soap->wsdlinit(
|
|||||||
), 'parse WSDL';
|
), 'parse WSDL';
|
||||||
ok $soap->no_dispatch(1), 'set no dispatch';
|
ok $soap->no_dispatch(1), 'set no dispatch';
|
||||||
|
|
||||||
|
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||||
|
# which requires SOAP::Lite
|
||||||
|
$soap->outputxml(1);
|
||||||
|
|
||||||
ok ($xml = $soap->call('test',
|
ok ($xml = $soap->call('test',
|
||||||
testAll => {
|
testAll => {
|
||||||
Test1 => 'Test 1',
|
Test1 => 'Test 1',
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ ok( $soap = SOAP::WSDL->new(
|
|||||||
no_dispatch => 1,
|
no_dispatch => 1,
|
||||||
), 'Instantiated object' );
|
), 'Instantiated object' );
|
||||||
|
|
||||||
|
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||||
|
# which requires SOAP::Lite
|
||||||
|
$soap->outputxml(1);
|
||||||
|
|
||||||
ok ($xml = $soap->call('test',
|
ok ($xml = $soap->call('test',
|
||||||
testAll => {
|
testAll => {
|
||||||
Test2 => 'Test2',
|
Test2 => 'Test2',
|
||||||
|
|||||||
@@ -36,6 +36,11 @@ ok( $soap->wsdlinit(
|
|||||||
), 'parsed WSDL' );
|
), 'parsed WSDL' );
|
||||||
$soap->no_dispatch(1);
|
$soap->no_dispatch(1);
|
||||||
|
|
||||||
|
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||||
|
# which requires SOAP::Lite
|
||||||
|
$soap->outputxml(1);
|
||||||
|
|
||||||
|
|
||||||
#4
|
#4
|
||||||
ok $xml = $soap->call('test',
|
ok $xml = $soap->call('test',
|
||||||
testSequence => {
|
testSequence => {
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ ok( $soap = SOAP::WSDL->new(
|
|||||||
|
|
||||||
#3
|
#3
|
||||||
$soap->readable(1);
|
$soap->readable(1);
|
||||||
|
|
||||||
|
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||||
|
# which requires SOAP::Lite
|
||||||
|
$soap->outputxml(1);
|
||||||
|
|
||||||
ok( $soap->wsdlinit(
|
ok( $soap->wsdlinit(
|
||||||
servicename => 'testService',
|
servicename => 'testService',
|
||||||
), 'parsed WSDL' );
|
), 'parsed WSDL' );
|
||||||
@@ -34,8 +39,6 @@ $soap->no_dispatch(1);
|
|||||||
ok ( $xml = $soap->call('test', testElement1 => 1 ) ,
|
ok ( $xml = $soap->call('test', testElement1 => 1 ) ,
|
||||||
'Serialized (simpler) element' );
|
'Serialized (simpler) element' );
|
||||||
|
|
||||||
# print $xml, "\n";
|
|
||||||
|
|
||||||
|
|
||||||
TODO: {
|
TODO: {
|
||||||
local $TODO="implement min/maxOccurs checks";
|
local $TODO="implement min/maxOccurs checks";
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ ok( $soap = SOAP::WSDL->new(
|
|||||||
|
|
||||||
#3
|
#3
|
||||||
$soap->readable(1);
|
$soap->readable(1);
|
||||||
|
$soap->outputxml(1);
|
||||||
|
|
||||||
ok( $soap->wsdlinit(
|
ok( $soap->wsdlinit(
|
||||||
servicename => 'testService',
|
servicename => 'testService',
|
||||||
), 'parsed WSDL' );
|
), 'parsed WSDL' );
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ ok( $soap = SOAP::WSDL->new(
|
|||||||
), 'Instantiated object' );
|
), 'Instantiated object' );
|
||||||
|
|
||||||
$soap->readable(1);
|
$soap->readable(1);
|
||||||
|
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||||
|
# which requires SOAP::Lite
|
||||||
|
$soap->outputxml(1);
|
||||||
|
|
||||||
#3
|
#3
|
||||||
ok( $soap->wsdlinit(
|
ok( $soap->wsdlinit(
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ ok( $soap->wsdlinit(
|
|||||||
), 'parsed WSDL' );
|
), 'parsed WSDL' );
|
||||||
$soap->no_dispatch(1);
|
$soap->no_dispatch(1);
|
||||||
$soap->autotype(0);
|
$soap->autotype(0);
|
||||||
|
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||||
|
# which requires SOAP::Lite
|
||||||
|
$soap->outputxml(1);
|
||||||
|
|
||||||
#4
|
#4
|
||||||
ok $xml = $soap->call('test', testAll => [ 1, 2 ] ) , 'Serialize list call';
|
ok $xml = $soap->call('test', testAll => [ 1, 2 ] ) , 'Serialize list call';
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ ok $soap = SOAP::WSDL->new(
|
|||||||
$soap->readable(1);
|
$soap->readable(1);
|
||||||
ok $soap->wsdlinit(), 'parsed WSDL';
|
ok $soap->wsdlinit(), 'parsed WSDL';
|
||||||
$soap->no_dispatch(1);
|
$soap->no_dispatch(1);
|
||||||
|
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||||
|
# which requires SOAP::Lite
|
||||||
|
$soap->outputxml(1);
|
||||||
|
|
||||||
#4
|
#4
|
||||||
ok $xml = $soap->call('test', testAll => 1 ) , 'Serialized call';
|
ok $xml = $soap->call('test', testAll => 1 ) , 'Serialized call';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More tests => 4;
|
use Test::More tests => 4;
|
||||||
use lib '../..';
|
use lib '../../../lib/';
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
|
|
||||||
@@ -43,6 +43,10 @@ ok $soap = SOAP::WSDL->new(
|
|||||||
no_dispatch => 1
|
no_dispatch => 1
|
||||||
), 'Create SOAP::WSDL object';
|
), 'Create SOAP::WSDL object';
|
||||||
|
|
||||||
|
# won't work without - would require SOAP::WSDL::Deserializer::SOM,
|
||||||
|
# which requires SOAP::Lite
|
||||||
|
$soap->outputxml(1);
|
||||||
|
|
||||||
$soap->proxy('http://helloworld/helloworld.asmx');
|
$soap->proxy('http://helloworld/helloworld.asmx');
|
||||||
|
|
||||||
ok $soap->wsdlinit(
|
ok $soap->wsdlinit(
|
||||||
|
|||||||
@@ -27,20 +27,3 @@ ok( $soap = SOAP::WSDL->new(
|
|||||||
ok $soap->wsdlinit( url => $url );
|
ok $soap->wsdlinit( url => $url );
|
||||||
ok $soap->servicename('testService');
|
ok $soap->servicename('testService');
|
||||||
ok $soap->portname('testPort');
|
ok $soap->portname('testPort');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__END__
|
|
||||||
|
|
||||||
my $xpath = $soap->_wsdl_xpath( );
|
|
||||||
|
|
||||||
my @ports = $xpath->findnodes( '/definitions/service[@name="' . $soap->servicename() . '"]/port/soap:address[@location="' . $url .'"]');
|
|
||||||
if (@ports)
|
|
||||||
{
|
|
||||||
print "# found testPort URL\n";
|
|
||||||
my $address = shift @ports;
|
|
||||||
my $port = $address->getParentNode();
|
|
||||||
print $port->getAttribute('binding'), "\n";
|
|
||||||
print $port->getAttribute('name'), "\n";
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
use Test::More tests => 9;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use File::Basename;
|
||||||
|
use SOAP::WSDL::Client;
|
||||||
|
|
||||||
|
my $soap;
|
||||||
|
my $base_dir = dirname( __FILE__ );
|
||||||
|
use_ok(qw/SOAP::WSDL::Transport::Test/);
|
||||||
|
|
||||||
|
$soap = SOAP::WSDL::Client->new();
|
||||||
|
$soap->set_proxy('http://somewhere.over.the.rainbow');
|
||||||
|
|
||||||
|
ok( $soap->get_transport->set_base_dir( join '/', $base_dir, 'acceptance' ) );
|
||||||
|
|
||||||
|
my $response = $soap->call({ operation => 'test', soap_action => 'http://test' }, {});
|
||||||
|
ok ! $response, 'Returned fault on error';
|
||||||
|
is $response->get_faultcode(), 'soap:Server', 'faultcode';
|
||||||
|
is $response->get_faultactor(), 'urn:localhost', 'faultactor';
|
||||||
|
|
||||||
|
$soap->outputxml(1);
|
||||||
|
$response = $soap->call({ operation => 'test', soap_action => 'http://test2' }, {});
|
||||||
|
is $response, 'test2', 'Returned file content';
|
||||||
|
|
||||||
|
SKIP: {
|
||||||
|
eval { require SOAP::WSDL::Deserializer::SOM; }
|
||||||
|
or skip 'SOAP::WSDL::Deserializer::SOM required', 3;
|
||||||
|
# requre SOAP::WSDL::Factory::Deserializer;
|
||||||
|
SOAP::WSDL::Factory::Deserializer->register('1.1', 'SOAP::WSDL::Deserializer::SOM');
|
||||||
|
|
||||||
|
my $soap_som = SOAP::WSDL::Client->new();
|
||||||
|
$soap_som->set_proxy('http://somewhere.over.the.rainbow');
|
||||||
|
$soap_som->get_transport->set_base_dir( join '/', $base_dir, 'acceptance' );
|
||||||
|
|
||||||
|
my $som;
|
||||||
|
ok $som = $soap_som->call({ operation => 'test', soap_action => 'http://test3' }, {})
|
||||||
|
, 'Call with SOAP::WSDL::Deserializer::SOM';
|
||||||
|
|
||||||
|
# In the somewhat weird logic of SOAP::Lite, the first node inside the root element
|
||||||
|
# is the reault, all others are output parameters (and may be accessed via "paramsout")
|
||||||
|
is $som->result(), 'Munich', 'Result match';
|
||||||
|
is $som->paramsout(), 'Germany' , 'Output parameter match';
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
test2
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ><SOAP-ENV:Body><GetWeatherResponse xmlns="http://www.webserviceX.NET"><CityName>Munich</CityName><CountryName>Germany</CountryName></GetWeatherResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Test::More qw(no_plan);
|
||||||
|
use Scalar::Util qw(blessed);
|
||||||
|
use lib '../../../../../../lib';
|
||||||
|
use_ok qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
|
||||||
|
|
||||||
|
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::anyType->new({
|
||||||
|
xmlns => 'urn:Siemens.mosaic'
|
||||||
|
});
|
||||||
|
|
||||||
|
ok blessed $obj, 'constructor returned blessed reference';
|
||||||
|
|
||||||
|
ok $obj->set_xmlns('urn:SOAP-WSDL'), 'set_xmlns';
|
||||||
|
is $obj->get_xmlns(), 'urn:SOAP-WSDL', 'get_xmlns';
|
||||||
|
|
||||||
|
is $obj->start_tag({ name => 'test' }), '<test >', 'start_tag';
|
||||||
|
is $obj->end_tag({ name => 'test' }), '</test >', 'end_tag';
|
||||||
|
|
||||||
|
is "$obj", q{}, 'serialize overloading';
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Test::More qw(no_plan);
|
||||||
|
use Scalar::Util qw(blessed);
|
||||||
|
use lib '../../../../../../lib';
|
||||||
|
use_ok qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({});
|
||||||
|
|
||||||
|
ok $obj->set_xmlns('urn:SOAP-WSDL'), 'set_xmlns';
|
||||||
|
is $obj->get_xmlns(), 'urn:SOAP-WSDL', 'get_xmlns';
|
||||||
|
|
||||||
|
ok blessed $obj, 'constructor returned blessed reference';
|
||||||
|
|
||||||
|
is $obj->start_tag({ name => 'test' }), '<test >', 'start_tag';
|
||||||
|
is $obj->end_tag({ name => 'test' }), '</test >', 'end_tag';
|
||||||
|
|
||||||
|
ok $obj->set_value('test'), 'set_value';
|
||||||
|
is $obj->get_value(), 'test', 'get_value';
|
||||||
|
|
||||||
|
is "$obj", q{test}, 'serialize overloading';
|
||||||
|
|
||||||
|
ok ($obj)
|
||||||
|
? pass 'boolean overloading'
|
||||||
|
: fail 'boolean overloading';
|
||||||
|
|
||||||
|
ok ! $obj->set_value(undef), 'set_value with explicit undef';
|
||||||
|
is $obj->get_value(), undef, 'get_value';
|
||||||
|
|
||||||
|
is "$obj", q{}, 'stringification overloading';
|
||||||
|
|
||||||
|
ok $obj = SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({
|
||||||
|
xmlns => 'urn:XSD',
|
||||||
|
value => 'test2',
|
||||||
|
});
|
||||||
|
|
||||||
|
is $obj->get_xmlns(), 'urn:XSD', 'get_xmlns on attr value';
|
||||||
|
is $obj->get_value(), 'test2', 'get_value on attr value';
|
||||||
|
|
||||||
|
$obj->set_value(undef);
|
||||||
|
|
||||||
|
is $obj->serialize({ name => 'foo' }), '<foo ></foo >'
|
||||||
|
, 'serialize undef value with name';
|
||||||
|
is $obj->serialize(), q{}, 'serialize undef value without name'
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
use Test::More tests => 6;
|
use Test::More tests => 30;
|
||||||
use strict;
|
use strict;
|
||||||
|
use Carp qw(cluck);
|
||||||
|
|
||||||
|
$SIG{__WARN__} = sub { cluck @_ };
|
||||||
use warnings;
|
use warnings;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use Date::Format;
|
use Date::Format;
|
||||||
@@ -8,7 +11,7 @@ use_ok('SOAP::WSDL::XSD::Typelib::Builtin::date');
|
|||||||
my $obj;
|
my $obj;
|
||||||
|
|
||||||
sub timezone {
|
sub timezone {
|
||||||
my @time = strptime shift;
|
my @time = map { defined $_ ? $_ : 0 } strptime shift;
|
||||||
my $tz = strftime('%z', @time);
|
my $tz = strftime('%z', @time);
|
||||||
substr $tz, -2, 0, ':';
|
substr $tz, -2, 0, ':';
|
||||||
return $tz;
|
return $tz;
|
||||||
@@ -20,6 +23,44 @@ my %dates = (
|
|||||||
'30 Aug 2007' => '2007-08-30',
|
'30 Aug 2007' => '2007-08-30',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my %localized_date_of = (
|
||||||
|
'2007-12-31T00:00:00.0000000+0000' => '2007-12-31+00:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+0130' => '2007-12-31+01:30',
|
||||||
|
'2007-12-31T00:00:00.0000000+0200' => '2007-12-31+02:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+0300' => '2007-12-31+03:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+0400' => '2007-12-31+04:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+0500' => '2007-12-31+05:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+0600' => '2007-12-31+06:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+0700' => '2007-12-31+07:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+0800' => '2007-12-31+08:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+0900' => '2007-12-31+09:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+1000' => '2007-12-31+10:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+1100' => '2007-12-31+11:00',
|
||||||
|
'2007-12-31T00:00:00.0000000+1200' => '2007-12-31+12:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-0100' => '2007-12-31-01:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-0200' => '2007-12-31-02:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-0300' => '2007-12-31-03:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-0400' => '2007-12-31-04:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-0500' => '2007-12-31-05:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-0600' => '2007-12-31-06:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-0700' => '2007-12-31-07:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-0800' => '2007-12-31-08:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-0900' => '2007-12-31-09:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-1000' => '2007-12-31-10:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-1100' => '2007-12-31-11:00',
|
||||||
|
'2007-12-31T00:00:00.0000000-1200' => '2007-12-31-12:00',
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
while (my ($date, $converted) = each %localized_date_of ) {
|
||||||
|
|
||||||
|
$obj = SOAP::WSDL::XSD::Typelib::Builtin::date->new();
|
||||||
|
$obj->set_value( $date );
|
||||||
|
|
||||||
|
is $obj->get_value() , $converted , 'conversion';
|
||||||
|
}
|
||||||
|
|
||||||
while (my ($date, $converted) = each %dates ) {
|
while (my ($date, $converted) = each %dates ) {
|
||||||
|
|
||||||
$obj = SOAP::WSDL::XSD::Typelib::Builtin::date->new();
|
$obj = SOAP::WSDL::XSD::Typelib::Builtin::date->new();
|
||||||
@@ -28,9 +69,6 @@ while (my ($date, $converted) = each %dates ) {
|
|||||||
is $obj->get_value() , $converted . timezone($date), 'conversion';
|
is $obj->get_value() , $converted . timezone($date), 'conversion';
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj->set_value('2007-12-31T00:00:00.0000000+01:00');
|
$obj->set_value( '2037-12-31+12:00' );
|
||||||
is $obj->get_value() , '2007-12-31+01:00', 'conversion from XML dateTime';
|
is $obj->get_value() , '2037-12-31+12:00', 'no conversion on match';
|
||||||
|
|
||||||
$obj->set_value( '2037-12-31' );
|
|
||||||
is $obj->get_value() , '2037-12-31', 'no conversion on match';
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<definitions name="urn:simpleType"
|
<definitions name="urn:simpleType"
|
||||||
targetNamespace="urn:simpleType"
|
targetNamespace="urn:simpleType"
|
||||||
xmlns:tns="urn:simpleType"
|
xmlns:tns="urn:simpleType"
|
||||||
xmlns:wsd="http://www.w3c.org/2001/XMLSchema"
|
xmlns:xsd="http://www.w3c.org/2001/XMLSchema"
|
||||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
package MyElement;
|
package MyElement;
|
||||||
use strict;
|
use strict;
|
||||||
use Class::Std::Storable;
|
|
||||||
use SOAP::WSDL::XSD::Typelib::Element;
|
use SOAP::WSDL::XSD::Typelib::Element;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
use base (
|
use base (
|
||||||
@@ -14,7 +13,6 @@ sub get_xmlns { 'urn:Test' };
|
|||||||
|
|
||||||
package MyComplexTypeElement;
|
package MyComplexTypeElement;
|
||||||
use strict;
|
use strict;
|
||||||
use Class::Std::Storable;
|
|
||||||
use SOAP::WSDL::XSD::Typelib::Element;
|
use SOAP::WSDL::XSD::Typelib::Element;
|
||||||
use MyComplexType;
|
use MyComplexType;
|
||||||
use base (
|
use base (
|
||||||
@@ -27,7 +25,6 @@ sub get_xmlns { 'urn:Test' };
|
|||||||
|
|
||||||
package MyTestElement;
|
package MyTestElement;
|
||||||
use strict;
|
use strict;
|
||||||
use Class::Std::Storable;
|
|
||||||
use SOAP::WSDL::XSD::Typelib::Element;
|
use SOAP::WSDL::XSD::Typelib::Element;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin::string;
|
use SOAP::WSDL::XSD::Typelib::Builtin::string;
|
||||||
use base (
|
use base (
|
||||||
@@ -41,7 +38,6 @@ sub get_xmlns { 'urn:Test' };
|
|||||||
|
|
||||||
package MyTestElement2;
|
package MyTestElement2;
|
||||||
use strict;
|
use strict;
|
||||||
use Class::Std::Storable;
|
|
||||||
use SOAP::WSDL::XSD::Typelib::Element;
|
use SOAP::WSDL::XSD::Typelib::Element;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
use base (
|
use base (
|
||||||
@@ -57,7 +53,6 @@ sub get_xmlns { 'urn:Test' };
|
|||||||
package MyAtomicComplexTypeElement;
|
package MyAtomicComplexTypeElement;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Class::Std::Storable;
|
|
||||||
use SOAP::WSDL::XSD::Typelib::Element;
|
use SOAP::WSDL::XSD::Typelib::Element;
|
||||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package Typelib::TEnqueueMessage;
|
package Typelib::TEnqueueMessage;
|
||||||
use strict;
|
use strict;
|
||||||
use base qw(Typelib::Base);
|
use base qw(Typelib::Base);
|
||||||
use Class::Std::Storable;
|
|
||||||
|
|
||||||
my %MMessage_of :ATTR(:name<MMessage> :default<()>);
|
my %MMessage_of :ATTR(:name<MMessage> :default<()>);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package Typelib::TMessage;
|
package Typelib::TMessage;
|
||||||
use strict;
|
use strict;
|
||||||
use base qw(Typelib::Base);
|
use base qw(Typelib::Base);
|
||||||
use Class::Std::Storable;
|
|
||||||
|
|
||||||
my %MRecipientURI_of :ATTR(:name<MRecipientURI> :default<()>);
|
my %MRecipientURI_of :ATTR(:name<MRecipientURI> :default<()>);
|
||||||
my %MMessageContent_of :ATTR(:name<MMessageContent> :default<()>);
|
my %MMessageContent_of :ATTR(:name<MMessageContent> :default<()>);
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
use Date::Format;
|
||||||
|
use Date::Parse;
|
||||||
|
use Date::Language;
|
||||||
|
my $date_string='2007-12-13T00:00:00.12345+0300';
|
||||||
|
|
||||||
|
my $time = str2time( $date_string );
|
||||||
|
print $time,"\n";
|
||||||
|
|
||||||
|
$date_string='2007-12-13T00:00:00.12345+0200';
|
||||||
|
my $time = str2time( $date_string );
|
||||||
|
|
||||||
|
|
||||||
|
print time2str('%d. %B %Y %H %M %S', $time, '+0200' );
|
||||||
|
|
||||||
Reference in New Issue
Block a user