ASNMTAP
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/ASNMTAP/Asnmtap/Plugins/SOAP.pm view on Meta::CPAN
# ----------------------------------------------------------------------------------------------------------
# © Copyright 2000-2011 by Alex Peeters [alex.peeters@citap.be]
# ----------------------------------------------------------------------------------------------------------
# 2011/mm/dd, v3.002.003, package ASNMTAP::Asnmtap::Plugins::SOAP Object-Oriented Perl
# ----------------------------------------------------------------------------------------------------------
# Class name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
package ASNMTAP::Asnmtap::Plugins::SOAP;
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
use strict;
use warnings; # Must be used in test mode only. This reduces a little process speed
#use diagnostics; # Must be used in test mode only. This reduces a lot of process speed
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
use Carp qw(cluck);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
use ASNMTAP::Asnmtap qw(%ERRORS %TYPE);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BEGIN {
use Exporter ();
@ASNMTAP::Asnmtap::Plugins::SOAP::ISA = qw(Exporter ASNMTAP::Asnmtap);
%ASNMTAP::Asnmtap::Plugins::SOAP::EXPORT_TAGS = ( ALL => [ qw(&get_soap_request) ] );
@ASNMTAP::Asnmtap::Plugins::SOAP::EXPORT_OK = ( @{ $ASNMTAP::Asnmtap::Plugins::SOAP::EXPORT_TAGS{ALL} } );
$ASNMTAP::Asnmtap::Plugins::SOAP::VERSION = do { my @r = (q$Revision: 3.002.003$ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
}
# Utility methods - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub get_soap_request {
my %defaults = ( asnmtapInherited => undef,
custom => undef,
customArguments => undef,
proxy => undef,
credentials => undef,
namespace => undef,
registerNamespace => undef,
method => undef,
soapaction => undef,
xmlContent => undef,
params => undef,
envprefix => 'soapenv',
encprefix => 'soapenc',
encodingStyle => undef,
readable => 1,
cookies => undef,
perfdataLabel => undef,
PATCH_HTTP_KEEPALIVE => 0,
WSRF => 0,
TYPE_ERROR_RETURN => 'REPLACE'
);
my %parms = (%defaults, @_);
my $asnmtapInherited = $parms{asnmtapInherited};
unless ( defined $asnmtapInherited ) { cluck ( 'ASNMTAP::Asnmtap::Plugins::SOAP: asnmtapInherited missing' ); exit $ERRORS{UNKNOWN} }
unless ( defined $parms{proxy} ) {
$$asnmtapInherited->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => 'Missing SOAP parameter proxy' }, $TYPE{APPEND} );
return ( $ERRORS{UNKNOWN} );
}
my $namespace = $parms{namespace};
unless ( defined $namespace ) {
$$asnmtapInherited->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => 'Missing SOAP parameter namespace' }, $TYPE{APPEND} );
return ( $ERRORS{UNKNOWN} );
}
my $registerNamespace = $parms{registerNamespace};
if ( defined $registerNamespace ) {
unless ( ref $registerNamespace eq 'HASH' ) {
$$asnmtapInherited->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => 'Missing SOAP parameter registerNamespace' }, $TYPE{APPEND} );
return ( $ERRORS{UNKNOWN} );
}
}
unless ( defined $parms{method} ) {
$$asnmtapInherited->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => 'Missing SOAP parameter method' }, $TYPE{APPEND} );
return ( $ERRORS{UNKNOWN} );
}
my $soapaction = $parms{soapaction};
my $xmlContent = $parms{xmlContent};
my $params = $parms{params};
my $readable = $parms{readable};
my $envprefix = $parms{envprefix};
view all matches for this distributionview release on metacpan - search on metacpan
( run in 3.025 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-72ae3ad1e6da )