Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
080b211e4e | ||
|
|
fa4d5dd884 | ||
|
|
3d11524449 |
@@ -4,11 +4,15 @@ $build = Module::Build->new(
|
|||||||
create_makefile_pl => 'passthrough',
|
create_makefile_pl => 'passthrough',
|
||||||
dist_abstract => 'SOAP with WSDL support',
|
dist_abstract => 'SOAP with WSDL support',
|
||||||
dist_name => 'SOAP-WSDL',
|
dist_name => 'SOAP-WSDL',
|
||||||
dist_version => '2.00_18',
|
dist_version => '2.00_22',
|
||||||
module_name => 'SOAP::WSDL',
|
module_name => 'SOAP::WSDL',
|
||||||
license => 'artistic',
|
license => 'artistic',
|
||||||
requires => {
|
requires => {
|
||||||
'Class::Std' => q/v0.0.8/,
|
# 5.6.x is way too buggy and has no unicode support
|
||||||
|
# for us. SOAP-WSDL relies on unicode (WS-I demands it)
|
||||||
|
# and triggers several 5.6 bugs...
|
||||||
|
'perl' => '5.8.0',
|
||||||
|
'Class::Std' => q/v0.0.8/,
|
||||||
'Class::Std::Storable' => 0,
|
'Class::Std::Storable' => 0,
|
||||||
'Data::Dumper' => 0,
|
'Data::Dumper' => 0,
|
||||||
'Date::Parse' => 0,
|
'Date::Parse' => 0,
|
||||||
@@ -40,6 +44,11 @@ $build = Module::Build->new(
|
|||||||
'XML::Parser::Expat' => 0,
|
'XML::Parser::Expat' => 0,
|
||||||
},
|
},
|
||||||
recursive_test_files => 1,
|
recursive_test_files => 1,
|
||||||
|
meta_add => {
|
||||||
|
no_index => {
|
||||||
|
directory => 'lib/SOAP/WSDL/Generator/Template/XSD/',
|
||||||
|
},
|
||||||
|
}
|
||||||
);
|
);
|
||||||
$build->add_build_element('tt');
|
$build->add_build_element('tt');
|
||||||
$build->create_build_script;
|
$build->create_build_script;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Release notes for SOAP::WSDL 2.00_18
|
Release notes for SOAP::WSDL 2.00_22
|
||||||
-------
|
-------
|
||||||
|
|
||||||
I'm proud to present a new pre-release version of SOAP::WSDL.
|
I'm proud to present a new pre-release version of SOAP::WSDL.
|
||||||
@@ -33,6 +33,70 @@ Features:
|
|||||||
|
|
||||||
The following changes have been made:
|
The following changes have been made:
|
||||||
|
|
||||||
|
2.00_22
|
||||||
|
----
|
||||||
|
|
||||||
|
The following bugs have been fixed (the numbers in square brackets are the
|
||||||
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||||
|
|
||||||
|
* [ 1817697 ] Dots in service/port names lead to broken interfaces
|
||||||
|
* [ 1817699 ] Templates not found on all OS
|
||||||
|
|
||||||
|
The following uncategorized improvements have been made:
|
||||||
|
|
||||||
|
* Code cleanup. The XSD library has been cleaned up a bit. Should result
|
||||||
|
in a minor speedup in serializing and deserializing XML messages,
|
||||||
|
|
||||||
|
|
||||||
|
2.00_21 - not released
|
||||||
|
----
|
||||||
|
The following bugs have been fixed (the numbers in square brackets are the
|
||||||
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||||
|
|
||||||
|
* [ 1810058 ] .tt's pod indexed on CPAN (again)
|
||||||
|
* [ 1809284 ] Rename SOAP::WSDL::Deserializer::SOAP11 to ::XSD
|
||||||
|
|
||||||
|
The following uncategorized improvements have been made:
|
||||||
|
|
||||||
|
* Requires at least perl 5.8.0. This is due to a bug in perls before -
|
||||||
|
see http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/929746
|
||||||
|
|
||||||
|
2.00_20
|
||||||
|
----
|
||||||
|
The following features were added (the numbers in square brackets are the
|
||||||
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||||
|
|
||||||
|
* [ 1815646 ] Only include last part of port name in interface
|
||||||
|
* [ 1815648 ] Methods with empty body cannot be called as ->method()
|
||||||
|
* [ 1815651 ] Empty complexType definitions not supported
|
||||||
|
|
||||||
|
The following bugs have been fixed (the numbers in square brackets are the
|
||||||
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||||
|
|
||||||
|
* [ 1815643 ] ComplexTypes cannot be freezed/thawed
|
||||||
|
|
||||||
|
The following uncategorized improvements have been made:
|
||||||
|
|
||||||
|
* WSDL definitions are decoded into utf8
|
||||||
|
* fixed tests to use correct path on windows
|
||||||
|
|
||||||
|
2.00_19
|
||||||
|
----
|
||||||
|
The following features were added (the numbers in square brackets are the
|
||||||
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660924):
|
||||||
|
|
||||||
|
* [ 1810395 ] Implement complexType complexContent extension
|
||||||
|
|
||||||
|
The following bugs have been fixed (the numbers in square brackets are the
|
||||||
|
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||||
|
|
||||||
|
* [ 1813144 ] Typemap not used in interface class
|
||||||
|
* [ 1810058 ] .tt's pod indexed on CPAN
|
||||||
|
|
||||||
|
The following uncategorized improvements have been made:
|
||||||
|
|
||||||
|
* Documentation improvements
|
||||||
|
|
||||||
2.00_18
|
2.00_18
|
||||||
----
|
----
|
||||||
The following features were added (the numbers in square brackets are the
|
The following features were added (the numbers in square brackets are the
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ 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/Hash.pm
|
lib/SOAP/WSDL/Deserializer/Hash.pm
|
||||||
lib/SOAP/WSDL/Deserializer/SOAP11.pm
|
lib/SOAP/WSDL/Deserializer/XSD.pm
|
||||||
lib/SOAP/WSDL/Deserializer/SOM.pm
|
lib/SOAP/WSDL/Deserializer/SOM.pm
|
||||||
lib/SOAP/WSDL/Expat/Base.pm
|
lib/SOAP/WSDL/Expat/Base.pm
|
||||||
lib/SOAP/WSDL/Expat/Message2Hash.pm
|
lib/SOAP/WSDL/Expat/Message2Hash.pm
|
||||||
@@ -59,12 +59,14 @@ lib/SOAP/WSDL/Generator/Template/XSD/complexType/all.tt
|
|||||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/atomicTypes.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/atomicTypes.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/complexContent.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/complexContent.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/contentModel.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/contentModel.tt
|
||||||
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/extension.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/all.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/all.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/choice.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/choice.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/complexContent.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/complexContent.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/restriction.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/restriction.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/structure.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/structure.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/complexType/restriction.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/restriction.tt
|
||||||
|
lib/SOAP/WSDL/Generator/Template/XSD/complexType/variety.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/element.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/element.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/element/POD/structure.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/element/POD/structure.tt
|
||||||
lib/SOAP/WSDL/Generator/Template/XSD/Interface.tt
|
lib/SOAP/WSDL/Generator/Template/XSD/Interface.tt
|
||||||
@@ -100,7 +102,7 @@ lib/SOAP/WSDL/OpMessage.pm
|
|||||||
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/Serializer/SOAP11.pm
|
lib/SOAP/WSDL/Serializer/XSD.pm
|
||||||
lib/SOAP/WSDL/Service.pm
|
lib/SOAP/WSDL/Service.pm
|
||||||
lib/SOAP/WSDL/SOAP/Address.pm
|
lib/SOAP/WSDL/SOAP/Address.pm
|
||||||
lib/SOAP/WSDL/SOAP/Body.pm
|
lib/SOAP/WSDL/SOAP/Body.pm
|
||||||
@@ -312,3 +314,6 @@ t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.t
|
|||||||
t/test.wsdl
|
t/test.wsdl
|
||||||
TEST_COVERAGE
|
TEST_COVERAGE
|
||||||
TODO
|
TODO
|
||||||
|
|
||||||
|
SOAP-WSDL-2.00_21.ppd
|
||||||
|
SOAP-WSDL-2.00_21.zip
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: SOAP-WSDL
|
name: SOAP-WSDL
|
||||||
version: 2.00_18
|
version: 2.00_22
|
||||||
author: []
|
author: []
|
||||||
abstract: SOAP with WSDL support
|
abstract: SOAP with WSDL support
|
||||||
license: artistic
|
license: artistic
|
||||||
@@ -20,6 +20,7 @@ requires:
|
|||||||
Template: 0
|
Template: 0
|
||||||
Term::ReadKey: 0
|
Term::ReadKey: 0
|
||||||
XML::Parser::Expat: 0
|
XML::Parser::Expat: 0
|
||||||
|
perl: 5.8.0
|
||||||
provides:
|
provides:
|
||||||
SOAP::WSDL:
|
SOAP::WSDL:
|
||||||
file: lib/SOAP/WSDL.pm
|
file: lib/SOAP/WSDL.pm
|
||||||
@@ -41,12 +42,12 @@ provides:
|
|||||||
SOAP::WSDL::Deserializer::Hash:
|
SOAP::WSDL::Deserializer::Hash:
|
||||||
file: lib/SOAP/WSDL/Deserializer/Hash.pm
|
file: lib/SOAP/WSDL/Deserializer/Hash.pm
|
||||||
version: 2.00_17
|
version: 2.00_17
|
||||||
SOAP::WSDL::Deserializer::SOAP11:
|
|
||||||
file: lib/SOAP/WSDL/Deserializer/SOAP11.pm
|
|
||||||
version: 2.00_17
|
|
||||||
SOAP::WSDL::Deserializer::SOM:
|
SOAP::WSDL::Deserializer::SOM:
|
||||||
file: lib/SOAP/WSDL/Deserializer/SOM.pm
|
file: lib/SOAP/WSDL/Deserializer/SOM.pm
|
||||||
version: 2.00_15
|
version: 2.00_15
|
||||||
|
SOAP::WSDL::Deserializer::XSD:
|
||||||
|
file: lib/SOAP/WSDL/Deserializer/XSD.pm
|
||||||
|
version: 2.00_21
|
||||||
SOAP::WSDL::Expat::Base:
|
SOAP::WSDL::Expat::Base:
|
||||||
file: lib/SOAP/WSDL/Expat/Base.pm
|
file: lib/SOAP/WSDL/Expat/Base.pm
|
||||||
SOAP::WSDL::Expat::Message2Hash:
|
SOAP::WSDL::Expat::Message2Hash:
|
||||||
@@ -104,9 +105,9 @@ provides:
|
|||||||
SOAP::WSDL::SOAP::Typelib::Fault11:
|
SOAP::WSDL::SOAP::Typelib::Fault11:
|
||||||
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
|
||||||
version: 2.00_17
|
version: 2.00_17
|
||||||
SOAP::WSDL::Serializer::SOAP11:
|
SOAP::WSDL::Serializer::XSD:
|
||||||
file: lib/SOAP/WSDL/Serializer/SOAP11.pm
|
file: lib/SOAP/WSDL/Serializer/XSD.pm
|
||||||
version: 2.00_13
|
version: 2.00_21
|
||||||
SOAP::WSDL::Service:
|
SOAP::WSDL::Service:
|
||||||
file: lib/SOAP/WSDL/Service.pm
|
file: lib/SOAP/WSDL/Service.pm
|
||||||
SOAP::WSDL::Transport::HTTP:
|
SOAP::WSDL::Transport::HTTP:
|
||||||
@@ -128,7 +129,7 @@ provides:
|
|||||||
version: 2.00_17
|
version: 2.00_17
|
||||||
SOAP::WSDL::XSD::Element:
|
SOAP::WSDL::XSD::Element:
|
||||||
file: lib/SOAP/WSDL/XSD/Element.pm
|
file: lib/SOAP/WSDL/XSD/Element.pm
|
||||||
version: 2.00_17
|
version: 2.00_22
|
||||||
SOAP::WSDL::XSD::Schema:
|
SOAP::WSDL::XSD::Schema:
|
||||||
file: lib/SOAP/WSDL/XSD/Schema.pm
|
file: lib/SOAP/WSDL/XSD/Schema.pm
|
||||||
SOAP::WSDL::XSD::Schema::Builtin:
|
SOAP::WSDL::XSD::Schema::Builtin:
|
||||||
@@ -235,7 +236,7 @@ provides:
|
|||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
|
||||||
SOAP::WSDL::XSD::Typelib::ComplexType:
|
SOAP::WSDL::XSD::Typelib::ComplexType:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
|
||||||
version: 2.00_16
|
version: 2.00_22
|
||||||
SOAP::WSDL::XSD::Typelib::Element:
|
SOAP::WSDL::XSD::Typelib::Element:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Element.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Element.pm
|
||||||
SOAP::WSDL::XSD::Typelib::SimpleType:
|
SOAP::WSDL::XSD::Typelib::SimpleType:
|
||||||
@@ -246,3 +247,5 @@ generated_by: Module::Build version 0.2808
|
|||||||
meta-spec:
|
meta-spec:
|
||||||
url: http://module-build.sourceforge.net/META-spec-v1.2.html
|
url: http://module-build.sourceforge.net/META-spec-v1.2.html
|
||||||
version: 1.2
|
version: 1.2
|
||||||
|
no_index:
|
||||||
|
directory: lib/SOAP/WSDL/Generator/Template/XSD/
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<SOFTPKG NAME="SOAP-WSDL-2.00_21" VERSION="2,00_21,0,0">
|
||||||
|
<TITLE>SOAP-WSDL-2.00_21</TITLE>
|
||||||
|
<ABSTRACT>SOAP with WSDL support</ABSTRACT>
|
||||||
|
<AUTHOR>Martin Kutter <MKUTTER@cpan.org></AUTHOR>
|
||||||
|
<IMPLEMENTATION>
|
||||||
|
<DEPENDENCY NAME="Class-Std" VERSION="v0,0,8,0" />
|
||||||
|
<DEPENDENCY NAME="Class-Std-Storable" VERSION="0,0,0,0" />
|
||||||
|
<DEPENDENCY NAME="Template-Toolkit" VERSION="0,0,0,0" />
|
||||||
|
<DEPENDENCY NAME="TimeDate" VERSION="0,0,0,0" />
|
||||||
|
<OS NAME="MSWin32" />
|
||||||
|
<ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" />
|
||||||
|
<CODEBASE HREF="SOAP-WSDL-2.00_21.zip" />
|
||||||
|
</IMPLEMENTATION>
|
||||||
|
</SOFTPKG>
|
||||||
Binary file not shown.
@@ -2,7 +2,6 @@ TODO list for SOAP::WSDL
|
|||||||
|
|
||||||
2.00 Pre-releases
|
2.00 Pre-releases
|
||||||
--------
|
--------
|
||||||
* Implement a Generator Plugin API
|
|
||||||
|
|
||||||
* Implement a interface similar to SOAP::Schema (#1783639)
|
* Implement a interface similar to SOAP::Schema (#1783639)
|
||||||
|
|
||||||
|
|||||||
+8
-3
@@ -604,6 +604,11 @@ details.
|
|||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
|
=item * perl 5.8.0 or higher required
|
||||||
|
|
||||||
|
SOAP::WSDL needs perl 5.8.0 or higher. This is due to a bug in perls
|
||||||
|
before - see http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/929746 for details.
|
||||||
|
|
||||||
=item * Apache SOAP datatypes are not supported
|
=item * Apache SOAP datatypes are not supported
|
||||||
|
|
||||||
You currently can't use SOAP::WSDL with Apache SOAP datatypes like map.
|
You currently can't use SOAP::WSDL with Apache SOAP datatypes like map.
|
||||||
@@ -731,10 +736,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 308 $
|
$Rev: 332 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: WSDL.pm 308 2007-10-05 17:35:28Z kutterma $
|
$Id: WSDL.pm 332 2007-10-19 07:29:03Z kutterma $
|
||||||
$HeadURL: http://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
|
||||||
|
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
$Rev: 303 $
|
$Rev: 303 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Client.pm 303 2007-10-01 18:51:50Z kutterma $
|
$Id: Client.pm 303 2007-10-01 18:51:50Z kutterma $
|
||||||
$HeadURL: http://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
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ our $VERSION = '2.00_17';
|
|||||||
sub call {
|
sub call {
|
||||||
my ($self, $method, $body, $header) = @_;
|
my ($self, $method, $body, $header) = @_;
|
||||||
if (not blessed $body) {
|
if (not blessed $body) {
|
||||||
|
$body = {} if not defined $body;
|
||||||
my $class = $method->{ body }->{ parts }->[0];
|
my $class = $method->{ body }->{ parts }->[0];
|
||||||
eval "require $class" || die $@;
|
eval "require $class" || die $@;
|
||||||
$body = $class->new($body);
|
$body = $class->new($body);
|
||||||
@@ -116,9 +117,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 303 $
|
$Rev: 323 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Base.pm 303 2007-10-01 18:51:50Z kutterma $
|
$Id: Base.pm 323 2007-10-17 15:23:05Z kutterma $
|
||||||
$HeadURL: http://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
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package SOAP::WSDL::Deserializer::SOAP11;
|
package SOAP::WSDL::Deserializer::XSD;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
use SOAP::WSDL::SOAP::Typelib::Fault11;
|
use SOAP::WSDL::SOAP::Typelib::Fault11;
|
||||||
use SOAP::WSDL::Expat::MessageParser;
|
use SOAP::WSDL::Expat::MessageParser;
|
||||||
|
|
||||||
our $VERSION='2.00_17';
|
our $VERSION='2.00_21';
|
||||||
|
|
||||||
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
||||||
|
|
||||||
@@ -234,9 +234,9 @@ This module may be used under the same terms as perl itself.
|
|||||||
|
|
||||||
$ID: $
|
$ID: $
|
||||||
|
|
||||||
$LastChangedDate: 2007-10-07 19:27:58 +0200 (Son, 07 Okt 2007) $
|
$LastChangedDate: 2007-10-07 19:27:58 +0200 (So, 07 Okt 2007) $
|
||||||
$LastChangedRevision: 313 $
|
$LastChangedRevision: 313 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
|
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $
|
||||||
|
|
||||||
|
|||||||
@@ -68,9 +68,9 @@ This module may be used under the same terms as perl itself.
|
|||||||
|
|
||||||
$ID: $
|
$ID: $
|
||||||
|
|
||||||
$LastChangedDate: 2007-10-07 19:27:58 +0200 (Son, 07 Okt 2007) $
|
$LastChangedDate: 2007-10-07 19:27:58 +0200 (So, 07 Okt 2007) $
|
||||||
$LastChangedRevision: 313 $
|
$LastChangedRevision: 313 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
|
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageStreamParser.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageStreamParser.pm $
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my %DESERIALIZER = (
|
my %DESERIALIZER = (
|
||||||
'1.1' => 'SOAP::WSDL::Deserializer::SOAP11',
|
'1.1' => 'SOAP::WSDL::Deserializer::XSD',
|
||||||
);
|
);
|
||||||
|
|
||||||
# class method
|
# class method
|
||||||
@@ -64,7 +64,7 @@ SOAP::WSDL::Deserializer tries to load one of the following classes:
|
|||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
By default, L<SOAP::WSDL::Deserializer::SOAP11|SOAP::WSDL::Deserializer::SOAP11>
|
By default, L<SOAP::WSDL::Deserializer::XSD|SOAP::WSDL::Deserializer::XSD>
|
||||||
is registered for SOAP1.1 messages.
|
is registered for SOAP1.1 messages.
|
||||||
|
|
||||||
=head1 METHODS
|
=head1 METHODS
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use warnings;
|
|||||||
our $VERSION='2.00_17';
|
our $VERSION='2.00_17';
|
||||||
|
|
||||||
my %SERIALIZER = (
|
my %SERIALIZER = (
|
||||||
'1.1' => 'SOAP::WSDL::Serializer::SOAP11',
|
'1.1' => 'SOAP::WSDL::Serializer::XSD',
|
||||||
);
|
);
|
||||||
|
|
||||||
# class method
|
# class method
|
||||||
@@ -95,7 +95,7 @@ class should be used for, and $class is the class 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() in
|
To auto-register your transport class on loading, execute register() in
|
||||||
your tranport class (see L<SYNOPSIS|SYNOPSIS> above).
|
your tranport class (see L</SYNOPSIS> above).
|
||||||
|
|
||||||
=head2 Serializer package layout
|
=head2 Serializer package layout
|
||||||
|
|
||||||
@@ -138,9 +138,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 302 $
|
$Rev: 329 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Serializer.pm 302 2007-09-30 19:25:25Z kutterma $
|
$Id: Serializer.pm 329 2007-10-18 19:42:09Z kutterma $
|
||||||
$HeadURL: http://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
|
||||||
|
|||||||
@@ -239,6 +239,6 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
$Rev: 304 $
|
$Rev: 304 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: Transport.pm 304 2007-10-02 20:07:21Z kutterma $
|
$Id: Transport.pm 304 2007-10-02 20:07:21Z kutterma $
|
||||||
$HeadURL: http://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
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ sub _process :PROTECTED {
|
|||||||
%{ $arg_ref }
|
%{ $arg_ref }
|
||||||
},
|
},
|
||||||
$output)
|
$output)
|
||||||
or die $tt->error();
|
or die $INCLUDE_PATH_of{ $ident }, '\\', $template, ' ', $tt->error();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,15 +18,38 @@ sub BUILD {
|
|||||||
$self->set_RECURSION(1);
|
$self->set_RECURSION(1);
|
||||||
$self->set_INCLUDE_PATH( exists $arg_ref->{INCLUDE_PATH}
|
$self->set_INCLUDE_PATH( exists $arg_ref->{INCLUDE_PATH}
|
||||||
? $arg_ref->{INCLUDE_PATH}
|
? $arg_ref->{INCLUDE_PATH}
|
||||||
: File::Spec->rel2abs( dirname __FILE__ ). '/XSD/'
|
: do {
|
||||||
|
# ignore uninitialized warnings - File::Spec warns about
|
||||||
|
# uninitialized values, probably because we have no filename
|
||||||
|
local $SIG{__WARN__} = sub {
|
||||||
|
return if ($_[0]=~m{\buninitialized\b});
|
||||||
|
CORE::warn @_;
|
||||||
|
};
|
||||||
|
|
||||||
|
# makeup path for the OS we're running on
|
||||||
|
my ($volume, $dir, $file) = File::Spec->splitpath(
|
||||||
|
File::Spec->rel2abs( dirname __FILE__ )
|
||||||
|
);
|
||||||
|
$dir = File::Spec->catdir($dir, $file, 'XSD');
|
||||||
|
# return path put together...
|
||||||
|
my $path = File::Spec->catpath( $volume, $dir );
|
||||||
|
|
||||||
|
# Fixup path for windows - / works fine, \ does
|
||||||
|
# not...
|
||||||
|
if ( eval { &Win32::BuildNumber } ) {
|
||||||
|
$path =~s{\\}{/}g;
|
||||||
|
}
|
||||||
|
$path;
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub generate {
|
sub generate {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->generate_typelib();
|
my $opt = shift;
|
||||||
$self->generate_interface();
|
$self->generate_typelib( $opt );
|
||||||
$self->generate_typemap();
|
$self->generate_interface( $opt );
|
||||||
|
$self->generate_typemap( $opt );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub generate_typelib {
|
sub generate_typelib {
|
||||||
@@ -54,17 +77,24 @@ sub generate_interface {
|
|||||||
next if not $port->first_address;
|
next if not $port->first_address;
|
||||||
next if not $port->first_address->isa('SOAP::WSDL::SOAP::Address');
|
next if not $port->first_address->isa('SOAP::WSDL::SOAP::Address');
|
||||||
|
|
||||||
|
my $port_name = $port->get_name;
|
||||||
|
$port_name =~s{ \A .+\. }{}xms;
|
||||||
my $output = $arg_ref->{ output }
|
my $output = $arg_ref->{ output }
|
||||||
? $arg_ref->{ output }
|
? $arg_ref->{ output }
|
||||||
: $self->_generate_filename( $self->get_interface_prefix(), $service->get_name(), $port->get_name );
|
: $self->_generate_filename(
|
||||||
|
$self->get_interface_prefix(),
|
||||||
|
$service->get_name(),
|
||||||
|
$port_name,
|
||||||
|
);
|
||||||
|
print "Creating interface class $output\n";
|
||||||
|
|
||||||
$self->_process('Interface.tt',
|
$self->_process('Interface.tt',
|
||||||
{
|
{
|
||||||
service => $service,
|
service => $service,
|
||||||
port => $port,
|
port => $port,
|
||||||
NO_POD => $arg_ref->{ NO_POD } ? 1 : 0 ,
|
NO_POD => $arg_ref->{ NO_POD } ? 1 : 0 ,
|
||||||
},
|
},
|
||||||
$output);
|
$output, binmode => ':utf8');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,6 +120,8 @@ sub generate_typemap {
|
|||||||
my $output = $arg_ref->{ output }
|
my $output = $arg_ref->{ output }
|
||||||
? $arg_ref->{ output }
|
? $arg_ref->{ output }
|
||||||
: $self->_generate_filename( $self->get_typemap_prefix(), $service->get_name() );
|
: $self->_generate_filename( $self->get_typemap_prefix(), $service->get_name() );
|
||||||
|
|
||||||
|
print "Creating typemap class $output\n";
|
||||||
$self->_process('Typemap.tt',
|
$self->_process('Typemap.tt',
|
||||||
{
|
{
|
||||||
service => $service,
|
service => $service,
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
package [% interface_prefix %]::[% service.get_name %]::[% port.get_name %];
|
package [% interface_prefix %]::[% service.get_name.replace('\.', '::') %]::[% port.get_name.replace('^.+\.','') %];
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
use base qw(SOAP::WSDL::Client::Base);
|
use base qw(SOAP::WSDL::Client::Base);
|
||||||
|
|
||||||
|
# only load if it hasn't been loaded before
|
||||||
|
require [% typemap_prefix %]::[% service.get_name.replace('\.', '::') %]
|
||||||
|
if not [% typemap_prefix %]::[% service.get_name.replace('\.', '::') %]->can('get_class');
|
||||||
|
|
||||||
sub START {
|
sub START {
|
||||||
$_[0]->set_proxy('[% port.first_address.get_location %]') if not $_[2]->{proxy};
|
$_[0]->set_proxy('[% port.first_address.get_location %]') if not $_[2]->{proxy};
|
||||||
$_[0]->set_class_resolver('[% typemap_prefix %]::[% service.get_name %]')
|
$_[0]->set_class_resolver('[% typemap_prefix %]::[% service.get_name.replace('\.', '::') %]')
|
||||||
if not $_[2]->{class_resolver};
|
if not $_[2]->{class_resolver};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
use Class::Std::Storable;
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||||
|
|
||||||
{ # BLOCK to scope variables
|
{ # BLOCK to scope variables
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[% IF (complexType.get_variety == 'restriction');
|
[% IF (complexType.get_variety == 'restriction');
|
||||||
INCLUDE complexType/restriction.tt(complexType = complexType);
|
INCLUDE complexType/restriction.tt(complexType = complexType);
|
||||||
ELSIF (complexType.get_variety == 'sequence');
|
ELSIF (complexType.get_variety == 'sequence');
|
||||||
THROW NOT_IMPLEMENTED, "${ complexType.get_name } - complexType complexContent extension not implemented yet";
|
INCLUDE complexType/extension.tt(complexType = complexType);
|
||||||
ELSE;
|
ELSE;
|
||||||
THROW UNKNOWN, "unknown variety ${ complexType.get_variety }";
|
THROW UNKNOWN, "unknown variety ${ complexType.get_variety }";
|
||||||
END;
|
END;
|
||||||
|
|||||||
@@ -1,15 +1,7 @@
|
|||||||
[% IF (complexType.get_variety == 'all');
|
[% IF (complexType.get_contentModel == 'simpleContent');
|
||||||
INCLUDE complexType/all.tt(complexType = complexType);
|
|
||||||
ELSIF (complexType.get_variety == 'sequence');
|
|
||||||
INCLUDE complexType/all.tt(complexType = complexType);
|
|
||||||
ELSIF (complexType.get_variety == 'group');
|
|
||||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType group not implemented yet";
|
|
||||||
ELSIF (complexType.get_variety == 'choice');
|
|
||||||
INCLUDE complexType/all.tt(complexType = complexType);
|
|
||||||
ELSIF (complexType.get_contentModel == 'simpleContent');
|
|
||||||
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType simpleContent not implemented yet";
|
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType simpleContent not implemented yet";
|
||||||
ELSIF (complexType.get_contentModel == 'complexContent');
|
ELSIF (complexType.get_contentModel == 'complexContent');
|
||||||
INCLUDE complexType/complexContent.tt(complexType = complexType);
|
INCLUDE complexType/complexContent.tt(complexType = complexType);
|
||||||
ELSE;
|
ELSE;
|
||||||
THROW NOT_IMPLEMENTED, "Unknown content model ${ complexType.get_contentModel }";
|
INCLUDE complexType/variety.tt(complexType = complexType);
|
||||||
END %]
|
END %]
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
[%
|
||||||
|
|
||||||
|
base_name=complexType.expand( complexType.get_base);
|
||||||
|
base_type = definitions.first_types.find_type( base_name );
|
||||||
|
|
||||||
|
element_from = complexType.get_element;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Sanity check: All original elements must be noted first
|
||||||
|
#
|
||||||
|
FOREACH element = base_type.get_element;
|
||||||
|
IF element_from.${ loop.index }.get_name != element.get_name;
|
||||||
|
THROW WSDL "${element.get_name} not found at position ${ loop.index } in extension type ${ complexType.get_name }";
|
||||||
|
END;
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
-%]
|
||||||
|
use base qw([% type_prefix %]::[% base_name.1.replace('\.', '::') %]);
|
||||||
|
[%
|
||||||
|
|
||||||
|
INCLUDE complexType/variety.tt(complexType = complexType);
|
||||||
|
|
||||||
|
%]
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[% IF (base=complexType.get_base);
|
[% IF (base=complexType.get_base);
|
||||||
base_name=complexType.expand(base);
|
base_name=complexType.expand(base);
|
||||||
-%]
|
-%]
|
||||||
use base qw([% type_prefix %]::[% base_name.1 %]);
|
use base qw([% type_prefix %]::[% base_name.1.replace('\.', '::') %]);
|
||||||
[%
|
[%
|
||||||
ELSE;
|
ELSE;
|
||||||
THROW NOT_IMPLEMENTED, "restriction without base not supported";
|
THROW NOT_IMPLEMENTED, "restriction without base not supported";
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[%
|
||||||
|
IF (complexType.get_variety == 'all');
|
||||||
|
INCLUDE complexType/all.tt(complexType = complexType);
|
||||||
|
ELSIF (complexType.get_variety == 'sequence');
|
||||||
|
INCLUDE complexType/all.tt(complexType = complexType);
|
||||||
|
ELSIF (complexType.get_variety == 'group');
|
||||||
|
THROW NOT_IMPLEMENTED, "${ element.get_name } - complexType group not implemented yet";
|
||||||
|
ELSIF (complexType.get_variety == 'choice');
|
||||||
|
INCLUDE complexType/all.tt(complexType = complexType);
|
||||||
|
ELSIF (complexType.get_variety);
|
||||||
|
THROW NOT_IMPLEMENTED, "Unknown variety ${ complexType.get_variety } in ${ complexType.get_name } (${ element.get_name })";
|
||||||
|
ELSE;
|
||||||
|
# There's no variety - might be empty complexType
|
||||||
|
END;
|
||||||
|
%]
|
||||||
@@ -178,6 +178,13 @@ no check for occurence are made.
|
|||||||
|
|
||||||
=head3 complexType with complexContent content model
|
=head3 complexType with complexContent content model
|
||||||
|
|
||||||
|
Note that complexType classes with complexContent content model don't exhibit
|
||||||
|
their type via the xsi:type attribute yet, so they currently cannot be used
|
||||||
|
as a replacement for their base type.
|
||||||
|
|
||||||
|
SOAP::WSDL's XSD deserializer backend does not recognize the xsi:type=""
|
||||||
|
attribute either yet.
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item * restriction variety
|
=item * restriction variety
|
||||||
@@ -192,12 +199,30 @@ No additional processing or content checking is performed yet.
|
|||||||
complexType
|
complexType
|
||||||
restriction
|
restriction
|
||||||
|
|
||||||
Note that complexType with restriction variety classes don't exhibit their
|
|
||||||
type via the xsi:type attribute yet, so they currently cannot be used as
|
|
||||||
a replacement for their base type.
|
|
||||||
|
|
||||||
=item * extension variety
|
=item * extension variety
|
||||||
|
|
||||||
|
ComplexType classes with extension variety inherit from the XSD base
|
||||||
|
complexType class and from their base type.
|
||||||
|
|
||||||
|
Extension classes are checked for (re-)defining all elements of their parent
|
||||||
|
class.
|
||||||
|
|
||||||
|
Note that a derived type's elements (=properties) overrides the getter /
|
||||||
|
setter methods for all inherited elements. All object data is stored in the
|
||||||
|
derived type's class, not in the defining class (See L<Class::Std> for a
|
||||||
|
discussion on inside out object data storage).
|
||||||
|
|
||||||
|
No additional processing or content checking is performed yet.
|
||||||
|
|
||||||
|
complexType complexType
|
||||||
|
base class base type class
|
||||||
|
^ ^
|
||||||
|
| |
|
||||||
|
-----------------
|
||||||
|
|
|
||||||
|
complexType
|
||||||
|
extension
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 SimpleType
|
=head2 SimpleType
|
||||||
@@ -217,8 +242,6 @@ SOAP::WSDL::XSD::Typelib::XSD::list.
|
|||||||
Derivation by restriction is implemented by inheriting from a base type and
|
Derivation by restriction is implemented by inheriting from a base type and
|
||||||
applying the required restrictions.
|
applying the required restrictions.
|
||||||
|
|
||||||
=head2 Complex Types
|
|
||||||
|
|
||||||
=head1 FACETS
|
=head1 FACETS
|
||||||
|
|
||||||
XML Schema facets are not implemented yet.
|
XML Schema facets are not implemented yet.
|
||||||
@@ -244,7 +267,6 @@ The following XML Schema declaration elements are not supported yet:
|
|||||||
|
|
||||||
=item * Type definition elements
|
=item * Type definition elements
|
||||||
|
|
||||||
complexContent - only restriction supported
|
|
||||||
simpleContent
|
simpleContent
|
||||||
union
|
union
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
# TODO rename to ::XSD
|
package SOAP::WSDL::Serializer::XSD;
|
||||||
package SOAP::WSDL::Serializer::SOAP11;
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
|
|
||||||
our $VERSION='2.00_13';
|
our $VERSION='2.00_21';
|
||||||
|
|
||||||
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';
|
||||||
@@ -90,7 +90,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
$Rev: 288 $
|
$Rev: 288 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: HTTP.pm 288 2007-09-29 19:34:20Z kutterma $
|
$Id: HTTP.pm 288 2007-09-29 19:34:20Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|||||||
@@ -136,6 +136,10 @@ my %TYPES = (
|
|||||||
type => 'METHOD',
|
type => 'METHOD',
|
||||||
method => 'set_restriction',
|
method => 'set_restriction',
|
||||||
},
|
},
|
||||||
|
extension => {
|
||||||
|
type => 'METHOD',
|
||||||
|
method => 'set_extension',
|
||||||
|
},
|
||||||
list => {
|
list => {
|
||||||
type => 'METHOD',
|
type => 'METHOD',
|
||||||
method => 'set_list',
|
method => 'set_list',
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ my %abstract_of :ATTR(:name<abstract> :default<()>);
|
|||||||
my %mixed_of :ATTR(:name<mixed> :default<()>); # default is false
|
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<NONE>);
|
||||||
|
|
||||||
sub get_variety; *get_variety = \&get_flavor;
|
sub get_variety; *get_variety = \&get_flavor;
|
||||||
|
|
||||||
@@ -45,6 +45,12 @@ sub set_restriction {
|
|||||||
$base_of{ ident $self } = $element->{ Value };
|
$base_of{ ident $self } = $element->{ Value };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub set_extension {
|
||||||
|
my $self = shift;
|
||||||
|
my $element = shift;
|
||||||
|
$flavor_of{ ident $self } = 'extension';
|
||||||
|
$base_of{ ident $self } = $element->{ Value };
|
||||||
|
}
|
||||||
|
|
||||||
sub init {
|
sub init {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
|
||||||
our $VERSION='2.00_17';
|
our $VERSION='2.00_22';
|
||||||
|
|
||||||
my %annotation_of :ATTR(:name<annotation> :default<()>);
|
my %annotation_of :ATTR(:name<annotation> :default<()>);
|
||||||
my %simpleType_of :ATTR(:name<simpleType> :default<()>);
|
my %simpleType_of :ATTR(:name<simpleType> :default<()>);
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
|
|
||||||
# my %xmlns_of :ATTR(:get<xmlns> :init_arg<xmlns> :default<()>);
|
|
||||||
|
|
||||||
# sub set_xmlns { $xmlns_of{ ident $_[0] } = $_[1] };
|
|
||||||
sub get_xmlns { 'http://www.w3.org/2001/XMLSchema' };
|
sub get_xmlns { 'http://www.w3.org/2001/XMLSchema' };
|
||||||
|
|
||||||
# use $_[1] for performance
|
# use $_[1] for performance
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ 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
|
||||||
|
return if not $_[1];
|
||||||
return $_[0]->SUPER::set_value($_[1]) 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} )?
|
||||||
@@ -50,7 +51,8 @@ sub set_value {
|
|||||||
|
|
||||||
# strptime sets empty values to undef - and strftime doesn't like that...
|
# strptime sets empty values to undef - and strftime doesn't like that...
|
||||||
my @time_from = map { ! defined $_ ? 0 : $_ } strptime($_[1]);
|
my @time_from = map { ! defined $_ ? 0 : $_ } strptime($_[1]);
|
||||||
undef $time_from[-1];
|
return if not (@time_from);
|
||||||
|
undef $time_from[$#time_from];
|
||||||
|
|
||||||
my $time_str = strftime( '%Y-%m-%dT%H:%M:%S%z', @time_from );
|
my $time_str = strftime( '%Y-%m-%dT%H:%M:%S%z', @time_from );
|
||||||
substr $time_str, -2, 0, ':';
|
substr $time_str, -2, 0, ':';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use Class::Std::Storable;
|
|||||||
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
|
||||||
|
|
||||||
our $VERSION = '2.00_16';
|
our $VERSION = '2.00_22';
|
||||||
|
|
||||||
my %ELEMENTS_FROM;
|
my %ELEMENTS_FROM;
|
||||||
my %ATTRIBUTES_OF;
|
my %ATTRIBUTES_OF;
|
||||||
@@ -19,10 +19,11 @@ my %CLASSES_OF;
|
|||||||
# We could also handle them via AUTOMETHOD,
|
# We could also handle them via AUTOMETHOD,
|
||||||
# but AUTOMETHOD should always croak...
|
# but AUTOMETHOD should always croak...
|
||||||
# Do we really need this ?
|
# Do we really need this ?
|
||||||
#sub STORABLE_freeze_pre {}
|
# ... looks like we do...
|
||||||
#sub STORABLE_freeze_post {}
|
sub STORABLE_freeze_pre {}
|
||||||
#sub STORABLE_thaw_pre {}
|
sub STORABLE_freeze_post {}
|
||||||
#sub STORABLE_thaw_post {}
|
sub STORABLE_thaw_pre {}
|
||||||
|
sub STORABLE_thaw_post {}
|
||||||
|
|
||||||
# for error reporting. Eases working with data objects...
|
# for error reporting. Eases working with data objects...
|
||||||
sub AUTOMETHOD {
|
sub AUTOMETHOD {
|
||||||
@@ -116,6 +117,7 @@ sub _factory {
|
|||||||
? $_[1]
|
? $_[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 => $_[1] });
|
: $type->new({ value => $_[1] });
|
||||||
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
*{ "$class\::add_$name" } = sub {
|
*{ "$class\::add_$name" } = sub {
|
||||||
@@ -124,15 +126,20 @@ sub _factory {
|
|||||||
if not defined $_[1];
|
if not defined $_[1];
|
||||||
|
|
||||||
# first call
|
# first call
|
||||||
return $attribute_ref->{ $ident } = $_[1]
|
if (not defined $attribute_ref->{ $ident }) {
|
||||||
if not defined $attribute_ref->{ $ident };
|
$attribute_ref->{ $ident } = $_[1];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
# second call: listify previous value if it's no list
|
if (not ref $attribute_ref->{ $ident } eq 'ARRAY') {
|
||||||
$attribute_ref->{ $ident } = [ $attribute_ref->{ $ident } ]
|
# second call: listify previous value if it's no list
|
||||||
if not ref $attribute_ref->{ $ident } eq 'ARRAY';
|
$attribute_ref->{ $ident } = [ $attribute_ref->{ $ident } ];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
# second and following: add to list
|
# second and following: add to list
|
||||||
return push @{ $attribute_ref->{ $ident } }, $_[1];
|
push @{ $attribute_ref->{ $ident } }, $_[1];
|
||||||
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
*{ "$class\::$name" } = *{ "$class\::add_$name" };
|
*{ "$class\::$name" } = *{ "$class\::add_$name" };
|
||||||
@@ -174,7 +181,6 @@ sub _factory {
|
|||||||
# But what about choice, extension ?
|
# But what about choice, extension ?
|
||||||
*{ "$class\::_serialize" } = sub {
|
*{ "$class\::_serialize" } = sub {
|
||||||
my $ident = ident $_[0];
|
my $ident = ident $_[0];
|
||||||
# my $class = ref $_[0];
|
|
||||||
# return concatenated return value of serialize call of all
|
# return concatenated return value of serialize call of all
|
||||||
# elements retrieved from get_elements expanding list refs.
|
# elements retrieved from get_elements expanding list refs.
|
||||||
# get_elements is inlined for performance.
|
# get_elements is inlined for performance.
|
||||||
@@ -209,14 +215,13 @@ sub _factory {
|
|||||||
};
|
};
|
||||||
|
|
||||||
*{ "$class\::serialize" } = sub {
|
*{ "$class\::serialize" } = sub {
|
||||||
my ($self, $opt) = @_;
|
$_[1] ||= {}; # maybe even replace by assigning a constant var
|
||||||
$opt ||= {};
|
|
||||||
|
|
||||||
# do we have a empty element ?
|
# do we have a empty element ?
|
||||||
return $self->start_tag({ %$opt, empty => 1 })
|
return $_[0]->start_tag({ %{ $_[1] }, empty => 1 })
|
||||||
if not defined $ELEMENTS_FROM{ $class } or not @{ $ELEMENTS_FROM{ $class } };
|
if not defined $ELEMENTS_FROM{ $class } or not @{ $ELEMENTS_FROM{ $class } };
|
||||||
return join q{}, $self->start_tag($opt),
|
return join q{}, $_[0]->start_tag($_[1]),
|
||||||
$self->_serialize(), $self->end_tag();
|
$_[0]->_serialize(), $_[0]->end_tag();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -376,10 +381,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
|||||||
|
|
||||||
=head1 REPOSITORY INFORMATION
|
=head1 REPOSITORY INFORMATION
|
||||||
|
|
||||||
$Rev: 309 $
|
$Rev: 337 $
|
||||||
$LastChangedBy: kutterma $
|
$LastChangedBy: kutterma $
|
||||||
$Id: ComplexType.pm 309 2007-10-05 17:48:37Z kutterma $
|
$Id: ComplexType.pm 337 2007-10-22 20:04:59Z kutterma $
|
||||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm $
|
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm $
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ my %REF;
|
|||||||
my %MIN_OCCURS;
|
my %MIN_OCCURS;
|
||||||
my %MAX_OCCURS;
|
my %MAX_OCCURS;
|
||||||
|
|
||||||
|
# TODO replace by generated methods?
|
||||||
|
#
|
||||||
# Class data - remember, we're the base class for a class factory or for
|
# Class data - remember, we're the base class for a class factory or for
|
||||||
# generated code...
|
# generated code...
|
||||||
# use BLOCK: for scoping
|
# use BLOCK: for scoping
|
||||||
@@ -48,6 +50,9 @@ sub start_tag {
|
|||||||
if ($_[1]->{qualified}) {
|
if ($_[1]->{qualified}) {
|
||||||
push @attr_from, 'xmlns="' . $_[0]->get_xmlns . '"';
|
push @attr_from, 'xmlns="' . $_[0]->get_xmlns . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# do we need to check for name ? Element ref="" should have it's own
|
||||||
|
# start_tag. If we don't need to check, we can speed things up
|
||||||
return join q{ }, "<$_[1]->{ name }" , @attr_from , $ending if $_[1]->{ name };
|
return join q{ }, "<$_[1]->{ name }" , @attr_from , $ending if $_[1]->{ name };
|
||||||
return join q{ }, "<$NAME{ ref $_[0]}" , @attr_from , $ending;
|
return join q{ }, "<$NAME{ ref $_[0]}" , @attr_from , $ending;
|
||||||
}
|
}
|
||||||
@@ -61,6 +66,9 @@ sub start_tag {
|
|||||||
# return "</$opt->{name}>" if $opt->{name};
|
# return "</$opt->{name}>" if $opt->{name};
|
||||||
# return "</"$NAME{$class}>";
|
# return "</"$NAME{$class}>";
|
||||||
#
|
#
|
||||||
|
# do we need to check for name ? Element ref="" should have it's own
|
||||||
|
# end_tag. If we don't need to check, we can speed things up by defining
|
||||||
|
# end tag with () prototype - perl will inline it for us if we do...
|
||||||
sub end_tag {
|
sub end_tag {
|
||||||
return "</$_[1]->{name}>" if $_[1]->{name};
|
return "</$_[1]->{name}>" if $_[1]->{name};
|
||||||
return "</$NAME{ ref $_[0] }>";
|
return "</$NAME{ ref $_[0] }>";
|
||||||
|
|||||||
+2
-2
@@ -7,8 +7,8 @@ use lib '../lib';
|
|||||||
my @modules = qw(
|
my @modules = qw(
|
||||||
SOAP::WSDL
|
SOAP::WSDL
|
||||||
SOAP::WSDL::Client
|
SOAP::WSDL::Client
|
||||||
SOAP::WSDL::Serializer::SOAP11
|
SOAP::WSDL::Serializer::XSD
|
||||||
SOAP::WSDL::Deserializer::SOAP11
|
SOAP::WSDL::Deserializer::XSD
|
||||||
SOAP::WSDL::Transport::HTTP
|
SOAP::WSDL::Transport::HTTP
|
||||||
SOAP::WSDL::Definitions
|
SOAP::WSDL::Definitions
|
||||||
SOAP::WSDL::Message
|
SOAP::WSDL::Message
|
||||||
|
|||||||
+2
-2
@@ -10,7 +10,7 @@ eval {
|
|||||||
import Test::XML;
|
import Test::XML;
|
||||||
};
|
};
|
||||||
|
|
||||||
use_ok qw/SOAP::WSDL::Serializer::SOAP11/;
|
use_ok qw/SOAP::WSDL::Serializer::XSD/;
|
||||||
|
|
||||||
my $opt = {
|
my $opt = {
|
||||||
readable => 1,
|
readable => 1,
|
||||||
@@ -18,7 +18,7 @@ my $opt = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
my $xml;
|
my $xml;
|
||||||
ok( $xml = SOAP::WSDL::Serializer::SOAP11->serialize(
|
ok( $xml = SOAP::WSDL::Serializer::XSD->serialize(
|
||||||
undef, undef, $opt
|
undef, undef, $opt
|
||||||
),
|
),
|
||||||
"serialize empty envelope"
|
"serialize empty envelope"
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ if ($@)
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||||
|
my ($volume, $dir) = File::Spec->splitpath($path, 1);
|
||||||
|
my @dir_from = File::Spec->splitdir($dir);
|
||||||
|
unshift @dir_from, $volume if $volume;
|
||||||
|
my $url = join '/', @dir_from;
|
||||||
|
|
||||||
|
# print $url;
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL/);
|
use_ok(qw/SOAP::WSDL/);
|
||||||
|
|
||||||
@@ -24,7 +30,7 @@ my $soap;
|
|||||||
|
|
||||||
#2
|
#2
|
||||||
ok( $soap = SOAP::WSDL->new(
|
ok( $soap = SOAP::WSDL->new(
|
||||||
wsdl => 'file://' . $path . '/../../acceptance/wsdl/03_complexType-all.wsdl',
|
wsdl => 'file://' . $url . '/../../acceptance/wsdl/03_complexType-all.wsdl',
|
||||||
), 'Instantiated object' );
|
), 'Instantiated object' );
|
||||||
|
|
||||||
#3
|
#3
|
||||||
|
|||||||
@@ -12,14 +12,17 @@ use_ok(qw/SOAP::WSDL/);
|
|||||||
print "# SOAP::WSDL Version: $SOAP::WSDL::VERSION\n";
|
print "# SOAP::WSDL Version: $SOAP::WSDL::VERSION\n";
|
||||||
|
|
||||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||||
|
my ($volume, $dir) = File::Spec->splitpath($path, 1);
|
||||||
|
my @dir_from = File::Spec->splitdir($dir);
|
||||||
|
unshift @dir_from, $volume if $volume;
|
||||||
|
my $url = join '/', @dir_from;
|
||||||
|
|
||||||
my $xml;
|
my $xml;
|
||||||
my $soap;
|
my $soap;
|
||||||
|
|
||||||
#2
|
#2
|
||||||
ok( $soap = SOAP::WSDL->new(
|
ok( $soap = SOAP::WSDL->new(
|
||||||
wsdl => 'file://' . $path . '/../../acceptance/wsdl/03_complexType-element-ref.wsdl',
|
wsdl => 'file://' . $url . '/../../acceptance/wsdl/03_complexType-element-ref.wsdl',
|
||||||
no_dispatch => 1,
|
no_dispatch => 1,
|
||||||
), 'Instantiated object' );
|
), 'Instantiated object' );
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,14 @@ use_ok(qw/SOAP::WSDL/);
|
|||||||
my $xml;
|
my $xml;
|
||||||
|
|
||||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||||
|
my ($volume, $dir) = File::Spec->splitpath($path, 1);
|
||||||
|
my @dir_from = File::Spec->splitdir($dir);
|
||||||
|
unshift @dir_from, $volume if $volume;
|
||||||
|
my $url = join '/', @dir_from;
|
||||||
|
|
||||||
#2
|
#2
|
||||||
ok( $soap = SOAP::WSDL->new(
|
ok( $soap = SOAP::WSDL->new(
|
||||||
wsdl => 'file://' . $path . '/../../acceptance/wsdl/03_complexType-sequence.wsdl'
|
wsdl => 'file://' . $url . '/../../acceptance/wsdl/03_complexType-sequence.wsdl'
|
||||||
), 'Instantiated object' );
|
), 'Instantiated object' );
|
||||||
|
|
||||||
#3
|
#3
|
||||||
|
|||||||
@@ -17,10 +17,14 @@ use_ok(qw/SOAP::WSDL/);
|
|||||||
my $soap;
|
my $soap;
|
||||||
my $xml;
|
my $xml;
|
||||||
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
my $path = File::Spec->rel2abs( dirname __FILE__ );
|
||||||
|
my ($volume, $dir) = File::Spec->splitpath($path, 1);
|
||||||
|
my @dir_from = File::Spec->splitdir($dir);
|
||||||
|
unshift @dir_from, $volume if $volume;
|
||||||
|
my $url = join '/', @dir_from;
|
||||||
|
|
||||||
#2
|
#2
|
||||||
ok( $soap = SOAP::WSDL->new(
|
ok( $soap = SOAP::WSDL->new(
|
||||||
wsdl => 'file://' . $path . '/../../acceptance/wsdl/04_element.wsdl'
|
wsdl => 'file://' . $url . '/../../acceptance/wsdl/04_element.wsdl'
|
||||||
), 'Instantiated object' );
|
), 'Instantiated object' );
|
||||||
|
|
||||||
#3
|
#3
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
use Test::More;
|
use Test::More;
|
||||||
|
use SOAP::Lite;
|
||||||
eval { require SOAP::Lite } or do {
|
eval { require SOAP::Lite } or do {
|
||||||
plan skip_all => 'SOAP::Lite not available';
|
plan skip_all => 'SOAP::Lite not available';
|
||||||
exit 0;
|
exit 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
print "# Using SOAP::Lite $SOAP::Lite::VERSION\n";
|
||||||
|
|
||||||
use lib '../../../lib';
|
use lib '../../../lib';
|
||||||
plan tests => 10;
|
plan tests => 10;
|
||||||
use_ok qw(SOAP::WSDL::Deserializer::SOM);
|
use_ok qw(SOAP::WSDL::Deserializer::SOM);
|
||||||
@@ -14,8 +17,12 @@ ok my $som = $deserializer->deserialize(q{<a><b>1</b><b>2</b><c>3</c></a>});
|
|||||||
my $data = $som->match('/a')->valueof;
|
my $data = $som->match('/a')->valueof;
|
||||||
|
|
||||||
is $data->{ c } , 3;
|
is $data->{ c } , 3;
|
||||||
is $data->{ b }->[0] , 1;
|
|
||||||
is $data->{ b }->[1] , 2;
|
SKIP: {
|
||||||
|
skip "SOAP::Lite > 0.69 required" , 2 if ($SOAP::Lite::VERSION < 0.69);
|
||||||
|
is $data->{ b }->[0] , 1, "array values - SOAP::Lite $SOAP::Lite::VERSION";;
|
||||||
|
is $data->{ b }->[1] , 2, "array values - SOAP::Lite $SOAP::Lite::VERSION";;
|
||||||
|
}
|
||||||
|
|
||||||
eval { $deserializer->generate_fault({
|
eval { $deserializer->generate_fault({
|
||||||
role => 'soap:Server',
|
role => 'soap:Server',
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 5;
|
use Test::More tests => 5;
|
||||||
|
|
||||||
use SOAP::WSDL::Deserializer::SOAP11;
|
use SOAP::WSDL::Deserializer::XSD;
|
||||||
|
|
||||||
my $obj;
|
my $obj;
|
||||||
|
|
||||||
ok $obj = SOAP::WSDL::Deserializer::SOAP11->new();
|
ok $obj = SOAP::WSDL::Deserializer::XSD->new();
|
||||||
ok $obj = SOAP::WSDL::Deserializer::SOAP11->new({
|
ok $obj = SOAP::WSDL::Deserializer::XSD->new({
|
||||||
class_resolver => 'TestResolver',
|
class_resolver => 'TestResolver',
|
||||||
some_other_option => 'ignored',
|
some_other_option => 'ignored',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,14 +19,8 @@ my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
|||||||
definitions => $definitions,
|
definitions => $definitions,
|
||||||
});
|
});
|
||||||
my $output = q{};
|
my $output = q{};
|
||||||
$generator->generate_interface({
|
|
||||||
NO_POD => 1,
|
|
||||||
output => \$output,
|
|
||||||
});
|
|
||||||
|
|
||||||
ok eval $output;
|
|
||||||
|
|
||||||
$output = q{};
|
|
||||||
$generator->generate_typemap({
|
$generator->generate_typemap({
|
||||||
NO_POD => 1,
|
NO_POD => 1,
|
||||||
output => \$output,
|
output => \$output,
|
||||||
@@ -35,7 +29,19 @@ $generator->generate_typemap({
|
|||||||
ok eval $output;
|
ok eval $output;
|
||||||
print $@ if $@;
|
print $@ if $@;
|
||||||
|
|
||||||
print $output;
|
#print $output;
|
||||||
|
|
||||||
|
$output = q{};
|
||||||
|
$generator->generate_interface({
|
||||||
|
NO_POD => 1,
|
||||||
|
output => \$output,
|
||||||
|
});
|
||||||
|
|
||||||
|
ok eval $output;
|
||||||
|
print $@ if $@;
|
||||||
|
|
||||||
|
|
||||||
|
# print $output;
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
my $tt = Template->new(
|
my $tt = Template->new(
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use Test::More tests => 26;
|
use Test::More tests => 30;
|
||||||
use File::Basename qw(dirname);
|
use File::Basename qw(dirname);
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
use File::Path;
|
use File::Path;
|
||||||
@@ -107,5 +107,15 @@ $complexRestriction = MyTypes::testComplexTypeRestriction->new({
|
|||||||
is $complexRestriction->get_Test1(), 'test1';
|
is $complexRestriction->get_Test1(), 'test1';
|
||||||
is $complexRestriction->get_Test2(), 'test2';
|
is $complexRestriction->get_Test2(), 'test2';
|
||||||
|
|
||||||
|
ok eval { require MyTypes::testComplexTypeExtension };
|
||||||
|
$complexExtension = MyTypes::testComplexTypeExtension->new({
|
||||||
|
Test1 => 'test1',
|
||||||
|
Test2 => 'test2',
|
||||||
|
Test3 => 'test3',
|
||||||
|
});
|
||||||
|
is $complexExtension->get_Test1(), 'test1';
|
||||||
|
is $complexExtension->get_Test2(), 'test2';
|
||||||
|
is $complexExtension->get_Test3(), 'test3';
|
||||||
|
|
||||||
|
|
||||||
rmtree "$path/testlib";
|
rmtree "$path/testlib";
|
||||||
|
|||||||
@@ -84,6 +84,21 @@
|
|||||||
</xsd:complexContent>
|
</xsd:complexContent>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="testComplexTypeExtension">
|
||||||
|
<xsd:annotation>
|
||||||
|
<xsd:documentation>complexType extension test</xsd:documentation>
|
||||||
|
</xsd:annotation>
|
||||||
|
<xsd:complexContent>
|
||||||
|
<xsd:extension base="tns:testComplexTypeAll">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Test1" type="xsd:string" />
|
||||||
|
<xsd:element name="Test2" type="xsd:string" minOccurs="1"/>
|
||||||
|
<xsd:element name="Test3" type="xsd:string" minOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:extension>
|
||||||
|
</xsd:complexContent>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="testComplexTypeChoice">
|
<xsd:complexType name="testComplexTypeChoice">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation>
|
<xsd:documentation>
|
||||||
|
|||||||
Reference in New Issue
Block a user