import SOAP-WSDL 2.00_29 from CPAN

git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_29
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_29.tar.gz
This commit is contained in:
Martin Kutter
2009-12-12 19:48:17 -08:00
committed by Michael G. Schwern
parent 2bad767211
commit 874251225f
402 changed files with 30230 additions and 2406 deletions
+80
View File
@@ -0,0 +1,80 @@
package MyTypemap;
sub get_typemap { return {} };
package HandlerClass;
sub bar {
return "Verdammte Axt";
}
package main;
use Test::More;
eval "require IO::Scalar"
or plan skip_all => 'IO::Scalar required for testing...';
plan tests => 8;
use_ok(SOAP::WSDL::Server);
use_ok(SOAP::WSDL::Server::CGI);
my $server = SOAP::WSDL::Server::CGI->new({
class_resolver => 'MyTypemap',
});
$server->set_action_map_ref({
'testaction' => 'testmethod',
});
{
no warnings qw(once);
*IO::Scalar::BINMODE = sub {};
}
my $output = q{};
my $fh = IO::Scalar->new(\$output);
my $stdout = *STDOUT;
*STDOUT = $fh;
$server->handle();
like $output, qr{ \A Status: \s 411 \s Length \s Required}x;
$output = q{};
$ENV{'CONTENT_LENGTH'} = '0e0';
$server->handle();
like $output, qr{ Error \s deserializing }xsm;
$output = q{};
$server->set_action_map_ref({
'foo' => 'bar',
});
$server->set_dispatch_to( 'HandlerClass' );
$server->handle();
like $output, qr{no \s element \s found}xms;
$output = q{};
$ENV{REQUEST_METHOD} = 'POST';
$ENV{HTTP_SOAPACTION} = 'test';
$server->handle();
like $output, qr{no \s element \s found}xms;
$output = q{};
delete $ENV{HTTP_SOAPACTION};
$ENV{EXPECT} = 'Foo';
$ENV{HTTP_SOAPAction} = 'foo';
$server->handle();
like $output, qr{no \s element \s found}xms;
$output = q{};
$ENV{EXPECT} = '100-Continue';
$ENV{HTTP_SOAPAction} = 'foo';
$server->handle();
like $output, qr{100 \s Continue}xms;
$output = q{};
*STDOUT = $stdout;
# print $output;