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:
1 parent
3de318be40
commit
bfc3247583
229 files changed
+16685
-2064
No files matched your search
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 5;
|
||||
use Test::More tests => 6;
|
||||
use lib '../../../../lib';
|
||||
use lib '../../../../t/lib';
|
||||
use lib 't/lib';
|
||||
@@ -28,6 +28,8 @@ my $parser = SOAP::WSDL::Expat::MessageParser->new({
|
||||
|
||||
test_nil($parser);
|
||||
|
||||
test_simple_element($parser);
|
||||
|
||||
$parser->parse( $xml );
|
||||
|
||||
|
||||
@@ -72,6 +74,7 @@ BEGIN {
|
||||
'MyElementAttrs' => 'MyElementAttrs',
|
||||
'MyElementAttrs/test' => 'MyTestElement',
|
||||
'MyElementAttrs/test2' => 'MyTestElement2',
|
||||
'MySimpleElement' => 'MySimpleElement',
|
||||
);
|
||||
|
||||
sub new { return bless {}, 'FakeResolver' };
|
||||
@@ -98,3 +101,14 @@ sub test_nil {
|
||||
my $result = $parser->parse($xml_nil_attr);
|
||||
is $result->get_test2->serialize({ name => 'test2'}), '<test2 xsi:nil="true"/>';
|
||||
}
|
||||
|
||||
|
||||
sub test_simple_element {
|
||||
my $parser = shift;
|
||||
|
||||
my $body = $parser->parse(
|
||||
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><MySimpleElement xmlns="urn:Test">3</MySimpleElement></SOAP-ENV:Body></SOAP-ENV:Envelope>});
|
||||
is $body->get_value(), 3;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 16; #qw(no_plan);
|
||||
use Test::More tests => 17; #qw(no_plan);
|
||||
use File::Spec;
|
||||
use File::Basename;
|
||||
|
||||
@@ -38,6 +38,10 @@ else {
|
||||
);
|
||||
}
|
||||
|
||||
$parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
$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';
|
||||
@@ -47,6 +51,8 @@ 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';
|
||||
|
||||
is $schema_from_ref->[1]->get_xmlns()->{ foo }, 'urn:Bar1', 'namespace prefix not overridden by import';
|
||||
|
||||
{
|
||||
my $warn_parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
my $warning;
|
||||
|
||||
Reference in new issue
Block a user