| 1 | package SOAP::WSDL::Definitions; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use List::Util qw(first); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Class::Std::Fast::Storable; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use base qw(SOAP::WSDL::Base); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | our $VERSION = 3.004; | |||||||||
| 9 | |||||||||||
| 10 | 1 | my %types_of :ATTR(:name<types> :default<[]>); | |||||||||
| 11 | 1 | my %message_of :ATTR(:name<message> :default<[]>); | |||||||||
| 12 | 1 | my %portType_of :ATTR(:name<portType> :default<[]>); | |||||||||
| 13 | 1 | my %binding_of :ATTR(:name<binding> :default<[]>); | |||||||||
| 14 | 1 | my %service_of :ATTR(:name<service> :default<[]>); | |||||||||
| 15 | 1 | my %namespace_of :ATTR(:name<namespace> :default<()>); | |||||||||
| 16 | |||||||||||
| 17 | # must be attr for Class::Std::Fast::Storable | ||||||||||
| 18 | #my %attributes_of :ATTR(); | ||||||||||
| 19 | 1 | my %attributes_of = ( | |||||||||
| 20 | binding => \%binding_of, | ||||||||||
| 21 | message => \%message_of, | ||||||||||
| 22 | portType => \%portType_of, | ||||||||||
| 23 | service => \%service_of, | ||||||||||
| 24 | ); | ||||||||||
| 25 | |||||||||||
| 26 | # Function factory - we could be writing this method for all %attribute | ||||||||||
| 27 | # keys, too, but that's just C&P (eehm, Copy & Paste...) | ||||||||||
| 28 | BLOCK: { | ||||||||||
| 29 | 1 | foreach my $method(keys %attributes_of ) { | |||||||||
| 30 | 1 | ▶ | no strict qw/refs/; ## no critic ProhibitNoStrict | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 31 | 4 | ▶ | *{ "find_$method" } = sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.1
| |||||||||||
| 32 | 3 | my ($self, @args_from) = @_; | |||||||||
| 33 | 0 | ▶ | @args_from = @{ $args_from[0] } if ref $args_from[0] eq 'ARRAY'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 8 | ▶ | return first { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 35 | 8 | ▶ | $_->get_targetNamespace() eq $args_from[0] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | && $_->get_name() eq $args_from[1] | ||||||||||
| 37 | } | ||||||||||
| 38 | 3 | @{ $attributes_of{ $method }->{ ident $self } }; | |||||||||
| 39 | 4 | }; | |||||||||
| 40 | } | ||||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | |||||||||||
| 44 | 1 | 1; | |||||||||
| 45 | |||||||||||
| 46 | =pod | ||||||||||
| 47 | |||||||||||
| 48 | =head1 NAME | ||||||||||
| 49 | |||||||||||
| 50 | SOAP::WSDL::Definitions - model a WSDL E<gt>definitionsE<lt> element | ||||||||||
| 51 | |||||||||||
| 52 | =head1 DESCRIPTION | ||||||||||
| 53 | |||||||||||
| 54 | =head1 METHODS | ||||||||||
| 55 | |||||||||||
| 56 | =head2 first_service get_service set_service push_service | ||||||||||
| 57 | |||||||||||
| 58 | Accessors/Mutators for accessing / setting the E<gt>serviceE<lt> child | ||||||||||
| 59 | element(s). | ||||||||||
| 60 | |||||||||||
| 61 | =head2 find_service | ||||||||||
| 62 | |||||||||||
| 63 | Returns the service matching the namespace/localname pair passed as arguments. | ||||||||||
| 64 | |||||||||||
| 65 | my $service = $wsdl->find_service($namespace, $localname); | ||||||||||
| 66 | |||||||||||
| 67 | =head2 first_binding get_binding set_binding push_binding | ||||||||||
| 68 | |||||||||||
| 69 | Accessors/Mutators for accessing / setting the E<gt>bindingE<lt> child | ||||||||||
| 70 | element(s). | ||||||||||
| 71 | |||||||||||
| 72 | =head2 find_binding | ||||||||||
| 73 | |||||||||||
| 74 | Returns the binding matching the namespace/localname pair passed as arguments. | ||||||||||
| 75 | |||||||||||
| 76 | my $binding = $wsdl->find_binding($namespace, $localname); | ||||||||||
| 77 | |||||||||||
| 78 | =head2 first_portType get_portType set_portType push_portType | ||||||||||
| 79 | |||||||||||
| 80 | Accessors/Mutators for accessing / setting the E<gt>portTypeE<lt> child | ||||||||||
| 81 | element(s). | ||||||||||
| 82 | |||||||||||
| 83 | =head2 find_portType | ||||||||||
| 84 | |||||||||||
| 85 | Returns the portType matching the namespace/localname pair passed as arguments. | ||||||||||
| 86 | |||||||||||
| 87 | my $portType = $wsdl->find_portType($namespace, $localname); | ||||||||||
| 88 | |||||||||||
| 89 | =head2 first_message get_message set_message push_message | ||||||||||
| 90 | |||||||||||
| 91 | Accessors/Mutators for accessing / setting the E<gt>messageE<lt> child | ||||||||||
| 92 | element(s). | ||||||||||
| 93 | |||||||||||
| 94 | =head2 find_message | ||||||||||
| 95 | |||||||||||
| 96 | Returns the message matching the namespace/localname pair passed as arguments. | ||||||||||
| 97 | |||||||||||
| 98 | my $message = $wsdl->find_message($namespace, $localname); | ||||||||||
| 99 | |||||||||||
| 100 | =head2 first_types get_types set_types push_types | ||||||||||
| 101 | |||||||||||
| 102 | Accessors/Mutators for accessing / setting the E<gt>typesE<lt> child | ||||||||||
| 103 | element(s). | ||||||||||
| 104 | |||||||||||
| 105 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 106 | |||||||||||
| 107 | Copyright 2004-2007 Martin Kutter. | ||||||||||
| 108 | |||||||||||
| 109 | This file is part of SOAP-WSDL. You may distribute/modify it under | ||||||||||
| 110 | the same terms as perl itself | ||||||||||
| 111 | |||||||||||
| 112 | =head1 AUTHOR | ||||||||||
| 113 | |||||||||||
| 114 | Martin Kutter E<lt>martin.kutter fen-net.deE<gt> | ||||||||||
| 115 | |||||||||||
| 116 | =head1 REPOSITORY INFORMATION | ||||||||||
| 117 | |||||||||||
| 118 | $Rev: 851 $ | ||||||||||
| 119 | $LastChangedBy: kutterma $ | ||||||||||
| 120 | $Id: Definitions.pm 851 2009-05-15 22:45:18Z kutterma $ | ||||||||||
| 121 | $HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Definitions.pm $ | ||||||||||
| 122 | |||||||||||
| 123 | =cut | ||||||||||
| 124 | |||||||||||