import SOAP-WSDL 2.00.02 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 2.00.02 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00.02.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
745ce925c1
commit
915ee03cbe
@@ -1,3 +1,9 @@
|
||||
package FOO;
|
||||
use strict; use warnings;
|
||||
use Class::Std::Fast;
|
||||
sub serialize_qualified { 'FOO' };
|
||||
|
||||
package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw(no_plan);
|
||||
@@ -9,12 +15,17 @@ my $serializer = SOAP::WSDL::Serializer::XSD->new();
|
||||
like $serializer->serialize(), qr{<SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty body';
|
||||
like $serializer->serialize({ body => {} }), qr{<SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty body';
|
||||
like $serializer->serialize({ body => [] }), qr{<SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty body';
|
||||
like $serializer->serialize({ header => {}, body => [] }),
|
||||
like $serializer->serialize({ header => {}, body => [] }),
|
||||
qr{<SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty header and body';
|
||||
like $serializer->serialize({ header => {}, body => [] , options => {
|
||||
namespace => {
|
||||
'http://schemas.xmlsoap.org/soap/envelope/' => 'SOAP',
|
||||
'http://www.w3.org/2001/XMLSchema-instance' => 'xsi',
|
||||
}
|
||||
} }),
|
||||
qr{<SOAP:Header></SOAP:Header><SOAP:Body></SOAP:Body>}, 'empty header and body';
|
||||
} }),
|
||||
qr{<SOAP:Header></SOAP:Header><SOAP:Body></SOAP:Body>}, 'empty header and body';
|
||||
|
||||
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';
|
||||
|
||||
Reference in New Issue
Block a user