line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package W3C::SOAP::Base; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2012-05-28 07:40:20 |
4
|
|
|
|
|
|
|
# Create by: Ivan Wills |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
1067
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
10
|
1
|
|
|
1
|
|
4988
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
11
|
1
|
|
|
1
|
|
3
|
use version; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
12
|
1
|
|
|
1
|
|
46
|
use Carp qw/carp croak cluck confess longmess/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
52
|
|
13
|
1
|
|
|
1
|
|
3
|
use Scalar::Util; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
14
|
1
|
|
|
1
|
|
4
|
use List::Util; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
55
|
|
15
|
1
|
|
|
1
|
|
6
|
use Data::Dumper qw/Dumper/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
16
|
1
|
|
|
1
|
|
5
|
use English qw/ -no_match_vars /; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = version->new('0.11'); |
19
|
|
|
|
|
|
|
our $DEBUG_REQUEST_RESPONSE = $ENV{W3C_SOAP_DEBUG_CLIENT}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has w3c_built_with_version => ( |
22
|
|
|
|
|
|
|
is => 'rw', |
23
|
|
|
|
|
|
|
isa => 'version', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NAME |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
W3C::SOAP::Base - Base module for build L<W3C::SOAP> modules |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 VERSION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
This documentation refers to W3C::SOAP::Base version 0.11. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SYNOPSIS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
use W3C::SOAP::Base; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# post a SOAP action |
43
|
|
|
|
|
|
|
my $client = W3C::SOAP::Base->new( |
44
|
|
|
|
|
|
|
location => 'http://some.where.com/', |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
$client->post('DO_SOMETHING', $xms_doc); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DESCRIPTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
L<W3C::SOAP::Base> is the base class for L<W3C::SOAP> clients. It provides |
52
|
|
|
|
|
|
|
the base attributes that are needed for sending SOAP requests. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=over 4 |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item location |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
The URL for the SOAP request |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=item mech |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
No longer used |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item ua |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
A L<LWP::UserAgent> compatible object which if not supplied will be lazily |
69
|
|
|
|
|
|
|
created. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item response |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
The L<HTTP::Response> object of the last returned response |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item log |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
An logging object that proves the following methods: |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
debug, info, warn, error and fatal |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=item content_type |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
The value of the Content-Type HTTP header (defaults to text/xml;charset=UTF-8') |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=back |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=over 4 |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=item C<post ($action, $xml)> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Performs the SOAP POST request. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=back |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
The environment variable C<W3C_SOAP_DEBUG_CLIENT> can be used to show |
102
|
|
|
|
|
|
|
request and response XML. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
There are no known bugs in this module. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Please report problems to Ivan Wills (ivan.wills@gmail.com). |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Patches are welcome. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 AUTHOR |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Copyright (c) 2012 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
123
|
|
|
|
|
|
|
All rights reserved. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
126
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
127
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
128
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
129
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=cut |