ASNMTAP::Asnmtap::Plugins::SOAP

ASNMTAP::Asnmtap::Plugins::SOAP is a Perl module that provides SOAP functions used by ASNMTAP-based plugins.
Download

ASNMTAP::Asnmtap::Plugins::SOAP Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Alex Peeters
  • Publisher web site:
  • http://search.cpan.org/~asnmtap/ASNMTAP-3.000015/lib/ASNMTAP/Asnmtap/Applications/CGI.pod

ASNMTAP::Asnmtap::Plugins::SOAP Tags


ASNMTAP::Asnmtap::Plugins::SOAP Description

ASNMTAP::Asnmtap::Plugins::SOAP is a Perl module that provides SOAP functions used by ASNMTAP-based plugins. ASNMTAP::Asnmtap::Plugins::SOAP is a Perl module that provides SOAP functions used by ASNMTAP-based plugins.SYNOPSIS use ASNMTAP::Asnmtap::Plugins v3.000.010; use ASNMTAP::Asnmtap::Plugins qw(:PLUGINS); my $objectPlugins = ASNMTAP::Asnmtap::Plugins->new ( _programName => 'check_template-SOAP.pl', _programDescription => "SOAP::LITE plugin template for testing the '$APPLICATION' with Performance Data", _programVersion => '3.000.010', _programGetOptions => , _timeout => 30, _debug => 0); use ASNMTAP::Asnmtap::Plugins::SOAP qw(&get_soap_request); use SOAP::Lite; my $proxy = 'http://services.soaplite.com/hibye.cgi'; my $namespace = 'http://www.soaplite.com/Demo'; my $methodName = 'hi'; my $method = SOAP::Data->name($methodName)->attr( {xmlns => $namespace} ); my %soapService_Register_NS = ( 'http://schemas.xmlsoap.org/wsdl/mime/' => 'mime', 'http://www.w3.org/2001/XMLSchema' => 's' ); my $xmlContent; my $params; my ($returnCode, $xml) = get_soap_request ( asnmtapInherited => $objectPlugins, proxy => $proxy, namespace => $namespace, method => $method, registerNamespace => %soapService_Register_NS, xmlContent => $xmlContent, params => $params, cookies => 1, perfdataLabel => 'SOAP' ); unless ( $returnCode ) { if (defined $xml) { ... } else { ... } } $objectPlugins->exit (7);SOAP::Lite for Perl is a collection of Perl modules which provides a simple and lightweight interface to the Simple Object Access Protocol (SOAP, also known as Service Oriented Access Protocol) both on client and server side.get_soap_request()SOAP is a simple XML-based protocol to let applications exchange information over HTTP.More information regarding SOAP can be find at URI: http://www.w3schools.com/soap/Returns a status for $returnCode (OK..UNKNOWN) and when the status is OK for $xml the extracted XML if exists, otherwise undef.asnmtapInheritedA required reference to an ASNMTAP::Asnmtap::Plugins or ASNMTAP::Asnmtap::Plugins::Nagios subclassThrough this way of working we inherited the command line option --debug.customoptional, is an reference to your own custom defined function$som: the SOM object provides a simple API for accessing any aspect of the response's SOAP envelope, a result object from SOAP::Lite. sub actionOnSoapResponse { my ($asnmtapInherited, $som) = @_; return ($returnCode); }and now with customArguments: sub actionOnSoapResponse { my ($asnmtapInherited, $som, $arguments) = @_; return ($returnCode); }customArgumentsoptional, when you need to pass parameters to your own custom defined function, this can be done with customArguments. customArguments: SCALAR, ARRAY, HASH, REF SCALAR, REF ARRAY, REF HASHproxyThis lets you specify an endpoint (service address) and also loads the required module at the same time. proxy: 'http://services.soaplite.com/hibye.cgi'a required scalar.namespaceSets the URI that will be used as the namespace for the resulting XML entity. namespace: 'http://www.soaplite.com/Demo'a required scalar.registerNamespaceThe register_ns subroutine allows users to register a global namespace with the SOAP Envelope. registerNamespace: %soapService_Register_NS = ( 'http://schemas.xmlsoap.org/wsdl/mime/' => 'mime', 'http://www.w3.org/2001/XMLSchema' => 's' );a required hash.methodThe name is what the serializer will use for the tag when generating the XML for this object. method: SOAP::Data->name(hi)->attr( {xmlns => 'http://www.soaplite.com/Demo'} );a required SOAP::Data->name definition Requirements: · Perl


ASNMTAP::Asnmtap::Plugins::SOAP Related Software