« blib/lib/W3C/SOAP/XSD/Document/ComplexType.pm
↑ Summary
blib/lib/W3C/SOAP/WSDL/Document/Binding.pm »
| 1 | package W3C::SOAP::WSDL::Document::InOutPuts; | ||||||||||
| 2 | |||||||||||
| 3 | # Created on: 2012-05-28 07:30:02 | ||||||||||
| 4 | # Create by: Ivan Wills | ||||||||||
| 5 | # $Id$ | ||||||||||
| 6 | # $Revision$, $HeadURL$, $Date$ | ||||||||||
| 7 | # $Revision$, $Source$, $Date$ | ||||||||||
| 8 | |||||||||||
| 9 | 5 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 5 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 5 | ▶ | use Scalar::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 5 | ▶ | use List::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | #use List::MoreUtils; | ||||||||||
| 15 | 5 | ▶ | use Data::Dumper qw/Dumper/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 5 | ▶ | use English qw/ -no_match_vars /; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | 5 | ▶ | use W3C::SOAP::Utils qw/split_ns/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 5 | extends 'W3C::SOAP::Document::Node'; | |||||||||
| 19 | |||||||||||
| 20 | 5 | our $VERSION = 0.13; | |||||||||
| 21 | |||||||||||
| 22 | 5 | has message => ( | |||||||||
| 23 | is => 'rw', | ||||||||||
| 24 | isa => 'Maybe[W3C::SOAP::WSDL::Document::Message]', | ||||||||||
| 25 | builder => '_message', | ||||||||||
| 26 | lazy => 1, | ||||||||||
| 27 | ); | ||||||||||
| 28 | 5 | has header => ( | |||||||||
| 29 | is => 'rw', | ||||||||||
| 30 | isa => 'Maybe[W3C::SOAP::WSDL::Document::Message]', | ||||||||||
| 31 | builder => '_header', | ||||||||||
| 32 | lazy => 1, | ||||||||||
| 33 | ); | ||||||||||
| 34 | 5 | has policy => ( | |||||||||
| 35 | is => 'rw', | ||||||||||
| 36 | isa => 'Maybe[Str]', | ||||||||||
| 37 | builder => '_policy', | ||||||||||
| 38 | lazy => 1, | ||||||||||
| 39 | ); | ||||||||||
| 40 | 5 | has body => ( | |||||||||
| 41 | is => 'rw', | ||||||||||
| 42 | isa => 'Maybe[Str]', | ||||||||||
| 43 | builder => '_body', | ||||||||||
| 44 | lazy => 1, | ||||||||||
| 45 | ); | ||||||||||
| 46 | |||||||||||
| 47 | 5 | has dir => ( | |||||||||
| 48 | is => 'rw', | ||||||||||
| 49 | isa => 'Maybe[Str]', | ||||||||||
| 50 | predicate => 'has_dir', | ||||||||||
| 51 | ); | ||||||||||
| 52 | |||||||||||
| 53 | sub _message { | ||||||||||
| 54 | 12 | ▶ | my ($self) = @_; | ||||||||
|
Subroutine
_message: called CC=3 SCAR=11.0
| |||||||||||
| 55 | 12 | my ($ns, $message) = split_ns($self->node->getAttribute('message')); | |||||||||
| 56 | |||||||||||
| 57 | 12 | for my $msg (@{ $self->document->messages }) { | |||||||||
| 58 | 34 | ▶ | return $msg if $msg->name eq $message; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 59 | } | ||||||||||
| 60 | |||||||||||
| 61 | 0 | return; | |||||||||
| 62 | } | ||||||||||
| 63 | |||||||||||
| 64 | sub _header { | ||||||||||
| 65 | 12 | ▶ | my ($self) = @_; | ||||||||
|
Subroutine
_header: called CC=5 SCAR=16.1
| |||||||||||
| 66 | |||||||||||
| 67 | 12 | my $header; | |||||||||
| 68 | 12 | ▶ | if ( $self->parent_node()->has_binding_operation() ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 69 | 12 | my $dir = $self->dir(); | |||||||||
| 70 | 12 | my $bo_node = $self->parent_node()->binding_operation()->node(); | |||||||||
| 71 | |||||||||||
| 72 | 12 | my ($_node) = $self->document->xpc->findnodes("wsdl:$dir/soap:header", $bo_node); | |||||||||
| 73 | |||||||||||
| 74 | 12 | ▶ | if ( defined $_node ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 75 | 4 | my ($ns, $message) = split_ns($_node->getAttribute('message')); | |||||||||
| 76 | |||||||||||
| 77 | HEADER_MESSAGE: | ||||||||||
| 78 | 4 | for my $msg (@{ $self->document->messages }) { | |||||||||
| 79 | 12 | ▶ | if ( $msg->name eq $message ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 80 | 4 | $header = $msg; | |||||||||
| 81 | 4 | last HEADER_MESSAGE; | |||||||||
| 82 | } | ||||||||||
| 83 | } | ||||||||||
| 84 | } | ||||||||||
| 85 | } | ||||||||||
| 86 | 12 | return $header; | |||||||||
| 87 | } | ||||||||||
| 88 | |||||||||||
| 89 | |||||||||||
| 90 | 5 | 1; | |||||||||
| 91 | |||||||||||
| 92 | __END__ | ||||||||||
| 93 | |||||||||||
| 94 | =head1 NAME | ||||||||||
| 95 | |||||||||||
| 96 | W3C::SOAP::WSDL::Document::InOutPuts - Representation of input and output element in a WSDL document | ||||||||||
| 97 | |||||||||||
| 98 | =head1 VERSION | ||||||||||
| 99 | |||||||||||
| 100 | This documentation refers to W3C::SOAP::WSDL::Document::InOutPuts version 0.13. | ||||||||||
| 101 | |||||||||||
| 102 | |||||||||||
| 103 | =head1 SYNOPSIS | ||||||||||
| 104 | |||||||||||
| 105 | use W3C::SOAP::WSDL::Document::InOutPuts; | ||||||||||
| 106 | |||||||||||
| 107 | # Brief but working code example(s) here showing the most common usage(s) | ||||||||||
| 108 | # This section will be as far as many users bother reading, so make it as | ||||||||||
| 109 | # educational and exemplary as possible. | ||||||||||
| 110 | |||||||||||
| 111 | |||||||||||
| 112 | =head1 DESCRIPTION | ||||||||||
| 113 | |||||||||||
| 114 | A C<W3C::SOAP::WSDL::Document::InOutPuts> represents the input and output | ||||||||||
| 115 | tags in a WSDL document | ||||||||||
| 116 | |||||||||||
| 117 | =head1 SUBROUTINES/METHODS | ||||||||||
| 118 | |||||||||||
| 119 | =over 4 | ||||||||||
| 120 | |||||||||||
| 121 | =back | ||||||||||
| 122 | |||||||||||
| 123 | =head1 DIAGNOSTICS | ||||||||||
| 124 | |||||||||||
| 125 | =head1 CONFIGURATION AND ENVIRONMENT | ||||||||||
| 126 | |||||||||||
| 127 | =head1 DEPENDENCIES | ||||||||||
| 128 | |||||||||||
| 129 | =head1 INCOMPATIBILITIES | ||||||||||
| 130 | |||||||||||
| 131 | =head1 BUGS AND LIMITATIONS | ||||||||||
| 132 | |||||||||||
| 133 | There are no known bugs in this module. | ||||||||||
| 134 | |||||||||||
| 135 | Please report problems to Ivan Wills (ivan.wills@gmail.com). | ||||||||||
| 136 | |||||||||||
| 137 | Patches are welcome. | ||||||||||
| 138 | |||||||||||
| 139 | =head1 AUTHOR | ||||||||||
| 140 | |||||||||||
| 141 | Ivan Wills - (ivan.wills@gmail.com) | ||||||||||
| 142 | |||||||||||
| 143 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 144 | |||||||||||
| 145 | Copyright (c) 2012 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). | ||||||||||
| 146 | All rights reserved. | ||||||||||
| 147 | |||||||||||
| 148 | This module is free software; you can redistribute it and/or modify it under | ||||||||||
| 149 | the same terms as Perl itself. See L<perlartistic>. This program is | ||||||||||
| 150 | distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||||||||||
| 151 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||||||||||
| 152 | PARTICULAR PURPOSE. | ||||||||||
| 153 | |||||||||||
| 154 | =cut | ||||||||||