Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Gantry::Plugins::SOAP::Doc 3.51

    Download button

    No screenshots available
    Downloads: 423  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Very Good (4.0/5)
    13 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Phil Crow and Tim Keefer | More programs
    Perl Artistic License / FREE
    June 5th, 2008, 11:53 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    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.

    SYNOPSIS

    In 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 = [
    {
    yourResponseType => [
    { var => value },
    { var2 => value2 },
    { var3 => undef }, # for required empty tags
    { nesting_var => [
    { subvar => value },
    ] }
    ]
    }
    ] );

    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.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    SOAP support | Gantry plugin | Perl module | Gantry | plugin | SOAP

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM