import SOAP-WSDL 2.00_03 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 2.00_03 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_03.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
7716d4349a
commit
21b5330a8d
+2
-3
@@ -3,8 +3,6 @@ use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Test::More tests => 17; # qw/no_plan/; # TODO: change to tests => N;
|
||||
use Test::Differences;
|
||||
use Data::Dumper;
|
||||
use lib '../lib';
|
||||
use XML::SAX::ParserFactory;
|
||||
|
||||
@@ -133,7 +131,8 @@ SKIP: {
|
||||
}
|
||||
ok($xml = $wsdl->find_message('urn:myNamespace', 'testRequest')
|
||||
->get_part()->[0]->serialize(
|
||||
undef, { length => { size => -13, unit => 'BLA' } , int => 3 },
|
||||
undef,
|
||||
{ test => { length => { size => -13, unit => 'BLA' } , int => 3 } },
|
||||
$serializer_options ),
|
||||
"serialize part"
|
||||
);
|
||||
|
||||
+8
-10
@@ -1,8 +1,6 @@
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use Test::Differences;
|
||||
use Test::More tests => 11;
|
||||
use Data::Dumper;
|
||||
use lib '../lib';
|
||||
use Benchmark;
|
||||
use XML::LibXML;
|
||||
|
||||
use_ok(qw/SOAP::WSDL::SAX::WSDLHandler/);
|
||||
@@ -59,7 +57,7 @@ $opt->{ readable } = 0;
|
||||
is( $schema->find_type( 'myNamespace', 'length3')->serialize(
|
||||
'TestComplex', { size => -13, unit => 'BLA' } ,
|
||||
$opt ),
|
||||
q{<TestComplex type="tns:length3">}
|
||||
q{<TestComplex type="tns:length3" >}
|
||||
. q{<size type="xsd:non-positive-integer">-13</size>}
|
||||
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestComplex>}
|
||||
, "serialize complex type" );
|
||||
@@ -67,7 +65,7 @@ is( $schema->find_type( 'myNamespace', 'length3')->serialize(
|
||||
is( $schema->find_element( 'myNamespace', 'TestElementComplexType')->serialize(
|
||||
undef, { size => -13, unit => 'BLA' } ,
|
||||
$opt ),
|
||||
q{<TestElementComplexType type="tns:length3">}
|
||||
q{<TestElementComplexType type="tns:length3" >}
|
||||
. q{<size type="xsd:non-positive-integer">-13</size>}
|
||||
. q{<unit type="xsd:NMTOKEN">BLA</unit></TestElementComplexType>},
|
||||
"element with complex type"
|
||||
@@ -77,8 +75,8 @@ is( $schema->find_type( 'myNamespace', 'complex')->serialize(
|
||||
'complexComplex',
|
||||
{ 'length' => { size => -13, unit => 'BLA' }, 'int' => 1 },
|
||||
$opt ),
|
||||
q{<complexComplex type="tns:complex">}
|
||||
. q{<length type="tns:length3">}
|
||||
q{<complexComplex type="tns:complex" >}
|
||||
. q{<length type="tns:length3" >}
|
||||
. q{<size type="xsd:non-positive-integer">-13</size>}
|
||||
. q{<unit type="xsd:NMTOKEN">BLA</unit></length>}
|
||||
. q{<int type="xsd:int">1</int></complexComplex>},
|
||||
@@ -86,10 +84,10 @@ is( $schema->find_type( 'myNamespace', 'complex')->serialize(
|
||||
);
|
||||
|
||||
is( $wsdl->find_message('myNamespace', 'testRequest')->first_part()->serialize(
|
||||
undef, { length => { size => -13, unit => 'BLA' } , int => 3 },
|
||||
undef, { test => { length => { size => -13, unit => 'BLA' } , int => 3 } },
|
||||
$opt ),
|
||||
q{<test type="tns:complex">}
|
||||
. q{<length type="tns:length3">}
|
||||
q{<test type="tns:complex" >}
|
||||
. q{<length type="tns:length3" >}
|
||||
. q{<size type="xsd:non-positive-integer">-13</size>}
|
||||
. q{<unit type="xsd:NMTOKEN">BLA</unit>}
|
||||
. q{</length><int type="xsd:int">3</int></test>}
|
||||
|
||||
+8
-16
@@ -1,13 +1,9 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use Test::Differences;
|
||||
# use Devel::Profiler;
|
||||
use Data::Dumper;
|
||||
use Test::More tests => 5;
|
||||
use lib '../lib';
|
||||
use XML::SAX::ParserFactory;
|
||||
use Benchmark;
|
||||
|
||||
use diagnostics;
|
||||
|
||||
@@ -22,17 +18,10 @@ my $filter;
|
||||
|
||||
ok($filter = SOAP::WSDL::SAX::WSDLHandler->new(), "Object creation");
|
||||
|
||||
#my $parser = XML::SAX::ParserFactory->parser(
|
||||
# Handler => $filter
|
||||
#);
|
||||
|
||||
use XML::LibXML;
|
||||
my $parser = XML::LibXML->new();
|
||||
$parser->set_handler( $filter );
|
||||
|
||||
#timethis 10, sub { $parser->parse_string( xml() ) };
|
||||
#__END__
|
||||
|
||||
eval { $parser->parse_string( xml() ) };
|
||||
if ($@)
|
||||
{
|
||||
@@ -60,7 +49,7 @@ my $opt = {
|
||||
indent => "",
|
||||
};
|
||||
|
||||
my $data = {
|
||||
my $data = { EnqueueMessage => {
|
||||
MMessage => {
|
||||
MRecipientURI => 'anyURI',
|
||||
MSenderAddress => 'a string',
|
||||
@@ -72,7 +61,10 @@ my $data = {
|
||||
MKeepaliveErrorPolicy => ' ( suppress | report ) ',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
SKIP: { skip_without_test_xml();
|
||||
is_xml( $wsdl->find_message(
|
||||
@@ -89,7 +81,7 @@ sub skip_without_test_xml {
|
||||
|
||||
sub xml_message {
|
||||
return
|
||||
q{<EnqueueMessage>
|
||||
q{<EnqueueMessage xmlns="http://www.example.org/MessageGateway2/">
|
||||
<MMessage>
|
||||
<MRecipientURI>anyURI</MRecipientURI>
|
||||
<MSenderAddress>a string</MSenderAddress>
|
||||
@@ -116,10 +108,10 @@ sub xml {
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<wsdl:types>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
targetNamespace="http://www.example.org/MessageGateway2/">
|
||||
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage">
|
||||
<xsd:element name="EnqueueMessage" type="tns:TEnqueueMessage"
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Enqueue message request element</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use Test::Differences;
|
||||
use Data::Dumper;
|
||||
use lib '../lib';
|
||||
use XML::LibXML;
|
||||
use Benchmark;
|
||||
|
||||
use diagnostics;
|
||||
|
||||
|
||||
+9
-10
@@ -3,8 +3,6 @@ use strict;
|
||||
use warnings;
|
||||
use Pod::Simple::Text;
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use Test::Differences;
|
||||
use Data::Dumper;
|
||||
use lib '../lib';
|
||||
use XML::SAX::ParserFactory;
|
||||
|
||||
@@ -20,16 +18,16 @@ use Cwd;
|
||||
my $path = cwd;
|
||||
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Client/);
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $soap = SOAP::WSDL::Client->new(
|
||||
my $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
||||
readable => 1,
|
||||
)->wsdlinit();
|
||||
|
||||
$soap->servicename('MessageGateway');
|
||||
|
||||
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
||||
ok( $soap->readable( 1 ) , "Set readable");
|
||||
ok( $soap->explain() );
|
||||
|
||||
|
||||
@@ -42,10 +40,11 @@ $pod->parse_string_document( $soap->explain() );
|
||||
|
||||
SKIP: {
|
||||
skip_without_test_xml();
|
||||
is_xml( $soap->call( 'EnqueueMessage' ,
|
||||
'MMessage' => {
|
||||
'MRecipientURI' => 'mailto:test@example.com' ,
|
||||
'MMessageContent' => 'TestContent for Message' ,
|
||||
is_xml( $soap->call( 'EnqueueMessage' , EnqueueMessage => {
|
||||
'MMessage' => {
|
||||
'MRecipientURI' => 'mailto:test@example.com' ,
|
||||
'MMessageContent' => 'TestContent for Message' ,
|
||||
}
|
||||
}
|
||||
)
|
||||
, q{<SOAP-ENV:Envelope
|
||||
@@ -54,7 +53,7 @@ SKIP: {
|
||||
xmlns:tns="http://www.example.org/MessageGateway2/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
|
||||
<SOAP-ENV:Body ><EnqueueMessage><MMessage>
|
||||
<SOAP-ENV:Body ><EnqueueMessage xmlns="http://www.example.org/MessageGateway2/"><MMessage>
|
||||
<MRecipientURI>mailto:test@example.com</MRecipientURI>
|
||||
<MMessageContent>TestContent for Message</MMessageContent>
|
||||
</MMessage></EnqueueMessage></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
||||
|
||||
@@ -3,16 +3,15 @@ use strict;
|
||||
use warnings;
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use lib '../lib';
|
||||
use diagnostics;
|
||||
|
||||
use Cwd;
|
||||
|
||||
my $path = cwd;
|
||||
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
||||
|
||||
use_ok(qw/SOAP::WSDL::Client/);
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $soap = SOAP::WSDL::Client->new(
|
||||
my $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/008_complexType.wsdl'
|
||||
)->wsdlinit();
|
||||
|
||||
|
||||
+6
-20
@@ -1,13 +1,6 @@
|
||||
#!/usr/bin/perl -w
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
#use Devel::Profiler bad_pkgs => [
|
||||
# qw(UNIVERSAL Time::HiRes B Carp Exporter Cwd Config CORE DynaLoader
|
||||
# XSLoader AutoLoader
|
||||
# Class::Std SOAP::Lite) ];
|
||||
|
||||
use Scalar::Util;
|
||||
use strict;
|
||||
use Test::Differences;
|
||||
use strict;
|
||||
use Test::More tests => 5;
|
||||
use lib 't/lib';
|
||||
use lib '../lib';
|
||||
use lib 'lib';
|
||||
@@ -18,7 +11,7 @@ use Cwd;
|
||||
use XML::LibXML::SAX;
|
||||
use_ok(qw/SOAP::WSDL::SAX::MessageHandler/);
|
||||
|
||||
use SOAP::WSDL::Client;
|
||||
use SOAP::WSDL;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
my $path = cwd;
|
||||
$path =~s|\/t\/?$||; # allow running from t/ and above (Build test)
|
||||
@@ -46,7 +39,8 @@ else
|
||||
fail "bool context overloading"
|
||||
}
|
||||
|
||||
my $soap = SOAP::WSDL::Client->new(
|
||||
my $soap = SOAP::WSDL->new(
|
||||
readable => 1,
|
||||
wsdl => 'file:///' . $path .'/t/acceptance/wsdl/006_sax_client.wsdl',
|
||||
)->wsdlinit();
|
||||
|
||||
@@ -55,17 +49,9 @@ $soap->servicename('MessageGateway');
|
||||
ok( $soap->no_dispatch( 1 ) , "Set no_dispatch" );
|
||||
ok( $soap->readable( 0 ) , "Set readable");
|
||||
|
||||
# print $soap->call( 'EnqueueMessage'
|
||||
# , MMessage => $filter->get_data()->get_MMessage() );
|
||||
|
||||
timethese 1000, {
|
||||
timethese 100, {
|
||||
'ClassParser' => sub { $parser->parse_string( xml() ); },
|
||||
# 'HashParser' => sub { $hash_parser->parse_string( xml() ); },
|
||||
'XML::Simple' => sub { return XMLin( xml() ) },
|
||||
# 'SOAP::WSDL::Client->call' => sub {
|
||||
# $soap->call( 'EnqueueMessage'
|
||||
# , MMessage => $filter->get_data()->get_MMessage() );
|
||||
# }
|
||||
};
|
||||
|
||||
sub xml {
|
||||
|
||||
@@ -4,7 +4,6 @@ use strict;
|
||||
use lib 'lib/';
|
||||
use lib '../lib/';
|
||||
use lib 't/lib';
|
||||
use Data::Dumper;
|
||||
|
||||
use_ok qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
use_ok qw( MyComplexType );
|
||||
|
||||
+1
-5
@@ -1,13 +1,9 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use Test::Differences;
|
||||
# use Devel::Profiler;
|
||||
use Data::Dumper;
|
||||
use Test::More tests => 5;
|
||||
use lib '../lib';
|
||||
use XML::SAX::ParserFactory;
|
||||
use Benchmark;
|
||||
|
||||
use diagnostics;
|
||||
|
||||
|
||||
+1
-5
@@ -1,13 +1,9 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More qw/no_plan/; # TODO: change to tests => N;
|
||||
use Test::Differences;
|
||||
# use Devel::Profiler;
|
||||
use Data::Dumper;
|
||||
use Test::More tests => 5;
|
||||
use lib '../lib';
|
||||
use XML::SAX::ParserFactory;
|
||||
use Benchmark;
|
||||
|
||||
use diagnostics;
|
||||
|
||||
|
||||
+31
-6
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/perl
|
||||
use Test::More qw(no_plan);
|
||||
use Test::More tests => 9;
|
||||
use strict;
|
||||
use diagnostics;
|
||||
use lib 'lib/';
|
||||
use lib '../lib/';
|
||||
use lib 't/lib';
|
||||
@@ -13,17 +14,21 @@ use_ok qw( SOAP::WSDL::Client );
|
||||
my $obj = MyAtomicComplexTypeElement->new({ test=> 'Test', test2 => 'Test2'});
|
||||
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
|
||||
, 'inherited class';
|
||||
|
||||
# print $obj->get_test;
|
||||
|
||||
ok $obj->get_test->isa('SOAP::WSDL::XSD::Typelib::Builtin::string')
|
||||
, 'element isa';
|
||||
, 'element isa';
|
||||
|
||||
is $obj, '<MyAtomicComplexTypeElement xmlns="urn:Test" ><MyTestElement >Test</MyTestElement>'
|
||||
. '<MyTestElement2 >Test2</MyTestElement2></MyAtomicComplexTypeElement>'
|
||||
, 'stringification';
|
||||
|
||||
my $soap = SOAP::WSDL::Client->new();
|
||||
$soap->proxy('http://bla');
|
||||
$soap->no_dispatch(1);
|
||||
my $soap = SOAP::WSDL::Client->new( {
|
||||
class_resolver => 'FakeResolver',
|
||||
} )
|
||||
->proxy('http://bla')
|
||||
->no_dispatch(1);
|
||||
|
||||
is $soap->call('Test', $obj), q{<SOAP-ENV:Envelope }
|
||||
. q{xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" }
|
||||
@@ -32,4 +37,24 @@ is $soap->call('Test', $obj), q{<SOAP-ENV:Envelope }
|
||||
. q{<MyTestElement >Test</MyTestElement>}
|
||||
. q{<MyTestElement2 >Test2</MyTestElement2>}
|
||||
. q{</MyAtomicComplexTypeElement></SOAP-ENV:Body></SOAP-ENV:Envelope>}
|
||||
, 'SOAP Envelope generation with objects';
|
||||
, 'SOAP Envelope generation with objects';
|
||||
|
||||
my $result = $soap->proxy('http://bla')
|
||||
->no_dispatch(0)
|
||||
->call('Test', $obj);
|
||||
ok $result->isa('SOAP::WSDL::SOAP::Typelib::Fault11'),
|
||||
'return fault on impossible call';
|
||||
ok ! $result, 'fault is false in boolean context';
|
||||
|
||||
package FakeResolver;
|
||||
|
||||
sub get_class {
|
||||
my %class_list = (
|
||||
'Fault' => 'SOAP::WSDL::SOAP::Typelib::Fault11',
|
||||
'Fault/faultactor' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'Fault/faultcode' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI',
|
||||
'Fault/faultstring' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'Fault/detail' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyType',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
use Test::More tests => 1;
|
||||
use lib '../lib';
|
||||
eval "require SOAP::WSDL::XSD::Typelib::Builtin";
|
||||
use Storable;
|
||||
|
||||
my $long = SOAP::WSDL::XSD::Typelib::Builtin::long->new( { value => 9 });
|
||||
my $clone = Storable::thaw( Storable::freeze( $long ) );
|
||||
|
||||
is $clone->serialize, 9 , 'clone via freeze/thaw';
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
use Test::More;
|
||||
eval "use Test::Pod 1.00";
|
||||
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
|
||||
|
||||
use Cwd;
|
||||
|
||||
my $dir = cwd;
|
||||
|
||||
if ( $dir =~ /t$/ )
|
||||
{
|
||||
@directories = ('../lib/');
|
||||
}
|
||||
else
|
||||
{
|
||||
@directories = ();
|
||||
}
|
||||
|
||||
my @files = all_pod_files(
|
||||
@directories
|
||||
);
|
||||
|
||||
plan tests => scalar(@files);
|
||||
|
||||
foreach my $module (@files)
|
||||
{
|
||||
pod_file_ok( $module )
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="simpleType"
|
||||
targetNamespace="simpleType"
|
||||
xmlns:tns="simpleType"
|
||||
<definitions name="urn:simpleType"
|
||||
targetNamespace="urn:simpleType"
|
||||
xmlns:tns="urn:simpleType"
|
||||
xmlns:wsd="http://www.w3c.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
@@ -32,8 +32,8 @@
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort2">
|
||||
@@ -42,22 +42,23 @@
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="testPort2">
|
||||
<portType name="testPort3">
|
||||
<operation name="test">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="testPort" name="testBinding">
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
@@ -67,8 +68,10 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="testPort2" name="testBinding2">
|
||||
<binding type="tns:testPort2" name="testBinding2">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
@@ -78,26 +81,28 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="testPort3" name="testBinding3">
|
||||
<binding type="tns:testPort3" name="testBinding3">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
<soap:operation soapAction="test"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="testBinding">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
<port name="testPort2" binding="testBinding2">
|
||||
<port name="testPort2" binding="tns:testBinding2">
|
||||
<soap:address location="http://127.0.0.1/testPort2" />
|
||||
</port>
|
||||
<port name="testPort3" binding="testBinding3">
|
||||
<port name="testPort3" binding="tns:testBinding3">
|
||||
<soap:address location="http://127.0.0.1/testPort3" />
|
||||
</port>
|
||||
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="Test"
|
||||
xmlns:tns="Test"
|
||||
<definitions name="urn:Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="Test">
|
||||
<xsd:complexType name="testComplexTypeAll">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="Test1" type="xsd:string"/>
|
||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:complexType name="testComplexTypeAll">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
ComplexType Test
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:all>
|
||||
<xsd:element name="Test1" type="xsd:string"/>
|
||||
<xsd:element name="Test2" type="xsd:string" minOccurs="1"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="testComplexTypeSequence">
|
||||
<xsd:annotation>
|
||||
@@ -34,11 +34,11 @@
|
||||
</xsd:schema>
|
||||
|
||||
</types>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testComplexType1"/>
|
||||
<message name="testRequest">
|
||||
<part name="testAll" type="tns:testComplexTypeAll"/>
|
||||
</message>
|
||||
<message name="testResponse">
|
||||
<part name="testAll" type="tns:testComplexType1"/>
|
||||
<part name="testAll" type="tns:testComplexTypeAll"/>
|
||||
</message>
|
||||
<portType name="testPort">
|
||||
<operation name="test">
|
||||
@@ -53,8 +53,8 @@
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test">
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
@@ -62,7 +62,7 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
|
||||
@@ -58,8 +58,9 @@
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
@@ -67,21 +68,26 @@
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort2" name="testBinding2">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test">
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding type="tns:testPort3" name="testBinding3">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
@@ -90,7 +96,8 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</binding>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="Test"
|
||||
xmlns:tns="Test"
|
||||
<definitions name="urn:Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="Test">
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:element name="testElement1">
|
||||
<xsd:simpleType>
|
||||
<xsd:annotation>
|
||||
@@ -32,12 +32,13 @@
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="testPort" name="testBinding">
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
@@ -47,9 +48,10 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="testBinding">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="Test"
|
||||
xmlns:tns="Test"
|
||||
<definitions name="urn:Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="Test">
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:element name="testElement1" type="xsd:string" />
|
||||
<xsd:element name="testElement2" type="xsd:int" />
|
||||
</xsd:schema>
|
||||
@@ -24,12 +24,13 @@
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="testPort" name="testBinding">
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
@@ -39,9 +40,10 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="testBinding">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="Test"
|
||||
xmlns:tns="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="Test">
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
@@ -44,13 +44,14 @@
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
@@ -59,9 +60,10 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="testBinding">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="Test"
|
||||
xmlns:tns="Test"
|
||||
<definitions name="urn:Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="Test">
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
@@ -33,12 +33,13 @@
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tnstestResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding type="testPort" name="testBinding">
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<operation name="test">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
@@ -48,9 +49,10 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="testBinding">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<definitions name="Test"
|
||||
targetNamespace="Test"
|
||||
xmlns:tns="Test"
|
||||
targetNamespace="urn:Test"
|
||||
xmlns:tns="urn:Test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
>
|
||||
<types>
|
||||
<xsd:schema targetNamespace="Test">
|
||||
<xsd:schema targetNamespace="urn:Test">
|
||||
<xsd:simpleType name="testSimpleType1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
@@ -58,22 +58,23 @@
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest"/>
|
||||
<output message="testResponse"/>
|
||||
<input message="tns:testRequest"/>
|
||||
<output message="tns:testResponse"/>
|
||||
</operation>
|
||||
<operation name="test2">
|
||||
<documentation>
|
||||
Test-Methode
|
||||
</documentation>
|
||||
|
||||
<input message="testRequest2"/>
|
||||
<output message="testResponse2"/>
|
||||
<input message="tns:testRequest2"/>
|
||||
<output message="tns:testResponse2"/>
|
||||
</operation>
|
||||
|
||||
</portType>
|
||||
|
||||
<binding type="testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<binding type="tns:testPort" name="testBinding">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="test">
|
||||
<soap:operation soapAction="test">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
@@ -82,7 +83,9 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
<soap:operation soapAction="test2">
|
||||
</operation>
|
||||
<operation name="test2">
|
||||
<soap:operation soapAction="test2">
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
@@ -90,9 +93,10 @@
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</soap:operation>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="testService">
|
||||
<port name="testPort" binding="testBinding">
|
||||
<port name="testPort" binding="tns:testBinding">
|
||||
<soap:address location="http://127.0.0.1/testPort" />
|
||||
</port>
|
||||
</service>
|
||||
|
||||
+45
-36
@@ -1,38 +1,47 @@
|
||||
use Test::More tests => 9;
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use Test::More tests => 10;
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use Data::Dumper;
|
||||
use lib '../lib';
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
# chdir to my location
|
||||
my $cwd = cwd;
|
||||
my $path = dirname( $0 );
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
chdir $path;
|
||||
|
||||
$path = cwd;
|
||||
|
||||
$path =~s{/attic}{}xms;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||
|
||||
ok( ($soap->servicename('testService') ), 'set service' );
|
||||
ok( ($soap->portname('testPort') ) ,'set portname');
|
||||
|
||||
ok( ($soap->portname() eq 'testPort' ),
|
||||
"Found first port definition" );
|
||||
|
||||
ok( ($soap->portname('testPort2') ),
|
||||
"Found second port definition (based on URL)" );
|
||||
|
||||
ok( ($soap->portname('testPort3') ),
|
||||
"Found third port definition (based on Name)" );
|
||||
|
||||
ok( $soap->wsdlinit( servicename => 'testService', portname => 'testPort'), 'parsed WSDL' );
|
||||
|
||||
$soap->_wsdl_init_methods();
|
||||
|
||||
use lib '../lib';
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
# chdir to my location
|
||||
my $cwd = cwd;
|
||||
my $path = dirname( $0 );
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
chdir $path;
|
||||
|
||||
$path = cwd;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
ok( ($soap->servicename('testService') eq 'testService' ) );
|
||||
ok( ($soap->portname('testPort') eq 'testPort' ) );
|
||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||
|
||||
ok( ($soap->portname() eq 'testPort' ),
|
||||
"Found first port definition" );
|
||||
|
||||
ok( ($soap->portname('testPort2') eq 'testPort2' ),
|
||||
"Found second port definition (based on URL)" );
|
||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||
ok( ($soap->portname('testPort3') eq 'testPort3' ),
|
||||
"Found third port definition (based on Name)" );
|
||||
|
||||
|
||||
ok( $soap->wsdlinit( servicename => 'testService', portname => 'testPort'), 'parsed WSDL' );
|
||||
ok( ($soap->portname() eq 'testPort' ), 'found port passed to wsdlinit');
|
||||
@@ -1,32 +1,32 @@
|
||||
BEGIN
|
||||
use Test::More tests => 8;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
chdir 't/' if (-d 't/');
|
||||
use Test::More tests => 7;;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
$SKIP = "Test::Differences required for testing. ";
|
||||
}
|
||||
|
||||
|
||||
my $path = cwd();
|
||||
my $name = $0;
|
||||
$name =~s/\.t$//;
|
||||
$name =~s/^t\///;
|
||||
|
||||
$path =~s{/attic}{}xms;
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
print "# SOAP::WSDL Version: $SOAP::WSDL::VERSION\n";
|
||||
|
||||
my $xml;
|
||||
my $soap;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
@@ -36,21 +36,14 @@ ok( $soap = SOAP::WSDL->new(
|
||||
|
||||
|
||||
#3
|
||||
ok( $soap->wsdlinit(
|
||||
checkoccurs => 1,
|
||||
), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
ok $soap->wsdlinit( checkoccurs => 1, ), 'parse WSDL';
|
||||
ok $soap->no_dispatch(1), 'set no dispatch';
|
||||
|
||||
ok ($xml = $soap->serializer->method( $soap->call('test',
|
||||
testAll => {
|
||||
Test1 => 'Test 1',
|
||||
Test2 => 'Test 2',
|
||||
}
|
||||
) ), 'Serialized complexType' );
|
||||
ok ($xml = $soap->call('test',
|
||||
Test1 => 'Test 1',
|
||||
Test2 => 'Test 2',
|
||||
), 'Serialized complexType' );
|
||||
|
||||
# oprint $xml;
|
||||
|
||||
#exit;
|
||||
|
||||
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|
||||
|| die "Cannot open acceptance results file";
|
||||
@@ -58,13 +51,15 @@ my $testXML = <$fh>;
|
||||
close $fh;
|
||||
|
||||
SKIP: {
|
||||
print $SKIP;
|
||||
skip( $SKIP, 1 ) if ($SKIP);
|
||||
eval { soap_eq_or_diff( $xml, $testXML, 'Got expected result') };
|
||||
};
|
||||
|
||||
# $soap->wsdl_checkoccurs(1);
|
||||
|
||||
TODO: {
|
||||
local $TODO = "not implemented yet";
|
||||
|
||||
eval
|
||||
{
|
||||
$xml = $soap->serializer->method(
|
||||
@@ -92,3 +87,4 @@ eval {
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
|
||||
}
|
||||
@@ -1,19 +1,22 @@
|
||||
BEGIN
|
||||
{
|
||||
chdir 't/' if (-d 't/');
|
||||
use Test::More tests => 7;;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
}
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <choice> support";
|
||||
fail "serialize choice element";
|
||||
}
|
||||
@@ -1,19 +1,22 @@
|
||||
BEGIN
|
||||
{
|
||||
chdir 't/' if (-d 't/');
|
||||
use Test::More tests => 7;;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
}
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <complexContent> support";
|
||||
fail "serialize complexContent element";
|
||||
}
|
||||
@@ -1,19 +1,22 @@
|
||||
BEGIN
|
||||
{
|
||||
chdir 't/' if (-d 't/');
|
||||
use Test::More tests => 7;;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
}
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <group> support";
|
||||
fail "serialize group element";
|
||||
}
|
||||
@@ -24,6 +24,8 @@ my $path = cwd();
|
||||
my $name = $0;
|
||||
$name =~s/\.t$//;
|
||||
|
||||
$path=~s{/attic}{}xms;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file://' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||
@@ -34,16 +36,16 @@ ok( $soap->wsdlinit(
|
||||
checkoccurs => 1,
|
||||
), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
$soap->serializer()->namespace('SOAP-ENV');
|
||||
$soap->serializer()->encodingspace('SOAP-ENC');
|
||||
$soap->serializer()->envprefix('SOAP-ENV');
|
||||
$soap->serializer()->encprefix('SOAP-ENC');
|
||||
|
||||
#4
|
||||
ok ($xml = $soap->serializer->method( $soap->call('test',
|
||||
ok $xml = $soap->call('test',
|
||||
testSequence => {
|
||||
Test1 => 'Test 1',
|
||||
Test2 => 'Test 2',
|
||||
}
|
||||
) ), 'Serialized complexType' );
|
||||
), 'Serialized complexType';
|
||||
|
||||
#5
|
||||
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|
||||
@@ -53,7 +55,7 @@ close $fh;
|
||||
|
||||
SKIP:
|
||||
{
|
||||
skip( 1, $SKIP ) if ($SKIP);
|
||||
skip( $SKIP, 1 ) if ($SKIP);
|
||||
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
|
||||
}
|
||||
#6
|
||||
@@ -86,7 +88,3 @@ eval
|
||||
ok( ($@),
|
||||
"Died on illegal number of elements"
|
||||
);
|
||||
|
||||
|
||||
# chdir back to where we came from
|
||||
chdir $cwd;
|
||||
@@ -1,19 +1,22 @@
|
||||
BEGIN
|
||||
{
|
||||
chdir 't/' if (-d 't/');
|
||||
use Test::More tests => 7;;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use Test::More tests => 2;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
}
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing. $@";
|
||||
}
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $soap = SOAP::WSDL->new();
|
||||
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement <simpleContent> support";
|
||||
fail "serialize simpleContent element";
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
use Test::More tests => 1;
|
||||
use Test::More skip_all => 'TODO: implement tests';
|
||||
use lib '../lib';
|
||||
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
BEGIN
|
||||
{
|
||||
chdir 't/' if (-d 't/');
|
||||
use Test::More;
|
||||
use strict;
|
||||
use warnings;
|
||||
plan qw/no_plan/;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use Test::More;
|
||||
plan qw/no_plan/;
|
||||
# plan "skip_all", "Not yet supported";
|
||||
# use Test::More tests => 7;;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
$SKIP = "Test::Differences required for testing.";
|
||||
}
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing.";
|
||||
}
|
||||
|
||||
|
||||
@@ -25,15 +19,13 @@ use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $xml;
|
||||
|
||||
# chdir to my location
|
||||
my $cwd = cwd;
|
||||
my $path = dirname( $0 );
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
chdir $path;
|
||||
|
||||
$path = cwd;
|
||||
my $path = cwd;
|
||||
|
||||
$path =~s{/attic}{}xms;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
@@ -41,53 +33,35 @@ ok( $soap = SOAP::WSDL->new(
|
||||
), 'Instantiated object' );
|
||||
|
||||
#3
|
||||
$soap->readable(1);
|
||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
$soap->serializer()->namespace('SOAP-ENV');
|
||||
$soap->serializer()->encodingspace('SOAP-ENC');
|
||||
|
||||
ok ( $xml = $soap->serializer->method( $soap->call('test',
|
||||
testAll => 1 )
|
||||
),
|
||||
ok ( $xml = $soap->call('test', testElement1 => 1 ) ,
|
||||
'Serialized (simpler) element' );
|
||||
|
||||
# print $xml, "\n";
|
||||
|
||||
|
||||
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|
||||
|| die 'Cannot open acceptance file '
|
||||
. $path . '/acceptance/results/' . $name . '.xml';
|
||||
my $testXML = <$fh>;
|
||||
close $fh;
|
||||
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|
||||
|| die 'Cannot open acceptance file '
|
||||
. $path . '/acceptance/results/' . $name . '.xml';
|
||||
my $testXML = <$fh>;
|
||||
close $fh;
|
||||
|
||||
SKIP: {
|
||||
skip($SKIP, 1) if ($SKIP);
|
||||
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
|
||||
};
|
||||
skip($SKIP, 1) if ($SKIP);
|
||||
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
|
||||
}
|
||||
|
||||
TODO: {
|
||||
local $TODO="implement min/maxOccurs checks";
|
||||
|
||||
eval { $soap->call('test', testAll => [ 2, 3 ] ); };
|
||||
|
||||
like $@, qr{illegal\snumber\sof\selements}, "Died on illegal number of elements (too many)";
|
||||
|
||||
eval { $soap->call('test', testAll => undef ) };
|
||||
ok $@, 'Died on illegal number of elements (not enough)';
|
||||
}
|
||||
|
||||
eval
|
||||
{
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => [ 2, 3 ]
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
# print $@;
|
||||
|
||||
ok( ($@ =~m/illegal\snumber\sof\selements/),
|
||||
"Died on illegal number of elements (too many)"
|
||||
);
|
||||
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => undef
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
|
||||
chdir $cwd;
|
||||
+40
-42
@@ -1,74 +1,72 @@
|
||||
BEGIN
|
||||
{
|
||||
chdir 't/' if (-d 't/');
|
||||
use Test::More tests => 7;;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use Test::More tests => 7;;
|
||||
use lib '../lib';
|
||||
use lib 't/lib';
|
||||
use lib 'lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@)
|
||||
{
|
||||
$SKIP = "Test::Differences required for testing.";
|
||||
}
|
||||
our $SKIP;
|
||||
eval "use Test::SOAPMessage";
|
||||
if ($@) {
|
||||
$SKIP = "Test::Differences required for testing.";
|
||||
}
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $soap;
|
||||
my $xml;
|
||||
my $path = cwd();
|
||||
my $name = $0;
|
||||
$name =~s/\.t$//;
|
||||
|
||||
$path =~s{/attic}{}xsm;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file://' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
#3
|
||||
$soap->readable(1);
|
||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
$soap->serializer()->namespace('SOAP-ENV');
|
||||
$soap->serializer()->encodingspace('SOAP-ENC');
|
||||
|
||||
ok ($xml = $soap->serializer->method( $soap->call('test',
|
||||
testAll => 'Test'
|
||||
) ), 'Serialized (simpler) element' );
|
||||
ok ($xml = $soap->call('test',
|
||||
testElement1 => 'Test'
|
||||
), 'Serialized (simple) element' );
|
||||
|
||||
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|
||||
|| die "Cannot open acceptance results file";
|
||||
my $testXML = <$fh>;
|
||||
close $fh;
|
||||
|
||||
SKIP:
|
||||
{
|
||||
skip( $SKIP, 1 ) if ($SKIP);
|
||||
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
|
||||
SKIP: {
|
||||
if ($SKIP){
|
||||
print $xml;
|
||||
skip( $SKIP, 1 );
|
||||
}
|
||||
|
||||
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
|
||||
};
|
||||
|
||||
eval
|
||||
{
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
TODO: {
|
||||
local $TODO="implement min/maxOccurs checks";
|
||||
|
||||
eval {
|
||||
$xml = $soap->call('test',
|
||||
testAll => [ 'Test 2', 'Test 3' ]
|
||||
)
|
||||
);
|
||||
};
|
||||
);
|
||||
};
|
||||
|
||||
ok( ($@ =~m/illegal\snumber\sof\selements/),
|
||||
ok( ($@ =~m/illegal\snumber\sof\selements/),
|
||||
"Died on illegal number of elements (too many)"
|
||||
);
|
||||
);
|
||||
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => undef
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
eval {
|
||||
$xml = $soap->call('test', testAll => undef );
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,98 +1,53 @@
|
||||
use Test::More tests => 10;
|
||||
use Test::More tests => 8;
|
||||
use strict;
|
||||
use lib '../lib';
|
||||
use lib 'lib';
|
||||
use lib 't/lib';
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
use Test::SOAPMessage;
|
||||
use diagnostics;
|
||||
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
unless ($SOAP::WSDL::MISSING) { };
|
||||
|
||||
my ($xml, $xml2);
|
||||
my ($soap, $xml, $xml2);
|
||||
|
||||
# chdir to my location
|
||||
my $cwd = cwd;
|
||||
my $path = dirname( $0 );
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
chdir $path;
|
||||
|
||||
$path = cwd;
|
||||
my $path = cwd;
|
||||
$path =~s{/attic}{}xms;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
$soap->readable(1);
|
||||
|
||||
#3
|
||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
|
||||
#4
|
||||
ok ( $xml = $soap->serializer->method( $soap->call('test',
|
||||
testAll => [ 1, 2 ] )
|
||||
),
|
||||
'Serialized (simple) call (list)' );
|
||||
ok $xml = $soap->call('test', testAll => [ 1, 2 ] ), 'Serialize list call';
|
||||
|
||||
#print $xml, "\n";
|
||||
|
||||
SKIP: {
|
||||
|
||||
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|
||||
|| skip("Cannot open acceptance results file", 1);
|
||||
my $testXML = <$fh>;
|
||||
close $fh;
|
||||
#5
|
||||
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
|
||||
}
|
||||
print $xml, "\n";
|
||||
|
||||
#5
|
||||
ok ( $xml2 = $soap->call('test', testAll => "1 2" ) , 'Serialized scalar call' );
|
||||
#6
|
||||
ok ( $xml2 = $soap->serializer->method( $soap->call('test',
|
||||
testAll => "1 2" )
|
||||
),
|
||||
'Serialized (simple) call (scalar)' );
|
||||
#7
|
||||
ok( $xml eq $xml2, 'Got expected result');
|
||||
|
||||
#8
|
||||
ok (
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => 2
|
||||
)
|
||||
), "Serialized simple call (scalar value)"
|
||||
);
|
||||
|
||||
#9
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => undef
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
|
||||
|
||||
#10
|
||||
SKIP:
|
||||
{
|
||||
skip ("maxLength test not implemented", 1)
|
||||
if ( $SOAP::WSDL::MISSING->{ simpleType }->{ list }->{ maxLength } );
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ]
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (more than maxLength)');
|
||||
|
||||
#7
|
||||
TODO: {
|
||||
local $TODO = "implement minLength check";
|
||||
eval { $xml = $soap->call('test', testAll => undef ) };
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
}
|
||||
|
||||
chdir $cwd;
|
||||
#8
|
||||
TODO: {
|
||||
local $TODO = "maxLength test not implemented";
|
||||
eval { $xml = $soap->call('test', testAll => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ] ) };
|
||||
ok($@, 'Died on illegal number of elements (more than maxLength)');
|
||||
}
|
||||
|
||||
@@ -1,105 +1,57 @@
|
||||
use Test::More tests => 9;
|
||||
use Test::More tests => 8;
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use lib '../lib';
|
||||
use lib 'lib';
|
||||
use lib 't/lib';
|
||||
|
||||
use Test::SOAPMessage;
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $xml;
|
||||
|
||||
# chdir to my location
|
||||
my $cwd = cwd;
|
||||
my $path = dirname( $0 );
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
chdir $path;
|
||||
|
||||
$path = cwd;
|
||||
my $path = cwd;
|
||||
$path =~s{/attic}{}xms;
|
||||
|
||||
my $soap;
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
|
||||
#3
|
||||
$soap->readable(1);
|
||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||
$soap->no_dispatch(1);
|
||||
$soap->autotype(0);
|
||||
|
||||
#4
|
||||
ok ( $xml = $soap->serializer->method( $soap->call('test',
|
||||
testAll => 1 )
|
||||
),
|
||||
'Serialized (simple) call (list)' );
|
||||
ok $xml = $soap->call('test', testAll => [ 1, 2 ] ) , 'Serialize list call';
|
||||
|
||||
print $xml, "\n";
|
||||
# print $xml, "\n";
|
||||
|
||||
|
||||
SKIP: {
|
||||
skip 'broken', 1;
|
||||
open (my $fh, $path . '/acceptance/results/' . $name . '.xml')
|
||||
|| skip("Cannot open acceptance results file ". $name . '.xml', 1);
|
||||
my $testXML = <$fh>;
|
||||
close $fh;
|
||||
chomp $testXML;
|
||||
chomp $xml;
|
||||
TODO: {
|
||||
local $TODO = "implement minLength/maxLength checks";
|
||||
eval { $soap->call('test', testAll => [ 1, 2, 3 ] ) };
|
||||
ok($@, 'Died on illegal number of elements (too many)');
|
||||
|
||||
soap_eq_or_diff( $xml, $testXML, 'Got expected result');
|
||||
eval { $soap->call('test', testAll => [] ) };
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
}
|
||||
|
||||
# 6
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => [ 1, 2 ]
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => undef
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
|
||||
SKIP:
|
||||
{
|
||||
skip( "minValue check not implemented ", 1)
|
||||
if ($SOAP::WSDL::MISSING->{ simpleType }->{ restriction }->{ minValue });
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => 0
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal value');
|
||||
TODO: {
|
||||
local $TODO = "minValue check not implemented ";
|
||||
eval { $xml = $soap->call('test', testAll => 0 ) };
|
||||
ok($@, 'Died on illegal value');
|
||||
}
|
||||
|
||||
SKIP:
|
||||
{
|
||||
skip( "maxValue check not implemented ", 1)
|
||||
if ($SOAP::WSDL::MISSING->{ simpleType }->{ restriction }->{ maxValue });
|
||||
eval {
|
||||
$xml = $soap->serializer->method(
|
||||
$soap->call('test',
|
||||
testAll => 100
|
||||
)
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal value');
|
||||
TODO: {
|
||||
local $TODO = "maxValue check not implemented ";
|
||||
eval { $xml = $soap->call('test', testAll => 100 ) };
|
||||
ok($@, 'Died on illegal value');
|
||||
}
|
||||
|
||||
|
||||
chdir $cwd;
|
||||
@@ -1,41 +1,36 @@
|
||||
use Test::More tests => 9;
|
||||
use Test::More skip_all => 'Not supported yet';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
||||
use lib '../lib';
|
||||
|
||||
use_ok(qw/SOAP::WSDL/);
|
||||
use_ok qw/SOAP::WSDL/;
|
||||
|
||||
my $xml;
|
||||
|
||||
# chdir to my location
|
||||
my $cwd = cwd;
|
||||
my $path = dirname( $0 );
|
||||
my $soap = undef;
|
||||
my $name = basename( $0 );
|
||||
$name =~s/\.(t|pl)$//;
|
||||
chdir $path;
|
||||
|
||||
$path = cwd;
|
||||
my $path = cwd;
|
||||
|
||||
$path =~s{/attic}{}xms;
|
||||
|
||||
#2
|
||||
ok( $soap = SOAP::WSDL->new(
|
||||
ok $soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $path . '/acceptance/wsdl/' . $name . '.wsdl'
|
||||
), 'Instantiated object' );
|
||||
), 'Instantiated object';
|
||||
|
||||
#3
|
||||
ok( $soap->wsdlinit(), 'parsed WSDL' );
|
||||
$soap->readable(1);
|
||||
ok $soap->wsdlinit(), 'parsed WSDL';
|
||||
$soap->no_dispatch(1);
|
||||
$soap->serializer()->namespace('SOAP-ENV');
|
||||
$soap->serializer()->encodingspace('SOAP-ENC');
|
||||
|
||||
#4
|
||||
ok ( $xml = $soap->serializer->method( $soap->call('test',
|
||||
testAll => 1 )
|
||||
),
|
||||
'Serialized (simple) call (list)' );
|
||||
ok $xml = $soap->call('test', testAll => 1 ) , 'Serialized call';
|
||||
|
||||
# print $xml, "\n";
|
||||
print $xml, "\n";
|
||||
|
||||
SKIP: {
|
||||
|
||||
@@ -81,5 +76,3 @@ eval {
|
||||
)
|
||||
};
|
||||
ok($@, 'Died on illegal number of elements (not enough)');
|
||||
|
||||
chdir $cwd;
|
||||
@@ -28,19 +28,6 @@ print "Acceptance test against sample output with simple WSDL\n";
|
||||
my $data = {
|
||||
name => 'test',
|
||||
givenName => 'test',
|
||||
# test => {
|
||||
# name => 'TESTNAME',
|
||||
# givenName => 'GIVENNAME',
|
||||
# },
|
||||
# test1 => {
|
||||
# name => 'TESTNAME',
|
||||
# givenName => 'GIVENNAME',
|
||||
# extend => 'EXTEND',
|
||||
# },
|
||||
# test2 => {
|
||||
# name => 'TESTNAME',
|
||||
# givenName => 'GIVENNAME',
|
||||
# }
|
||||
};
|
||||
|
||||
my $t0 = [gettimeofday];
|
||||
@@ -54,6 +41,8 @@ chdir $path;
|
||||
|
||||
$path = cwd;
|
||||
|
||||
$path =~s{/attic}{}xms;
|
||||
|
||||
|
||||
ok( $soap=SOAP::WSDL->new(
|
||||
wsdl => 'file:///'.$path.'/acceptance/wsdl/11_helloworld.wsdl',
|
||||
@@ -71,9 +60,9 @@ print "WSDL init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
do {
|
||||
my $xml = $soap->serializer->method( $soap->call(sayHello => %{ $data }) );
|
||||
my $xml = $soap->call('sayHello', 'sayHello' => %{ $data });
|
||||
|
||||
open (FILE, "acceptance/results/11_helloworld.xml")
|
||||
open (FILE, "../acceptance/results/11_helloworld.xml")
|
||||
|| open (FILE, "t/acceptance/results/11_helloworld.xml") || die "can't open acceptance file";
|
||||
my $xml_test=<FILE>;
|
||||
close FILE;
|
||||
@@ -94,9 +83,9 @@ do {
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
do {
|
||||
my $xml = $soap->serializer->method( $soap->call(sayHello => %{ $data }) );
|
||||
my $xml = $soap->call(sayHello => %{ $data });
|
||||
|
||||
open (FILE, "acceptance/results/11_helloworld.xml")
|
||||
open (FILE, "../acceptance/results/11_helloworld.xml")
|
||||
|| open FILE, ("t/acceptance/results/11_helloworld.xml") || die "can't open acceptance file";
|
||||
my $xml_test=<FILE>;
|
||||
close FILE;
|
||||
|
||||
+3
-2
@@ -20,7 +20,7 @@ package MyTestElement;
|
||||
use strict;
|
||||
use Class::Std::Storable;
|
||||
use SOAP::WSDL::XSD::Typelib::Element;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin;
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::string;
|
||||
use base (
|
||||
'SOAP::WSDL::XSD::Typelib::Element',
|
||||
'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
@@ -28,8 +28,9 @@ use base (
|
||||
|
||||
sub START {
|
||||
my ($self, $ident, $args_of) =@_;
|
||||
$self->__set_name('MyTestElement');
|
||||
}
|
||||
|
||||
__PACKAGE__->__set_name('MyTestElement');
|
||||
|
||||
sub get_xmlns { 'urn:Test' };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user