import SOAP-WSDL 2.00_31 from CPAN

git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_31
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_31.tar.gz
This commit is contained in:
Martin Kutter authored and Michael G. Schwern committed 2009-12-12 19:48:21 -08:00
1 parent 874251225f
commit f0b3bdc201
54 files changed
+1094 -450

No files matched your search

+11 -2
View File
@@ -1,6 +1,6 @@
use strict;
use warnings;
use Test::More tests => 3;
use Test::More tests => 5;
use_ok qw(SOAP::WSDL::Expat::Base);
my $parser = SOAP::WSDL::Expat::Base->new();
@@ -9,4 +9,13 @@ eval { $parser->parse('Foobar')};
ok $@;
eval { $parser->parsefile('Foobar')};
ok $@;
ok $@;
$parser = SOAP::WSDL::Expat::Base->new({
user_agent => 'foo',
});
is $parser->get_user_agent(), 'foo';
$parser->set_user_agent('bar');
is $parser->get_user_agent(), 'bar';
+3 -3
View File
@@ -36,20 +36,20 @@ my $xml_attr = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
<SOAP-ENV:Body><MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2">
<test>Test</test>
<test2 >Test2</test2>
<test2 > </test2>
</MyElementAttrs></SOAP-ENV:Body></SOAP-ENV:Envelope>};
$parser->parse($xml_attr);
is $parser->get_data(),
q{<MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2"><test>Test</test><test2>Test2</test2></MyElementAttrs>},
q{<MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2"><test>Test</test></MyElementAttrs>},
'Content with attributes';
my $xml_error = q{<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
<SOAP-ENV:Body><MyElementAttrs xmlns="urn:Test" test="Test" test2="Test2">
<test>Test</test>
<test2 >Test2</test2>
<test2 ></test2>
<foo>Bar</foo>
</MyElementAttrs></SOAP-ENV:Body></SOAP-ENV:Envelope>};
+22 -11
View File
@@ -1,6 +1,6 @@
use strict;
use warnings;
use Test::More tests => 4; #qw(no_plan);
use Test::More tests => 10; #qw(no_plan);
use File::Spec;
use File::Basename;
@@ -10,7 +10,7 @@ use_ok qw( SOAP::WSDL::Expat::WSDLParser);
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
my $definitions = $parser->parse_file(
my $definitions = $parser->parse_file(
"$path/../../../acceptance/wsdl/WSDLParser.wsdl"
);
@@ -30,16 +30,27 @@ my $generator = SOAP::WSDL::Generator::Template::XSD->new({
OUTPUT_PATH => "$path/testlib",
});
my $code = "";
$generator->set_output(\$code);
$generator->generate_typelib();
{
eval $code;
ok !$@;
print $@ if $@;
}
#my $code = "";
#$generator->set_output(\$code);
#$generator->generate_typelib();
#{
# eval $code;
# ok !$@;
# print $@ if $@;
#}
# print $code;
$definitions = $parser->parse_uri(
"file://$path/../../../acceptance/wsdl/WSDLParser-import.wsdl"
);
ok my $service = $definitions->first_service();
is $service->get_name(), 'Service1', 'wsdl:import service name';
is $definitions->first_binding()->get_name(), 'Service1Soap', 'wsdl:import binding name';
ok my $schema_from_ref = $definitions->first_types()->get_schema();
is @{ $schema_from_ref }, 2, 'got builtin and imported schema';
ok @{ $schema_from_ref->[1]->get_element } > 0;
is $schema_from_ref->[1]->get_element->[0]->get_name(), 'sayHello';
__END__