SOAP-WSDL-3.003/ 0000755 0001750 0001750 00000000000 12507276245 007762 5 ustar SOAP-WSDL-3.003/t/ 0000755 0001750 0001750 00000000000 12507276245 010225 5 ustar SOAP-WSDL-3.003/t/003_wsdl_based_serializer.t 0000644 0001750 0001750 00000005130 12377443515 015334 0 ustar use Test::More tests => 11;
use lib '../lib';
use File::Basename qw(dirname);
use Cwd;
my $path = dirname __FILE__;
use_ok(qw/SOAP::WSDL::Expat::WSDLParser/);
my $filter;
my $parser;
ok($parser = SOAP::WSDL::Expat::WSDLParser->new() );
eval { $parser->parse_file( "$path/test.wsdl" ) };
if ($@)
{
fail("parsing WSDL: $@");
die "Can't test without parsed WSDL";
}
else
{
pass("parsing XML");
}
my $wsdl;
ok( $wsdl = $parser->get_data() , "get object tree");
my $schema = $wsdl->first_types();
my $opt = {
readable => 0,
autotype => 1,
namespace => $wsdl->get_xmlns(),
indent => "\t",
typelib => $schema,
};
is( $schema->find_type( 'urn:myNamespace', 'testSimpleType1' )->serialize(
'test', 1 , $opt ),
q{1} , "serialize simple type");
is( $schema->find_type( 'urn:myNamespace', 'testSimpleList' )->serialize(
'testList', [ 1, 2, 3 ] , $opt),
q{1 2 3},
"serialize simple list type"
);
is( $schema->find_element( 'urn:myNamespace', 'TestElement' )->serialize(
undef, 1 , $opt),
q{1}, "Serialize element"
);
$opt->{ readable } = 0;
is( $schema->find_type( 'urn:myNamespace', 'length3')->serialize(
'TestComplex', { size => -13, unit => 'BLA' } ,
$opt ),
q{}
. q{-13}
. q{BLA}
, "serialize complex type" );
is( $schema->find_element( 'urn:myNamespace', 'TestElementComplexType')->serialize(
undef, { size => -13, unit => 'BLA' } ,
$opt ),
q{}
. q{-13}
. q{BLA},
"element with complex type"
);
is( $schema->find_type( 'urn:myNamespace', 'complex')->serialize(
'complexComplex',
{ 'length' => { size => -13, unit => 'BLA' }, 'int' => 1 },
$opt ),
q{}
. q{}
. q{-13}
. q{BLA}
. q{1},
"nested complex type"
);
is( $wsdl->find_message('urn:myNamespace', 'testRequest')->first_part()->serialize(
undef, { test => { length => { size => -13, unit => 'BLA' } , int => 3 } },
$opt ),
q{}
. q{}
. q{-13}
. q{BLA}
. q{3}
, "Message part"
);
SOAP-WSDL-3.003/t/SOAP/ 0000755 0001750 0001750 00000000000 12507276245 010767 5 ustar SOAP-WSDL-3.003/t/SOAP/WSDL_1.wsdl 0000644 0001750 0001750 00000003774 12375112740 012656 0 ustar