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:
committed by
Michael G. Schwern
parent
874251225f
commit
f0b3bdc201
+26
-2
@@ -1,6 +1,6 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 4; #qw(no_plan);
|
||||
use Test::More tests => 8; #qw(no_plan);
|
||||
|
||||
use_ok qw(SOAP::WSDL::Client);
|
||||
|
||||
@@ -10,4 +10,28 @@ ok $client = SOAP::WSDL::Client->new({
|
||||
proxy => 'http://localhost',
|
||||
});
|
||||
|
||||
is $client->get_endpoint(), 'http://localhost';
|
||||
is $client->get_endpoint(), 'http://localhost';
|
||||
|
||||
$client->no_dispatch(1);
|
||||
$client->set_serializer('main');
|
||||
my $serialize = $client->call({
|
||||
operation => 'testMethod'
|
||||
}, { foo => 'bar'}, { bar => 'baz'});
|
||||
is $serialize->{ body }->{ foo }, 'bar';
|
||||
is $serialize->{ header }->{ bar }, 'baz';
|
||||
|
||||
# Old calling style compatibility test - foo => bar is body...
|
||||
$serialize = $client->call({
|
||||
operation => 'testMethod'
|
||||
}, foo => 'bar');
|
||||
is $serialize->{ body }->{ foo }, 'bar';
|
||||
|
||||
# Old calling style compatibility test - foo => bar is body...
|
||||
$serialize = $client->call('testMethod', foo => 'bar');
|
||||
is $serialize->{ body }->{ foo }, 'bar';
|
||||
|
||||
|
||||
sub serialize {
|
||||
my $self = shift;
|
||||
return shift;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user