import SOAP-WSDL 2.00.07 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 2.00.07 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00.07.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
3de318be40
commit
bfc3247583
@@ -2,11 +2,19 @@ package FOO;
|
||||
use strict; use warnings;
|
||||
use Class::Std::Fast;
|
||||
sub serialize_qualified { 'FOO' };
|
||||
sub get_xmlns { 'urn:foo' };
|
||||
{
|
||||
my $name = 'Foo';
|
||||
sub __set_name { $name = $_[1]};
|
||||
sub __get_name{ $name };
|
||||
sub serialize { "<$name/>" };
|
||||
}
|
||||
|
||||
|
||||
package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw(no_plan);
|
||||
use Test::More tests => 10;
|
||||
|
||||
use_ok qw(SOAP::WSDL::Serializer::XSD);
|
||||
|
||||
@@ -34,3 +42,9 @@ like $serializer->serialize({ header => {}, body => [ undef ] }),
|
||||
qr{<SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty header and body';
|
||||
like $serializer->serialize({ header => {}, body => [ undef, FOO->new() ] }),
|
||||
qr{<SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body>FOO</SOAP-ENV:Body>}, 'empty header and body';
|
||||
|
||||
like $serializer->serialize({ header => FOO->new(), body => FOO->new()}),
|
||||
qr{<SOAP-ENV:Body>FOO</SOAP-ENV:Body>}, 'prefixed body element';
|
||||
|
||||
like $serializer->serialize({ header => FOO->new(), body => FOO->new() , options => { prefix => 'foo'}}),
|
||||
qr{<SOAP-ENV:Body><foo:Foo/></SOAP-ENV:Body>}, 'prefixed body element';
|
||||
|
||||
Reference in New Issue
Block a user