blib/lib/SOAP/WSDL/Transport/Loopback.pm

filter: Statementstmt 93.5% 29 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 89.4% 34 / 38 CC 1 SCAR 1.5
CC
1
Cov
94%
send_receive
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/SOAP/WSDL/XSD/Schema/Builtin.pm ↑ Summary blib/lib/SOAP/WSDL/Expat/Base.pm »
1 package SOAP::WSDL::Transport::Loopback;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Class::Std::Fast::Storable constructor => 'basic';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use SOAP::WSDL::Factory::Transport;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = 3.004;
8  
9 # register on loading
10 2 SOAP::WSDL::Factory::Transport->register( http => __PACKAGE__ );
11 2 SOAP::WSDL::Factory::Transport->register( https => __PACKAGE__ );
12  
13 2 my %code_of :ATTR(:name<code> :default<()>);
14 2 my %status_of :ATTR(:name<status> :default<()>);
15 2 my %message_of :ATTR(:name<message> :default<()>);
16 2 my %is_success_of :ATTR(:name<is_success> :default<()>);
17  
18 # create methods normally inherited from SOAP::Client
19 SUBFACTORY: {
20 2 ▶ no strict qw(refs);
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 foreach my $method ( qw(code message status is_success) ) {
22 8 *{ $method } = *{ "get_$method" };
23 }
24 }
25  
26 0 ▶sub send_receive {
Subroutine send_receive: not called CC=1 SCAR=6.9
Pod undocumented
27 0 my ($self, %parameters) = @_;
28 0 return $parameters{envelope};
29 }
30  
31 2 Class::Std::initialize();
32  
33  
34 2 1;
35  
36 =head1 NAME
37  
38 SOAP::WSDL::Transport::Test - Loopback transport class for SOAP::WSDL
39  
40 =head1 SYNOPSIS
41  
42 use SOAP::WSDL::Client;
43 use SOAP::WSDL::Transport::Loopback;
44  
45 my $soap = SOAP::WSDL::Client->new()
46 $soap->get_transport->set_base_dir('.');
47 $soap->call('method', \%body, \%header);
48  
49 =head1 DESCRIPTION
50  
51 SOAP::WSDL::Transport::Loopback is a loopback test transport backend for
52 SOAP::WSDL.
53  
54 When SOAP::WSDL::Transport::Loopback is used as transport backend, the
55 request is returned as response. No data ever goes over the wire.
56 This is particularly useful for testing SOAP::WSDL plugins and applications.
57  
58 =head1 LICENSE AND COPYRIGHT
59  
60 Copyright (c) 2007 Martin Kutter. All rights reserved.
61  
62 This file is part of SOAP-WSDL. You may distribute/modify it under
63 the same terms as perl itself
64  
65 =head1 AUTHOR
66  
67 Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
68  
69 =head1 REPOSITORY INFORMATION
70  
71 $Rev: 218 $
72 $LastChangedBy: kutterma $
73 $Id: HTTP.pm 218 2007-09-10 16:19:23Z kutterma $
74 $HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
75  
76 =cut
« blib/lib/SOAP/WSDL/XSD/Schema/Builtin.pm ↑ Summary blib/lib/SOAP/WSDL/Expat/Base.pm »