Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a78d6d15b5 | ||
|
|
5c42b1d8f6 | ||
|
|
21b5330a8d |
@@ -2,7 +2,7 @@ use Module::Build;
|
|||||||
Module::Build->new(
|
Module::Build->new(
|
||||||
dist_abstract => 'SOAP with WSDL support',
|
dist_abstract => 'SOAP with WSDL support',
|
||||||
dist_name => 'SOAP-WSDL',
|
dist_name => 'SOAP-WSDL',
|
||||||
dist_version => '2.00_02',
|
dist_version => '2.00_05',
|
||||||
module_name => 'SOAP::WSDL',
|
module_name => 'SOAP::WSDL',
|
||||||
license => 'artistic',
|
license => 'artistic',
|
||||||
requires => {
|
requires => {
|
||||||
@@ -15,6 +15,8 @@ Module::Build->new(
|
|||||||
'XML::SAX::ParserFactory' => 0,
|
'XML::SAX::ParserFactory' => 0,
|
||||||
},
|
},
|
||||||
buildrequires => {
|
buildrequires => {
|
||||||
|
'Benchmark' => 0,
|
||||||
|
'Cwd' => 0,
|
||||||
'Test::More' => 0,
|
'Test::More' => 0,
|
||||||
'SOAP::Lite' => 0,
|
'SOAP::Lite' => 0,
|
||||||
'Class::Std' => 0.0.8,
|
'Class::Std' => 0.0.8,
|
||||||
@@ -24,5 +26,9 @@ Module::Build->new(
|
|||||||
'XML::LibXML' => 0,
|
'XML::LibXML' => 0,
|
||||||
'XML::SAX::Base' => 0,
|
'XML::SAX::Base' => 0,
|
||||||
'XML::SAX::ParserFactory' => 0,
|
'XML::SAX::ParserFactory' => 0,
|
||||||
|
'Pod::Simple::Text' => 0,
|
||||||
|
'XML::SAX::ParserFactory' => 0,
|
||||||
|
|
||||||
},
|
},
|
||||||
|
recursive_test_files => 1,
|
||||||
)->create_build_script;
|
)->create_build_script;
|
||||||
|
|||||||
@@ -28,6 +28,52 @@ lib/SOAP/WSDL/XSD/Schema.pm
|
|||||||
lib/SOAP/WSDL/XSD/Schema/Builtin.pm
|
lib/SOAP/WSDL/XSD/Schema/Builtin.pm
|
||||||
lib/SOAP/WSDL/XSD/SimpleType.pm
|
lib/SOAP/WSDL/XSD/SimpleType.pm
|
||||||
lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/boolean.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/byte.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/date.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/decimal.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/double.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/duration.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/float.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/gDay.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonth.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonthDay.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/gYear.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/gYearMonth.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/ID.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/int.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/integer.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/language.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/list.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/long.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/Name.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/NCName.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/QName.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/short.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/string.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/time.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/token.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.pm
|
||||||
|
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
|
||||||
lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
|
lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
|
||||||
lib/SOAP/WSDL/XSD/Typelib/Element.pm
|
lib/SOAP/WSDL/XSD/Typelib/Element.pm
|
||||||
lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
|
||||||
@@ -50,6 +96,8 @@ t/013_complexType.t
|
|||||||
t/014_sax_typelib.t
|
t/014_sax_typelib.t
|
||||||
t/015_to_typemap.t
|
t/015_to_typemap.t
|
||||||
t/016_client_object.t
|
t/016_client_object.t
|
||||||
|
t/020_storable.t
|
||||||
|
t/098_pod.t
|
||||||
t/acceptance/results/03_complexType-all.xml
|
t/acceptance/results/03_complexType-all.xml
|
||||||
t/acceptance/results/03_complexType-sequence.xml
|
t/acceptance/results/03_complexType-sequence.xml
|
||||||
t/acceptance/results/04_element-simpleType.xml
|
t/acceptance/results/04_element-simpleType.xml
|
||||||
@@ -75,25 +123,6 @@ t/acceptance/wsdl/contributed/ETest.wsdl
|
|||||||
t/acceptance/wsdl/contributed/OITest.wsdl
|
t/acceptance/wsdl/contributed/OITest.wsdl
|
||||||
t/acceptance/wsdl/contributed/tools.wsdl
|
t/acceptance/wsdl/contributed/tools.wsdl
|
||||||
t/acceptance/wsdl/email_account.wsdl
|
t/acceptance/wsdl/email_account.wsdl
|
||||||
t/attic/01_use.t
|
|
||||||
t/attic/02_port.t
|
|
||||||
t/attic/03_complexType-all.t
|
|
||||||
t/attic/03_complexType-choice.t
|
|
||||||
t/attic/03_complexType-complexContent.t
|
|
||||||
t/attic/03_complexType-group.t
|
|
||||||
t/attic/03_complexType-sequence.t
|
|
||||||
t/attic/03_complexType-simpleContent.t
|
|
||||||
t/attic/04_element-complexType.t
|
|
||||||
t/attic/04_element-simpleType.t
|
|
||||||
t/attic/04_element.t
|
|
||||||
t/attic/05_simpleType-list.t
|
|
||||||
t/attic/05_simpleType-restriction.t
|
|
||||||
t/attic/05_simpleType-union.t
|
|
||||||
t/attic/10_performance.t
|
|
||||||
t/attic/11_helloworld.NET.t
|
|
||||||
t/attic/12_binding.pl
|
|
||||||
t/attic/97_pod.t
|
|
||||||
t/attic/98_pod_coverage.t
|
|
||||||
t/lib/MyComplexType.pm
|
t/lib/MyComplexType.pm
|
||||||
t/lib/MyElement.pm
|
t/lib/MyElement.pm
|
||||||
t/lib/MySimpleType.pm
|
t/lib/MySimpleType.pm
|
||||||
@@ -101,3 +130,22 @@ t/lib/Test/SOAPMessage.pm
|
|||||||
t/lib/Typelib/Base.pm
|
t/lib/Typelib/Base.pm
|
||||||
t/lib/Typelib/TEnqueueMessage.pm
|
t/lib/Typelib/TEnqueueMessage.pm
|
||||||
t/lib/Typelib/TMessage.pm
|
t/lib/Typelib/TMessage.pm
|
||||||
|
t/SOAP/WSDL/01_use.t
|
||||||
|
t/SOAP/WSDL/02_port.t
|
||||||
|
t/SOAP/WSDL/03_complexType-all.t
|
||||||
|
t/SOAP/WSDL/03_complexType-choice.t
|
||||||
|
t/SOAP/WSDL/03_complexType-complexContent.t
|
||||||
|
t/SOAP/WSDL/03_complexType-group.t
|
||||||
|
t/SOAP/WSDL/03_complexType-sequence.t
|
||||||
|
t/SOAP/WSDL/03_complexType-simpleContent.t
|
||||||
|
t/SOAP/WSDL/04_element-complexType.t
|
||||||
|
t/SOAP/WSDL/04_element-simpleType.t
|
||||||
|
t/SOAP/WSDL/04_element.t
|
||||||
|
t/SOAP/WSDL/05_simpleType-list.t
|
||||||
|
t/SOAP/WSDL/05_simpleType-restriction.t
|
||||||
|
t/SOAP/WSDL/05_simpleType-union.t
|
||||||
|
t/SOAP/WSDL/10_performance.t
|
||||||
|
t/SOAP/WSDL/11_helloworld.NET.t
|
||||||
|
t/SOAP/WSDL/12_binding.pl
|
||||||
|
t/SOAP/WSDL/97_pod.t
|
||||||
|
t/SOAP/WSDL/XSD/Typelib/Builtin/001_string.t
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: SOAP-WSDL
|
name: SOAP-WSDL
|
||||||
version: 2.00_02
|
version: 2.00_05
|
||||||
author:
|
author:
|
||||||
- "Replace the whitespace in the e-mail adresses by '@'."
|
|
||||||
abstract: SOAP with WSDL support
|
abstract: SOAP with WSDL support
|
||||||
license: artistic
|
license: artistic
|
||||||
requires:
|
requires:
|
||||||
@@ -20,7 +19,7 @@ meta-spec:
|
|||||||
provides:
|
provides:
|
||||||
SOAP::WSDL:
|
SOAP::WSDL:
|
||||||
file: lib/SOAP/WSDL.pm
|
file: lib/SOAP/WSDL.pm
|
||||||
version: 1.21
|
version: 2.00_05
|
||||||
SOAP::WSDL::Base:
|
SOAP::WSDL::Base:
|
||||||
file: lib/SOAP/WSDL/Base.pm
|
file: lib/SOAP/WSDL/Base.pm
|
||||||
SOAP::WSDL::Binding:
|
SOAP::WSDL::Binding:
|
||||||
@@ -75,97 +74,97 @@ provides:
|
|||||||
SOAP::WSDL::XSD::Typelib::Builtin:
|
SOAP::WSDL::XSD::Typelib::Builtin:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::ENTITY:
|
SOAP::WSDL::XSD::Typelib::Builtin::ENTITY:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::ID:
|
SOAP::WSDL::XSD::Typelib::Builtin::ID:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ID.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::IDREF:
|
SOAP::WSDL::XSD::Typelib::Builtin::IDREF:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::IDREFS:
|
SOAP::WSDL::XSD::Typelib::Builtin::IDREFS:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::NCName:
|
SOAP::WSDL::XSD::Typelib::Builtin::NCName:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NCName.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN:
|
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKENS:
|
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKENS:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::NOTATION:
|
SOAP::WSDL::XSD::Typelib::Builtin::NOTATION:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::Name:
|
SOAP::WSDL::XSD::Typelib::Builtin::Name:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/Name.pm
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::QName:
|
||||||
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/QName.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType:
|
SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::anyType:
|
SOAP::WSDL::XSD::Typelib::Builtin::anyType:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::anyURI:
|
SOAP::WSDL::XSD::Typelib::Builtin::anyURI:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::base64Binary:
|
SOAP::WSDL::XSD::Typelib::Builtin::base64Binary:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::boolean:
|
SOAP::WSDL::XSD::Typelib::Builtin::boolean:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/boolean.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::byte:
|
SOAP::WSDL::XSD::Typelib::Builtin::byte:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/byte.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::date:
|
SOAP::WSDL::XSD::Typelib::Builtin::date:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/date.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::dateTime:
|
SOAP::WSDL::XSD::Typelib::Builtin::dateTime:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::decimal:
|
SOAP::WSDL::XSD::Typelib::Builtin::decimal:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/decimal.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::double:
|
SOAP::WSDL::XSD::Typelib::Builtin::double:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/double.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::duration:
|
SOAP::WSDL::XSD::Typelib::Builtin::duration:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/duration.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::float:
|
SOAP::WSDL::XSD::Typelib::Builtin::float:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/float.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::gDay:
|
SOAP::WSDL::XSD::Typelib::Builtin::gDay:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gDay.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::gMonth:
|
SOAP::WSDL::XSD::Typelib::Builtin::gMonth:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonth.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay:
|
SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonthDay.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::gYear:
|
SOAP::WSDL::XSD::Typelib::Builtin::gYear:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gYear.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth:
|
SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gYearMonth.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::hex64Binary:
|
SOAP::WSDL::XSD::Typelib::Builtin::hexBinary:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::int:
|
SOAP::WSDL::XSD::Typelib::Builtin::int:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/int.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::integer:
|
SOAP::WSDL::XSD::Typelib::Builtin::integer:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/integer.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::language:
|
SOAP::WSDL::XSD::Typelib::Builtin::language:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/language.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::list:
|
SOAP::WSDL::XSD::Typelib::Builtin::list:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/list.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::long:
|
SOAP::WSDL::XSD::Typelib::Builtin::long:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/long.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger:
|
SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger:
|
SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger:
|
SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::normalizedString:
|
SOAP::WSDL::XSD::Typelib::Builtin::normalizedString:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger:
|
SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::qName:
|
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::short:
|
SOAP::WSDL::XSD::Typelib::Builtin::short:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/short.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::string:
|
SOAP::WSDL::XSD::Typelib::Builtin::string:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/string.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::time:
|
SOAP::WSDL::XSD::Typelib::Builtin::time:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/time.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::token:
|
SOAP::WSDL::XSD::Typelib::Builtin::token:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/token.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte:
|
SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt:
|
SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong:
|
SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
|
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.pm
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort:
|
SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort:
|
||||||
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.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
|
||||||
SOAP::WSDL::XSD::Typelib::Element:
|
SOAP::WSDL::XSD::Typelib::Element:
|
||||||
|
|||||||
+570
-1463
File diff suppressed because it is too large
Load Diff
@@ -62,6 +62,7 @@ EOT
|
|||||||
};
|
};
|
||||||
|
|
||||||
$txt .= <<"EOT";
|
$txt .= <<"EOT";
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item * $operation_name
|
=item * $operation_name
|
||||||
|
|||||||
+141
-369
@@ -1,233 +1,64 @@
|
|||||||
package SOAP::WSDL::Client;
|
package SOAP::WSDL::Client;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use vars qw/$AUTOLOAD/;
|
use Carp;
|
||||||
use Scalar::Util qw(blessed);
|
use Scalar::Util qw(blessed);
|
||||||
use SOAP::WSDL::Envelope;
|
use SOAP::WSDL::Envelope;
|
||||||
use SOAP::WSDL::SAX::WSDLHandler;
|
use SOAP::Lite;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use SOAP::WSDL::SAX::MessageHandler;
|
||||||
|
use SOAP::WSDL::SOAP::Typelib::Fault11;
|
||||||
|
|
||||||
|
# Package globals for speed...
|
||||||
|
my $PARSER;
|
||||||
|
my $MESSAGE_HANDLER;
|
||||||
|
|
||||||
|
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
|
||||||
|
my %no_dispatch_of :ATTR(:name<no_dispatch> :default<()>);
|
||||||
|
my %outputxml_of :ATTR(:name<outputxml> :default<()>);
|
||||||
|
my %proxy_of :ATTR(:name<proxy> :default<()>);
|
||||||
|
|
||||||
|
# TODO remove when preparing 2.01
|
||||||
|
sub outputtree { warn 'outputtree is deprecated and'
|
||||||
|
. 'will be removed before reaching v2.01 !' }
|
||||||
|
|
||||||
|
SUBFACTORY: {
|
||||||
|
no strict qw(refs);
|
||||||
|
for (qw(class_resolver no_dispatch outputxml proxy)) {
|
||||||
|
my $setter = "set_$_";
|
||||||
|
my $getter = "get_$_";
|
||||||
|
*{ $_ } = sub { my $self = shift;
|
||||||
|
if (@_) {
|
||||||
|
$self->$setter(@_);
|
||||||
|
return $self;
|
||||||
|
}
|
||||||
|
return $self->$getter()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
eval {
|
eval {
|
||||||
use XML::LibXML;
|
require XML::LibXML;
|
||||||
|
$PARSER = XML::LibXML->new();
|
||||||
|
$MESSAGE_HANDLER = SOAP::WSDL::SAX::MessageHandler->new();
|
||||||
|
$PARSER->set_handler( $MESSAGE_HANDLER );
|
||||||
};
|
};
|
||||||
if ($@) {
|
if ($@) {
|
||||||
use XML::SAX::ParserFactory;
|
require XML::SAX::ParserFactory;
|
||||||
|
$MESSAGE_HANDLER = SOAP::WSDL::SAX::MessageHandler->new({
|
||||||
|
base => 'XML::SAX::Base' });
|
||||||
|
$PARSER = XML::SAX::ParserFactory->parser(
|
||||||
|
handler => $MESSAGE_HANDLER );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use base qw/SOAP::Lite/;
|
|
||||||
|
|
||||||
sub outputtree {
|
|
||||||
my $self = shift;
|
|
||||||
return $self->{ _WSDL }->{ outputtree } if not @_;
|
|
||||||
return $self->{ _WSDL }->{ outputtree } = shift;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub class_resolver {
|
|
||||||
my $self = shift;
|
|
||||||
return $self->{ _WSDL }->{ class_resolver } if not @_;
|
|
||||||
return $self->{ _WSDL }->{ class_resolver } = shift;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub wsdlinit
|
|
||||||
{
|
|
||||||
my $self = shift;
|
|
||||||
|
|
||||||
my $wsdl_xml = SOAP::Schema->new( schema_url => $self->wsdl() )->access(
|
|
||||||
$self->wsdl()
|
|
||||||
);
|
|
||||||
|
|
||||||
my $filter;
|
|
||||||
my $parser = eval { XML::LibXML->new() };
|
|
||||||
if ($parser) {
|
|
||||||
$filter = SOAP::WSDL::SAX::WSDLHandler->new();
|
|
||||||
$parser->set_handler( $filter );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$filter = SOAP::WSDL::SAX::WSDLHandler->new( base => 'XML::SAX::Base' );
|
|
||||||
$parser = XML::SAX::ParserFactory->parser( Handler => $filter );
|
|
||||||
}
|
|
||||||
|
|
||||||
$parser->parse_string( $wsdl_xml );
|
|
||||||
|
|
||||||
my $wsdl_definitions = $filter->get_data()
|
|
||||||
or die "unable to parse WSDL";
|
|
||||||
|
|
||||||
my $types = $wsdl_definitions->first_types()
|
|
||||||
or die "unable to extract schema from WSDL";
|
|
||||||
|
|
||||||
my $ns = $wsdl_definitions->get_xmlns()
|
|
||||||
or die "unable to extract XML Namespaces" . $wsdl_definitions->to_string;
|
|
||||||
( %{ $ns } ) or die "unable to extract XML Namespaces";
|
|
||||||
|
|
||||||
# setup lookup variables
|
|
||||||
$self->{ _WSDL }->{ wsdl_definitions } = $wsdl_definitions;
|
|
||||||
$self->{ _WSDL }->{ serialize_options } = {
|
|
||||||
autotype => 0,
|
|
||||||
readable => 1,
|
|
||||||
typelib => $types,
|
|
||||||
namespace => $ns,
|
|
||||||
};
|
|
||||||
$self->{ _WSDL }->{ explain_options } = {
|
|
||||||
readable => 1,
|
|
||||||
wsdl => $wsdl_definitions,
|
|
||||||
namespace => $ns,
|
|
||||||
typelib => $types,
|
|
||||||
};
|
|
||||||
|
|
||||||
return $self;
|
|
||||||
} ## end sub wsdlinit
|
|
||||||
|
|
||||||
sub _wsdl_get_service
|
|
||||||
{
|
|
||||||
my $self = shift;
|
|
||||||
my $service;
|
|
||||||
my $wsdl = $self->{ _WSDL }->{ wsdl_definitions };
|
|
||||||
my $ns = $wsdl->get_targetNamespace();
|
|
||||||
if ( $self->{ _WSDL }->{ servicename } )
|
|
||||||
{
|
|
||||||
$service =
|
|
||||||
$wsdl->find_service( $ns, $self->{ _WSDL }->{ servicename } );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$service = $wsdl->get_service()->[ 0 ];
|
|
||||||
warn "no servicename specified - using " . $service->get_name();
|
|
||||||
}
|
|
||||||
return $self->{ _WSDL }->{ service } = $service;
|
|
||||||
} ## end sub _wsdl_get_service
|
|
||||||
|
|
||||||
sub _wsdl_get_port
|
|
||||||
{
|
|
||||||
my $self = shift;
|
|
||||||
my $service = $self->{ _WSDL }->{ service }
|
|
||||||
|| $self->_wsdl_get_service();
|
|
||||||
my $wsdl = $self->{ _WSDL }->{ wsdl_definitions };
|
|
||||||
my $ns = $wsdl->get_targetNamespace();
|
|
||||||
my $port;
|
|
||||||
if ( $self->{ _WSDL }->{ portname } )
|
|
||||||
{
|
|
||||||
$port = $service->get_port( $ns, $self->{ _WSDL }->{ portname } );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$port = $service->get_port()->[ 0 ];
|
|
||||||
}
|
|
||||||
$self->{ _WSDL }->{ port } = $port;
|
|
||||||
|
|
||||||
# preload portType
|
|
||||||
$self->_wsdl_get_portType();
|
|
||||||
|
|
||||||
# Auto-set proxy - required before issuing call()
|
|
||||||
$self->proxy( $port->get_location() );
|
|
||||||
|
|
||||||
return $port;
|
|
||||||
} ## end sub _wsdl_get_port
|
|
||||||
|
|
||||||
sub _wsdl_get_binding
|
|
||||||
{
|
|
||||||
my $self = shift;
|
|
||||||
my $wsdl = $self->{ _WSDL }->{ wsdl_definitions };
|
|
||||||
my $ns = $wsdl->get_targetNamespace();
|
|
||||||
my $port = $self->{ _WSDL }->{ port }
|
|
||||||
|| $self->_wsdl_get_port();
|
|
||||||
|
|
||||||
my ( $prefix, $localname ) = split /:/, $port->get_binding();
|
|
||||||
|
|
||||||
# TODO lookup $ns instead of just using
|
|
||||||
# the top element's targetns...
|
|
||||||
my $binding = $wsdl->find_binding( $ns, $localname )
|
|
||||||
or die "no binding found for ", $port->get_binding();
|
|
||||||
return $self->{ _WSDL }->{ binding } = $binding;
|
|
||||||
} ## end sub _wsdl_get_binding
|
|
||||||
|
|
||||||
sub _wsdl_get_portType
|
|
||||||
{
|
|
||||||
my $self = shift;
|
|
||||||
my $wsdl = $self->{ _WSDL }->{ wsdl_definitions };
|
|
||||||
my $binding = $self->{ _WSDL }->{ binding }
|
|
||||||
|| $self->_wsdl_get_binding();
|
|
||||||
my $ns = $wsdl->get_targetNamespace();
|
|
||||||
my ( $prefix, $localname ) = split /:/, $binding->get_type();
|
|
||||||
my $portType = $wsdl->find_portType( $ns, $localname );
|
|
||||||
$self->{ _WSDL }->{ portType } = $portType;
|
|
||||||
return $portType;
|
|
||||||
} ## end sub _wsdl_get_portType
|
|
||||||
|
|
||||||
=pod
|
|
||||||
|
|
||||||
=head2 _wsdl_init_methods
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item DESCRIPTION
|
|
||||||
|
|
||||||
Creates a lookup table containing the information required for all methods
|
|
||||||
specified for the service/port selected.
|
|
||||||
|
|
||||||
The lookup table is used by L<call|call>.
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
sub _wsdl_init_methods {
|
|
||||||
my $self = shift;
|
|
||||||
my $wsdl = $self->{ _WSDL }->{ wsdl_definitions };
|
|
||||||
my $ns = $wsdl->get_targetNamespace();
|
|
||||||
|
|
||||||
# get bindings, portType, message, part(s)
|
|
||||||
# - use cached values where possible for speed,
|
|
||||||
# private methods if not for clear separation...
|
|
||||||
my $binding = $self->{ _WSDL }->{ binding }
|
|
||||||
|| $self->_wsdl_get_binding();
|
|
||||||
my $portType = $self->{ _WSDL }->{ portType }
|
|
||||||
|| $self->_wsdl_get_portType();
|
|
||||||
|
|
||||||
my $methodHashRef = {};
|
|
||||||
|
|
||||||
foreach my $binding_operation (@{ $binding->get_operation() })
|
|
||||||
{
|
|
||||||
my $method = {};
|
|
||||||
|
|
||||||
# get SOAP Action
|
|
||||||
# SOAP-Action is a required HTTP Header, so we need to look it up...
|
|
||||||
my $soap_binding_operation = $binding_operation->get_operation()->[0];
|
|
||||||
$method->{ soap_action } = $soap_binding_operation ?
|
|
||||||
$soap_binding_operation->get_soapAction() : $method;
|
|
||||||
|
|
||||||
# get parts
|
|
||||||
# 1. get operation from port
|
|
||||||
my $operation = $portType->find_operation( $ns,
|
|
||||||
$binding_operation->get_name() );
|
|
||||||
# 2. get input message name
|
|
||||||
my ( $prefix, $localname ) = split /:/,
|
|
||||||
$operation->get_input()->[0]->get_message();
|
|
||||||
# 3. get input message
|
|
||||||
my $message = $wsdl->find_message( $ns, $localname );
|
|
||||||
$method->{ parts } = $message->get_part();
|
|
||||||
|
|
||||||
# rpc / encoded methods may have a namespace specified.
|
|
||||||
# look it up and set it...
|
|
||||||
$method->{ namespace } = $binding_operation ?
|
|
||||||
$binding_operation->get_input()->[0]->get_namespace() : undef;
|
|
||||||
|
|
||||||
$methodHashRef->{ $binding_operation->get_name() } = $method;
|
|
||||||
}
|
|
||||||
|
|
||||||
$self->{ _WSDL }->{ methodInfo } = $methodHashRef;
|
|
||||||
|
|
||||||
return $methodHashRef;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub call {
|
sub call {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $method = shift;
|
my $method = shift;
|
||||||
my $data = ref $_[0] ? $_[0] : { @_ };
|
my $data = ref $_[0] ? $_[0] : { @_ };
|
||||||
|
|
||||||
my $content = q{};
|
my $content = q{};
|
||||||
my $envelope;
|
my ($envelope, $soap_action);
|
||||||
my $methodInfo;
|
|
||||||
|
|
||||||
if (blessed $data
|
if (blessed $data
|
||||||
&& $data->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType'))
|
&& $data->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType'))
|
||||||
@@ -236,41 +67,13 @@ sub call {
|
|||||||
|
|
||||||
# TODO replace by something derived from binding - this is just a
|
# TODO replace by something derived from binding - this is just a
|
||||||
# workaround...
|
# workaround...
|
||||||
$methodInfo->{ soap_action }
|
$soap_action = join '/', $data->get_xmlns(), $method;
|
||||||
= join '/', $data->get_xmlns(), $method;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
my $methodLookup = $self->{ _WSDL }->{ methodInfo }
|
|
||||||
|| $self->_wsdl_init_methods();
|
|
||||||
|
|
||||||
$methodInfo = $methodLookup->{ $method };
|
return $envelope if $self->no_dispatch();
|
||||||
my $partListRef = $methodInfo->{ parts };
|
|
||||||
|
|
||||||
# set serializer options
|
# warn $envelope;
|
||||||
# TODO allow custom options here
|
|
||||||
my $opt = $self->{ _WSDL }->{ serialize_options };
|
|
||||||
|
|
||||||
# set response target namespace
|
|
||||||
# TODO make rpc-encoded encoding recognise this namespace
|
|
||||||
# $opt->{ targetNamespace } = $soap_binding_operation ?
|
|
||||||
# $operation->input()->namespace() : undef;
|
|
||||||
|
|
||||||
# serialize content
|
|
||||||
# TODO create surrounding element for rpc-encoded messages
|
|
||||||
foreach my $part ( @{ $partListRef } )
|
|
||||||
{
|
|
||||||
$content .= $part->serialize( $method, $data, $opt );
|
|
||||||
}
|
|
||||||
$envelope = SOAP::WSDL::Envelope->serialize(
|
|
||||||
$method, $content , $opt );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
if ( $self->no_dispatch() )
|
|
||||||
{
|
|
||||||
return $envelope;
|
|
||||||
} ## end if ( $self->no_dispatch...
|
|
||||||
|
|
||||||
# get response via transport layer
|
# get response via transport layer
|
||||||
# TODO remove dependency from SOAP::Lite and use a
|
# TODO remove dependency from SOAP::Lite and use a
|
||||||
@@ -283,142 +86,119 @@ sub call {
|
|||||||
# - fault: returns the result of the call if a SOAP fault is sent back
|
# - fault: returns the result of the call if a SOAP fault is sent back
|
||||||
# by the server. Retuns undef (nothing) if the call has been
|
# by the server. Retuns undef (nothing) if the call has been
|
||||||
# processed without errors.
|
# processed without errors.
|
||||||
my $response = $self->transport->send_receive(
|
my $soap = SOAP::Lite->new()->proxy( $self->get_proxy() );
|
||||||
|
my $response = $soap->transport->send_receive(
|
||||||
context => $self, # this is provided for context
|
context => $self, # this is provided for context
|
||||||
endpoint => $self->endpoint(),
|
endpoint => $soap->endpoint(),
|
||||||
action => $methodInfo->{ soap_action }, # SOAPAction from binding
|
action => $soap_action, # SOAPAction, should be from binding
|
||||||
envelope => $envelope, # use custom content
|
envelope => $envelope, # use custom content
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# warn 'Received ' . length($response) . ' bytes of content';
|
||||||
|
|
||||||
return $response if ($self->outputxml() );
|
return $response if ($self->outputxml() );
|
||||||
|
|
||||||
if ($self->outputtree()) {
|
$MESSAGE_HANDLER->set_class_resolver( $self->get_class_resolver() );
|
||||||
|
|
||||||
my ($parser, $handler); # replace by globals - singleton is faster
|
# if we had no success (Transport layer error status code)
|
||||||
if (not $parser) {
|
# or if transport layer failed
|
||||||
require SOAP::WSDL::SOAP::Typelib::Fault11;
|
if (! $soap->transport->is_success() ) {
|
||||||
require SOAP::WSDL::SAX::MessageHandler;
|
|
||||||
require XML::LibXML;
|
|
||||||
$handler = SOAP::WSDL::SAX::MessageHandler->new(
|
|
||||||
{ class_resolver => $self->class_resolver() },
|
|
||||||
);
|
|
||||||
$parser = XML::LibXML->new();
|
|
||||||
$parser->set_handler( $handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
# if we had no success (Transport layer error status code)
|
# TODO Fix deserializing message - there's something wrong with Fault11
|
||||||
# or if transport layer failed
|
# Try deserializing response - there may be some
|
||||||
if (! $self->transport->is_success() ) {
|
if ($response) {
|
||||||
# Try deserializing response - there may be some
|
|
||||||
if ($response) {
|
|
||||||
eval { $parser->parse_string( $response ) };
|
|
||||||
return $handler->get_data if not $@;
|
|
||||||
};
|
|
||||||
|
|
||||||
# generate & return fault if we cannot serialize response
|
eval { $PARSER->parse_string( $response ); };
|
||||||
# or have none...
|
if ($@) {
|
||||||
return SOAP::WSDL::SOAP::Typelib::Fault11->new({
|
warn "could not deserialize response: $@";
|
||||||
faultcode => 'soap:Server',
|
}
|
||||||
faultactor => 'urn:localhost',
|
else {
|
||||||
faultstring => 'Error sending / receiving message: '
|
return $MESSAGE_HANDLER->get_data();
|
||||||
. $self->transport->message()
|
}
|
||||||
});
|
};
|
||||||
}
|
|
||||||
|
|
||||||
eval { $parser->parse_string( $response ) };
|
|
||||||
|
|
||||||
# return fault if we cannot deserialize response
|
require SOAP::WSDL::SOAP::Typelib::Fault11;
|
||||||
if ($@) {
|
# generate & return fault if we cannot serialize response
|
||||||
return SOAP::WSDL::SOAP::Typelib::Fault11->new({
|
# or have none...
|
||||||
faultcode => 'soap:Server',
|
return SOAP::WSDL::SOAP::Typelib::Fault11->new({
|
||||||
faultactor => 'urn:localhost',
|
faultcode => 'soap:Server',
|
||||||
faultstring => "Error deserializing message: $@. \n"
|
faultactor => 'urn:localhost',
|
||||||
. "Message was: \n$response"
|
faultstring => 'Error sending / receiving message: '
|
||||||
});
|
. $soap->transport->message()
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
eval { $PARSER->parse_string( $response ) };
|
||||||
|
|
||||||
return $handler->get_data();
|
# return fault if we cannot deserialize response
|
||||||
|
if ($@) {
|
||||||
|
return SOAP::WSDL::SOAP::Typelib::Fault11->new({
|
||||||
|
faultcode => 'soap:Server',
|
||||||
|
faultactor => 'urn:localhost',
|
||||||
|
faultstring => "Error deserializing message: $@. \n"
|
||||||
|
. "Message was: \n$response"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
# deserialize and store result
|
return $MESSAGE_HANDLER->get_data();
|
||||||
my $result = $self->{ '_call' } =
|
|
||||||
eval { $self->deserializer->deserialize( $response ) }
|
|
||||||
if $response;
|
|
||||||
|
|
||||||
if (
|
|
||||||
!$self->transport->is_success || # transport fault
|
|
||||||
$@ || # not deserializible
|
|
||||||
# fault message even if transport OK
|
|
||||||
# or no transport error (for example, fo TCP, POP3, IO implementations)
|
|
||||||
UNIVERSAL::isa( $result => 'SOAP::SOM' ) && $result->fault
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return $self->{ '_call' } = (
|
|
||||||
$self->on_fault->(
|
|
||||||
$self, $@ ? $@ . ( $response || '' ) : $result
|
|
||||||
)
|
|
||||||
|| $result
|
|
||||||
);
|
|
||||||
# ? # trick editors
|
|
||||||
} ## end if ( !$self->transport...
|
|
||||||
|
|
||||||
return unless $response; # nothing to do for one-ways
|
|
||||||
return $result;
|
|
||||||
} ## end sub call
|
} ## end sub call
|
||||||
|
|
||||||
sub explain
|
1;
|
||||||
{
|
|
||||||
my $self = shift;
|
|
||||||
my $opt = $self->{ _WSDL }->{ explain_options };
|
|
||||||
|
|
||||||
return $self->{ _WSDL }->{ wsdl_definitions }->explain( $opt );
|
|
||||||
} ## end sub explain
|
|
||||||
|
|
||||||
sub _load_method
|
|
||||||
{
|
|
||||||
my $method = shift;
|
|
||||||
no strict "refs";
|
|
||||||
*$method = sub {
|
|
||||||
my $self = shift;
|
|
||||||
return ( @_ ) ? $self->{ _WSDL }->{ $method } = shift
|
|
||||||
: $self->{ _WSDL }->{ $method }
|
|
||||||
};
|
|
||||||
} ## end sub _load_method
|
|
||||||
|
|
||||||
&_load_method( 'no_dispatch' );
|
|
||||||
&_load_method( 'wsdl' );
|
|
||||||
|
|
||||||
sub servicename
|
|
||||||
{
|
|
||||||
my $self = shift;
|
|
||||||
return $self->{ _WSDL }->{ servicename } if ( not @_ );
|
|
||||||
$self->{ _WSDL }->{ servicename } = shift;
|
|
||||||
|
|
||||||
my $ns = $self->{ _WSDL }->{ wsdl_definitions }->get_targetNamespace();
|
|
||||||
|
|
||||||
$self->{ _WSDL }->{ service } =
|
|
||||||
$self->{ _WSDL }->{ wsdl_definitions }
|
|
||||||
->find_service( $ns, $self->{ _WSDL }->{ servicename } )
|
|
||||||
or die "No such service: " . $self->{ _WSDL }->{ servicename };
|
|
||||||
} ## end sub servicename
|
|
||||||
|
|
||||||
sub portname
|
|
||||||
{
|
|
||||||
my $self = shift;
|
|
||||||
return $self->{ _WSDL }->{ portname } if ( not @_ );
|
|
||||||
$self->{ _WSDL }->{ portname } = shift;
|
|
||||||
|
|
||||||
my $ns = $self->{ _WSDL }->{ wsdl_definitions }->targetNamespace();
|
|
||||||
|
|
||||||
$self->{ _WSDL }->{ port } =
|
|
||||||
$self->{ _WSDL }->{ service }
|
|
||||||
->get_port( $ns, $self->{ _WSDL }->{ portname } )
|
|
||||||
or die "No such port: " . $self->{ _WSDL }->{ portname };
|
|
||||||
} ## end sub portname
|
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
|
||||||
=head1 Auto-Dispatching
|
=head2 Features different from SOAP::Lite
|
||||||
|
|
||||||
|
SOAP::WSDL does not aim to be a complete replacement for SOAP::Lite - the
|
||||||
|
SOAP::Lite module has it's strengths and weaknesses and SOAP::WSDL is
|
||||||
|
designed as a cure for the weakness of little WSDL support - nothing more,
|
||||||
|
nothing less.
|
||||||
|
|
||||||
|
Nonetheless SOAP::WSDL mimics part of SOAP::Lite's API and behaviour,
|
||||||
|
so SOAP::Lite users can switch without looking up every method call in the
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
A few things are quite differentl from SOAP::Lite, though:
|
||||||
|
|
||||||
|
=head3 SOAP request data
|
||||||
|
|
||||||
|
SOAP request data may either be given as message object, or as hash ref (in
|
||||||
|
which case it will automatically be encoded into a message object).
|
||||||
|
|
||||||
|
=head3 Return values
|
||||||
|
|
||||||
|
The result from call() is not a SOAP::SOM object, but a message object.
|
||||||
|
|
||||||
|
Message objects' classes may be generated from WSDL definitions automatically
|
||||||
|
- see SOAP::WSDL::Generator::Typelib on how to generate your own WSDL based
|
||||||
|
message class library.
|
||||||
|
|
||||||
|
=head3 Fault handling
|
||||||
|
|
||||||
|
SOAP::WSDL::Client returns a fault object on errors, even on transport layer
|
||||||
|
errors.
|
||||||
|
|
||||||
|
The fault object is a SOAP1.1 fault object of the following
|
||||||
|
C<SOAP::WSDL::SOAP::Typelib::Fault11>.
|
||||||
|
|
||||||
|
SOAP::WSDL::SOAP::Typelib::Fault11 objects are false in boolean context, so
|
||||||
|
you can just do something like
|
||||||
|
|
||||||
|
my $result = $soap->call($method, $data);
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
# handle result
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
die $result->faultstring();
|
||||||
|
}
|
||||||
|
|
||||||
|
=head3 outputxml
|
||||||
|
|
||||||
|
SOAP::Lite returns only the content of the SOAP body when outputxml is set
|
||||||
|
to true. SOAP::WSDL::Client returns the complete XML response.
|
||||||
|
|
||||||
|
=head3 Auto-Dispatching
|
||||||
|
|
||||||
SOAP::WSDL::Client does B<does not> support auto-dispatching.
|
SOAP::WSDL::Client does B<does not> support auto-dispatching.
|
||||||
|
|
||||||
@@ -433,14 +213,6 @@ SOAP::WSDL::Client and implementing something like
|
|||||||
You may even do this in a class factory - SOAP::WSDL provides the methods
|
You may even do this in a class factory - SOAP::WSDL provides the methods
|
||||||
for generating such interfaces.
|
for generating such interfaces.
|
||||||
|
|
||||||
SOAP::Lite's autodispatching mechanism is - though convenient - a constant
|
|
||||||
source of errors: Every typo in a method name gets caught by AUTOLOAD and
|
|
||||||
may lead to unpredictable results.
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub AUTOLOAD
|
|
||||||
{
|
|
||||||
my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2);
|
|
||||||
die "$method not found";
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -53,10 +53,130 @@ sub explain {
|
|||||||
sub to_typemap {
|
sub to_typemap {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $opt = shift;
|
my $opt = shift;
|
||||||
$opt->{ wsdl } ||= $self;
|
|
||||||
$opt->{ prefix } ||= q{};
|
$opt->{ prefix } ||= q{};
|
||||||
|
$opt->{ wsdl } ||= $self;
|
||||||
|
$opt->{ type_prefix } ||= $opt->{ prefix };
|
||||||
|
$opt->{ element_prefix } ||= $opt->{ prefix };
|
||||||
return join "\n",
|
return join "\n",
|
||||||
map { $_->to_typemap( $opt ) } @{ $service_of{ ident $self } };
|
map { $_->to_typemap( $opt ) } @{ $service_of{ ident $self } };
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::Definitions - model a WSDL E<gt>definitionsE<lt> element
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
=head1 METHODS
|
||||||
|
|
||||||
|
=head2 first_service get_service set_service push_service
|
||||||
|
|
||||||
|
Accessors/Mutators for accessing / setting the E<gt>serviceE<lt> child
|
||||||
|
element(s).
|
||||||
|
|
||||||
|
=head2 find_service
|
||||||
|
|
||||||
|
Returns the service matching the namespace/localname pair passed as arguments.
|
||||||
|
|
||||||
|
my $service = $wsdl->find_service($namespace, $localname);
|
||||||
|
|
||||||
|
=head2 first_binding get_binding set_binding push_binding
|
||||||
|
|
||||||
|
Accessors/Mutators for accessing / setting the E<gt>bindingE<lt> child
|
||||||
|
element(s).
|
||||||
|
|
||||||
|
=head2 find_service
|
||||||
|
|
||||||
|
Returns the binding matching the namespace/localname pair passed as arguments.
|
||||||
|
|
||||||
|
my $binding = $wsdl->find_binding($namespace, $localname);
|
||||||
|
|
||||||
|
=head2 first_portType get_portType set_portType push_portType
|
||||||
|
|
||||||
|
Accessors/Mutators for accessing / setting the E<gt>portTypeE<lt> child
|
||||||
|
element(s).
|
||||||
|
|
||||||
|
=head2 find_portType
|
||||||
|
|
||||||
|
Returns the portType matching the namespace/localname pair passed as arguments.
|
||||||
|
|
||||||
|
my $portType = $wsdl->find_portType($namespace, $localname);
|
||||||
|
|
||||||
|
=head2 first_message get_message set_message push_message
|
||||||
|
|
||||||
|
Accessors/Mutators for accessing / setting the E<gt>messageE<lt> child
|
||||||
|
element(s).
|
||||||
|
|
||||||
|
=head2 find_service
|
||||||
|
|
||||||
|
Returns the message matching the namespace/localname pair passed as arguments.
|
||||||
|
|
||||||
|
my $message = $wsdl->find_message($namespace, $localname);
|
||||||
|
|
||||||
|
=head2 first_types get_types set_types push_types
|
||||||
|
|
||||||
|
Accessors/Mutators for accessing / setting the E<gt>typesE<lt> child
|
||||||
|
element(s).
|
||||||
|
|
||||||
|
=head2 explain
|
||||||
|
|
||||||
|
Returns a POD string describing how to call the methods of the service(s)
|
||||||
|
described in the WSDL.
|
||||||
|
|
||||||
|
=head2 to_typemap
|
||||||
|
|
||||||
|
Creates a typemap for use with a generated type class library.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
|
||||||
|
NAME DESCRIPTION
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
prefix Prefix to use for all classes
|
||||||
|
type_prefix Prefix to use for all (Complex/Simple)Type classes
|
||||||
|
element_prefix Prefix to use for all Element classes (with atomic types)
|
||||||
|
|
||||||
|
As some webservices tend to use globally unique type definitions, but
|
||||||
|
locally unique elements with atomic types, type and element classes may
|
||||||
|
be separated by specifying type_prefix and element_prefix instead of
|
||||||
|
prefix.
|
||||||
|
|
||||||
|
The typemap is plain text which can be used as snipped for building a
|
||||||
|
SOAP::WSDL class_resolver perl class.
|
||||||
|
|
||||||
|
Try something like this for creating typemap classes:
|
||||||
|
|
||||||
|
my $parser = XML::LibXML->new();
|
||||||
|
my $handler = SOAP::WSDL::SAX::WSDLHandler->new()
|
||||||
|
$parser->set_handler( $handler );
|
||||||
|
|
||||||
|
$parser->parse_url('file:///path/to/wsdl');
|
||||||
|
|
||||||
|
my $wsdl = $handler->get_data();
|
||||||
|
my $typemap = $wsdl->to_typemap();
|
||||||
|
|
||||||
|
print <<"EOT"
|
||||||
|
package MyTypemap;
|
||||||
|
my \%typemap = (
|
||||||
|
$typemap
|
||||||
|
);
|
||||||
|
sub get_class { return \$typemap{\$_[1] } };
|
||||||
|
1;
|
||||||
|
"EOT"
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
|||||||
+24
-24
@@ -10,33 +10,33 @@ my %type_of :ATTR(:name<type> :default<()>);
|
|||||||
|
|
||||||
sub serialize
|
sub serialize
|
||||||
{
|
{
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $name = shift;
|
my $name = shift;
|
||||||
my $data = shift;
|
my $data = shift;
|
||||||
my $opt = shift;
|
my $opt = shift;
|
||||||
my $typelib = $opt->{ typelib } || die "No typelib";
|
my $typelib = $opt->{ typelib } || die "No typelib";
|
||||||
my %ns_map = reverse %{ $opt->{ namespace } };
|
my %ns_map = reverse %{ $opt->{ namespace } };
|
||||||
|
|
||||||
my $item_name;
|
my $item_name;
|
||||||
if ($item_name = $self->get_type() )
|
if ($item_name = $self->get_type() ) {
|
||||||
{
|
# resolve type
|
||||||
# resolve type
|
|
||||||
my ($prefix, $localname) = split /:/ , $item_name, 2;
|
|
||||||
my $type = $typelib->find_type(
|
|
||||||
$ns_map{ $prefix },
|
|
||||||
$localname
|
|
||||||
);
|
|
||||||
return $type->serialize( $self->get_name(), $data, $opt );
|
|
||||||
}
|
|
||||||
elsif ( $item_name = $self->get_element() )
|
|
||||||
{
|
|
||||||
my ($prefix, $localname) = split /:/ , $item_name, 2;
|
my ($prefix, $localname) = split /:/ , $item_name, 2;
|
||||||
my $element = $typelib->find_element(
|
my $type = $typelib->find_type( $ns_map{ $prefix }, $localname )
|
||||||
$ns_map{ $prefix },
|
or die "type $item_name , $ns_map{ $prefix } not found";
|
||||||
$localname
|
|
||||||
);
|
my $name = $self->get_name();
|
||||||
return $element->serialize( undef, $data, $opt );
|
return $type->serialize( $name, $data->{ $name }, $opt );
|
||||||
}
|
}
|
||||||
|
elsif ( $item_name = $self->get_element() ) {
|
||||||
|
my ($prefix, $localname) = split /:/ , $item_name, 2;
|
||||||
|
my $element = $typelib->find_element(
|
||||||
|
$ns_map{ $prefix },
|
||||||
|
$localname
|
||||||
|
)
|
||||||
|
or die "element $item_name , $ns_map{ $prefix } not found";
|
||||||
|
$opt->{ qualify } = 1;
|
||||||
|
return $element->serialize( undef, $data->{ $element->get_name() }, $opt );
|
||||||
|
}
|
||||||
die "Neither type nor element - don't know what to do";
|
die "Neither type nor element - don't know what to do";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use Class::Std::Storable;
|
|||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
|
|
||||||
my %characters_of :ATTR(:default<()>);
|
my %characters_of :ATTR(:default<()>);
|
||||||
my %class_resolver_of :ATTR(:default<()> :init_attr<class_resolver>);
|
my %class_resolver_of :ATTR(:default<()> :name<class_resolver>);
|
||||||
my %current_of :ATTR(:default<()>);
|
my %current_of :ATTR(:default<()>);
|
||||||
my %ignore_of :ATTR(:default<()>);
|
my %ignore_of :ATTR(:default<()>);
|
||||||
my %list_of :ATTR(:default<()>);
|
my %list_of :ATTR(:default<()>);
|
||||||
@@ -70,7 +70,7 @@ my %data_of :ATTR(:default<()>);
|
|||||||
}
|
}
|
||||||
|
|
||||||
$class_resolver_of{ ident $self } = $args->{ class_resolver }
|
$class_resolver_of{ ident $self } = $args->{ class_resolver }
|
||||||
or die "cannot parse message without type resolver";
|
if $args->{ class_resolver };
|
||||||
|
|
||||||
return bless $self, $class;
|
return bless $self, $class;
|
||||||
}
|
}
|
||||||
@@ -89,11 +89,10 @@ sub start_document {
|
|||||||
sub start_element {
|
sub start_element {
|
||||||
# use $_[n] for performance
|
# use $_[n] for performance
|
||||||
my ($ident, $element) = (ident $_[0], $_[1]);
|
my ($ident, $element) = (ident $_[0], $_[1]);
|
||||||
my $local_name = $element->{ LocalName };
|
|
||||||
|
|
||||||
# ignore top level elements
|
# ignore top level elements
|
||||||
if (@{ $ignore_of{ $ident } }
|
if (@{ $ignore_of{ $ident } }
|
||||||
&& $local_name eq $ignore_of{ $ident }->[0]) {
|
&& $element->{ LocalName } eq $ignore_of{ $ident }->[0]) {
|
||||||
shift @{ $ignore_of{ $ident } };
|
shift @{ $ignore_of{ $ident } };
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -101,7 +100,7 @@ sub start_element {
|
|||||||
# empty characters
|
# empty characters
|
||||||
$characters_of{ $ident } = q{};
|
$characters_of{ $ident } = q{};
|
||||||
|
|
||||||
push @{ $path_of{ $ident } }, $local_name; # step down...
|
push @{ $path_of{ $ident } }, $element->{ LocalName }; # step down...
|
||||||
push @{ $list_of{ $ident } }, $current_of{ $ident }; # remember current
|
push @{ $list_of{ $ident } }, $current_of{ $ident }; # remember current
|
||||||
|
|
||||||
# resolve class of this element
|
# resolve class of this element
|
||||||
@@ -111,26 +110,26 @@ sub start_element {
|
|||||||
. " via "
|
. " via "
|
||||||
. $class_resolver_of{ $ident };
|
. $class_resolver_of{ $ident };
|
||||||
|
|
||||||
|
|
||||||
# Check whether we have a primitive - we implement them as classes
|
# Check whether we have a primitive - we implement them as classes
|
||||||
# TODO replace with UNIVERSAL->isa() or maybe index - could be faster
|
# TODO replace with UNIVERSAL->isa()
|
||||||
# than m//
|
# match is a bit faster if the string does not match, but WAY slower
|
||||||
# TODO
|
# if $class matches...
|
||||||
if (not $class=~m{^SOAP::WSDL::XSD::Typelib::Builtin}xms) {
|
# if (not $class=~m{^SOAP::WSDL::XSD::Typelib::Builtin}xms) {
|
||||||
eval "require $class"; ## no critic qw(ProhibitStringyEval)
|
|
||||||
die $@ if $@;
|
if (index $class, 'SOAP::WSDL::XSD::Typelib::Builtin', 0 < 0) {
|
||||||
|
eval "require $class" ## no critic qw(ProhibitStringyEval)
|
||||||
|
or die $@;
|
||||||
}
|
}
|
||||||
# create object
|
# create object
|
||||||
my $obj = $class->new({
|
# set current object
|
||||||
|
$current_of{ $ident } = $class->new({
|
||||||
map { $_->{ Name } => $_->{ Value } }
|
map { $_->{ Name } => $_->{ Value } }
|
||||||
values %{ $element->{ Attributes } }
|
values %{ $element->{ Attributes } }
|
||||||
});
|
});
|
||||||
|
|
||||||
# set current object
|
|
||||||
$current_of{ $ident } = $obj;
|
|
||||||
|
|
||||||
# remember top level element
|
# remember top level element
|
||||||
$data_of{ $ident } = $obj if not defined $data_of{ $ident };
|
defined $data_of{ $ident }
|
||||||
|
or ($data_of{ $ident } = $current_of{ $ident });
|
||||||
}
|
}
|
||||||
|
|
||||||
sub characters {
|
sub characters {
|
||||||
@@ -142,7 +141,8 @@ sub end_element {
|
|||||||
my ($ident, $element) = (ident $_[0], $_[1]);
|
my ($ident, $element) = (ident $_[0], $_[1]);
|
||||||
|
|
||||||
# This one easily handles ignores for us, too...
|
# This one easily handles ignores for us, too...
|
||||||
return if $list_of{ $ident }->[-1] eq '__STOP__';
|
return if not ref $list_of{ $ident }->[-1];
|
||||||
|
|
||||||
if ( $current_of{ $ident }
|
if ( $current_of{ $ident }
|
||||||
->isa('SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType') ) {
|
->isa('SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType') ) {
|
||||||
$current_of{ $ident }->set_value( $characters_of{ $ident } );
|
$current_of{ $ident }->set_value( $characters_of{ $ident } );
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ use base qw(
|
|||||||
my %faultcode_of :ATTR(:get<faultcode>);
|
my %faultcode_of :ATTR(:get<faultcode>);
|
||||||
my %faultstring_of :ATTR(:get<faultstring>);
|
my %faultstring_of :ATTR(:get<faultstring>);
|
||||||
my %faultactor_of :ATTR(:get<faultactor>);
|
my %faultactor_of :ATTR(:get<faultactor>);
|
||||||
my %detail_of :ATTR(:get<faultdetail>);
|
my %detail_of :ATTR(:get<detail>);
|
||||||
|
|
||||||
# always return false in boolean context - a fault is never true...
|
# always return false in boolean context - a fault is never true...
|
||||||
sub as_bool :BOOLIFY { return; }
|
sub as_bool :BOOLIFY { return; }
|
||||||
|
|
||||||
__PACKAGE__->_factory(
|
__PACKAGE__->_factory(
|
||||||
[ qw(faultcode faultstring faultactor faultdetail) ],
|
[ qw(faultcode faultstring faultactor detail) ],
|
||||||
{
|
{
|
||||||
faultcode => \%faultcode_of,
|
faultcode => \%faultcode_of,
|
||||||
faultstring => \%faultstring_of,
|
faultstring => \%faultstring_of,
|
||||||
@@ -29,7 +29,7 @@ __PACKAGE__->_factory(
|
|||||||
detail => \%detail_of,
|
detail => \%detail_of,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
faultcode => 'SOAP::WSDL::XSD::Typelib::Builtin::qName',
|
faultcode => 'SOAP::WSDL::XSD::Typelib::Builtin::QName',
|
||||||
faultstring => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
faultstring => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||||
faultactor => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI',
|
faultactor => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI',
|
||||||
detail => 'SOAP::WSDL::XSD::Typelib::Builtin::anyType',
|
detail => 'SOAP::WSDL::XSD::Typelib::Builtin::anyType',
|
||||||
@@ -45,3 +45,56 @@ __PACKAGE__->__set_maxOccurs();
|
|||||||
__PACKAGE__->__set_ref('');
|
__PACKAGE__->__set_ref('');
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::SOAP::Typelib::Fault11 - SOAP 1.1 Fault class
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Models a SOAP 1.1 Fault.
|
||||||
|
|
||||||
|
SOAP::WSDL::SOAP::Typelib::Fault11 objects are false in boolean context
|
||||||
|
and serialize to XML on stringification.
|
||||||
|
|
||||||
|
This means you can do something like:
|
||||||
|
|
||||||
|
my $soap = SOAP::WSDL::Client->new();
|
||||||
|
# ...
|
||||||
|
my $result = $soap->call($method, $data);
|
||||||
|
if (not $result) {
|
||||||
|
die "Error calling SOAP method: ", $result->get_faultstring();
|
||||||
|
}
|
||||||
|
|
||||||
|
=head1 METHODS
|
||||||
|
|
||||||
|
=head2 get_faultcode / set_faultcode
|
||||||
|
|
||||||
|
Getter/setter for object's the faultcode property.
|
||||||
|
|
||||||
|
=head2 get_faultstring / set_faultstring
|
||||||
|
|
||||||
|
Getter/setter for object's the faultstring property.
|
||||||
|
|
||||||
|
=head2 get_faultactor / set_faultactor
|
||||||
|
|
||||||
|
Getter/setter for object's the faultactor property.
|
||||||
|
|
||||||
|
=head2 get_detail / set_detail
|
||||||
|
|
||||||
|
Getter/setter for detail object's detail property.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
Copyright 2007 Martin Kutter.
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ use Carp;
|
|||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
use Scalar::Util qw(blessed);
|
use Scalar::Util qw(blessed);
|
||||||
use base qw/SOAP::WSDL::Base/;
|
use base qw/SOAP::WSDL::Base/;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
my %annotation_of :ATTR(:name<annotation> :default<()>);
|
my %annotation_of :ATTR(:name<annotation> :default<()>);
|
||||||
my %element_of :ATTR(:name<element> :default<()>);
|
my %element_of :ATTR(:name<element> :default<()>);
|
||||||
@@ -60,57 +61,63 @@ sub serialize
|
|||||||
{
|
{
|
||||||
my ($self, $name, $value, $opt) = @_;
|
my ($self, $name, $value, $opt) = @_;
|
||||||
|
|
||||||
$opt->{ indent } ||= q{};
|
$opt->{ indent } ||= q{};
|
||||||
my $flavor = $self->get_flavor();
|
$opt->{ attributes } ||= [];
|
||||||
my $xml = '';
|
my $flavor = $self->get_flavor();
|
||||||
|
my $xml = ($opt->{ readable }) ? $opt->{ indent } : q{}; # add indentation
|
||||||
|
|
||||||
$xml .= $opt->{ indent } if ($opt->{ readable }); # add indentation
|
|
||||||
$xml .= "<$name";
|
if ( $opt->{ qualify } ) {
|
||||||
if ( $opt->{ autotype })
|
$opt->{ attributes } = [ ' xmlns="' . $self->get_targetNamespace .'"' ];
|
||||||
{
|
delete $opt->{ qualify };
|
||||||
my $ns = $self->get_targetNamespace();
|
}
|
||||||
my $prefix = $opt->{ namespace }->{ $ns }
|
|
||||||
|| die 'No prefix found for namespace '. $ns;
|
|
||||||
$xml .= join q{}, " type=\"$prefix:", $self->get_name(), '"'
|
$xml .= join q{ } , "<$name" , @{ $opt->{ attributes } };
|
||||||
if ($self->get_name() );
|
delete $opt->{ attributes }; # don't propagate...
|
||||||
}
|
|
||||||
$xml .= '>';
|
if ( $opt->{ autotype }) {
|
||||||
$xml .= "\n" if ( $opt->{ readable } ); # add linebreak
|
my $ns = $self->get_targetNamespace();
|
||||||
if ( ($flavor eq "sequence") or ($flavor eq "all") )
|
my $prefix = $opt->{ namespace }->{ $ns }
|
||||||
{
|
|| die 'No prefix found for namespace '. $ns;
|
||||||
$opt->{ indent } .= "\t";
|
$xml .= join q{}, " type=\"$prefix:", $self->get_name(), '" '
|
||||||
for my $element (@{ $self->get_element() })
|
if ($self->get_name() );
|
||||||
{
|
}
|
||||||
# might be list - listify
|
$xml .= '>';
|
||||||
$value = [ $value ] if not ref $value eq 'ARRAY';
|
$xml .= "\n" if ( $opt->{ readable } ); # add linebreak
|
||||||
|
if ( ($flavor eq "sequence") or ($flavor eq "all") )
|
||||||
|
{
|
||||||
|
$opt->{ indent } .= "\t";
|
||||||
|
for my $element (@{ $self->get_element() }) {
|
||||||
|
# might be list - listify
|
||||||
|
$value = [ $value ] if not ref $value eq 'ARRAY';
|
||||||
|
|
||||||
for my $single_value (@{ $value }) {
|
for my $single_value (@{ $value }) {
|
||||||
my $element_value;
|
my $element_value;
|
||||||
if (blessed $single_value) {
|
if (blessed $single_value) {
|
||||||
my $method = 'get_' . $element->get_name();
|
my $method = 'get_' . $element->get_name();
|
||||||
$element_value = $single_value->$method();
|
$element_value = $single_value->$method();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$element_value = $single_value->{ $element->get_name() }
|
$element_value = $single_value->{ $element->get_name() };
|
||||||
}
|
}
|
||||||
$element_value = [ $element_value ]
|
$element_value = [ $element_value ]
|
||||||
if not ref $element_value eq 'ARRAY';
|
if not ref $element_value eq 'ARRAY';
|
||||||
|
|
||||||
$xml .= join q{}
|
$xml .= join q{}
|
||||||
, map { $element->serialize( undef, $_, $opt ) }
|
, map { $element->serialize( undef, $_, $opt ) }
|
||||||
@{ $element_value };
|
@{ $element_value };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$opt->{ indent } =~s/\t$//;
|
$opt->{ indent } =~s/\t$//;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
die "sorry, we just handle all and sequence types yet...";
|
||||||
die "sorry, we just handle all and sequence types yet...";
|
}
|
||||||
}
|
$xml .= $opt->{ indent } if ( $opt->{ readable } ); # add indentation
|
||||||
$xml .= $opt->{ indent } if ( $opt->{ readable } ); # add indentation
|
$xml .= '</' . $name . '>';
|
||||||
$xml .= '</' . $name . '>';
|
$xml .= "\n" if ($opt->{ readable } ); # add linebreak
|
||||||
$xml .= "\n" if ($opt->{ readable } ); # add linebreak
|
return $xml;
|
||||||
return $xml;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub explain
|
sub explain
|
||||||
@@ -249,6 +256,6 @@ Handling of these child elements is not implemented yet
|
|||||||
|
|
||||||
=item * explain may produce erroneous results
|
=item * explain may produce erroneous results
|
||||||
|
|
||||||
=over
|
=back
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
use base qw(SOAP::WSDL::Base);
|
use base qw(SOAP::WSDL::Base);
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
my %simpleType_of :ATTR(:name<simpleType> :default<()>);
|
my %simpleType_of :ATTR(:name<simpleType> :default<()>);
|
||||||
my %complexType_of :ATTR(:name<complexType> :default<()>);
|
my %complexType_of :ATTR(:name<complexType> :default<()>);
|
||||||
@@ -44,7 +45,7 @@ sub first_complexType {
|
|||||||
# serialize type instead...
|
# serialize type instead...
|
||||||
sub serialize
|
sub serialize
|
||||||
{
|
{
|
||||||
my ($self, $name, $value, $opt) = @_;
|
my ($self, $name, $value, $opt) = @_;
|
||||||
my $type;
|
my $type;
|
||||||
my $typelib = $opt->{ typelib };
|
my $typelib = $opt->{ typelib };
|
||||||
my %ns_map = reverse %{ $opt->{ namespace } };
|
my %ns_map = reverse %{ $opt->{ namespace } };
|
||||||
@@ -60,12 +61,17 @@ sub serialize
|
|||||||
|
|
||||||
$name ||= $self->get_name();
|
$name ||= $self->get_name();
|
||||||
|
|
||||||
|
if ( $opt->{ qualify } ) {
|
||||||
|
$opt->{ attributes } = [ ' xmlns="' . $self->get_targetNamespace .'"' ];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# set default and fixed - fixed overrides everything,
|
# set default and fixed - fixed overrides everything,
|
||||||
# default only empty (undefined) values
|
# default only empty (undefined) values
|
||||||
if (not defined $value) {
|
if (not defined $value) {
|
||||||
$value = $default_of{ ident $self } if $default_of{ ident $self };
|
$value = $default_of{ ident $self } if $default_of{ ident $self };
|
||||||
}
|
}
|
||||||
$value = $fixed_of{ ident $self } if $fixed_of{ ident $self };
|
$value = $fixed_of{ ident $self } if $fixed_of{ ident $self };
|
||||||
|
|
||||||
# TODO check nillable and serialize empty data correctly
|
# TODO check nillable and serialize empty data correctly
|
||||||
|
|
||||||
@@ -76,18 +82,18 @@ sub serialize
|
|||||||
}
|
}
|
||||||
|
|
||||||
# handle direct simpleType and complexType here
|
# handle direct simpleType and complexType here
|
||||||
if ($type = $self->first_simpleType() ) { # simpleType
|
if ($type = $self->first_simpleType() ) { # simpleType
|
||||||
return $type->serialize( $name, $value, $opt );
|
return $type->serialize( $name, $value, $opt );
|
||||||
}
|
}
|
||||||
elsif ($type = $self->first_complexType() ) { # complexType
|
elsif ($type = $self->first_complexType() ) { # complexType
|
||||||
return $type->serialize( $name, $value, $opt );
|
return $type->serialize( $name, $value, $opt );
|
||||||
}
|
}
|
||||||
elsif (my $ref_name = $ref_of{ $ident }) { # ref
|
elsif (my $ref_name = $ref_of{ $ident }) { # ref
|
||||||
my ($prefix, $localname) = split /:/ , $ref_name;
|
my ($prefix, $localname) = split /:/ , $ref_name;
|
||||||
my $ns = $ns_map{ $prefix };
|
my $ns = $ns_map{ $prefix };
|
||||||
$type = $typelib->find_type( $ns, $localname );
|
$type = $typelib->find_type( $ns, $localname );
|
||||||
die "no type for $prefix:$localname" if (not $type);
|
die "no type for $prefix:$localname" if (not $type);
|
||||||
return $type->serialize( $self->get_name(), $value, $opt );
|
return $type->serialize( $name, $value, $opt );
|
||||||
}
|
}
|
||||||
|
|
||||||
# lookup type
|
# lookup type
|
||||||
@@ -98,9 +104,9 @@ sub serialize
|
|||||||
);
|
);
|
||||||
|
|
||||||
# safety check
|
# safety check
|
||||||
die "no type for $prefix:$localname $ns_map{$prefix}" if (not $type);
|
die "no type for $prefix:$localname $ns_map{$prefix}" if (not $type);
|
||||||
|
|
||||||
return $type->serialize( $self->get_name(), $value, $opt );
|
return $type->serialize( $name, $value, $opt );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub explain
|
sub explain
|
||||||
@@ -147,6 +153,7 @@ sub to_typemap {
|
|||||||
|
|
||||||
my $type;
|
my $type;
|
||||||
push @{ $opt->{path} }, $self->get_name();
|
push @{ $opt->{path} }, $self->get_name();
|
||||||
|
# referenced types need type_prefix
|
||||||
if ( my $typename = $self->get_type() ) {
|
if ( my $typename = $self->get_type() ) {
|
||||||
my ($prefix, $localname) = split /:/, $self->get_type();
|
my ($prefix, $localname) = split /:/, $self->get_type();
|
||||||
my $ns = $nsmap{ $prefix };
|
my $ns = $nsmap{ $prefix };
|
||||||
@@ -159,12 +166,18 @@ sub to_typemap {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$type = $opt->{ wsdl }->first_types()->find_type( $ns, $localname );
|
$type = $opt->{ wsdl }->first_types()->find_type( $ns, $localname );
|
||||||
$typeclass = $opt->{ prefix } . $type->get_name();
|
# referenced types need type_prefix (may be globally unique)
|
||||||
|
$typeclass = $opt->{ type_prefix } . $type->get_name();
|
||||||
$txt .= $type->to_typemap($opt);
|
$txt .= $type->to_typemap($opt);
|
||||||
}
|
}
|
||||||
$txt .= q{'} . join( q{/}, @{ $opt->{path} } ) . "' => '$typeclass',\n";
|
$txt .= q{'} . join( q{/}, @{ $opt->{path} } ) . "' => '$typeclass',\n";
|
||||||
}
|
}
|
||||||
|
# atomic types need element prefix
|
||||||
elsif ($type = $self->first_simpleType() ) {
|
elsif ($type = $self->first_simpleType() ) {
|
||||||
|
# atomic types need element prefix (may be locally unique)
|
||||||
|
# TODO fix simpletype Typemap
|
||||||
|
my $typeclass = $opt->{ element_prefix } . $self->get_name();
|
||||||
|
$txt .= q{'} . join( q{/}, @{ $opt->{path} } ) . "' => '$typeclass',\n";
|
||||||
my $flavor = $type->get_flavor();
|
my $flavor = $type->get_flavor();
|
||||||
if ( $flavor eq 'sequence' ) {
|
if ( $flavor eq 'sequence' ) {
|
||||||
$txt .= "# atomic simple type (sequence)\n";
|
$txt .= "# atomic simple type (sequence)\n";
|
||||||
@@ -179,7 +192,7 @@ sub to_typemap {
|
|||||||
|
|
||||||
}
|
}
|
||||||
elsif ($type = $self->first_complexType() ) {
|
elsif ($type = $self->first_complexType() ) {
|
||||||
my $typeclass = $opt->{ prefix } . $self->get_name();
|
my $typeclass = $opt->{ element_prefix } . $self->get_name();
|
||||||
$txt .= q{'} . join( q{/}, @{ $opt->{path} } ) . "' => '$typeclass',\n";
|
$txt .= q{'} . join( q{/}, @{ $opt->{path} } ) . "' => '$typeclass',\n";
|
||||||
my $flavor = $type->get_flavor();
|
my $flavor = $type->get_flavor();
|
||||||
if ( $flavor eq 'sequence' ) {
|
if ( $flavor eq 'sequence' ) {
|
||||||
@@ -217,6 +230,7 @@ use base qw(
|
|||||||
[% type.base_class($class_prefix) %]
|
[% type.base_class($class_prefix) %]
|
||||||
);
|
);
|
||||||
[% ELSIF (type = self.first_complexType) %]
|
[% ELSIF (type = self.first_complexType) %]
|
||||||
|
# atomic complexType
|
||||||
# <element name="[% self.get_name %]"><complexType> definition
|
# <element name="[% self.get_name %]"><complexType> definition
|
||||||
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
use SOAP::WSDL::XSD::Typelib::ComplexType;
|
||||||
use base qw(
|
use base qw(
|
||||||
@@ -244,7 +258,7 @@ __PACKAGE__->_factory(
|
|||||||
IF nsmap.$prefix == 'http://www.w3.org/2001/XMLSchema' %]
|
IF nsmap.$prefix == 'http://www.w3.org/2001/XMLSchema' %]
|
||||||
[% element.get_name %] => 'SOAP::WSDL::XSD::Typelib::Builtin::[% localname %]',
|
[% element.get_name %] => 'SOAP::WSDL::XSD::Typelib::Builtin::[% localname %]',
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
[% element.get_name %] => '[% class_prefix %]::[% localname %]',
|
[% element.get_name %] => '[% type_prefix %]::[% localname %]',
|
||||||
[% END %]
|
[% END %]
|
||||||
[% END %]
|
[% END %]
|
||||||
}
|
}
|
||||||
@@ -260,7 +274,7 @@ __PACKAGE__->_factory(
|
|||||||
[% IF (nsmap.$prefix == 'http://www.w3.org/2001/XMLSchema');
|
[% IF (nsmap.$prefix == 'http://www.w3.org/2001/XMLSchema');
|
||||||
base_class = 'SOAP::WSDL::XSD::Typelib::Builtin::' _ localname ;
|
base_class = 'SOAP::WSDL::XSD::Typelib::Builtin::' _ localname ;
|
||||||
ELSE;
|
ELSE;
|
||||||
base_class = class_prefix _ '::' _ localname;
|
base_class = type_prefix _ '::' _ localname;
|
||||||
-%]
|
-%]
|
||||||
|
|
||||||
use [% base_class %];
|
use [% base_class %];
|
||||||
@@ -292,6 +306,7 @@ EOT
|
|||||||
);
|
);
|
||||||
my $code = $tt->process( \$template, {
|
my $code = $tt->process( \$template, {
|
||||||
class_prefix => $opt->{ prefix },
|
class_prefix => $opt->{ prefix },
|
||||||
|
type_prefix => $opt->{ type_prefix },
|
||||||
self => $self,
|
self => $self,
|
||||||
nsmap => { reverse %{ $opt->{ wsdl }->get_xmlns() } },
|
nsmap => { reverse %{ $opt->{ wsdl }->get_xmlns() } },
|
||||||
},
|
},
|
||||||
@@ -333,7 +348,7 @@ Handling of the substitutionGroup attribute is not implemented yet
|
|||||||
|
|
||||||
=item * explain may produce erroneous results
|
=item * explain may produce erroneous results
|
||||||
|
|
||||||
=over
|
=back
|
||||||
|
|
||||||
=head1 COPYING
|
=head1 COPYING
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,10 @@ sub serialize
|
|||||||
my ($self, $name, $value, $opt) = @_;
|
my ($self, $name, $value, $opt) = @_;
|
||||||
my $xml;
|
my $xml;
|
||||||
$opt->{ indent } ||= "";
|
$opt->{ indent } ||= "";
|
||||||
|
$opt->{ attributes } ||= [];
|
||||||
|
|
||||||
$xml .= $opt->{ indent } if ($opt->{ readable });
|
$xml .= $opt->{ indent } if ($opt->{ readable });
|
||||||
$xml .= '<' . $name;
|
$xml .= '<' . join ' ', $name, @{ $opt->{ attributes } };
|
||||||
if ( $opt->{ autotype })
|
if ( $opt->{ autotype })
|
||||||
{
|
{
|
||||||
my $ns = $self->get_targetNamespace();
|
my $ns = $self->get_targetNamespace();
|
||||||
|
|||||||
@@ -57,58 +57,59 @@ sub push_enumeration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub serialize
|
sub serialize {
|
||||||
{
|
my $self = shift;
|
||||||
my $self = shift;
|
my $name = shift;
|
||||||
my $name = shift;
|
my $value = shift;
|
||||||
my $value = shift;
|
my $opt = shift;
|
||||||
my $opt = shift;
|
|
||||||
my $ident = ident $self;
|
my $ident = ident $self;
|
||||||
$self->_check_value( $value );
|
|
||||||
|
|
||||||
return $self->_serialize_single($name, $value , $opt)
|
$opt->{ attributes } ||= [];
|
||||||
if ( $flavor_of{ $ident } eq 'restriction'
|
$opt->{ indent } ||= q{};
|
||||||
or $flavor_of{ $ident } eq 'union'
|
|
||||||
or $flavor_of{ $ident } eq 'enumeration');
|
|
||||||
|
|
||||||
if ($flavor_of{ $ident } eq 'list' )
|
$self->_check_value( $value );
|
||||||
{
|
|
||||||
$value ||= [];
|
return $self->_serialize_single($name, $value , $opt)
|
||||||
$value = [ $value ] if ( ref( $value) ne 'ARRAY' );
|
if ( $flavor_of{ $ident } eq 'restriction'
|
||||||
return $self->_serialize_single($name, join( q{ }, @{ $value } ), $opt);
|
or $flavor_of{ $ident } eq 'union'
|
||||||
}
|
or $flavor_of{ $ident } eq 'enumeration');
|
||||||
|
|
||||||
|
if ($flavor_of{ $ident } eq 'list' )
|
||||||
|
{
|
||||||
|
$value ||= [];
|
||||||
|
$value = [ $value ] if ( ref( $value) ne 'ARRAY' );
|
||||||
|
return $self->_serialize_single($name, join( q{ }, @{ $value } ), $opt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _serialize_single
|
sub _serialize_single {
|
||||||
{
|
my ($self, $name, $value, $opt) = @_;
|
||||||
my ($self, $name, $value, $opt) = @_;
|
my $xml = '';
|
||||||
my $xml = '';
|
$xml .= $opt->{ indent } if ($opt->{ readable }); # add indentation
|
||||||
$xml .= $opt->{ indent } if ($opt->{ readable }); # add indentation
|
$xml .= '<' . join ' ', $name, @{ $opt->{ attributes } };
|
||||||
$xml .= '<' . $name;
|
if ( $opt->{ autotype }) {
|
||||||
if ( $opt->{ autotype })
|
my $ns = $self->get_targetNamespace();
|
||||||
{
|
|
||||||
my $ns = $self->get_targetNamespace();
|
|
||||||
my $prefix = $opt->{ namespace }->{ $ns }
|
my $prefix = $opt->{ namespace }->{ $ns }
|
||||||
|| die 'No prefix found for namespace '. $ns;
|
|| die 'No prefix found for namespace '. $ns;
|
||||||
$xml .= ' type="' . $prefix . ':'
|
$xml .= ' type="' . $prefix . ':' . $self->get_name() .'"';
|
||||||
. $self->get_name() .'"';
|
}
|
||||||
}
|
|
||||||
$xml .= '>';
|
# nillabel ?
|
||||||
$xml .= $value;
|
return $xml .'/>' if not defined $value;
|
||||||
$xml .= '</' . $name . '>' ;
|
|
||||||
$xml .= "\n" if ($opt->{ readable });
|
$xml .= join q{}, '>' , $value , '</' , $name , '>';
|
||||||
return $xml;
|
$xml .= "\n" if ($opt->{ readable });
|
||||||
|
return $xml;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub explain
|
sub explain {
|
||||||
{
|
my ($self, $opt, $name) = @_;
|
||||||
my ($self, $opt, $name) = @_;
|
my $perl;
|
||||||
my $perl;
|
$opt->{ indent } ||= "";
|
||||||
$opt->{ indent } ||= "";
|
$perl .= $opt->{ indent } if ($opt->{ readable });
|
||||||
$perl .= $opt->{ indent } if ($opt->{ readable });
|
$perl .= q{'} . $name . q{' => $someValue };
|
||||||
$perl .= q{'} . $name . q{' => $someValue };
|
$perl .= "\n" if ($opt->{ readable });
|
||||||
$perl .= "\n" if ($opt->{ readable });
|
return $perl;
|
||||||
return $perl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _check_value {
|
sub _check_value {
|
||||||
@@ -173,6 +174,6 @@ union simpleType definitions probalbly serialize wrong
|
|||||||
|
|
||||||
=item * explain may produce erroneous results
|
=item * explain may produce erroneous results
|
||||||
|
|
||||||
=over
|
=back
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -3,367 +3,50 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Class::Std::Storable;
|
use Class::Std::Storable;
|
||||||
|
|
||||||
# derivation classes first...
|
use SOAP::WSDL::XSD::Typelib::Builtin::anyType;
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::list;
|
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
||||||
use strict;
|
use SOAP::WSDL::XSD::Typelib::Builtin::anyURI;
|
||||||
use warnings;
|
use SOAP::WSDL::XSD::Typelib::Builtin::base64Binary;
|
||||||
use Class::Std::Storable;
|
use SOAP::WSDL::XSD::Typelib::Builtin::boolean;
|
||||||
|
use SOAP::WSDL::XSD::Typelib::Builtin::byte;
|
||||||
sub serialize {
|
use SOAP::WSDL::XSD::Typelib::Builtin::date;
|
||||||
my ($self, $opt) = @_;
|
use SOAP::WSDL::XSD::Typelib::Builtin::dateTime;
|
||||||
my $value = $self->get_value();
|
use SOAP::WSDL::XSD::Typelib::Builtin::decimal;
|
||||||
return $self->start_tag({ %$opt, nil => 1 }) if not defined $value;
|
use SOAP::WSDL::XSD::Typelib::Builtin::double;
|
||||||
$value = [ $value ] if not ref $value;
|
use SOAP::WSDL::XSD::Typelib::Builtin::duration;
|
||||||
return join q{}, $self->start_tag($opt, $value)
|
use SOAP::WSDL::XSD::Typelib::Builtin::ENTITY;
|
||||||
, join( q{ }, @{ $value } )
|
use SOAP::WSDL::XSD::Typelib::Builtin::float;
|
||||||
, $self->end_tag($opt, $value);
|
use SOAP::WSDL::XSD::Typelib::Builtin::gDay;
|
||||||
}
|
use SOAP::WSDL::XSD::Typelib::Builtin::gMonth;
|
||||||
|
use SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay;
|
||||||
# Builtin classes
|
use SOAP::WSDL::XSD::Typelib::Builtin::gYear;
|
||||||
# Every XML schema type inherits from anyType...
|
use SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth;
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::anyType;
|
use SOAP::WSDL::XSD::Typelib::Builtin::hexBinary;
|
||||||
use strict;
|
use SOAP::WSDL::XSD::Typelib::Builtin::ID;
|
||||||
use warnings;
|
use SOAP::WSDL::XSD::Typelib::Builtin::IDREF;
|
||||||
use Class::Std::Storable;
|
use SOAP::WSDL::XSD::Typelib::Builtin::IDREFS;
|
||||||
|
use SOAP::WSDL::XSD::Typelib::Builtin::int;
|
||||||
sub start_tag {
|
use SOAP::WSDL::XSD::Typelib::Builtin::integer;
|
||||||
my ($self, $opt) = @_;
|
use SOAP::WSDL::XSD::Typelib::Builtin::language;
|
||||||
$opt ||= {};
|
use SOAP::WSDL::XSD::Typelib::Builtin::list;
|
||||||
return '<' . $opt->{name} . ' >' if $opt->{ name };
|
use SOAP::WSDL::XSD::Typelib::Builtin::long;
|
||||||
return q{}
|
use SOAP::WSDL::XSD::Typelib::Builtin::Name;
|
||||||
}
|
use SOAP::WSDL::XSD::Typelib::Builtin::NCName;
|
||||||
sub end_tag {
|
use SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger;
|
||||||
my ($self, $opt) = @_;
|
use SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger;
|
||||||
$opt ||= {};
|
use SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger;
|
||||||
return '</' . $opt->{name} . ' >' if $opt->{ name };
|
use SOAP::WSDL::XSD::Typelib::Builtin::normalizedString;
|
||||||
return q{}
|
use SOAP::WSDL::XSD::Typelib::Builtin::NOTATION;
|
||||||
};
|
use SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger;
|
||||||
|
use SOAP::WSDL::XSD::Typelib::Builtin::QName;
|
||||||
sub serialize_qualified :STRINGIFY {
|
use SOAP::WSDL::XSD::Typelib::Builtin::short;
|
||||||
return $_[0]->serialize( { qualified => 1 } );
|
use SOAP::WSDL::XSD::Typelib::Builtin::string;
|
||||||
}
|
use SOAP::WSDL::XSD::Typelib::Builtin::time;
|
||||||
|
use SOAP::WSDL::XSD::Typelib::Builtin::token;
|
||||||
# All builtin and all simpleType types inherit from anySimpleType
|
use SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte;
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
use SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt;
|
||||||
use strict;
|
use SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong;
|
||||||
use warnings;
|
use SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort;
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
|
|
||||||
|
|
||||||
my %value_of :ATTR(:name<value> :default<()>);
|
|
||||||
|
|
||||||
sub serialize {
|
|
||||||
my ($self, $opt) = @_;
|
|
||||||
my $ident = ident $self;
|
|
||||||
$opt ||= {};
|
|
||||||
return $self->start_tag({ %$opt, nil => 1})
|
|
||||||
if not defined $value_of{ $ident };
|
|
||||||
return join q{}, $self->start_tag($opt, $value_of{ $ident })
|
|
||||||
, $value_of{ $ident }
|
|
||||||
, $self->end_tag($opt);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub as_bool :BOOLIFY {
|
|
||||||
return $value_of { ident $_[0] };
|
|
||||||
}
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::dateTime;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::duration;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::date;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::time;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::gYear;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::gMonth;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::gDay;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::boolean;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
sub serialize {
|
|
||||||
my ($self, $opt) = @_;
|
|
||||||
my $ident = ident $self;
|
|
||||||
$opt ||= {};
|
|
||||||
return $self->start_tag({ %$opt, nil => 1})
|
|
||||||
if not defined $value_of{ $ident };
|
|
||||||
return join q{}
|
|
||||||
, $self->start_tag($opt)
|
|
||||||
, $value_of{ $ident } ? 'true' : 'false'
|
|
||||||
, $self->end_tag($opt);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub as_num :NUMERIFY {
|
|
||||||
return $_[0]->get_value();
|
|
||||||
}
|
|
||||||
|
|
||||||
sub set_value {
|
|
||||||
my ($self, $value) = @_;
|
|
||||||
$value_of{ ident $self } = defined $value
|
|
||||||
? ($value ne 'false' or ($value))
|
|
||||||
? 1 : 0
|
|
||||||
: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::string;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::normalizedString;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::string);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::token;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::normalizedString);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::language;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::token);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::Name;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::token);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::NCName;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::Name);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::ID;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::NCName);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::IDREF;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::ID);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::IDREFS;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(
|
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::list
|
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::IDREF);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::ENTITY;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::NCName);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::token);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::NMTOKENS;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(
|
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::list
|
|
||||||
SOAP::WSDL::XSD::Typelib::Builtin::token);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::decimal;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
sub as_num :NUMERIFY :BOOLIFY {
|
|
||||||
return $_[0]->get_value();
|
|
||||||
}
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::base64Binary;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::hex64Binary;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::float;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
sub as_num :NUMERIFY {
|
|
||||||
return $_[0]->get_value();
|
|
||||||
}
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::double;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
sub as_num :NUMERIFY {
|
|
||||||
return $_[0]->get_value();
|
|
||||||
}
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::anyURI;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::qName;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::NOTATION;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::integer;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::decimal);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::integer);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::integer);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::long;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::integer);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::int;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::long);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::short;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::int);
|
|
||||||
|
|
||||||
package SOAP::WSDL::XSD::Typelib::Builtin::byte;
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Class::Std::Storable;
|
|
||||||
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::short);
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
@@ -384,6 +67,12 @@ Objects of a class may be filled with values and serialize correctly.
|
|||||||
These basic type classes are most useful when used as element or simpleType
|
These basic type classes are most useful when used as element or simpleType
|
||||||
base classes.
|
base classes.
|
||||||
|
|
||||||
|
The datatypes classes themselves are split up into
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::* modules.
|
||||||
|
|
||||||
|
Using SOAP::WSDL::XSD::Typelib::Builtin uses all of the builtin datatype
|
||||||
|
classes.
|
||||||
|
|
||||||
=head1 EXAMPLES
|
=head1 EXAMPLES
|
||||||
|
|
||||||
my $bool = SOAP::WSDL::XSD::Typelib::Builtin::bool->new({ value => 0} );
|
my $bool = SOAP::WSDL::XSD::Typelib::Builtin::bool->new({ value => 0} );
|
||||||
@@ -506,7 +195,9 @@ Replace whitespace by @ in e-mail address.
|
|||||||
|
|
||||||
Martin Kutter E<gt>martin.kutter fen-net.deE<lt>
|
Martin Kutter E<gt>martin.kutter fen-net.deE<lt>
|
||||||
|
|
||||||
=head1 COPYING
|
=head1 Licenxe
|
||||||
|
|
||||||
|
Copyright 2004-2007 Martin Kutter.
|
||||||
|
|
||||||
This library is free software, you may distribute/modify it under the
|
This library is free software, you may distribute/modify it under the
|
||||||
same terms as perl itself
|
same terms as perl itself
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::ENTITY;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::NCName);
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::ENTITY - ENTITY objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::ID;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::NCName);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::ID - ID objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::IDREF;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::ID);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::IDREF - IDREF objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::IDREFS;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::list
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::IDREF);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::IDREFS - IDREFS objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
IDREFS is a list datatype implemented by list derivation from IDREF.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::NCName;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::Name);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::NCName - NCName objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::token);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN - NMTOKEN objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::NMTOKENS;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::list
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN);
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKENS - NMTOKENS objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
List of NMTOKEN objects.
|
||||||
|
|
||||||
|
Implemented by derivation via SOAP::WSDL::XSD::Typelib::Builtin::list.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::NOTATION;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %length_of :ATTR(:name<length> :default<()>);
|
||||||
|
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||||
|
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::NOTATION - NOTATION object
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
NOTATION represents the NOTATION attribute type from
|
||||||
|
XML 1.0 (Second Edition)
|
||||||
|
|
||||||
|
=head1 BUGS AND LIMITATIONS
|
||||||
|
|
||||||
|
Facets are implemented but don't have any influence yet.
|
||||||
|
|
||||||
|
No constraints are implemented yet.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::Name;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::token);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::Name - Name objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::QName;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %length_of :ATTR(:name<length> :default<()>);
|
||||||
|
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||||
|
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::QName - qualified Name object
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
QName represents XML qualified names. The �value space� of QName
|
||||||
|
is the set of tuples {namespace name, local part}, where namespace
|
||||||
|
name is an anyURI and local part is an NCName.
|
||||||
|
|
||||||
|
=head1 BUGS AND LIMITATIONS
|
||||||
|
|
||||||
|
Facets are implemented but don't have any influence yet.
|
||||||
|
|
||||||
|
No constraints are implemented yet.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
|
||||||
|
|
||||||
|
my %value_of :ATTR(:get<value> :init_arg<value> :default<()>);
|
||||||
|
|
||||||
|
## use $_[n] for speed - we get called zillions of times...
|
||||||
|
# and we don't need to return the last value...
|
||||||
|
sub set_value { $value_of{ ident $_[0] } = $_[1] }
|
||||||
|
|
||||||
|
sub serialize {
|
||||||
|
my ($self, $opt) = @_;
|
||||||
|
my $ident = ident $self;
|
||||||
|
$opt ||= {};
|
||||||
|
return $self->start_tag({ %$opt, nil => 1})
|
||||||
|
if not defined $value_of{ $ident };
|
||||||
|
return join q{}, $self->start_tag($opt, $value_of{ $ident })
|
||||||
|
, $value_of{ $ident }
|
||||||
|
, $self->end_tag($opt);
|
||||||
|
}
|
||||||
|
|
||||||
|
# TODO disallow serializing !
|
||||||
|
sub as_bool :BOOLIFY {
|
||||||
|
return $value_of { ident $_[0] };
|
||||||
|
}
|
||||||
|
|
||||||
|
Class::Std::initialize(); # make :BOOLIFY overloading serializable
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType - All builtin and all simpleType types inherit from anySimpleType
|
||||||
|
|
||||||
|
=head1 CAVEATS
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item * set_value
|
||||||
|
|
||||||
|
In contrast to Class::Std-generated mutators (setters), set_value does
|
||||||
|
not return the last value.
|
||||||
|
|
||||||
|
This is for speed reasons: SOAP::WSDL never needs to know the last value
|
||||||
|
when calling set_calue, but calls it over and over again...
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::anyType;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
|
||||||
|
my %xmlns_of :ATTR(:name<xmlns> :default<()>);
|
||||||
|
|
||||||
|
# use $_[1] for performance
|
||||||
|
sub start_tag {
|
||||||
|
my $opt = $_[1] ||= {};
|
||||||
|
return '<' . $opt->{name} . ' >' if $opt->{ name };
|
||||||
|
return q{}
|
||||||
|
}
|
||||||
|
|
||||||
|
# use $_[1] for performance
|
||||||
|
sub end_tag {
|
||||||
|
return $_[1] && defined $_[1]->{ name }
|
||||||
|
? "</$_[1]->{name} >"
|
||||||
|
: q{};
|
||||||
|
};
|
||||||
|
|
||||||
|
sub serialize_qualified :STRINGIFY {
|
||||||
|
return $_[0]->serialize( { qualified => 1 } );
|
||||||
|
}
|
||||||
|
|
||||||
|
Class::Std::initialize(); # make :STRINGIFY overloading serializable
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::anyType - Base of all XSD Types
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::anyURI;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %length_of :ATTR(:name<length> :default<()>);
|
||||||
|
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||||
|
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::anyURI - URI object
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
anyURI represents a Uniform Resource Identifier Reference (URI).
|
||||||
|
An anyURI value can be absolute or relative, and may have an optional
|
||||||
|
fragment identifier (i.e., it may be a URI Reference).
|
||||||
|
|
||||||
|
=head1 BUGS AND LIMITATIONS
|
||||||
|
|
||||||
|
Facets are implemented but don't have any influence yet.
|
||||||
|
|
||||||
|
No constraints are implemented yet.
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::base64Binary;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %length_of :ATTR(:name<length> :default<()>);
|
||||||
|
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||||
|
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::base64Binary - base64 encoded binary objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::boolean;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
|
||||||
|
my %value_of :ATTR(:get<value> :init_attr<value> :default<()>);
|
||||||
|
|
||||||
|
sub serialize {
|
||||||
|
my ($self, $opt) = @_;
|
||||||
|
my $ident = ident $self;
|
||||||
|
$opt ||= {};
|
||||||
|
return $self->start_tag({ %$opt, nil => 1})
|
||||||
|
if not defined $value_of{ $ident };
|
||||||
|
return join q{}
|
||||||
|
, $self->start_tag($opt)
|
||||||
|
, $value_of{ $ident } ? 'true' : 'false'
|
||||||
|
, $self->end_tag($opt);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub as_num :NUMERIFY {
|
||||||
|
return $_[0]->get_value();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub set_value {
|
||||||
|
my ($self, $value) = @_;
|
||||||
|
$value_of{ ident $self } = defined $value
|
||||||
|
? ($value ne 'false' or ($value))
|
||||||
|
? 1 : 0
|
||||||
|
: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Class::Std::initialize(); # make :BOOLIFY overloading serializable
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::boolean - boolean objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Serializes to "true" or "false".
|
||||||
|
|
||||||
|
Everything true in perl and not "false" is deserialized as true.
|
||||||
|
|
||||||
|
Returns true/false in boolean context.
|
||||||
|
|
||||||
|
Returns 1 / 0 in numeric context.
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::byte;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::short);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::byte - byte integer objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of short.
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::date;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::date - date objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::dateTime;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::dateTime - dateTime objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::decimal;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %totalDigits_of :ATTR(:name<totalDigits> :default<()>);
|
||||||
|
my %fractionDigits_of :ATTR(:name<fractionDigits> :default<()>);
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
sub as_num :NUMERIFY :BOOLIFY {
|
||||||
|
return $_[0]->get_value();
|
||||||
|
}
|
||||||
|
|
||||||
|
Class::Std::initialize(); # make :NUMERIFY :BOOLIFY overloading serializable
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::decimal - decimal object, base of all non-float numbers
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::double;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
sub as_num :NUMERIFY {
|
||||||
|
return $_[0]->get_value();
|
||||||
|
}
|
||||||
|
|
||||||
|
Class::Std::initialize(); # make :NUMERIFY overloading serializable
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::double - double precision float objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
The double datatype corresponds to IEEE double-precision 64-bit floating point type.
|
||||||
|
The basic �value space� of double consists of the values m � 2^e, where m is an
|
||||||
|
integer whose absolute value is less than 2^53, and e is an integer between
|
||||||
|
-1075 and 970, inclusive.
|
||||||
|
|
||||||
|
In addition to the basic �value space� described above, the �value space� of double
|
||||||
|
also contains the following special values: positive and negative zero, positive and
|
||||||
|
negative infinity and not-a-number. The �order-relation� on double is:
|
||||||
|
|
||||||
|
x < y iff y - x is positive.
|
||||||
|
|
||||||
|
Positive zero is greater than negative zero.
|
||||||
|
|
||||||
|
Not-a-number equals itself and is greater than all double values including
|
||||||
|
positive infinity.
|
||||||
|
|
||||||
|
=head1 BUGS AND LIMITATIONS
|
||||||
|
|
||||||
|
None of the "special" behaviours and values are implemented yet.
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::duration;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::duration - duration objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::float;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
|
||||||
|
sub as_num :NUMERIFY {
|
||||||
|
return $_[0]->get_value();
|
||||||
|
}
|
||||||
|
|
||||||
|
Class::Std::initialize(); # make :NUMERIFY overloading serializable
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::float - float objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::gDay;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::gDay - day objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::gMonth;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::gMonth - month objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay - month day objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::gYear;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::gYear - year objects
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth - year and month objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::hexBinary;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %length_of :ATTR(:name<length> :default<()>);
|
||||||
|
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||||
|
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::hexBinary - hex encoded binary objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::int;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::long);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::int - int objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of long.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::integer;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::decimal);
|
||||||
|
|
||||||
|
sub as_num :NUMERIFY {
|
||||||
|
return $_[0]->get_value();
|
||||||
|
}
|
||||||
|
|
||||||
|
Class::Std::initialize(); # make :NUMERIFY overloading serializable
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::integer - integer objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::language;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::token);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::language - language objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::list;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
|
||||||
|
sub serialize {
|
||||||
|
my ($self, $opt) = @_;
|
||||||
|
my $value = $self->get_value();
|
||||||
|
return $self->start_tag({ %$opt, nil => 1 }) if not defined $value;
|
||||||
|
$value = [ $value ] if not ref $value;
|
||||||
|
return join q{}, $self->start_tag($opt, $value)
|
||||||
|
, join( q{ }, @{ $value } )
|
||||||
|
, $self->end_tag($opt, $value);
|
||||||
|
}
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::list - list derivation base class
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
To derive from some class by list, just inherit from list.
|
||||||
|
|
||||||
|
Make sure SOAP::WSDL::XSD::Typelib::Builtin::list is before the type
|
||||||
|
to derive from in the @ISA list.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::long;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::integer);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::long - long integer objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of integer.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::egativeInteger - negative integer objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of integer.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::integer);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger - non negative integer objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of integer.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::integer);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger - nonPositiveInteger objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of integer.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::normalizedString;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::string);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::normalizedString - normalizedString objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger - positive integer objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of nonNegativeInteger.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::short;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::int);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::short - short int objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of int.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::string;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
# use HTML::Entities qw(encode_entities);
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %length_of :ATTR(:name<length> :default<()>);
|
||||||
|
my %minLength_of :ATTR(:name<minLength> :default<()>);
|
||||||
|
my %maxLength_of :ATTR(:name<maxLength> :default<()>);
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
|
||||||
|
my %char2entity = (
|
||||||
|
q{&} => q{&},
|
||||||
|
q{<} => q{<},
|
||||||
|
q{>} => q{>},
|
||||||
|
q{"} => q{&qout;},
|
||||||
|
q{'} => q{'},
|
||||||
|
);
|
||||||
|
|
||||||
|
sub serialize {
|
||||||
|
my ($self, $opt) = @_;
|
||||||
|
my $ident = ident $self;
|
||||||
|
$opt ||= {};
|
||||||
|
my $value = $self->get_value();
|
||||||
|
return $self->start_tag({ %$opt, nil => 1})
|
||||||
|
if not defined $value;
|
||||||
|
|
||||||
|
# HTML::Entities does the same - and more, thus it's around 1/3 slower...
|
||||||
|
$value =~ s{([&<>"'])}{$char2entity{$1}}xgmso;
|
||||||
|
|
||||||
|
return join q{}, $self->start_tag($opt, $value)
|
||||||
|
#, encode_entities( $value, q{&<>"'} )
|
||||||
|
, $value
|
||||||
|
, $self->end_tag($opt);
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::string - string objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
String objects. XML entities (&, E<lt> E<gt> " ') are encoded on
|
||||||
|
serialization.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::time;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType);
|
||||||
|
|
||||||
|
my %pattern_of :ATTR(:name<pattern> :default<()>);
|
||||||
|
my %enumeration_of :ATTR(:name<enumeration> :default<()>);
|
||||||
|
my %whiteSpace_of :ATTR(:name<whiteSpace> :default<()>);
|
||||||
|
my %maxInclusive_of :ATTR(:name<maxInclusive> :default<()>);
|
||||||
|
my %maxExclusive_of :ATTR(:name<maxExclusive> :default<()>);
|
||||||
|
my %minInclusive_of :ATTR(:name<minInclusive> :default<()>);
|
||||||
|
my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::time - time objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::token;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::normalizedString);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::token - token objects
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte - unsigned byte objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of unsignedShort.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong);
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt - unsigned int objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of unsignedLong.
|
||||||
|
|
||||||
|
=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>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong - unsigned long integer objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of nonNegativeInteger.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Class::Std::Storable;
|
||||||
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt);
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort - unsigned short integer objects
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Subclass of unsignedInt.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
This file is part of SOAP-WSDL. You may distribute/modify it under
|
||||||
|
the same terms as perl itself
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||||
|
|
||||||
|
=cut
|
||||||
@@ -27,22 +27,35 @@ sub _factory {
|
|||||||
{
|
{
|
||||||
my $type = $CLASSES_OF{ $class }->{ $name }
|
my $type = $CLASSES_OF{ $class }->{ $name }
|
||||||
or die "No class given for $name";
|
or die "No class given for $name";
|
||||||
eval "require $type" if not eval { $type->isa('UNIVERSAL') };
|
|
||||||
croak $@ if $@;
|
$type->isa('UNIVERSAL')
|
||||||
|
or eval "require $type"
|
||||||
|
or croak $@;
|
||||||
|
|
||||||
*{ "$class\::set_$name" } = sub {
|
*{ "$class\::set_$name" } = sub {
|
||||||
my ($self, $value) = @_;
|
my ($self, $value) = @_;
|
||||||
# set to a) value if it's an object
|
|
||||||
# b) New object with value for simple vlues
|
# set to
|
||||||
|
# a) value if it's an object
|
||||||
|
# b) New object with value for simple values
|
||||||
# c) New object with value for list values and list type
|
# c) New object with value for list values and list type
|
||||||
# d) List ref of new objects with value for list values and non-list type
|
# d) List ref of new objects with value for list values and non-list type
|
||||||
|
# e) New object with values passed to new for HASH references
|
||||||
|
#
|
||||||
|
# Die on non-ARRAY/HASH references - if you can define semantics
|
||||||
|
# for GLOB references, feel free to add them.
|
||||||
$attribute_ref->{ ident $self } = (blessed $value)
|
$attribute_ref->{ ident $self } = (blessed $value)
|
||||||
? $value
|
? $value
|
||||||
: (ref $value && ref $value eq 'ARRAY')
|
: (ref $value ) ?
|
||||||
? $type->isa('SOAP::WSDL::XSD::Typelib::Builtin::list')
|
(ref $value eq 'ARRAY')
|
||||||
? $type->new({ value => $value })
|
? $type->isa('SOAP::WSDL::XSD::Typelib::Builtin::list')
|
||||||
: [ map { $type->new({ value => $_ }) } @{ $value } ]
|
? $type->new({ value => $value })
|
||||||
: $type->new({ value => $value });
|
: [ map { $type->new({ value => $_ }) } @{ $value } ]
|
||||||
|
: (ref $value eq 'HASH')
|
||||||
|
? $type->new( $value )
|
||||||
|
: die "Cannot use non-ARRAY/HASH as data"
|
||||||
|
: $type->new({ value => $value });
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
*{ "$class\::add_$name" } = sub {
|
*{ "$class\::add_$name" } = sub {
|
||||||
@@ -63,33 +76,28 @@ sub _factory {
|
|||||||
return push @{ $attribute_ref->{ $ident } }, $value;
|
return push @{ $attribute_ref->{ $ident } }, $value;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
# we need our own destructor - on the fly generated classes
|
|
||||||
# don't necessarily go through Clas::Std::Storable's DEMOLISH
|
|
||||||
# calls.
|
|
||||||
# my $destructor_ref = *{ "$class\::DESTROY" };
|
|
||||||
# no warnings qw(redefine);
|
|
||||||
# *{ "$class\::DESTROY" } = sub {
|
|
||||||
# my $self = shift;
|
|
||||||
# my $class = shift;
|
|
||||||
# for (@{ $ELEMENTS_FROM{ $class } }) {
|
|
||||||
# delete $_->{ ident $self };
|
|
||||||
# }
|
|
||||||
# call original destructor.
|
|
||||||
# $destructor_ref->( $self, @_) if ref ($destructor_ref);
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub START {
|
sub START {
|
||||||
my ($self, $ident, $args_of) = @_;
|
my ($self, $ident, $args_of) = @_;
|
||||||
my $class = ref $self;
|
my $class = ref $self;
|
||||||
for my $name (keys %{ $ATTRIBUTES_OF{ $class } } ) {
|
|
||||||
my $method = "set_$name";
|
# iterate over keys of arguments
|
||||||
$self->$method( $args_of->{ $name } )
|
# and call set appropriate field in clase
|
||||||
if $args_of->{ $name };
|
map { ($ATTRIBUTES_OF{ $class }->{ $_ })
|
||||||
}
|
? do {
|
||||||
}
|
my $method = "set_$_";
|
||||||
|
$self->$method( $args_of->{ $_ } );
|
||||||
|
}
|
||||||
|
: $_ =~ m{ \A # beginning of string
|
||||||
|
xmlns # xmlns
|
||||||
|
}xms
|
||||||
|
? do {}
|
||||||
|
: croak "unknown field $_ in $class";
|
||||||
|
# TODO maybe only warn for unknown fields ?
|
||||||
|
|
||||||
|
} keys %$args_of;
|
||||||
|
};
|
||||||
|
|
||||||
sub _get_elements {
|
sub _get_elements {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
@@ -104,48 +112,48 @@ sub _get_elements {
|
|||||||
# But what about choice, group, extension ?
|
# But what about choice, group, extension ?
|
||||||
#
|
#
|
||||||
sub _serialize {
|
sub _serialize {
|
||||||
my $self = shift;
|
my $ident = ident $_[0];
|
||||||
my $ident = ident $self;
|
my $class = ref $_[0];
|
||||||
my $class = ref $self;
|
|
||||||
|
|
||||||
# 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.
|
||||||
return join q{} , map {
|
return join q{} , map {
|
||||||
my $element = $ATTRIBUTES_OF{ $class }->{ $_ }->{$ident };
|
my $element = $ATTRIBUTES_OF{ $class }->{ $_ }->{ $ident };
|
||||||
$element = [ $element ]
|
|
||||||
if not ref $element eq 'ARRAY';
|
|
||||||
my $name = $_;
|
|
||||||
|
|
||||||
map {
|
if (defined $element) {
|
||||||
# skip empty elements - complexTypes may have empty elements
|
$element = [ $element ]
|
||||||
# (minOccurs 0).
|
if not ref $element eq 'ARRAY';
|
||||||
if (not $_) {
|
my $name = $_;
|
||||||
q{}
|
|
||||||
}
|
map {
|
||||||
# serialize element elements with their own serializer
|
# serialize element elements with their own serializer
|
||||||
# but name them like they're named here.
|
# but name them like they're named here.
|
||||||
elsif ( $_->isa( 'SOAP::WSDL::XSD::Typelib::Element' ) ) {
|
if ( $_->isa( 'SOAP::WSDL::XSD::Typelib::Element' ) ) {
|
||||||
$_->serialize( { name => $_ } );
|
$_->serialize( { name => $_ } );
|
||||||
}
|
}
|
||||||
# serialize complextype elments (of other types) with their
|
# serialize complextype elments (of other types) with their
|
||||||
# serializer, but add element tags around.
|
# serializer, but add element tags around.
|
||||||
else {
|
else {
|
||||||
join q{}, $_->start_tag({ name => $name })
|
join q{}, $_->start_tag({ name => $name })
|
||||||
, $_->serialize()
|
, $_->serialize()
|
||||||
, $_->end_tag({ name => $name });
|
, $_->end_tag({ name => $name });
|
||||||
}
|
}
|
||||||
} @{ $element }
|
} @{ $element }
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
q{};
|
||||||
|
}
|
||||||
} (@{ $ELEMENTS_FROM{ $class } });
|
} (@{ $ELEMENTS_FROM{ $class } });
|
||||||
}
|
}
|
||||||
|
|
||||||
sub serialize {
|
sub serialize {
|
||||||
my ($self, $opt) = @_;
|
my ($self, $opt) = @_;
|
||||||
my $class = ref $self;
|
|
||||||
$opt ||= {};
|
$opt ||= {};
|
||||||
|
|
||||||
# do we have a empty element ?
|
# do we have a empty element ?
|
||||||
return $self->start_tag({ %$opt, empty => 1 })
|
return $self->start_tag({ %$opt, empty => 1 })
|
||||||
if not @{ $ELEMENTS_FROM{ $class } };
|
if not @{ $ELEMENTS_FROM{ ref $self } };
|
||||||
return join q{}, $self->start_tag($opt),
|
return join q{}, $self->start_tag($opt),
|
||||||
$self->_serialize(), $self->end_tag();
|
$self->_serialize(), $self->end_tag();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,9 +96,11 @@ The slight inconsistency between the these variants is caused by the
|
|||||||
restriction element, which has different meanings for simpleType and
|
restriction element, which has different meanings for simpleType and
|
||||||
complexType definitions.
|
complexType definitions.
|
||||||
|
|
||||||
=head1 Bugs and limitations
|
=back
|
||||||
|
|
||||||
=over *
|
=head1 BUGS AND LIMITATIONS
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
=item * Thread safety
|
=item * Thread safety
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -3,8 +3,6 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use diagnostics;
|
use diagnostics;
|
||||||
use Test::More tests => 17; # qw/no_plan/; # TODO: change to tests => N;
|
use Test::More tests => 17; # qw/no_plan/; # TODO: change to tests => N;
|
||||||
use Test::Differences;
|
|
||||||
use Data::Dumper;
|
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use XML::SAX::ParserFactory;
|
use XML::SAX::ParserFactory;
|
||||||
|
|
||||||
@@ -133,7 +131,8 @@ SKIP: {
|
|||||||
}
|
}
|
||||||
ok($xml = $wsdl->find_message('urn:myNamespace', 'testRequest')
|
ok($xml = $wsdl->find_message('urn:myNamespace', 'testRequest')
|
||||||
->get_part()->[0]->serialize(
|
->get_part()->[0]->serialize(
|
||||||
undef, { length => { size => -13, unit => 'BLA' } , int => 3 },
|
undef,
|
||||||
|
{ test => { length => { size => -13, unit => 'BLA' } , int => 3 } },
|
||||||
$serializer_options ),
|
$serializer_options ),
|
||||||
"serialize part"
|
"serialize part"
|
||||||
);
|
);
|
||||||
|
|||||||
+8
-10
@@ -1,8 +1,6 @@
|
|||||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
use Test::More tests => 11;
|
||||||
use Test::Differences;
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use Benchmark;
|
|
||||||
use XML::LibXML;
|
use XML::LibXML;
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
||||||
@@ -59,7 +57,7 @@ $opt->{ readable } = 0;
|
|||||||
is( $schema->find_type( 'myNamespace', 'length3')->serialize(
|
is( $schema->find_type( 'myNamespace', 'length3')->serialize(
|
||||||
'TestComplex', { size => -13, unit => 'BLA' } ,
|
'TestComplex', { size => -13, unit => 'BLA' } ,
|
||||||
$opt ),
|
$opt ),
|
||||||
q{<TestComplex type="tns:length3">}
|
q{<TestComplex type="tns:length3" >}
|
||||||
. q{<size type="xsd:non-positive-integer">-13</size>}
|
. q{<size type="xsd:non-positive-integer">-13</size>}
|
||||||
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestComplex>}
|
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestComplex>}
|
||||||
, "serialize complex type" );
|
, "serialize complex type" );
|
||||||
@@ -67,7 +65,7 @@ is( $schema->find_type( 'myNamespace', 'length3')->serialize(
|
|||||||
is( $schema->find_element( 'myNamespace', 'TestElementComplexType')->serialize(
|
is( $schema->find_element( 'myNamespace', 'TestElementComplexType')->serialize(
|
||||||
undef, { size => -13, unit => 'BLA' } ,
|
undef, { size => -13, unit => 'BLA' } ,
|
||||||
$opt ),
|
$opt ),
|
||||||
q{<TestElementComplexType type="tns:length3">}
|
q{<TestElementComplexType type="tns:length3" >}
|
||||||
. q{<size type="xsd:non-positive-integer">-13</size>}
|
. q{<size type="xsd:non-positive-integer">-13</size>}
|
||||||
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestElementComplexType>},
|
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestElementComplexType>},
|
||||||
"element with complex type"
|
"element with complex type"
|
||||||
@@ -77,8 +75,8 @@ is( $schema->find_type( 'myNamespace', 'complex')->serialize(
|
|||||||
'complexComplex',
|
'complexComplex',
|
||||||
{ 'length' => { size => -13, unit => 'BLA' }, 'int' => 1 },
|
{ 'length' => { size => -13, unit => 'BLA' }, 'int' => 1 },
|
||||||
$opt ),
|
$opt ),
|
||||||
q{<complexComplex type="tns:complex">}
|
q{<complexComplex type="tns:complex" >}
|
||||||
. q{<length type="tns:length3">}
|
. q{<length type="tns:length3" >}
|
||||||
. q{<size type="xsd:non-positive-integer">-13</size>}
|
. q{<size type="xsd:non-positive-integer">-13</size>}
|
||||||
. q{<unit type="xsd:NMTOKEN">BLA</unit></length>}
|
. q{<unit type="xsd:NMTOKEN">BLA</unit></length>}
|
||||||
. q{<int type="xsd:int">1</int></complexComplex>},
|
. q{<int type="xsd:int">1</int></complexComplex>},
|
||||||
@@ -86,10 +84,10 @@ is( $schema->find_type( 'myNamespace', 'complex')->serialize(
|
|||||||
);
|
);
|
||||||
|
|
||||||
is( $wsdl->find_message('myNamespace', 'testRequest')->first_part()->serialize(
|
is( $wsdl->find_message('myNamespace', 'testRequest')->first_part()->serialize(
|
||||||
undef, { length => { size => -13, unit => 'BLA' } , int => 3 },
|
undef, { test => { length => { size => -13, unit => 'BLA' } , int => 3 } },
|
||||||
$opt ),
|
$opt ),
|
||||||
q{<test type="tns:complex">}
|
q{<test type="tns:complex" >}
|
||||||
. q{<length type="tns:length3">}
|
. q{<length type="tns:length3" >}
|
||||||
. q{<size type="xsd:non-positive-integer">-13</size>}
|
. q{<size type="xsd:non-positive-integer">-13</size>}
|
||||||
. q{<unit type="xsd:NMTOKEN">BLA</unit>}
|
. q{<unit type="xsd:NMTOKEN">BLA</unit>}
|
||||||
. q{</length><int type="xsd:int">3</int></test>}
|
. q{</length><int type="xsd:int">3</int></test>}
|
||||||
|
|||||||
+8
-16
@@ -1,13 +1,9 @@
|
|||||||
#!/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 tests => 5;
|
||||||
use Test::Differences;
|
|
||||||
# use Devel::Profiler;
|
|
||||||
use Data::Dumper;
|
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use XML::SAX::ParserFactory;
|
use XML::SAX::ParserFactory;
|
||||||
use Benchmark;
|
|
||||||
|
|
||||||
use diagnostics;
|
use diagnostics;
|
||||||
|
|
||||||
@@ -22,17 +18,10 @@ my $filter;
|
|||||||
|
|
||||||
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
|
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
|
||||||
|
|
||||||
#my $parser = XML::SAX::ParserFactory->parser(
|
|
||||||
# Handler => $filter
|
|
||||||
#);
|
|
||||||
|
|
||||||
use XML::LibXML;
|
use XML::LibXML;
|
||||||
my $parser = XML::LibXML->new();
|
my $parser = XML::LibXML->new();
|
||||||
$parser->set_handler( $filter );
|
$parser->set_handler( $filter );
|
||||||
|
|
||||||
#timethis 10, sub { $parser->parse_string( xml() ) };
|
|
||||||
#__END__
|
|
||||||
|
|
||||||
eval { $parser->parse_string( xml() ) };
|
eval { $parser->parse_string( xml() ) };
|
||||||
if ($@)
|
if ($@)
|
||||||
{
|
{
|
||||||
@@ -60,7 +49,7 @@ my $opt = {
|
|||||||
indent => "",
|
indent => "",
|
||||||
};
|
};
|
||||||
|
|
||||||
my $data = {
|
my $data = { EnqueueMessage => {
|
||||||
MMessage => {
|
MMessage => {
|
||||||
MRecipientURI => 'anyURI',
|
MRecipientURI => 'anyURI',
|
||||||
MSenderAddress => 'a string',
|
MSenderAddress => 'a string',
|
||||||
@@ -72,8 +61,11 @@ my $data = {
|
|||||||
MKeepaliveErrorPolicy => ' ( suppress | report ) ',
|
MKeepaliveErrorPolicy => ' ( suppress | report ) ',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
SKIP: { skip_without_test_xml();
|
SKIP: { skip_without_test_xml();
|
||||||
is_xml( $wsdl->find_message(
|
is_xml( $wsdl->find_message(
|
||||||
"http://www.example.org/MessageGateway2/" ,'EnqueueMessageRequest'
|
"http://www.example.org/MessageGateway2/" ,'EnqueueMessageRequest'
|
||||||
@@ -89,7 +81,7 @@ sub skip_without_test_xml {
|
|||||||
|
|
||||||
sub xml_message {
|
sub xml_message {
|
||||||
return
|
return
|
||||||
q{<EnqueueMessage>
|
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||||
<MMessage>
|
<MMessage>
|
||||||
<MRecipientURI>anyURI</MRecipientURI>
|
<MRecipientURI>anyURI</MRecipientURI>
|
||||||
<MSenderAddress>a string</MSenderAddress>
|
<MSenderAddress>a string</MSenderAddress>
|
||||||
@@ -116,10 +108,10 @@ sub xml {
|
|||||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||||
<wsdl:types>
|
<wsdl:types>
|
||||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
|
||||||
targetNamespace="http://www.example.org/MessageGateway2/">
|
targetNamespace="http://www.example.org/MessageGateway2/">
|
||||||
|
|
||||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage">
|
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage"
|
||||||
|
xmlns:tns="http://www.example.org/MessageGateway2/">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
|
|||||||
@@ -2,11 +2,9 @@
|
|||||||
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 Test::Differences;
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use XML::LibXML;
|
use XML::LibXML;
|
||||||
use Benchmark;
|
|
||||||
|
|
||||||
use diagnostics;
|
use diagnostics;
|
||||||
|
|
||||||
|
|||||||
+9
-10
@@ -3,8 +3,6 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Pod::Simple::Text;
|
use Pod::Simple::Text;
|
||||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||||
use Test::Differences;
|
|
||||||
use Data::Dumper;
|
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use XML::SAX::ParserFactory;
|
use XML::SAX::ParserFactory;
|
||||||
|
|
||||||
@@ -20,16 +18,16 @@ use Cwd;
|
|||||||
my $path = cwd;
|
my $path = cwd;
|
||||||
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL::Client/);
|
use_ok(qw/SOAP::WSDL/);
|
||||||
|
|
||||||
my $soap = SOAP::WSDL::Client->new(
|
my $soap = SOAP::WSDL->new(
|
||||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
||||||
|
readable => 1,
|
||||||
)->wsdlinit();
|
)->wsdlinit();
|
||||||
|
|
||||||
$soap->servicename('MessageGateway');
|
$soap->servicename('MessageGateway');
|
||||||
|
|
||||||
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
||||||
ok( $soap->readable( 1 ) , "Set readable");
|
|
||||||
ok( $soap->explain() );
|
ok( $soap->explain() );
|
||||||
|
|
||||||
|
|
||||||
@@ -42,10 +40,11 @@ $pod->parse_string_document( $soap->explain() );
|
|||||||
|
|
||||||
SKIP: {
|
SKIP: {
|
||||||
skip_without_test_xml();
|
skip_without_test_xml();
|
||||||
is_xml( $soap->call( 'EnqueueMessage' ,
|
is_xml( $soap->call( 'EnqueueMessage' , EnqueueMessage => {
|
||||||
'MMessage' => {
|
'MMessage' => {
|
||||||
'MRecipientURI' => 'mailto:test@example.com' ,
|
'MRecipientURI' => 'mailto:test@example.com' ,
|
||||||
'MMessageContent' => 'TestContent for Message' ,
|
'MMessageContent' => 'TestContent for Message' ,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
, q{<SOAP-ENV:Envelope
|
, q{<SOAP-ENV:Envelope
|
||||||
@@ -54,7 +53,7 @@ SKIP: {
|
|||||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||||
<SOAP-ENV:Body ><EnqueueMessage><MMessage>
|
<SOAP-ENV:Body ><EnqueueMessage xmlns="http://www.example.org/MessageGateway2/"><MMessage>
|
||||||
<MRecipientURI>mailto:test@example.com</MRecipientURI>
|
<MRecipientURI>mailto:test@example.com</MRecipientURI>
|
||||||
<MMessageContent>TestContent for Message</MMessageContent>
|
<MMessageContent>TestContent for Message</MMessageContent>
|
||||||
</MMessage></EnqueueMessage></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
</MMessage></EnqueueMessage></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
||||||
|
|||||||
@@ -3,16 +3,15 @@ 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 lib '../lib';
|
use lib '../lib';
|
||||||
use diagnostics;
|
|
||||||
|
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
|
||||||
my $path = cwd;
|
my $path = cwd;
|
||||||
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL::Client/);
|
use_ok(qw/SOAP::WSDL/);
|
||||||
|
|
||||||
my $soap = SOAP::WSDL::Client->new(
|
my $soap = SOAP::WSDL->new(
|
||||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/008_complexType.wsdl'
|
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/008_complexType.wsdl'
|
||||||
)->wsdlinit();
|
)->wsdlinit();
|
||||||
|
|
||||||
|
|||||||
+5
-19
@@ -1,13 +1,6 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
|
||||||
#use Devel::Profiler bad_pkgs => [
|
|
||||||
# qw(UNIVERSAL Time::HiRes B Carp Exporter Cwd Config CORE DynaLoader
|
|
||||||
# XSLoader AutoLoader
|
|
||||||
# Class::Std SOAP::Lite) ];
|
|
||||||
|
|
||||||
use Scalar::Util;
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::Differences;
|
use Test::More tests => 5;
|
||||||
use lib 't/lib';
|
use lib 't/lib';
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use lib 'lib';
|
use lib 'lib';
|
||||||
@@ -18,7 +11,7 @@ use Cwd;
|
|||||||
use XML::LibXML::SAX;
|
use XML::LibXML::SAX;
|
||||||
use_ok(qw/SOAP::WSDL::SAX::MessageHandler/);
|
use_ok(qw/SOAP::WSDL::SAX::MessageHandler/);
|
||||||
|
|
||||||
use SOAP::WSDL::Client;
|
use SOAP::WSDL;
|
||||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||||
my $path = cwd;
|
my $path = cwd;
|
||||||
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
||||||
@@ -46,7 +39,8 @@ else
|
|||||||
fail "bool context overloading"
|
fail "bool context overloading"
|
||||||
}
|
}
|
||||||
|
|
||||||
my $soap = SOAP::WSDL::Client->new(
|
my $soap = SOAP::WSDL->new(
|
||||||
|
readable => 1,
|
||||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
||||||
)->wsdlinit();
|
)->wsdlinit();
|
||||||
|
|
||||||
@@ -55,17 +49,9 @@ $soap->servicename('MessageGateway');
|
|||||||
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
||||||
ok( $soap->readable( 0 ) , "Set readable");
|
ok( $soap->readable( 0 ) , "Set readable");
|
||||||
|
|
||||||
# print $soap->call( 'EnqueueMessage'
|
timethese 100, {
|
||||||
# , MMessage => $filter->get_data()->get_MMessage() );
|
|
||||||
|
|
||||||
timethese 1000, {
|
|
||||||
'ClassParser' => sub { $parser->parse_string( xml() ); },
|
'ClassParser' => sub { $parser->parse_string( xml() ); },
|
||||||
# 'HashParser' => sub { $hash_parser->parse_string( xml() ); },
|
|
||||||
'XML::Simple' => sub { return XMLin( xml() ) },
|
'XML::Simple' => sub { return XMLin( xml() ) },
|
||||||
# 'SOAP::WSDL::Client->call' => sub {
|
|
||||||
# $soap->call( 'EnqueueMessage'
|
|
||||||
# , MMessage => $filter->get_data()->get_MMessage() );
|
|
||||||
# }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sub xml {
|
sub xml {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ use strict;
|
|||||||
use lib 'lib/';
|
use lib 'lib/';
|
||||||
use lib '../lib/';
|
use lib '../lib/';
|
||||||
use lib 't/lib';
|
use lib 't/lib';
|
||||||
use Data::Dumper;
|
|
||||||
|
|
||||||
use_ok qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
use_ok qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||||
use_ok qw( MyComplexType );
|
use_ok qw( MyComplexType );
|
||||||
|
|||||||
+1
-5
@@ -1,13 +1,9 @@
|
|||||||
#!/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 tests => 5;
|
||||||
use Test::Differences;
|
|
||||||
# use Devel::Profiler;
|
|
||||||
use Data::Dumper;
|
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use XML::SAX::ParserFactory;
|
use XML::SAX::ParserFactory;
|
||||||
use Benchmark;
|
|
||||||
|
|
||||||
use diagnostics;
|
use diagnostics;
|
||||||
|
|
||||||
|
|||||||
+1
-5
@@ -1,13 +1,9 @@
|
|||||||
#!/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 tests => 5;
|
||||||
use Test::Differences;
|
|
||||||
# use Devel::Profiler;
|
|
||||||
use Data::Dumper;
|
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use XML::SAX::ParserFactory;
|
use XML::SAX::ParserFactory;
|
||||||
use Benchmark;
|
|
||||||
|
|
||||||
use diagnostics;
|
use diagnostics;
|
||||||
|
|
||||||
|
|||||||
+30
-4
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use Test::More qw(no_plan);
|
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';
|
||||||
@@ -14,6 +15,8 @@ my $obj = MyAtomicComplexTypeElement->new({ test=> 'Test', test2 => 'Test2'});
|
|||||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||||
, 'inherited class';
|
, 'inherited class';
|
||||||
|
|
||||||
|
# print $obj->get_test;
|
||||||
|
|
||||||
ok $obj->get_test->isa('SOAP::WSDL::XSD::Typelib::Builtin::string')
|
ok $obj->get_test->isa('SOAP::WSDL::XSD::Typelib::Builtin::string')
|
||||||
, 'element isa';
|
, 'element isa';
|
||||||
|
|
||||||
@@ -21,9 +24,11 @@ is $obj, '<MyAtomicComplexTypeElement xmlns="urn:Test" ><MyTestElement >Test</My
|
|||||||
. '<MyTestElement2 >Test2</MyTestElement2></MyAtomicComplexTypeElement>'
|
. '<MyTestElement2 >Test2</MyTestElement2></MyAtomicComplexTypeElement>'
|
||||||
, 'stringification';
|
, 'stringification';
|
||||||
|
|
||||||
my $soap = SOAP::WSDL::Client->new();
|
my $soap = SOAP::WSDL::Client->new( {
|
||||||
$soap->proxy('http://bla');
|
class_resolver => 'FakeResolver',
|
||||||
$soap->no_dispatch(1);
|
} )
|
||||||
|
->proxy('http://bla')
|
||||||
|
->no_dispatch(1);
|
||||||
|
|
||||||
is $soap->call('Test', $obj), q{<SOAP-ENV:Envelope }
|
is $soap->call('Test', $obj), q{<SOAP-ENV:Envelope }
|
||||||
. q{xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" }
|
. q{xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" }
|
||||||
@@ -33,3 +38,24 @@ is $soap->call('Test', $obj), q{<SOAP-ENV:Envelope }
|
|||||||
. q{<MyTestElement2 >Test2</MyTestElement2>}
|
. q{<MyTestElement2 >Test2</MyTestElement2>}
|
||||||
. q{</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
. q{</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
||||||
, 'SOAP Envelope generation with objects';
|
, 'SOAP Envelope generation with objects';
|
||||||
|
|
||||||
|
my $result = $soap->proxy('http://bla')
|
||||||
|
->no_dispatch(0)
|
||||||
|
->call('Test', $obj);
|
||||||
|
ok $result->isa('SOAP::WSDL::SOAP::Typelib::Fault11'),
|
||||||
|
'return fault on impossible call';
|
||||||
|
ok ! $result, 'fault is false in boolean context';
|
||||||
|
|
||||||
|
package FakeResolver;
|
||||||
|
|
||||||
|
sub get_class {
|
||||||
|
my %class_list = (
|
||||||
|
'Fault' => 'SOAP::WSDL::SOAP::Typelib::Fault11',
|
||||||
|
'Fault/faultactor' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||||
|
'Fault/faultcode' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI',
|
||||||
|
'Fault/faultstring' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||||
|
'Fault/detail' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyType',
|
||||||
|
);
|
||||||
|
return $class_list{ $_[1] };
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
use Test::More tests => 1;
|
||||||
|
use lib '../lib';
|
||||||
|
eval "require SOAP::WSDL::XSD::Typelib::Builtin";
|
||||||
|
use Storable;
|
||||||
|
|
||||||
|
my $long = SOAP::WSDL::XSD::Typelib::Builtin::long->new( { value => 9 });
|
||||||
|
my $clone = Storable::thaw( Storable::freeze( $long ) );
|
||||||
|
|
||||||
|
is $clone->serialize, 9 , 'clone via freeze/thaw';
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
use Test::More tests => 9;
|
use Test::More tests => 10;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use diagnostics;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
|
use Data::Dumper;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
|
|
||||||
use_ok(qw/SOAP::WSDL/);
|
use_ok(qw/SOAP::WSDL/);
|
||||||
@@ -16,23 +19,29 @@ chdir $path;
|
|||||||
|
|
||||||
$path = cwd;
|
$path = cwd;
|
||||||
|
|
||||||
|
$path =~s{/SOAP/WSDL}{}xms;
|
||||||
|
|
||||||
#2
|
#2
|
||||||
ok( $soap = SOAP::WSDL->new(
|
ok( $soap = SOAP::WSDL->new(
|
||||||
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||||
), 'Instantiated object' );
|
), 'Instantiated object' );
|
||||||
ok( ($soap->servicename('testService') eq 'testService' ) );
|
|
||||||
ok( ($soap->portname('testPort') eq 'testPort' ) );
|
|
||||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||||
|
|
||||||
|
ok( ($soap->servicename('testService') ), 'set service' );
|
||||||
|
ok( ($soap->portname('testPort') ) ,'set portname');
|
||||||
|
|
||||||
ok( ($soap->portname() eq 'testPort' ),
|
ok( ($soap->portname() eq 'testPort' ),
|
||||||
"Found first port definition" );
|
"Found first port definition" );
|
||||||
|
|
||||||
ok( ($soap->portname('testPort2') eq 'testPort2' ),
|
ok( ($soap->portname('testPort2') ),
|
||||||
"Found second port definition (based on URL)" );
|
"Found second port definition (based on URL)" );
|
||||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
|
||||||
ok( ($soap->portname('testPort3') eq 'testPort3' ),
|
ok( ($soap->portname('testPort3') ),
|
||||||
"Found third port definition (based on Name)" );
|
"Found third port definition (based on Name)" );
|
||||||
|
|
||||||
|
|
||||||
ok( $soap->wsdlinit( servicename => 'testService', portname => 'testPort'), 'parsed WSDL' );
|
ok( $soap->wsdlinit( servicename => 'testService', portname => 'testPort'), 'parsed WSDL' );
|
||||||
|
|
||||||
|
$soap->_wsdl_init_methods();
|
||||||
|
|
||||||
ok( ($soap->portname() eq 'testPort' ), 'found port passed to wsdlinit');
|
ok( ($soap->portname() eq 'testPort' ), 'found port passed to wsdlinit');
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
use Test::More tests => 7;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
our $SKIP;
|
||||||
|
eval "use Test::SOAPMessage";
|
||||||
|
if ($@)
|
||||||
|
{
|
||||||
|
$SKIP = "Test::Differences required for testing. ";
|
||||||
|
}
|
||||||
|
|
||||||
|
my $path = cwd();
|
||||||
|
my $name = basename $0;
|
||||||
|
$name =~s/\.t$//;
|
||||||
|
$name =~s/^t\///;
|
||||||
|
|
||||||
|
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||||
|
|
||||||
|
use_ok(qw/SOAP::WSDL/);
|
||||||
|
|
||||||
|
print "# SOAP::WSDL Version: $SOAP::WSDL::VERSION\n";
|
||||||
|
|
||||||
|
my $xml;
|
||||||
|
my $soap;
|
||||||
|
|
||||||
|
#2
|
||||||
|
ok( $soap = SOAP::WSDL->new(
|
||||||
|
wsdl => 'file://' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl',
|
||||||
|
readable =>1,
|
||||||
|
), 'Instantiated object' );
|
||||||
|
|
||||||
|
|
||||||
|
#3
|
||||||
|
ok $soap->wsdlinit(
|
||||||
|
checkoccurs => 1,
|
||||||
|
servicename => 'testService',
|
||||||
|
), 'parse WSDL';
|
||||||
|
ok $soap->no_dispatch(1), 'set no dispatch';
|
||||||
|
|
||||||
|
ok ($xml = $soap->call('test',
|
||||||
|
testAll => {
|
||||||
|
Test1 => 'Test 1',
|
||||||
|
Test2 => [ 'Test 2', 'Test 3' ]
|
||||||
|
}
|
||||||
|
), 'Serialized complexType' );
|
||||||
|
|
||||||
|
|
||||||
|
# print $xml;
|
||||||
|
|
||||||
|
# $soap->wsdl_checkoccurs(1);
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO = "not implemented yet";
|
||||||
|
|
||||||
|
eval
|
||||||
|
{
|
||||||
|
$xml = $soap->serializer->method(
|
||||||
|
$soap->call('test',
|
||||||
|
testAll => {
|
||||||
|
Test1 => 'Test 1',
|
||||||
|
Test2 => [ 'Test 2', 'Test 3' ]
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
ok( ($@ =~m/illegal\snumber\sof\selements/),
|
||||||
|
"Died on illegal number of elements (too many)"
|
||||||
|
);
|
||||||
|
|
||||||
|
eval {
|
||||||
|
$xml = $soap->serializer->method(
|
||||||
|
$soap->call('test',
|
||||||
|
testAll => {
|
||||||
|
Test1 => 'Test 1',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
};
|
||||||
|
ok($@, 'Died on illegal number of elements (not enough)');
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
use Test::More tests => 2;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
our $SKIP;
|
||||||
|
eval "use Test::SOAPMessage";
|
||||||
|
if ($@) {
|
||||||
|
$SKIP = "Test::Differences required for testing. $@";
|
||||||
|
}
|
||||||
|
|
||||||
|
use_ok qw/SOAP::WSDL/;
|
||||||
|
|
||||||
|
my $soap = SOAP::WSDL->new();
|
||||||
|
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO="implement <choice> support";
|
||||||
|
fail "serialize choice element";
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
use Test::More tests => 2;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
our $SKIP;
|
||||||
|
eval "use Test::SOAPMessage";
|
||||||
|
if ($@) {
|
||||||
|
$SKIP = "Test::Differences required for testing. $@";
|
||||||
|
}
|
||||||
|
|
||||||
|
use_ok qw/SOAP::WSDL/;
|
||||||
|
|
||||||
|
my $soap = SOAP::WSDL->new();
|
||||||
|
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO="implement <complexContent> support";
|
||||||
|
fail "serialize complexContent element";
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
use Test::More tests => 2;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
our $SKIP;
|
||||||
|
eval "use Test::SOAPMessage";
|
||||||
|
if ($@) {
|
||||||
|
$SKIP = "Test::Differences required for testing. $@";
|
||||||
|
}
|
||||||
|
|
||||||
|
use_ok qw/SOAP::WSDL/;
|
||||||
|
|
||||||
|
my $soap = SOAP::WSDL->new();
|
||||||
|
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO="implement <group> support";
|
||||||
|
fail "serialize group element";
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
BEGIN {
|
||||||
|
use Test::More tests => 6;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
our $SKIP;
|
||||||
|
eval "use Test::SOAPMessage";
|
||||||
|
if ($@)
|
||||||
|
{
|
||||||
|
$SKIP = "Test::Differences required for testing. $@";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use_ok(qw/SOAP::WSDL/);
|
||||||
|
|
||||||
|
my $xml;
|
||||||
|
|
||||||
|
my $path = cwd();
|
||||||
|
my $name = basename $0;
|
||||||
|
$name =~s/\.t$//;
|
||||||
|
|
||||||
|
$path=~s{(/t)?/SOAP/WSDL}{}xms;
|
||||||
|
|
||||||
|
#2
|
||||||
|
ok( $soap = SOAP::WSDL->new(
|
||||||
|
wsdl => 'file://' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||||
|
), 'Instantiated object' );
|
||||||
|
|
||||||
|
#3
|
||||||
|
ok( $soap->wsdlinit(
|
||||||
|
checkoccurs => 1,
|
||||||
|
servicename => 'testService',
|
||||||
|
), 'parsed WSDL' );
|
||||||
|
$soap->no_dispatch(1);
|
||||||
|
$soap->serializer()->envprefix('SOAP-ENV');
|
||||||
|
$soap->serializer()->encprefix('SOAP-ENC');
|
||||||
|
|
||||||
|
#4
|
||||||
|
ok $xml = $soap->call('test',
|
||||||
|
testSequence => {
|
||||||
|
Test1 => 'Test 1',
|
||||||
|
Test2 => 'Test 2',
|
||||||
|
}
|
||||||
|
), 'Serialized complexType';
|
||||||
|
|
||||||
|
#5
|
||||||
|
eval
|
||||||
|
{
|
||||||
|
$xml = $soap->serializer->method(
|
||||||
|
$soap->call('test',
|
||||||
|
testSequence => {
|
||||||
|
Test1 => 'Test 1',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
ok( ($@),
|
||||||
|
"Died on illegal number of elements"
|
||||||
|
);
|
||||||
|
|
||||||
|
#6
|
||||||
|
eval
|
||||||
|
{
|
||||||
|
$xml = $soap->serializer->method(
|
||||||
|
$soap->call('test',
|
||||||
|
testSequence => {
|
||||||
|
Test1 => 'Test 1',
|
||||||
|
Test2 => [ 1, 2, 3, ]
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
ok( ($@),
|
||||||
|
"Died on illegal number of elements"
|
||||||
|
);
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
use Test::More tests => 2;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
our $SKIP;
|
||||||
|
eval "use Test::SOAPMessage";
|
||||||
|
if ($@) {
|
||||||
|
$SKIP = "Test::Differences required for testing. $@";
|
||||||
|
}
|
||||||
|
|
||||||
|
use_ok qw/SOAP::WSDL/;
|
||||||
|
|
||||||
|
my $soap = SOAP::WSDL->new();
|
||||||
|
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO="implement <simpleContent> support";
|
||||||
|
fail "serialize simpleContent element";
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
use Test::More skip_all => 'TODO: implement tests';
|
||||||
|
use lib '../lib';
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
use Test::More tests => 6;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
use_ok(qw/SOAP::WSDL/);
|
||||||
|
|
||||||
|
my $xml;
|
||||||
|
|
||||||
|
my $soap = undef;
|
||||||
|
my $name = basename $0;
|
||||||
|
$name =~s/\.(t|pl)$//;
|
||||||
|
|
||||||
|
my $path = cwd;
|
||||||
|
|
||||||
|
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||||
|
|
||||||
|
#2
|
||||||
|
ok( $soap = SOAP::WSDL->new(
|
||||||
|
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||||
|
), 'Instantiated object' );
|
||||||
|
|
||||||
|
#3
|
||||||
|
$soap->readable(1);
|
||||||
|
ok( $soap->wsdlinit(
|
||||||
|
servicename => 'testService',
|
||||||
|
), 'parsed WSDL' );
|
||||||
|
$soap->no_dispatch(1);
|
||||||
|
|
||||||
|
ok ( $xml = $soap->call('test', testElement1 => 1 ) ,
|
||||||
|
'Serialized (simpler) element' );
|
||||||
|
|
||||||
|
# print $xml, "\n";
|
||||||
|
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO="implement min/maxOccurs checks";
|
||||||
|
|
||||||
|
eval { $soap->call('test', testAll => [ 2, 3 ] ); };
|
||||||
|
|
||||||
|
like $@, qr{illegal\snumber\sof\selements}, "Died on illegal number of elements (too many)";
|
||||||
|
|
||||||
|
eval { $soap->call('test', testAll => undef ) };
|
||||||
|
ok $@, 'Died on illegal number of elements (not enough)';
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
use Test::More tests => 6;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
our $SKIP;
|
||||||
|
eval "use Test::SOAPMessage";
|
||||||
|
if ($@) {
|
||||||
|
$SKIP = "Test::Differences required for testing.";
|
||||||
|
}
|
||||||
|
|
||||||
|
use_ok(qw/SOAP::WSDL/);
|
||||||
|
|
||||||
|
my $soap;
|
||||||
|
my $xml;
|
||||||
|
my $path = cwd();
|
||||||
|
my $name = basename $0;
|
||||||
|
$name =~s/\.t$//;
|
||||||
|
|
||||||
|
$path =~s{(/t)?/SOAP/WSDL}{}xsm;
|
||||||
|
|
||||||
|
#2
|
||||||
|
ok( $soap = SOAP::WSDL->new(
|
||||||
|
wsdl => 'file://' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||||
|
), 'Instantiated object' );
|
||||||
|
|
||||||
|
#3
|
||||||
|
$soap->readable(1);
|
||||||
|
ok( $soap->wsdlinit(
|
||||||
|
servicename => 'testService',
|
||||||
|
), 'parsed WSDL' );
|
||||||
|
$soap->no_dispatch(1);
|
||||||
|
|
||||||
|
ok ($xml = $soap->call('test',
|
||||||
|
testElement1 => 'Test'
|
||||||
|
), 'Serialized (simple) element' );
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO="implement min/maxOccurs checks";
|
||||||
|
|
||||||
|
eval {
|
||||||
|
$xml = $soap->call('test',
|
||||||
|
testAll => [ 'Test 2', 'Test 3' ]
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
ok( ($@ =~m/illegal\snumber\sof\selements/),
|
||||||
|
"Died on illegal number of elements (too many)"
|
||||||
|
);
|
||||||
|
|
||||||
|
eval {
|
||||||
|
$xml = $soap->call('test', testAll => undef );
|
||||||
|
};
|
||||||
|
ok($@, 'Died on illegal number of elements (not enough)');
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
use Test::More tests => 8;
|
||||||
|
use strict;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
use_ok(qw/SOAP::WSDL/);
|
||||||
|
|
||||||
|
my ($soap, $xml, $xml2);
|
||||||
|
|
||||||
|
# chdir to my location
|
||||||
|
my $name = basename( $0 );
|
||||||
|
$name =~s/\.(t|pl)$//;
|
||||||
|
|
||||||
|
my $path = cwd;
|
||||||
|
$path =~s{(/t)/SOAP/WSDL}{}xms;
|
||||||
|
|
||||||
|
#2
|
||||||
|
ok( $soap = SOAP::WSDL->new(
|
||||||
|
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||||
|
), 'Instantiated object' );
|
||||||
|
|
||||||
|
$soap->readable(1);
|
||||||
|
|
||||||
|
#3
|
||||||
|
ok( $soap->wsdlinit(
|
||||||
|
servicename => 'testService',
|
||||||
|
), 'parsed WSDL' );
|
||||||
|
$soap->no_dispatch(1);
|
||||||
|
|
||||||
|
#4
|
||||||
|
ok $xml = $soap->call('test', testAll => [ 1, 2 ] ), 'Serialize list call';
|
||||||
|
|
||||||
|
#5
|
||||||
|
ok ( $xml2 = $soap->call('test', testAll => "1 2" ) , 'Serialized scalar call' );
|
||||||
|
#6
|
||||||
|
ok( $xml eq $xml2, 'Got expected result');
|
||||||
|
|
||||||
|
#7
|
||||||
|
TODO: {
|
||||||
|
local $TODO = "implement minLength check";
|
||||||
|
eval { $xml = $soap->call('test', testAll => undef ) };
|
||||||
|
ok($@, 'Died on illegal number of elements (not enough)');
|
||||||
|
}
|
||||||
|
|
||||||
|
#8
|
||||||
|
TODO: {
|
||||||
|
local $TODO = "maxLength test not implemented";
|
||||||
|
eval { $xml = $soap->call('test', testAll => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ] ) };
|
||||||
|
ok($@, 'Died on illegal number of elements (more than maxLength)');
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
use Test::More tests => 8;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use diagnostics;
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
use lib '../lib';
|
||||||
|
use lib 'lib';
|
||||||
|
use lib 't/lib';
|
||||||
|
|
||||||
|
use_ok(qw/SOAP::WSDL/);
|
||||||
|
|
||||||
|
my $xml;
|
||||||
|
|
||||||
|
my $name = basename $0;
|
||||||
|
$name =~s/\.(t|pl)$//;
|
||||||
|
|
||||||
|
my $path = cwd;
|
||||||
|
$path =~s{(/t)/SOAP/WSDL}{}xms;
|
||||||
|
|
||||||
|
my $soap;
|
||||||
|
#2
|
||||||
|
ok( $soap = SOAP::WSDL->new(
|
||||||
|
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||||
|
), 'Instantiated object' );
|
||||||
|
|
||||||
|
#3
|
||||||
|
$soap->readable(1);
|
||||||
|
ok( $soap->wsdlinit(
|
||||||
|
servicename => 'testService',
|
||||||
|
), 'parsed WSDL' );
|
||||||
|
$soap->no_dispatch(1);
|
||||||
|
$soap->autotype(0);
|
||||||
|
|
||||||
|
#4
|
||||||
|
ok $xml = $soap->call('test', testAll => [ 1, 2 ] ) , 'Serialize list call';
|
||||||
|
|
||||||
|
# print $xml, "\n";
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO = "implement minLength/maxLength checks";
|
||||||
|
eval { $soap->call('test', testAll => [ 1, 2, 3 ] ) };
|
||||||
|
ok($@, 'Died on illegal number of elements (too many)');
|
||||||
|
|
||||||
|
eval { $soap->call('test', testAll => [] ) };
|
||||||
|
ok($@, 'Died on illegal number of elements (not enough)');
|
||||||
|
}
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO = "minValue check not implemented ";
|
||||||
|
eval { $xml = $soap->call('test', testAll => 0 ) };
|
||||||
|
ok($@, 'Died on illegal value');
|
||||||
|
}
|
||||||
|
|
||||||
|
TODO: {
|
||||||
|
local $TODO = "maxValue check not implemented ";
|
||||||
|
eval { $xml = $soap->call('test', testAll => 100 ) };
|
||||||
|
ok($@, 'Died on illegal value');
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
use Test::More skip_all => 'Not supported yet';
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
use lib '../lib';
|
||||||
|
|
||||||
|
use_ok qw/SOAP::WSDL/;
|
||||||
|
|
||||||
|
my $xml;
|
||||||
|
my $soap = undef;
|
||||||
|
my $name = basename( $0 );
|
||||||
|
$name =~s/\.(t|pl)$//;
|
||||||
|
|
||||||
|
my $path = cwd;
|
||||||
|
|
||||||
|
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||||
|
|
||||||
|
#2
|
||||||
|
ok $soap = SOAP::WSDL->new(
|
||||||
|
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||||
|
), 'Instantiated object';
|
||||||
|
|
||||||
|
#3
|
||||||
|
$soap->readable(1);
|
||||||
|
ok $soap->wsdlinit(), 'parsed WSDL';
|
||||||
|
$soap->no_dispatch(1);
|
||||||
|
|
||||||
|
#4
|
||||||
|
ok $xml = $soap->call('test', testAll => 1 ) , 'Serialized call';
|
||||||
|
|
||||||
|
# 6
|
||||||
|
eval {
|
||||||
|
$xml = $soap->serializer->method(
|
||||||
|
$soap->call('test',
|
||||||
|
testAll => [ 1 , 'union']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
};
|
||||||
|
ok($@, 'Died on illegal number of elements (not enough)');
|
||||||
|
|
||||||
|
eval {
|
||||||
|
$xml = $soap->serializer->method(
|
||||||
|
$soap->call('test',
|
||||||
|
testAll => undef
|
||||||
|
)
|
||||||
|
)
|
||||||
|
};
|
||||||
|
ok($@, 'Died on illegal number of elements (not enough)');
|
||||||
|
|
||||||
|
#8
|
||||||
|
ok ( $xml = $soap->serializer->method( $soap->call('test2',
|
||||||
|
testAll => 1 )
|
||||||
|
),
|
||||||
|
'Serialized (simple) call (list)' );
|
||||||
|
|
||||||
|
#9
|
||||||
|
eval {
|
||||||
|
$xml = $soap->serializer->method(
|
||||||
|
$soap->call('test',
|
||||||
|
testAll => [ 1 , 'union']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
};
|
||||||
|
ok($@, 'Died on illegal number of elements (not enough)');
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More tests=> 6;
|
use Test::More tests=> 5;
|
||||||
use Time::HiRes qw( gettimeofday tv_interval );
|
use Time::HiRes qw( gettimeofday tv_interval );
|
||||||
use lib '../..';
|
use lib '../..';
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
@@ -9,24 +9,22 @@ use File::Basename;
|
|||||||
use_ok qw/ SOAP::WSDL /;
|
use_ok qw/ SOAP::WSDL /;
|
||||||
use Benchmark;
|
use Benchmark;
|
||||||
|
|
||||||
# print "Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||||
# print "Performance test with simple WSDL file\n";
|
print "# Performance test with simple WSDL file\n";
|
||||||
|
my $soap;
|
||||||
my $data = {
|
my $data = {
|
||||||
|
sayHello => {
|
||||||
name => 'Mein Name',
|
name => 'Mein Name',
|
||||||
givenName => 'Vorname'
|
givenName => 'Vorname',
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
# chdir to my location
|
|
||||||
my $cwd = cwd;
|
|
||||||
my $path = dirname( $0 );
|
|
||||||
my $soap = undef;
|
|
||||||
my $name = basename( $0 );
|
my $name = basename( $0 );
|
||||||
$name =~s/\.(t|pl)$//;
|
$name =~s/\.(t|pl)$//;
|
||||||
chdir $path;
|
|
||||||
|
|
||||||
$path = cwd;
|
my $path = cwd;
|
||||||
|
|
||||||
|
$path=~s{(/t)?/SOAP/WSDL}{}xms;
|
||||||
|
|
||||||
my $cacheDir;
|
my $cacheDir;
|
||||||
if ($^O =~ m/Win/)
|
if ($^O =~ m/Win/)
|
||||||
@@ -42,7 +40,7 @@ else
|
|||||||
my $t0 = [gettimeofday];
|
my $t0 = [gettimeofday];
|
||||||
ok(
|
ok(
|
||||||
$soap=SOAP::WSDL->new(
|
$soap=SOAP::WSDL->new(
|
||||||
wsdl => "file://$path/acceptance/wsdl/10_helloworld.asmx.xml",
|
wsdl => "file://$path/t/acceptance/wsdl/10_helloworld.asmx.xml",
|
||||||
no_dispatch => 1
|
no_dispatch => 1
|
||||||
),
|
),
|
||||||
"Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)" );
|
"Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)" );
|
||||||
@@ -51,8 +49,10 @@ $soap->proxy('http://helloworld/helloworld.asmx');
|
|||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
eval{
|
eval{
|
||||||
$soap->wsdlinit(caching => 1,
|
$soap->wsdlinit(
|
||||||
cache_directory => $cacheDir ) };
|
caching => 1,
|
||||||
|
cache_directory => $cacheDir,
|
||||||
|
servicename => 'Service1' ) };
|
||||||
|
|
||||||
unless ($@) {
|
unless ($@) {
|
||||||
pass("wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)");
|
pass("wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)");
|
||||||
@@ -69,7 +69,7 @@ $t0 = [gettimeofday];
|
|||||||
ok($soap->call(sayHello => %{ $data }),
|
ok($soap->call(sayHello => %{ $data }),
|
||||||
"1 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)" );
|
"1 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)" );
|
||||||
|
|
||||||
timethis 500, sub { $soap->call(sayHello => %{ $data }) };
|
timethis 1000, sub { $soap->call(sayHello => %{ $data }) };
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
#######################################################################################
|
||||||
|
#
|
||||||
|
# 2_helloworld.t
|
||||||
|
#
|
||||||
|
# Acceptance test for message encoding, based on .NET wsdl and example code.
|
||||||
|
# SOAP::WSDL's encoding doesn't I<exactly> match the .NET example, because
|
||||||
|
# .NET doesn't always specify types (SOAP::WSDL does), and the namespace
|
||||||
|
# prefixes chosen are different (maybe the encoding style, too ? this would be a bug !)
|
||||||
|
#
|
||||||
|
########################################################################################
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use Test::More tests => 4;
|
||||||
|
use lib '../..';
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
|
||||||
|
use_ok q/SOAP::WSDL/;
|
||||||
|
|
||||||
|
### test vars END
|
||||||
|
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||||
|
print "# Acceptance test against sample output with simple WSDL\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
my $data = {
|
||||||
|
name => 'test',
|
||||||
|
givenName => 'test',
|
||||||
|
};
|
||||||
|
|
||||||
|
my $soap = undef;
|
||||||
|
my $name = basename( $0 );
|
||||||
|
$name =~s/\.(t|pl)$//;
|
||||||
|
|
||||||
|
my $path = cwd;
|
||||||
|
|
||||||
|
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||||
|
|
||||||
|
ok $soap = SOAP::WSDL->new(
|
||||||
|
wsdl => 'file:///'.$path.'/t/acceptance/wsdl/11_helloworld.wsdl',
|
||||||
|
no_dispatch => 1
|
||||||
|
), 'Create SOAP::WSDL object';
|
||||||
|
|
||||||
|
$soap->serializer()->namespace('SOAP-ENV');
|
||||||
|
$soap->serializer()->encodingspace('SOAP-ENC');
|
||||||
|
$soap->proxy('http://helloworld/helloworld.asmx');
|
||||||
|
|
||||||
|
ok $soap->wsdlinit(
|
||||||
|
servicename => 'Service1',
|
||||||
|
), 'wsdlinit';
|
||||||
|
|
||||||
|
|
||||||
|
ok $soap->call('sayHello', 'sayHello' => $data), 'soap call';
|
||||||
|
|
||||||
@@ -1,36 +1,34 @@
|
|||||||
|
use strict;
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use Test;
|
use Test::More tests => 4;
|
||||||
use SOAP::WSDL;
|
use SOAP::WSDL;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
use File::Basename;
|
||||||
plan tests => 9;
|
|
||||||
|
|
||||||
print "# Using SOAP::WSDL Version $SOAP::WSDL::VERSION\n";
|
print "# Using SOAP::WSDL Version $SOAP::WSDL::VERSION\n";
|
||||||
|
|
||||||
my $name = '02_port';
|
my $name = '02_port';
|
||||||
|
|
||||||
# chdir to my location
|
# chdir to my location
|
||||||
my $cwd = cwd;
|
my $soap = undef;
|
||||||
|
|
||||||
|
my $path = cwd;
|
||||||
|
|
||||||
if (-d 't')
|
$path =~s{(/t)?/SOAP/WSDL}{}xms;
|
||||||
{
|
|
||||||
$cwd .= '/t';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
my $url = 'http://127.0.0.1/testPort';
|
my $url = 'http://127.0.0.1/testPort';
|
||||||
|
|
||||||
|
|
||||||
ok(1);
|
|
||||||
|
|
||||||
ok( $soap = SOAP::WSDL->new(
|
ok( $soap = SOAP::WSDL->new(
|
||||||
wsdl => 'file:///' . $cwd . '/acceptance/wsdl/' . $name . '.wsdl'
|
wsdl => 'file:///' . $path . '/t/acceptance/wsdl/' . $name . '.wsdl'
|
||||||
) );
|
) );
|
||||||
ok( ($soap->servicename('testService') eq 'testService' ) );
|
|
||||||
ok( ($soap->portname('testPort') eq 'testPort' ) );
|
|
||||||
|
|
||||||
ok( $soap->wsdlinit( url => $url ) );
|
ok $soap->wsdlinit( url => $url );
|
||||||
|
ok $soap->servicename('testService');
|
||||||
|
ok $soap->portname('testPort');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
use Test::More;
|
||||||
|
eval "use Test::Pod 1.00";
|
||||||
|
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
|
||||||
|
|
||||||
|
use Cwd;
|
||||||
|
|
||||||
|
my $dir = cwd;
|
||||||
|
|
||||||
|
if ( $dir =~ /t$/ )
|
||||||
|
{
|
||||||
|
@directories = ('../lib/');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@directories = ();
|
||||||
|
}
|
||||||
|
|
||||||
|
my @files = all_pod_files(
|
||||||
|
@directories
|
||||||
|
);
|
||||||
|
|
||||||
|
plan tests => scalar(@files);
|
||||||
|
|
||||||
|
foreach my $module (@files)
|
||||||
|
{
|
||||||
|
pod_file_ok( $module )
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
use Test::More tests => 4;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use diagnostics;
|
||||||
|
use lib '../lib';
|
||||||
|
use Benchmark;
|
||||||
|
|
||||||
|
use_ok('SOAP::WSDL::XSD::Typelib::Builtin::string');
|
||||||
|
my $obj;
|
||||||
|
|
||||||
|
ok $obj = SOAP::WSDL::XSD::Typelib::Builtin::string->new(
|
||||||
|
{ value => '& "Aber" <test>'})
|
||||||
|
, "Object creation";
|
||||||
|
|
||||||
|
is $obj, '& &qout;Aber&qout; <test>'
|
||||||
|
, 'escape text on serialization';
|
||||||
|
|
||||||
|
is $obj->serialize({ name => 'test'})
|
||||||
|
, '<test >& &qout;Aber&qout; <test></test >'
|
||||||
|
, 'Serialization with name';
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<definitions name="simpleType"
|
<definitions name="urn:simpleType"
|
||||||
targetNamespace="simpleType"
|
targetNamespace="urn:simpleType"
|
||||||
xmlns:tns="simpleType"
|
xmlns:tns="urn:simpleType"
|
||||||
xmlns:wsd="http://www.w3c.org/2001/XMLSchema"
|
xmlns:wsd="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/"
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
Test-Methode
|
Test-Methode
|
||||||
</documentation>
|
</documentation>
|
||||||
|
|
||||||
<input message="testRequest"/>
|
<input message="tns:testRequest"/>
|
||||||
<output message="testResponse"/>
|
<output message="tns:testResponse"/>
|
||||||
</operation>
|
</operation>
|
||||||
</portType>
|
</portType>
|
||||||
<portType name="testPort2">
|
<portType name="testPort2">
|
||||||
@@ -42,22 +42,23 @@
|
|||||||
Test-Methode
|
Test-Methode
|
||||||
</documentation>
|
</documentation>
|
||||||
|
|
||||||
<input message="testRequest"/>
|
<input message="tns:testRequest"/>
|
||||||
<output message="testResponse"/>
|
<output message="tns:testResponse"/>
|
||||||
</operation>
|
</operation>
|
||||||
</portType>
|
</portType>
|
||||||
<portType name="testPort2">
|
<portType name="testPort3">
|
||||||
<operation name="test">
|
<operation name="test">
|
||||||
<documentation>
|
<documentation>
|
||||||
Test-Methode
|
Test-Methode
|
||||||
</documentation>
|
</documentation>
|
||||||
|
|
||||||
<input message="testRequest"/>
|
<input message="tns:testRequest"/>
|
||||||
<output message="testResponse"/>
|
<output message="tns:testResponse"/>
|
||||||
</operation>
|
</operation>
|
||||||
</portType>
|
</portType>
|
||||||
|
|
||||||
<binding type="testPort" name="testBinding">
|
<binding type="tns:testPort" name="testBinding">
|
||||||
|
<operation name="test">
|
||||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
<soap:operation soapAction="test">
|
<soap:operation soapAction="test">
|
||||||
<input>
|
<input>
|
||||||
@@ -67,8 +68,10 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</output>
|
</output>
|
||||||
</soap:operation>
|
</soap:operation>
|
||||||
|
</operation>
|
||||||
</binding>
|
</binding>
|
||||||
<binding type="testPort2" name="testBinding2">
|
<binding type="tns:testPort2" name="testBinding2">
|
||||||
|
<operation name="test">
|
||||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
<soap:operation soapAction="test">
|
<soap:operation soapAction="test">
|
||||||
<input>
|
<input>
|
||||||
@@ -78,26 +81,28 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</output>
|
</output>
|
||||||
</soap:operation>
|
</soap:operation>
|
||||||
|
</operation>
|
||||||
</binding>
|
</binding>
|
||||||
<binding type="testPort3" name="testBinding3">
|
<binding type="tns:testPort3" name="testBinding3">
|
||||||
|
<operation name="test">
|
||||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
<soap:operation soapAction="test">
|
<soap:operation soapAction="test"/>
|
||||||
<input>
|
<input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</input>
|
</input>
|
||||||
<output>
|
<output>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</output>
|
</output>
|
||||||
</soap:operation>
|
</operation>
|
||||||
</binding>
|
</binding>
|
||||||
<service name="testService">
|
<service name="testService">
|
||||||
<port name="testPort" binding="testBinding">
|
<port name="testPort" binding="tns:testBinding">
|
||||||
<soap:address location="http://127.0.0.1/testPort" />
|
<soap:address location="http://127.0.0.1/testPort" />
|
||||||
</port>
|
</port>
|
||||||
<port name="testPort2" binding="testBinding2">
|
<port name="testPort2" binding="tns:testBinding2">
|
||||||
<soap:address location="http://127.0.0.1/testPort2" />
|
<soap:address location="http://127.0.0.1/testPort2" />
|
||||||
</port>
|
</port>
|
||||||
<port name="testPort3" binding="testBinding3">
|
<port name="testPort3" binding="tns:testBinding3">
|
||||||
<soap:address location="http://127.0.0.1/testPort3" />
|
<soap:address location="http://127.0.0.1/testPort3" />
|
||||||
</port>
|
</port>
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<definitions name="Test"
|
<definitions name="urn:Test"
|
||||||
targetNamespace="Test"
|
targetNamespace="urn:Test"
|
||||||
xmlns:tns="Test"
|
xmlns:tns="urn:Test"
|
||||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
xmlns:xsd="http://www.w3.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/"
|
||||||
>
|
>
|
||||||
<types>
|
<types>
|
||||||
<xsd:schema targetNamespace="Test">
|
<xsd:schema targetNamespace="urn:Test">
|
||||||
<xsd:complexType name="testComplexTypeAll">
|
<xsd:complexType name="testComplexTypeAll">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation>
|
<xsd:documentation>
|
||||||
ComplexType Test
|
ComplexType Test
|
||||||
</xsd:documentation>
|
</xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
<xsd:all>
|
<xsd:all>
|
||||||
<xsd:element name="Test1" type="xsd:string"/>
|
<xsd:element name="Test1" type="xsd:string"/>
|
||||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1"/>
|
<xsd:element name="Test2" type="xsd:string" minOccurs="1"/>
|
||||||
</xsd:all>
|
</xsd:all>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="testComplexTypeSequence">
|
<xsd:complexType name="testComplexTypeSequence">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
@@ -35,10 +35,10 @@
|
|||||||
|
|
||||||
</types>
|
</types>
|
||||||
<message name="testRequest">
|
<message name="testRequest">
|
||||||
<part name="testAll" type="tns:testComplexType1"/>
|
<part name="testAll" type="tns:testComplexTypeAll"/>
|
||||||
</message>
|
</message>
|
||||||
<message name="testResponse">
|
<message name="testResponse">
|
||||||
<part name="testAll" type="tns:testComplexType1"/>
|
<part name="testAll" type="tns:testComplexTypeAll"/>
|
||||||
</message>
|
</message>
|
||||||
<portType name="testPort">
|
<portType name="testPort">
|
||||||
<operation name="test">
|
<operation name="test">
|
||||||
@@ -53,8 +53,8 @@
|
|||||||
|
|
||||||
<binding type="tns:testPort" name="testBinding">
|
<binding type="tns:testPort" name="testBinding">
|
||||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
<operation name="test">
|
<operation name="test">
|
||||||
<soap:operation soapAction="test">
|
<soap:operation soapAction="test">
|
||||||
<input>
|
<input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</input>
|
</input>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</output>
|
</output>
|
||||||
</soap:operation>
|
</soap:operation>
|
||||||
</operation>
|
</operation>
|
||||||
</binding>
|
</binding>
|
||||||
<service name="testService">
|
<service name="testService">
|
||||||
<port name="testPort" binding="tns:testBinding">
|
<port name="testPort" binding="tns:testBinding">
|
||||||
|
|||||||
@@ -59,7 +59,8 @@
|
|||||||
</portType>
|
</portType>
|
||||||
|
|
||||||
<binding type="tns:testPort" name="testBinding">
|
<binding type="tns:testPort" name="testBinding">
|
||||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<operation name="test">
|
||||||
<soap:operation soapAction="test">
|
<soap:operation soapAction="test">
|
||||||
<input>
|
<input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
@@ -68,10 +69,12 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</output>
|
</output>
|
||||||
</soap:operation>
|
</soap:operation>
|
||||||
|
</operation>
|
||||||
</binding>
|
</binding>
|
||||||
<binding type="tns:testPort2" name="testBinding2">
|
<binding type="tns:testPort2" name="testBinding2">
|
||||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
<soap:operation soapAction="test">
|
<operation name="test">
|
||||||
|
<soap:operation soapAction="test">
|
||||||
<input>
|
<input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</input>
|
</input>
|
||||||
@@ -79,9 +82,12 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</output>
|
</output>
|
||||||
</soap:operation>
|
</soap:operation>
|
||||||
|
</operation>
|
||||||
</binding>
|
</binding>
|
||||||
<binding type="tns:testPort3" name="testBinding3">
|
<binding type="tns:testPort3" name="testBinding3">
|
||||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
|
||||||
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<operation name="test">
|
||||||
<soap:operation soapAction="test">
|
<soap:operation soapAction="test">
|
||||||
<input>
|
<input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
@@ -90,7 +96,8 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</output>
|
</output>
|
||||||
</soap:operation>
|
</soap:operation>
|
||||||
</binding>
|
</operation>
|
||||||
|
</binding>
|
||||||
<service name="testService">
|
<service name="testService">
|
||||||
<port name="testPort" binding="tns:testBinding">
|
<port name="testPort" binding="tns:testBinding">
|
||||||
<soap:address location="http://127.0.0.1/testPort" />
|
<soap:address location="http://127.0.0.1/testPort" />
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<definitions name="Test"
|
<definitions name="urn:Test"
|
||||||
targetNamespace="Test"
|
targetNamespace="urn:Test"
|
||||||
xmlns:tns="Test"
|
xmlns:tns="urn:Test"
|
||||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
xmlns:xsd="http://www.w3.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/"
|
||||||
>
|
>
|
||||||
<types>
|
<types>
|
||||||
<xsd:schema targetNamespace="Test">
|
<xsd:schema targetNamespace="urn:Test">
|
||||||
<xsd:element name="testElement1">
|
<xsd:element name="testElement1">
|
||||||
<xsd:simpleType>
|
<xsd:simpleType>
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
@@ -32,12 +32,13 @@
|
|||||||
Test-Methode
|
Test-Methode
|
||||||
</documentation>
|
</documentation>
|
||||||
|
|
||||||
<input message="testRequest"/>
|
<input message="tns:testRequest"/>
|
||||||
<output message="testResponse"/>
|
<output message="tns:testResponse"/>
|
||||||
</operation>
|
</operation>
|
||||||
</portType>
|
</portType>
|
||||||
|
|
||||||
<binding type="testPort" name="testBinding">
|
<binding type="tns:testPort" name="testBinding">
|
||||||
|
<operation name="test">
|
||||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
<soap:operation soapAction="test">
|
<soap:operation soapAction="test">
|
||||||
<input>
|
<input>
|
||||||
@@ -47,9 +48,10 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</output>
|
</output>
|
||||||
</soap:operation>
|
</soap:operation>
|
||||||
|
</operation>
|
||||||
</binding>
|
</binding>
|
||||||
<service name="testService">
|
<service name="testService">
|
||||||
<port name="testPort" binding="testBinding">
|
<port name="testPort" binding="tns:testBinding">
|
||||||
<soap:address location="http://127.0.0.1/testPort" />
|
<soap:address location="http://127.0.0.1/testPort" />
|
||||||
</port>
|
</port>
|
||||||
</service>
|
</service>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<definitions name="Test"
|
<definitions name="urn:Test"
|
||||||
targetNamespace="Test"
|
targetNamespace="urn:Test"
|
||||||
xmlns:tns="Test"
|
xmlns:tns="urn:Test"
|
||||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
xmlns:xsd="http://www.w3.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/"
|
||||||
>
|
>
|
||||||
<types>
|
<types>
|
||||||
<xsd:schema targetNamespace="Test">
|
<xsd:schema targetNamespace="urn:Test">
|
||||||
<xsd:element name="testElement1" type="xsd:string" />
|
<xsd:element name="testElement1" type="xsd:string" />
|
||||||
<xsd:element name="testElement2" type="xsd:int" />
|
<xsd:element name="testElement2" type="xsd:int" />
|
||||||
</xsd:schema>
|
</xsd:schema>
|
||||||
@@ -24,12 +24,13 @@
|
|||||||
Test-Methode
|
Test-Methode
|
||||||
</documentation>
|
</documentation>
|
||||||
|
|
||||||
<input message="testRequest"/>
|
<input message="tns:testRequest"/>
|
||||||
<output message="testResponse"/>
|
<output message="tns:testResponse"/>
|
||||||
</operation>
|
</operation>
|
||||||
</portType>
|
</portType>
|
||||||
|
|
||||||
<binding type="testPort" name="testBinding">
|
<binding type="tns:testPort" name="testBinding">
|
||||||
|
<operation name="test">
|
||||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
<soap:operation soapAction="test">
|
<soap:operation soapAction="test">
|
||||||
<input>
|
<input>
|
||||||
@@ -39,9 +40,10 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</output>
|
</output>
|
||||||
</soap:operation>
|
</soap:operation>
|
||||||
|
</operation>
|
||||||
</binding>
|
</binding>
|
||||||
<service name="testService">
|
<service name="testService">
|
||||||
<port name="testPort" binding="testBinding">
|
<port name="testPort" binding="tns:testBinding">
|
||||||
<soap:address location="http://127.0.0.1/testPort" />
|
<soap:address location="http://127.0.0.1/testPort" />
|
||||||
</port>
|
</port>
|
||||||
</service>
|
</service>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user