| SOAP-WSDL documentation | Contained in the SOAP-WSDL distribution. |
SOAP::WSDL::Definitions - model a WSDL >definitions< element
Accessors/Mutators for accessing / setting the >service< child element(s).
Returns the service matching the namespace/localname pair passed as arguments.
my $service = $wsdl->find_service($namespace, $localname);
Accessors/Mutators for accessing / setting the >binding< child element(s).
Returns the binding matching the namespace/localname pair passed as arguments.
my $binding = $wsdl->find_binding($namespace, $localname);
Accessors/Mutators for accessing / setting the >portType< child element(s).
Returns the portType matching the namespace/localname pair passed as arguments.
my $portType = $wsdl->find_portType($namespace, $localname);
Accessors/Mutators for accessing / setting the >message< child element(s).
Returns the message matching the namespace/localname pair passed as arguments.
my $message = $wsdl->find_message($namespace, $localname);
Accessors/Mutators for accessing / setting the >types< child element(s).
Copyright 2004-2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself
Martin Kutter <martin.kutter fen-net.de>
$Rev: 851 $ $LastChangedBy: kutterma $ $Id: Definitions.pm 851 2009-05-15 22:45:18Z kutterma $ $HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Definitions.pm $
| SOAP-WSDL documentation | Contained in the SOAP-WSDL distribution. |
package SOAP::WSDL::Definitions; use strict; use warnings; use List::Util qw(first); use Class::Std::Fast::Storable; use base qw(SOAP::WSDL::Base); use version; our $VERSION = qv('2.00.10'); my %types_of :ATTR(:name<types> :default<[]>); my %message_of :ATTR(:name<message> :default<[]>); my %portType_of :ATTR(:name<portType> :default<[]>); my %binding_of :ATTR(:name<binding> :default<[]>); my %service_of :ATTR(:name<service> :default<[]>); my %namespace_of :ATTR(:name<namespace> :default<()>); # must be attr for Class::Std::Fast::Storable #my %attributes_of :ATTR(); my %attributes_of = ( binding => \%binding_of, message => \%message_of, portType => \%portType_of, service => \%service_of, ); # Function factory - we could be writing this method for all %attribute # keys, too, but that's just C&P (eehm, Copy & Paste...) BLOCK: { foreach my $method(keys %attributes_of ) { no strict qw/refs/; ## no critic ProhibitNoStrict *{ "find_$method" } = sub { my ($self, @args_from) = @_; @args_from = @{ $args_from[0] } if ref $args_from[0] eq 'ARRAY'; return first { $_->get_targetNamespace() eq $args_from[0] && $_->get_name() eq $args_from[1] } @{ $attributes_of{ $method }->{ ident $self } }; }; } } 1;