import SOAP-WSDL 2.00_24 from CPAN

git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_24
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_24.tar.gz
This commit is contained in:
Martin Kutter authored and Michael G. Schwern committed 2009-12-12 19:48:10 -08:00
1 parent b955c5ad79
commit 84b53d9261
169 files changed
+3995 -3676

No files matched your search

+13 -13
View File
@@ -6,7 +6,7 @@ use base qw(LWP::UserAgent);
SUBFACTORY: {
no strict qw(refs);
foreach my $method ( qw(code message status is_success) ) {
*{ $method } = sub {
*{ $method } = sub {
my $self = shift;
return $self->{ $method } if not @_;
return $self->{ $method } = shift;
@@ -19,8 +19,8 @@ sub send_receive {
my ($envelope, $soap_action, $endpoint, $encoding, $content_type) =
@parameters{qw(envelope action endpoint encoding content_type)};
$encoding = defined($encoding)
? 'utf8'
$encoding = defined($encoding)
? 'utf8'
: lc($encoding);
# what's this all about?
@@ -40,7 +40,7 @@ sub send_receive {
# use bytes is lexically scoped
my $bytelength = do { use bytes; length $envelope };
$envelope = pack('C0A*', $envelope)
$envelope = pack('C0A*', $envelope)
if length($envelope) != $bytelength;
my $request = HTTP::Request->new( 'POST',
@@ -50,15 +50,15 @@ sub send_receive {
'SOAPAction', $soap_action,
],
$envelope );
my $response = $self->request( $request );
$self->code( $response->code);
$self->message( $response->message);
$self->is_success($response->is_success);
$self->status($response->status_line);
return $response->content();
return $response->content();
}
1;
@@ -71,14 +71,14 @@ SOAP::WSDL::Transport::HTTP - Fallback http(s) transport class
=head1 DESCRIPTION
Provides a thin transport class used by SOAP::WSDL::Transport when
Provides a thin transport class used by SOAP::WSDL::Transport when
SOAP::Lite is not available.
=head1 LICENSE
=head1 LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter.
Copyright (c) 2007 Martin Kutter. All rights reserved.
This file is part of SOAP-WSDL. You may distribute/modify it under
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 AUTHOR
@@ -87,9 +87,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION
$Rev: 288 $
$Rev: 391 $
$LastChangedBy: kutterma $
$Id: HTTP.pm 288 2007-09-29 19:34:20Z kutterma $
$Id: HTTP.pm 391 2007-11-17 21:56:13Z kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
=cut
+14 -14
View File
@@ -4,23 +4,23 @@ use warnings;
use Class::Std::Storable;
use SOAP::WSDL::Factory::Transport;
our $VERSION = '2.00_17';
our $VERSION = '2.00_17';
SOAP::WSDL::Factory::Transport->register( http => __PACKAGE__ );
SOAP::WSDL::Factory::Transport->register( https => __PACKAGE__ );
my %code_of :ATTR(:name<code> :default<()>);
my %status_of :ATTR(:name<status> :default<()>);
my %message_of :ATTR(:name<message> :default<()>);
my %is_success_of :ATTR(:name<is_success> :default<()>);
my %code_of :ATTR(:name<code> :default<()>);
my %status_of :ATTR(:name<status> :default<()>);
my %message_of :ATTR(:name<message> :default<()>);
my %is_success_of :ATTR(:name<is_success> :default<()>);
{
no warnings qw(redefine);
sub new {
my $class = shift;
return bless \my ($o), $class;
}
}
}
# create methods normally inherited from SOAP::Client
@@ -53,18 +53,18 @@ SOAP::WSDL::Transport::Test - Loopback transport class for SOAP::WSDL
=head1 DESCRIPTION
SOAP::WSDL::Transport::Loopback is a loopback test transport backend for
SOAP::WSDL.
SOAP::WSDL::Transport::Loopback is a loopback test transport backend for
SOAP::WSDL.
When SOAP::WSDL::Transport::Loopback is used as transport backend, the
request is returned as response. No data ever goes over the wire.
When SOAP::WSDL::Transport::Loopback is used as transport backend, the
request is returned as response. No data ever goes over the wire.
This is particularly useful for testing SOAP::WSDL plugins and applications.
=head1 LICENSE
=head1 LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter.
Copyright (c) 2007 Martin Kutter. All rights reserved.
This file is part of SOAP-WSDL. You may distribute/modify it under
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 AUTHOR
+19 -19
View File
@@ -4,7 +4,7 @@ use warnings;
use Class::Std::Storable;
use SOAP::WSDL::Factory::Transport;
our $VERSION = '2.00_14';
our $VERSION = '2.00_14';
SOAP::WSDL::Factory::Transport->register( http => __PACKAGE__ );
SOAP::WSDL::Factory::Transport->register( https => __PACKAGE__ );
@@ -32,27 +32,27 @@ sub send_receive {
$filename =~s{ \A(:?'|") }{}xms;
$filename =~s{ (:?'|")\z }{}xms;
$filename =~s{ \A [^:]+ : (:? /{2})? }{}xms;
$filename = join '/', $base_dir_of{ ident $self }, "$filename.xml";
if (not -r $filename) {
if (not -r $filename) {
warn "cannot access $filename";
$self->set_code( 500 );
$self->set_message( "Failed" );
$self->set_is_success(0);
$self->set_status("500 Failed");
return;
return;
}
open my $fh, '<', $filename or die "cannot open $filename: $!";
binmode $fh;
my $response = <$fh>;
close $fh or die "cannot close $filename: $!";
close $fh or die "cannot close $filename: $!";
$self->set_code( 200 );
$self->set_message( "OK" );
$self->set_is_success(1);
$self->set_status("200 OK");
$self->set_status("200 OK");
return $response;
}
@@ -73,21 +73,21 @@ SOAP::WSDL::Transport::Test - Test transport class for SOAP::WSDL
=head1 DESCRIPTION
SOAP::WSDL::Transport::Test is a file-based test transport backend for
SOAP::WSDL.
SOAP::WSDL::Transport::Test is a file-based test transport backend for
SOAP::WSDL.
When SOAP::WSDL::Transport::Test is used as transport backend, the reponse is
read from a XML file and the request message is discarded. This is particularly
useful for testing SOAP::WSDL plugins.
When SOAP::WSDL::Transport::Test is used as transport backend, the reponse is
read from a XML file and the request message is discarded. This is
particularly useful for testing SOAP::WSDL plugins.
=head2 Filename resolution
SOAP::WSDL::Transport makes up the response XML file name from the SOAPAction
SOAP::WSDL::Transport makes up the response XML file name from the SOAPAction
of the request. The following filename is used:
base_dir / soap_action .xml
The protocol scheme (e.g. http:) and two heading slashes (//) are stripped from
The protocol scheme (e.g. http:) and two heading slashes (//) are stripped from
the soap_action.
base_dir defaults to '.'
@@ -105,14 +105,14 @@ Examples:
=head2 set_base_dir
Sets the base directory SOAP::WSDL::Transport::Test should look for response
Sets the base directory SOAP::WSDL::Transport::Test should look for response
files.
=head1 LICENSE
=head1 LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter.
Copyright (c) 2007 Martin Kutter. All rights reserved.
This file is part of SOAP-WSDL. You may distribute/modify it under
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 AUTHOR