Gantry::Plugins::SOAP::Doc

Gantry::Plugins::SOAP::Doc is a Perl module that offers document style SOAP support.
Download

Gantry::Plugins::SOAP::Doc Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Phil Crow and Tim Keefer
  • Publisher web site:
  • http://search.cpan.org/~tkeefer/

Gantry::Plugins::SOAP::Doc Tags


Gantry::Plugins::SOAP::Doc Description

Gantry::Plugins::SOAP::Doc is a Perl module that offers document style SOAP support. Gantry::Plugins::SOAP::Doc is a Perl module that offers document style SOAP support.SYNOPSISIn a controller: use Your::App::BaseModule qw( -PluginNamespace=YourApp SOAP::Doc ); # This exports these into the site object: # soap_out # do_wsdl # return_error do_a_soap_action { my $self = shift; my $data = $self->get_post_body(); my $parsed_data = XMLin( $data ); # Use data to process the request, until you have a # structure like: my $ret_struct = } ] } ] ); return $self->soap_out( $ret_struct, 'prefix', 'pretty' ); }This module supports document style SOAP. If you need rpc style, see Gantry::Plugins::SOAP::RPC.This module must be used as a plugin, so it can register a pre_init callback to take the POSTed body from the HTTP request before the engine can mangle it, in a vain attempt to make form parameters from it.The document style SOAP request must find its way to your do_ method via its soap_action URL and Gantry's normal dispatching mechanism. Once the do_ method is called, your SOAP request is available via the get_post_body accessor exported by each engine. That request is exactly as received. You probably want to use XML::Simple's XMLin function to extract your data. I would do that for you here, but you might need to set attributes of the parsing like ForceArray.When you have finished processing the request, you have two choices. If it did not go well, call return_error to deliver a SOAP fault to client. Using die or croak is a bad idea as that will return a regular Gantry error message which is obviously not SOAP compliant.If you succeeded in handling the request, return an array of hashes. Each hash is keyed by XML tag (not including namespace prefix). The value can be a scalar or an array of hashes like the top level one. If the value is undef, an empty tag will be generated.Generally, you need to take all of the exports from this module, unless you want to replace them with your own versions. Requirements: · Perl


Gantry::Plugins::SOAP::Doc Related Software