line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package W3C::SOAP::Header; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2012-05-23 14:32:39 |
4
|
|
|
|
|
|
|
# Create by: dev |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
1703
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
10
|
1
|
|
|
1
|
|
5123
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
11
|
1
|
|
|
1
|
|
4
|
use version; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
12
|
1
|
|
|
1
|
|
63
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
64
|
|
13
|
1
|
|
|
1
|
|
5
|
use Scalar::Util; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
14
|
1
|
|
|
1
|
|
5
|
use List::Util; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
156
|
|
15
|
|
|
|
|
|
|
#use List::MoreUtils; |
16
|
1
|
|
|
1
|
|
6
|
use Data::Dumper qw/Dumper/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
42
|
|
17
|
1
|
|
|
1
|
|
4
|
use English qw/ -no_match_vars /; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = version->new('0.11'); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has security => ( |
23
|
|
|
|
|
|
|
is => 'rw', |
24
|
|
|
|
|
|
|
isa => 'W3C::SOAP::Header::Security', |
25
|
|
|
|
|
|
|
predicate => 'has_security', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
has message => ( |
29
|
|
|
|
|
|
|
is => 'rw', |
30
|
|
|
|
|
|
|
isa => 'W3C::SOAP::XSD', |
31
|
|
|
|
|
|
|
predicate => 'has_message', |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub to_xml { |
35
|
0
|
|
|
0
|
1
|
|
my ($self, $xml) = @_; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
my $header = $xml->createElement('soapenv:Header'); |
38
|
|
|
|
|
|
|
|
39
|
0
|
0
|
|
|
|
|
if ($self->has_security) { |
40
|
0
|
|
|
|
|
|
$header->appendChild($self->security->to_xml($xml)); |
41
|
|
|
|
|
|
|
} |
42
|
0
|
0
|
|
|
|
|
if ($self->has_message) { |
43
|
0
|
|
|
|
|
|
for my $node ( $self->message->to_xml($xml) ) { |
44
|
0
|
|
|
|
|
|
$header->appendChild($node); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $header; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
W3C::SOAP::Header - Object to create SOAP headers |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 VERSION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This documentation refers to W3C::SOAP::Header version 0.11. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SYNOPSIS |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
use W3C::SOAP::Header; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
# create the XML |
68
|
|
|
|
|
|
|
my $xml = $header->to_xml(); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 DESCRIPTION |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This object allows the construction SOAP headers. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over 4 |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item C<to_xml ($xml)> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Coverts this object to XML |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=back |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
There are no known bugs in this module. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Please report problems to Ivan Wills - (ivan.wills@gmail.com) |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Patches are welcome. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 AUTHOR |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Copyright (c) 2012 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
107
|
|
|
|
|
|
|
All rights reserved. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
110
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
111
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
112
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
113
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=cut |