Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    POE::Component::Server::SOAP 1.14

    Download button

    No screenshots available
    Downloads: 255  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Apocalypse | More programs
    Perl Artistic License / FREE
    December 17th, 2009, 00:30 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    POE::Component::Server::SOAP description

    Publish POE event handlers via SOAP over HTTP

    POE::Component::Server::SOAP is a Perl module that makes serving SOAP/1.1 requests a breeze in POE.

    The hardest thing to understand in this module is the SOAP Body. That's it!

    The standard way to use this module is to do this:

     use POE;
     use POE::Component::Server::SOAP;

     POE::Component::Server::SOAP->new( ... );

     POE::Session->create( ... );

     POE::Kernel->run();


    POE::Component::Server::SOAP is a bolt-on component that can publish event handlers via SOAP over HTTP. Currently, this module only supports SOAP/1.1 requests, work will be done in the future to support SOAP/1.2 requests. The HTTP server is done via POE::Component::Server::SimpleHTTP.

    SYNOPSIS

     use POE;
     use POE::Component::Server::SOAP;

     POE::Component::Server::SOAP->new(
     'ALIAS' => 'MySOAP',
     'ADDRESS' => 'localhost',
     'PORT' => 32080,
     'HOSTNAME' => 'MyHost.com',
     );

     POE::Session->create(
     'inline_states' => {
     '_start' => &setup_service,
     '_stop' => &shutdown_service,
     'Sum_Things' => &do_sum,
     },
     );

     $poe_kernel->run;
     exit 0;

     sub setup_service {
     my $kernel = $_[KERNEL];
     $kernel->alias_set( 'MyServer' );
     $kernel->post( 'MySOAP', 'ADDMETHOD', 'MyServer', 'Sum_Things' );
     }

     sub shutdown_service {
     $_[KERNEL]->post( 'MySOAP', 'DELMETHOD', 'MyServer', 'Sum_Things' );
     }

     sub do_sum {
     my $response = $_[ARG0];
     my $params = $response->soapbody;
     my $sum = 0;
     while (my ($field, $value) = each(%$params)) {
     $sum += $value;
     }

     # Fake an error
     if ( $sum < 100 ) {
     $_[KERNEL]->post( 'MySOAP', 'FAULT', $response, 'Client.Add.Error', 'The sum must be above 100' );
     } else {
     # Add the content
     $response->content( "Thanks. Sum is: $sum" );
     $_[KERNEL]->post( 'MySOAP', 'DONE', $response );
     }
     }



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    POE event | event handlers | Perl module | POE | event | handlers

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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