import SOAP-WSDL 2.00_25 from CPAN

git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_25
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_25.tar.gz
This commit is contained in:
Martin Kutter
2009-12-12 19:48:11 -08:00
committed by Michael G. Schwern
parent 84b53d9261
commit a9033164e6
177 changed files with 3449 additions and 2063 deletions
+65
View File
@@ -0,0 +1,65 @@
package MyPart;
use Class::Std::Fast;
package main;
use strict;
use warnings;
use Test::More qw(no_plan);
use_ok qw(SOAP::WSDL::Client::Base);
my $client = SOAP::WSDL::Client::Base->new();
{
no warnings qw(redefine once);
*SOAP::WSDL::Client::call = sub { is $_[1]->{ operation }, 'sayHello', 'Called method';
return $_[2], $_[3];
};
}
my @result = $client->call({
operation => 'sayHello',
soap_action => 'urn:HelloWorld#sayHello',
style => 'document',
body => {
'use' => 'literal',
namespace => '',
encodingStyle => '',
parts => [qw( SOAP::WSDL::XSD::Typelib::Builtin::string )],
},
header => {
parts => [qw( SOAP::WSDL::XSD::Typelib::Builtin::string )],
},
headerfault => {
}
}, { value => 'Body' }, { value => 'Header' });
is $result[0], 'Body';
is $result[1], 'Header';
isa_ok $result[0], 'SOAP::WSDL::XSD::Typelib::Builtin::string';
@result = $client->call({
operation => 'sayHello',
soap_action => 'urn:HelloWorld#sayHello',
style => 'document',
body => {
'use' => 'literal',
namespace => '',
encodingStyle => '',
parts => [qw( SOAP::WSDL::XSD::Typelib::Builtin::string )],
},
header => {
parts => [qw( SOAP::WSDL::XSD::Typelib::Builtin::string )],
},
headerfault => {
}
}, SOAP::WSDL::XSD::Typelib::Builtin::string->new({ value => 'Body2' }),
SOAP::WSDL::XSD::Typelib::Builtin::string->new({ value => 'Header2' })
);
is $result[0], 'Body2';
is $result[1], 'Header2';
isa_ok $result[1], 'SOAP::WSDL::XSD::Typelib::Builtin::string';