POE-Component-Server-SOAP-1.14/0000755000175000017500000000000011141457064014457 5ustar apocapocPOE-Component-Server-SOAP-1.14/lib/0000755000175000017500000000000011141457064015225 5ustar apocapocPOE-Component-Server-SOAP-1.14/lib/POE/0000755000175000017500000000000011141457064015650 5ustar apocapocPOE-Component-Server-SOAP-1.14/lib/POE/Component/0000755000175000017500000000000011141457064017612 5ustar apocapocPOE-Component-Server-SOAP-1.14/lib/POE/Component/Server/0000755000175000017500000000000011141457064021060 5ustar apocapocPOE-Component-Server-SOAP-1.14/lib/POE/Component/Server/SOAP/0000755000175000017500000000000011141457064021622 5ustar apocapocPOE-Component-Server-SOAP-1.14/lib/POE/Component/Server/SOAP/Response.pm0000444000175000017500000000424311141457064023757 0ustar apocapoc# $Id: Response.pm 82 2008-08-08 01:30:59Z larwan $ package POE::Component::Server::SOAP::Response; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '1.14'; # Set our stuff to SimpleHTTP::Response use base qw( POE::Component::Server::SimpleHTTP::Response ); # Accessor for SOAP Service name sub soapservice { return shift->{'SOAPSERVICE'}; } # Accessor for SOAP Method name sub soapmethod { return shift->{'SOAPMETHOD'}; } # Accessor for SOAP Headers sub soapheaders { return shift->{'SOAPHEADERS'}; } # Accessor for SOAP Body sub soapbody { return shift->{'SOAPBODY'}; } # Accessor for SOAP URI sub soapuri { return shift->{'SOAPURI'}; } # Accessor for the original HTTP::Request object sub soaprequest { return shift->{'SOAPREQUEST'}; } # End of module 1; __END__ =head1 NAME POE::Component::Server::SOAP::Response - Emulates a SimpleHTTP::Response object, used to store SOAP data =head1 SYNOPSIS use POE::Component::Server::SOAP; # Get the response object from SOAP my $response = $_[ARG0]; print $response->soapmethod; =head1 DESCRIPTION This module is used as a drop-in replacement, because we need to store some SOAP data for the response. =head2 METHODS # Get the response object from SOAP my $response = $_[ARG0]; $response->soaprequest() # Returns the original HTTP::Request object from SimpleHTTP $response->soapservice() # Returns the service that triggered this SOAP instance $response->soapmethod() # Returns the method that triggered this SOAP instance $response->soapuri() # Returns the original URI of the request without the method $response->soapheaders() # Returns an arrayref of SOAP::Header objects ( undef if none ) $response->soapbody() # Returns the body as a hashref ( undef if no arguments ) =head2 EXPORT Nothing. =head1 SEE ALSO L L L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut POE-Component-Server-SOAP-1.14/lib/POE/Component/Server/SOAP.pm0000444000175000017500000010202311141457064022154 0ustar apocapoc# $Id: SOAP.pm 83 2008-08-08 01:37:07Z larwan $ package POE::Component::Server::SOAP; use strict; use warnings; # Initialize our version $LastChangedRevision: 83 $ use vars qw( $VERSION ); $VERSION = '1.14'; use Carp qw(croak); # Import the proper POE stuff use POE; use POE::Session; use POE::Component::Server::SimpleHTTP; # We need SOAP stuff use SOAP::Lite; use SOAP::Constants; # Our own modules use POE::Component::Server::SOAP::Response; # Set some constants BEGIN { if ( ! defined &DEBUG ) { *DEBUG = sub () { 0 } } } # Create a new instance sub new { # Get the OOP's type my $type = shift; # Sanity checking if ( @_ & 1 ) { croak( 'POE::Component::Server::SOAP->new needs even number of options' ); } # The options hash my %opt = @_; # Our own options my ( $ALIAS, $ADDRESS, $PORT, $HEADERS, $HOSTNAME, $MUSTUNDERSTAND, $SIMPLEHTTP ); # You could say I should do this: $Stuff = delete $opt{'Stuff'} # But, that kind of behavior is not defined, so I would not trust it... # Get the session alias if ( exists $opt{'ALIAS'} and defined $opt{'ALIAS'} and length( $opt{'ALIAS'} ) ) { $ALIAS = $opt{'ALIAS'}; delete $opt{'ALIAS'}; } else { # Debugging info... if ( DEBUG ) { warn 'Using default ALIAS = SOAPServer'; } # Set the default $ALIAS = 'SOAPServer'; # Remove any lingering ALIAS if ( exists $opt{'ALIAS'} ) { delete $opt{'ALIAS'}; } } # Get the PORT if ( exists $opt{'PORT'} and defined $opt{'PORT'} and length( $opt{'PORT'} ) ) { $PORT = $opt{'PORT'}; delete $opt{'PORT'}; } else { # Debugging info... if ( DEBUG ) { warn 'Using default PORT = 80'; } # Set the default $PORT = 80; # Remove any lingering PORT if ( exists $opt{'PORT'} ) { delete $opt{'PORT'}; } } # Get the ADDRESS if ( exists $opt{'ADDRESS'} and defined $opt{'ADDRESS'} and length( $opt{'ADDRESS'} ) ) { $ADDRESS = $opt{'ADDRESS'}; delete $opt{'ADDRESS'}; } else { croak( 'ADDRESS is required to create a new POE::Component::Server::SOAP instance!' ); } # Get the HEADERS if ( exists $opt{'HEADERS'} and defined $opt{'HEADERS'} ) { # Make sure it is ref to hash if ( ref $opt{'HEADERS'} and ref( $opt{'HEADERS'} ) eq 'HASH' ) { $HEADERS = $opt{'HEADERS'}; delete $opt{'HEADERS'}; } else { croak( 'HEADERS must be a reference to a HASH!' ); } } else { # Debugging info... if ( DEBUG ) { warn 'Using default HEADERS ( SERVER => POE::Component::Server::SOAP/' . $VERSION . ' )'; } # Set the default $HEADERS = { 'Server' => 'POE::Component::Server::SOAP/' . $VERSION, }; # Remove any lingering HEADERS if ( exists $opt{'HEADERS'} ) { delete $opt{'HEADERS'}; } } # Get the HOSTNAME if ( exists $opt{'HOSTNAME'} and defined $opt{'HOSTNAME'} and length( $opt{'HOSTNAME'} ) ) { $HOSTNAME = $opt{'HOSTNAME'}; delete $opt{'HOSTNAME'}; } else { # Debugging info... if ( DEBUG ) { warn 'Letting POE::Component::Server::SimpleHTTP create a default HOSTNAME'; } # Set the default $HOSTNAME = undef; # Remove any lingering HOSTNAME if ( exists $opt{'HOSTNAME'} ) { delete $opt{'HOSTNAME'}; } } # Get the MUSTUNDERSTAND if ( exists $opt{'MUSTUNDERSTAND'} and defined $opt{'MUSTUNDERSTAND'} and length( $opt{'MUSTUNDERSTAND'} ) ) { $MUSTUNDERSTAND = $opt{'MUSTUNDERSTAND'}; delete $opt{'MUSTUNDERSTAND'}; } else { # Debugging info... if ( DEBUG ) { warn 'Using default MUSTUNDERSTAND ( 1 )'; } # Set the default $MUSTUNDERSTAND = 1; # Remove any lingering MUSTUNDERSTAND if ( exists $opt{'MUSTUNDERSTAND'} ) { delete $opt{'MUSTUNDERSTAND'}; } } # Get the SIMPLEHTTP if ( exists $opt{'SIMPLEHTTP'} and defined $opt{'SIMPLEHTTP'} and ref( $opt{'SIMPLEHTTP'} ) eq 'HASH' ) { $SIMPLEHTTP = $opt{'SIMPLEHTTP'}; delete $opt{'SIMPLEHTTP'}; } # Anything left over is unrecognized if ( DEBUG ) { if ( keys %opt > 0 ) { croak( 'Unrecognized options were present in POE::Component::Server::SOAP->new -> ' . join( ', ', keys %opt ) ); } } # Create the POE Session! POE::Session->create( 'inline_states' => { # Generic stuff '_start' => \&StartServer, '_stop' => sub {}, '_child' => \&SmartShutdown, # Shuts down the server 'SHUTDOWN' => \&StopServer, 'STOPLISTEN' => \&StopListen, 'STARTLISTEN' => \&StartListen, # Adds/deletes Methods 'ADDMETHOD' => \&AddMethod, 'DELMETHOD' => \&DeleteMethod, 'DELSERVICE' => \&DeleteService, # Transaction handlers 'Got_Request' => \&TransactionStart, 'FAULT' => \&TransactionFault, 'RAWFAULT' => \&TransactionFault, 'DONE' => \&TransactionDone, 'RAWDONE' => \&TransactionDone, 'CLOSE' => \&TransactionClose, }, # Our own heap 'heap' => { 'INTERFACES' => {}, 'ALIAS' => $ALIAS, 'ADDRESS' => $ADDRESS, 'PORT' => $PORT, 'HEADERS' => $HEADERS, 'HOSTNAME' => $HOSTNAME, 'MUSTUNDERSTAND' => $MUSTUNDERSTAND, 'SIMPLEHTTP' => $SIMPLEHTTP, }, ) or die 'Unable to create a new session!'; # Return success return 1; } # Creates the server sub StartServer { # Set the alias $_[KERNEL]->alias_set( $_[HEAP]->{'ALIAS'} ); # Create the webserver! POE::Component::Server::SimpleHTTP->new( 'ALIAS' => $_[HEAP]->{'ALIAS'} . '-BACKEND', 'ADDRESS' => $_[HEAP]->{'ADDRESS'}, 'PORT' => $_[HEAP]->{'PORT'}, 'HOSTNAME' => $_[HEAP]->{'HOSTNAME'}, 'HEADERS' => $_[HEAP]->{'HEADERS'}, 'HANDLERS' => [ { 'DIR' => '.*', 'SESSION' => $_[HEAP]->{'ALIAS'}, 'EVENT' => 'Got_Request', }, ], ( defined $_[HEAP]->{'SIMPLEHTTP'} ? ( %{ $_[HEAP]->{'SIMPLEHTTP'} } ) : () ), ) or die 'Unable to create the HTTP Server'; # Success! return; } # Shuts down the server sub StopServer { # Tell the webserver to die! if ( defined $_[ARG0] and $_[ARG0] eq 'GRACEFUL' ) { # Shutdown gently... $_[KERNEL]->call( $_[HEAP]->{'ALIAS'} . '-BACKEND', 'SHUTDOWN', 'GRACEFUL' ); } else { # Shutdown NOW! $_[KERNEL]->call( $_[HEAP]->{'ALIAS'} . '-BACKEND', 'SHUTDOWN' ); } # Success! return; } # Stops listening for connections sub StopListen { # Tell the webserver this! $_[KERNEL]->call( $_[HEAP]->{'ALIAS'} . '-BACKEND', 'STOPLISTEN' ); # Success! return; } # Starts listening for connections sub StartListen { # Tell the webserver this! $_[KERNEL]->call( $_[HEAP]->{'ALIAS'} . '-BACKEND', 'STARTLISTEN' ); # Success! return; } # Watches for SimpleHTTP shutting down and shuts down ourself sub SmartShutdown { # ARG0 = type, ARG1 = ref to session, ARG2 = parameters # Check for real shutdown if ( $_[ARG0] eq 'lose' ) { # Remove our alias $_[KERNEL]->alias_remove( $_[HEAP]->{'ALIAS'} ); # Debug stuff if ( DEBUG ) { warn 'Received _child event from SimpleHTTP, shutting down'; } } # All done! return; } # Adds a method sub AddMethod { # ARG0: Session alias, ARG1: Session event, ARG2: Service name, ARG3: Method name my( $alias, $event, $service, $method ); # Check for stuff! if ( defined $_[ARG0] and length( $_[ARG0] ) ) { $alias = $_[ARG0]; } else { # Complain! if ( DEBUG ) { warn 'Did not get a Session Alias'; } return; } if ( defined $_[ARG1] and length( $_[ARG1] ) ) { $event = $_[ARG1]; } else { # Complain! if ( DEBUG ) { warn 'Did not get a Session Event'; } return; } # If none, defaults to the Session stuff if ( defined $_[ARG2] and length( $_[ARG2] ) ) { $service = $_[ARG2]; } else { # Debugging stuff if ( DEBUG ) { warn 'Using Session Alias as Service Name'; } $service = $alias; } if ( defined $_[ARG3] and length( $_[ARG3] ) ) { $method = $_[ARG3]; } else { # Debugging stuff if ( DEBUG ) { warn 'Using Session Event as Method Name'; } $method = $event; } # If we are debugging, check if we overwrote another method if ( DEBUG ) { if ( exists $_[HEAP]->{'INTERFACES'}->{ $service } ) { if ( exists $_[HEAP]->{'INTERFACES'}->{ $service }->{ $method } ) { warn 'Overwriting old method entry in the registry ( ' . $service . ' -> ' . $method . ' )'; } } } # Add it to our INTERFACES $_[HEAP]->{'INTERFACES'}->{ $service }->{ $method } = [ $alias, $event ]; # Return success return 1; } # Deletes a method sub DeleteMethod { # ARG0: Service name, ARG1: Service method name my( $service, $method ) = @_[ ARG0, ARG1 ]; # Validation if ( defined $service and length( $service ) ) { # Validation if ( defined $method and length( $method ) ) { # Validation if ( exists $_[HEAP]->{'INTERFACES'}->{ $service }->{ $method } ) { # Delete it! delete $_[HEAP]->{'INTERFACES'}->{ $service }->{ $method }; # Check to see if the service now have no methods if ( keys( %{ $_[HEAP]->{'INTERFACES'}->{ $service } } ) == 0 ) { # Debug stuff if ( DEBUG ) { warn "Service $service contains no methods, removing it!"; } # Delete it! delete $_[HEAP]->{'INTERFACES'}->{ $service }; } # Return success return 1; } else { # Error! if ( DEBUG ) { warn 'Tried to delete a nonexistant Method in Service -> ' . $service . ' : ' . $method; } } } else { # Complain! if ( DEBUG ) { warn 'Did not get a method to delete in Service -> ' . $service; } } } else { # No arguments! if ( DEBUG ) { warn 'Received no arguments!'; } } return; } # Deletes a service sub DeleteService { # ARG0: Service name my( $service ) = $_[ ARG0 ]; # Validation if ( defined $service and length( $service ) ) { # Validation if ( exists $_[HEAP]->{'INTERFACES'}->{ $service } ) { # Delete it! delete $_[HEAP]->{'INTERFACES'}->{ $service }; # Return success! return 1; } else { # Error! if ( DEBUG ) { warn 'Tried to delete a Service that does not exist! -> ' . $service; } } } else { # No arguments! if ( DEBUG ) { warn 'Received no arguments!'; } } return; } # Got a request, handle it! sub TransactionStart { # ARG0 = HTTP::Request, ARG1 = HTTP::Response, ARG2 = dir that matched my ( $request, $response ) = @_[ ARG0, ARG1 ]; # Check for error in parsing of request if ( ! defined $request ) { # Create a new error and send it off! $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_CLIENT, 'Bad Request', 'Unable to parse HTTP query', ); return; } # We only handle text/xml content if ( ! $request->header('Content-Type') || $request->header('Content-Type') !~ /^text\/xml(;.*)?$/ ) { # Create a new error and send it off! $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_CLIENT, 'Bad Request', 'Content-Type must be text/xml', ); return; } # We need the method name my $soap_method_name = $request->header('SOAPAction'); if ( ! defined $soap_method_name or ! length( $soap_method_name ) ) { # Create a new error and send it off! $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_CLIENT, 'Bad Request', 'SOAPAction is required', ); return; } # Get some stuff my $query_string = $request->uri->query(); if ( ! defined $query_string or $query_string !~ /\bsession=(.+ $ )/x ) { # Create a new error and send it off! $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_CLIENT, 'Bad Request', 'Unable to parse the URI for the service', ); return; } # Get the service my $service = $1; # Check to see if this service exists if ( ! exists $_[HEAP]->{'INTERFACES'}->{ $service } ) { # Create a new error and send it off! $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_CLIENT, 'Bad Request', "Unknown service: $service", ); return; } # Get the method name if ( $soap_method_name !~ /^([\"\']?)(\S+)\#(\S+)\1$/ ) { # Create a new error and send it off! $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_CLIENT, 'Bad Request', "Unrecognized SOAPAction header: $soap_method_name", ); return; } # Get the uri + method my $soapuri = $2; my $method = $3; # Check to see if this method exists if ( ! exists $_[HEAP]->{'INTERFACES'}->{ $service }->{ $method } ) { # Create a new error and send it off! $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_CLIENT, 'Bad Request', "Unknown method: $method", ); return; } # Actually parse the SOAP query! my $som_object; eval { $som_object = SOAP::Deserializer->deserialize( $request->content() ) }; ## no critic ( RequireExplicitInclusion ) # Check for errors if ( $@ ) { # Check for special case: VERSION_MISMATCH if ( $@ =~ /^$SOAP::Constants::WRONG_VERSION/ ) { # Create a version mismatch Fault $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_VERSION_MISMATCH, $SOAP::Constants::WRONG_VERSION, ); } else { # Create a new error and send it off! $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_SERVER, 'Application Faulted', "Failed while unmarshaling the request: $@", ); } # All done! return; } # Check the headers for the mustUnderstand attribute, and Fault if it is present my $head_count = 1; my @headers = (); while ( 1 ) { # Get the header my $hdr = $som_object->headerof( SOAP::SOM::header . "/[$head_count]" ); ## no critic ( RequireExplicitInclusion ) # Check if it is defined if ( ! defined $hdr ) { # We ran out of headers last; } # Check if it have mustUnderstand if ( $_[HEAP]->{'MUSTUNDERSTAND'} ) { if ( $hdr->mustUnderstand ) { # Fault! $_[KERNEL]->yield( 'FAULT', $response, $SOAP::Constants::FAULT_MUST_UNDERSTAND, "Unrecognized header '" . $hdr->name . "' has mustUnderstand set to 'true'", ); # We're done... return; } } # Push it into the headers array push( @headers, $hdr ); # Increment the counter $head_count++; } # Extract the body my $body = $som_object->body(); # Remove the top-level method name in the body $body = $body->{ $method }; # If it is an empty string, turn it into undef if ( defined $body and ! ref( $body ) and $body eq '' ) { $body = undef; } # Hax0r the Response to include our stuff! $response->{'SOAPMETHOD'} = $method; $response->{'SOAPBODY'} = $body; $response->{'SOAPSERVICE'} = $service; $response->{'SOAPREQUEST'} = $request; $response->{'SOAPURI'} = $soapuri; # Make the headers undef if there is none if ( scalar( @headers ) ) { $response->{'SOAPHEADERS'} = \@headers; } else { $response->{'SOAPHEADERS'} = undef; } # ReBless it ;) bless( $response, 'POE::Component::Server::SOAP::Response' ); # Send it off to the handler! $_[KERNEL]->post( $_[HEAP]->{'INTERFACES'}->{ $service }->{ $method }->[0], $_[HEAP]->{'INTERFACES'}->{ $service }->{ $method }->[1], $response, ); # Debugging stuff if ( DEBUG ) { warn "Sending off to the handler: Service $service -> Method $method for " . $response->connection->remote_ip(); } if ( DEBUG == 2 ) { print STDERR $request->content(), "\n\n"; } # All done! return; } # Creates the fault and sends it off sub TransactionFault { # ARG0 = SOAP::Response, ARG1 = SOAP faultcode, ARG2 = SOAP faultstring, ARG3 = SOAP Fault Detail, ARG4 = SOAP Fault Actor my ( $response, $fault_code, $fault_string, $fault_detail, $fault_actor ) = @_[ ARG0 .. ARG4 ]; # Make sure we have a SOAP::Response object here :) if ( ! defined $response ) { # Debug stuff if ( DEBUG ) { warn 'Received FAULT event but no arguments!'; } return; } # Is this a RAWFAULT event? my $content = undef; if ( $_[STATE] eq 'RAWFAULT' ) { # Tell SOAP::Serializer to not serialize it ## no critic ( RequireExplicitInclusion ) $content = SOAP::Serializer->envelope( 'freeform', SOAP::Data->type( 'xml', $response->content() ) ); } else { # Fault Code must be defined if ( ! defined $fault_code or ! length( $fault_code ) ) { # Debug stuff if ( DEBUG ) { warn 'Setting default Fault Code'; } # Set the default $fault_code = $SOAP::Constants::FAULT_SERVER; } # FaultString is a short description of the error if ( ! defined $fault_string or ! length( $fault_string ) ) { # Debug stuff if ( DEBUG ) { warn 'Setting default Fault String'; } # Set the default $fault_string = 'Application Faulted'; } # Serialize the envelope ## no critic ( RequireExplicitInclusion ) $content = SOAP::Serializer->envelope( 'fault', $fault_code, $fault_string, $fault_detail, $fault_actor ); } # Setup the response if ( ! defined $response->code ) { $response->code( $SOAP::Constants::HTTP_ON_FAULT_CODE ); } $response->header( 'Content-Type', 'text/xml' ); $response->content( $content ); # Send it off to the backend! $_[KERNEL]->post( $_[HEAP]->{'ALIAS'} . '-BACKEND', 'DONE', $response ); # Debugging stuff if ( DEBUG ) { warn 'Finished processing ' . $_[STATE] . ' for ' . $response->connection->remote_ip(); } if ( DEBUG == 2 ) { print STDERR "$content\n\n"; } # All done! return; } # All done with a transaction! sub TransactionDone { # ARG0 = SOAP::Response object my $response = $_[ARG0]; # Make the envelope! # The prefix is to change the darned "c-gensym3" to "s-gensym3" -> means it was server-generated ( whatever SOAP::Lite says... ) ## no critic ( RequireExplicitInclusion ) my $content = SOAP::Serializer->prefix( 's' )->envelope( 'response', SOAP::Data->name( $response->soapmethod() . 'Response' )->uri( $response->soapuri() ), # Do we need to serialize the content or not? ( $_[STATE] eq 'RAWDONE' ? SOAP::Data->type( 'xml', $response->content() ) : $response->content() ), ); ## use critic # Set up the response! if ( ! defined $response->code ) { $response->code( $SOAP::Constants::HTTP_ON_SUCCESS_CODE ); } $response->header( 'Content-Type', 'text/xml' ); $response->content( $content ); # Send it off! $_[KERNEL]->post( $_[HEAP]->{'ALIAS'} . '-BACKEND', 'DONE', $response ); # Debug stuff if ( DEBUG ) { warn 'Finished processing ' . $_[STATE] . ' Service ' . $response->soapservice . ' -> Method ' . $response->soapmethod . ' for ' . $response->connection->remote_ip(); } if ( DEBUG == 2 ) { print STDERR "$content\n\n"; } # All done! return; } # Close the transaction sub TransactionClose { # ARG0 = SOAP::Response object my $response = $_[ARG0]; # Send it off to the backend, signaling CLOSE $_[KERNEL]->post( $_[HEAP]->{'ALIAS'} . '-BACKEND', 'CLOSE', $response ); # Debug stuff if ( DEBUG ) { warn 'Closing the socket of this Service ' . $response->soapmethod . ' -> Method ' . $response->soapmethod() . ' for ' . $response->connection->remote_ip(); } # All done! return; } 1; __END__ =head1 NAME POE::Component::Server::SOAP - publish POE event handlers via SOAP over HTTP =head1 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 ); } } =head1 ABSTRACT An easy to use SOAP/1.1 daemon for POE-enabled programs =head1 DESCRIPTION This module 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. =head2 Starting Server::SOAP To start Server::SOAP, just call it's new method: POE::Component::Server::SOAP->new( 'ALIAS' => 'MySOAP', 'ADDRESS' => '192.168.1.1', 'PORT' => 11111, 'HOSTNAME' => 'MySite.com', 'HEADERS' => {}, ); This method will die on error or return success. This constructor accepts only 7 options. =over 4 =item C This will set the alias Server::SOAP uses in the POE Kernel. This will default to "SOAPServer" =item C
This value will be passed to POE::Component::Server::SimpleHTTP to bind to. Examples: ADDRESS => 0 # Bind to all addresses + localhost ADDRESS => 'localhost' # Bind to localhost ADDRESS => '192.168.1.1' # Bind to specified IP =item C This value will be passed to POE::Component::Server::SimpleHTTP to bind to. =item C This value is for the HTTP::Request's URI to point to. If this is not supplied, POE::Component::Server::SimpleHTTP will use Sys::Hostname to find it. =item C This should be a hashref, that will become the default headers on all HTTP::Response objects. You can override this in individual requests by setting it via $response->header( ... ) The default header is: Server => 'POE::Component::Server::SOAP/' . $VERSION For more information, consult the L module. =item C This is a boolean value, controlling whether Server::SOAP will check for this value in the Headers and Fault if it is present. This will default to true. =item C This allows you to pass options to the SimpleHTTP backend. One of the real reasons is to support SSL in Server::SOAP, yay! To learn how to use SSL, please consult the POE::Component::Server::SimpleHTTP documentation. Of course, you could totally screw up things, just use this with caution :) You must pass a hash reference as the value, because it will be expanded and put in the Server::SimpleHTTP->new() constructor. =back =head2 Events There are only a few ways to communicate with Server::SOAP. =over 4 =item C This event accepts four arguments: - The intended session alias - The intended session event - The public service name ( not required -> defaults to session alias ) - The public method name ( not required -> defaults to session event ) Calling this event will add the method to the registry. NOTE: This will overwrite the old definition of a method if it exists! =item C This event accepts two arguments: - The service name - The method name Calling this event will remove the method from the registry. NOTE: if the service now contains no methods, it will also be removed. =item C This event accepts one argument: - The service name Calling this event will remove the entire service from the registry. =item C This event accepts only one argument: the SOAP::Response object we sent to the handler. Calling this event implies that this particular request is done, and will proceed to close the socket. The content in $response->content() will be automatically serialized via SOAP::Lite's SOAP::Serializer NOTE: This method automatically sets some parameters: - HTTP Status = 200 ( if not defined ) - HTTP Header value of 'Content-Type' = 'text/xml' To get greater throughput and response time, do not post() to the DONE event, call() it! However, this will force your program to block while servicing SOAP requests... =item C This event accepts only one argument: the SOAP::Response object we sent to the handler. Calling this event implies that this particular request is done, and will proceed to close the socket. The only difference between this and the DONE event is that the content in $response->content() will not be serialized and passed through intact to the SOAP envelope. This is useful if you generate the xml yourself. NOTE: - The xml content does not need to have a header - In SOAP::Lite, the client sees '5489' as '54' only! The solution is to enclose the xml in another name, i.e. '5489' - If the xml is malformed or is not escaped properly, the client will get terribly confused! It will be inserted here: ...YOURSTUFFHERE... =item C This event accepts five arguments: - the HTTP::Response object we sent to the handler - SOAP Fault Code ( not required -> defaults to 'Server' ) - SOAP Fault String ( not required -> defaults to 'Application Faulted' ) - SOAP Fault Detail ( not required ) - SOAP Fault Actor ( not required ) Again, calling this event implies that this particular request is done, and will proceed to close the socket. Calling this event will generate a SOAP Fault and return it to the client. NOTE: This method automatically sets some parameters: - HTTP Status = 500 ( if not defined ) - HTTP Header value of 'Content-Type' = 'text/xml' - HTTP Content = SOAP Envelope of the fault ( overwriting anything that was there ) =item C This event accepts only one argument: the SOAP::Response object we sent to the handler. Calling this event implies that this particular request is done, and will proceed to close the socket. The only difference between this and the FAULT event is that you are given freedom to create your own xml for the fault. It will be passed through intact to the SOAP envelope. Be sure to read the SOAP specs :) This is very similar to the RAWDONE event, so go read the notes up there! It will be inserted here: ...YOURSTUFFHERE... =item C This event accepts only one argument: the SOAP::Response object we sent to the handler. Calling this event will proceed to close the socket, not sending any output. =item C Starts the listening socket, if it was shut down =item C Simply a wrapper for SHUTDOWN GRACEFUL, but will not shutdown Server::SOAP if there is no more requests =item C Without arguments, Server::SOAP does this: Close the listening socket Kills all pending requests by closing their sockets Removes it's alias With an argument of 'GRACEFUL', Server::SOAP does this: Close the listening socket Waits for all pending requests to come in via DONE/FAULT/CLOSE, then removes it's alias =back =head2 Processing Requests if you're new to the world of SOAP, reading the documentation by the excellent author of SOAP::Lite is recommended! It also would help to read some stuff at http://www.soapware.org/ -> they have some excellent links :) Now, once you have set up the services/methods, what do you expect from Server::SOAP? Every request is pretty straightforward, you just get a Server::SOAP::Response object in ARG0. The Server::SOAP::Response object contains a wealth of information about the specified request: - There is the SimpleHTTP::Connection object, which gives you connection information - There is the various SOAP accessors provided via Server::SOAP::Response - There is the HTTP::Request object Example information you can get: $response->connection->remote_ip() # IP of the client $response->soaprequest->uri() # Original URI $response->soapmethod() # The SOAP method that was called $response->soapbody() # The arguments to the method Probably the most important part of SOAP::Response is the body of the message, which contains the arguments to the method call. The data in the body is a hash, for more information look at SOAP::Lite -> SOAP::Deserializer. I cannot guarantee what will be in the body, it is all up to the SOAP serializer/deserializer. I can provide some examples: NOTE: It is much easier to play around with parameters if they are properly encoded. If you are using SOAP::Lite, make extensive use of SOAP::Data->name() to create parameters :) Calling a SOAP method with no arguments: print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things() -> result The body will look like this: $VAR1 = undef; Calling a SOAP method with multiple arguments: print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things( 8, 6, 7, 5, 3, 0, 9, 183 ) -> result The body will look like this: $VAR1 = { 'c-gensym17' => '183', 'c-gensym5' => '6', 'c-gensym13' => '0', 'c-gensym11' => '3', 'c-gensym15' => '9', 'c-gensym9' => '5', 'c-gensym3' => '8', 'c-gensym7' => '7' }; NOTE: The original array ordering can be received by sorting on the keys. Calling a SOAP method with an arrayref print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things( [ 8, 6, 7, 5, 3, 0, 9, 183 ] ) -> result The body will look like this: $VAR1 = { 'Array' => [ '8', '6', '7', '5', '3', '0', '9', '183' ] }; Calling a SOAP method with a hash: print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things( { 'FOO' => 'bax', 'Hello' => 'World!', } ) -> result The body will look like this: $VAR1 = { 'c-gensym21' => { 'Hello' => 'World!', 'FOO' => 'bax', } }; Calling a SOAP method using SOAP::Data methods: print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things( SOAP::Data->name( 'Foo', 'harz' ), SOAP::Data->name( 'Param', 'value' ), )-> result The body will look like this: $VAR1 = { 'Param' => 'value', 'Foo' => 'harz' }; Simply experiment using Data::Dumper and you'll quickly get the hang of it! When you're done with the SOAP request, stuff whatever output you have into the content of the response object. $response->content( 'The result is ... ' ); The only thing left to do is send it off to the DONE event :) $_[KERNEL]->post( 'MySOAP', 'DONE', $response ); If there's an error, you can send it to the FAULT event, which will convert it into a SOAP fault. # See this website for more details about what "SOAP Fault" is :) # http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383507 $_[KERNEL]->post( 'MySOAP', 'FAULT', $response, 'Client.Authentication', 'Invalid password' ); =head2 Server::SOAP Notes This module is very picky about capitalization! All of the options are uppercase, to avoid confusion. You can enable debugging mode by doing this: sub POE::Component::Server::SOAP::DEBUG () { 1 } use POE::Component::Server::SOAP; In the case you want to see the raw xml being received/sent to the client, set DEBUG to 2. Yes, I broke a lot of things in the release ( 1.01 ), but Rocco agreed that it's best to break things as early as possible, so that development can move on instead of being stuck on legacy issues. =head2 Using SSL So you want to use SSL in Server::SOAP? Here's a example on how to do it: POE::Component::Server::SOAP->new( ... 'SIMPLEHTTP' => { 'SSLKEYCERT' => [ 'public-key.pem', 'public-cert.pem' ], }, ); # And that's it provided you've already created the necessary key + certificate file :) Ah, to use SSL in SOAP::Lite, simply use https://blah.com instead of http://blah.com =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc POE::Component::Server::SOAP =head2 Websites =over 4 =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * RT: CPAN's request tracker L =item * Search CPAN L =back =head2 Bugs Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SEE ALSO The examples directory that came with this component. L L L L L L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE I took over this module from Rocco Caputo. Here is his stuff: POE::Component::Server::SOAP is Copyright 2002 by Rocco Caputo. All rights are reserved. POE::Component::Server::SOAP is free software; you may redistribute it and/or modify it under the same terms as Perl itself. Rocco may be contacted by e-mail via rcaputo@cpan.org. =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut POE-Component-Server-SOAP-1.14/MANIFEST0000444000175000017500000000036711141457064015614 0ustar apocapocMANIFEST MANIFEST.SKIP Build.PL Makefile.PL README lib/POE/Component/Server/SOAP.pm lib/POE/Component/Server/SOAP/Response.pm META.yml Changes LICENSE examples/test-client.perl examples/test-server.perl t/1_load.t t/apocalypse.t POE-Component-Server-SOAP-1.14/t/0000755000175000017500000000000011141457064014722 5ustar apocapocPOE-Component-Server-SOAP-1.14/t/1_load.t0000444000175000017500000000045411141457064016247 0ustar apocapoc#!/usr/bin/perl use strict; use warnings; my $numtests; BEGIN { $numtests = 2; eval "use Test::NoWarnings"; if ( ! $@ ) { # increment by one $numtests++; } } use Test::More tests => $numtests; use_ok( 'POE::Component::Server::SOAP::Response' ); use_ok( 'POE::Component::Server::SOAP' ); POE-Component-Server-SOAP-1.14/t/apocalypse.t0000444000175000017500000000047311141457064017251 0ustar apocapoc#!/usr/bin/perl use strict; use warnings; use Test::More; eval "use Test::Apocalypse"; if ( $@ ) { plan skip_all => 'Test::Apocalypse required for validating the distribution'; } else { # lousy hack for kwalitee require Test::NoWarnings; require Test::Pod; require Test::Pod::Coverage; is_apocalypse_here(); } POE-Component-Server-SOAP-1.14/Build.PL0000444000175000017500000000172111141457064015752 0ustar apocapoc# Build.PL use strict; use warnings; use Module::Build; my $build = Module::Build->new( # look up Module::Build::API for the info! 'dynamic_config' => 0, 'module_name' => 'POE::Component::Server::SOAP', 'license' => 'perl', 'dist_abstract' => 'An easy to use SOAP/1.1 daemon for POE-enabled programs', 'create_packlist' => 1, 'create_makefile_pl' => 'traditional', 'create_readme' => 1, 'test_files' => 't/*.t', 'add_to_cleanup' => [ 'META.yml', 'Makefile.PL', 'README', 'Makefile' ], # automatically generated 'requires' => { # Networking 'POE' => 0, 'POE::Component::Server::SimpleHTTP' => '1.54', # bump version so we fix CLOSE issue 'SOAP::Lite' => '0.55', # FIXME stupid deps Test::Dependencies needs to see 'POE::Session' => 0, 'SOAP::Constants' => 0, # Perl stuff 'Carp' => 0, # minimum perl version 'perl' => '5.006', }, ); # all done! $build->create_build_script; POE-Component-Server-SOAP-1.14/examples/0000755000175000017500000000000011141457064016275 5ustar apocapocPOE-Component-Server-SOAP-1.14/examples/test-client.perl0000555000175000017500000000163511141457064021422 0ustar apocapoc#!/usr/bin/perl use strict; use warnings; use SOAP::Lite; use Data::Dumper qw( Dumper ); print "The sum of 8,6,7,5,3,0,9,183 is: "; print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things( 8, 6, 7, 5, 3, 0, 9, 183 ) -> result ; print "\n\nNow, the time is: "; print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=TimeServer') -> Time() -> result ; print "\n\nNow, for a pretty Data::Dumper output of a hash:\n"; print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> DUMP( { 'Foo' => 'Baz', 'Hello' => 'World!', 'Frobnicate' => 45, }, )-> result ; print "\n\nNow, let's see some raw XML!\n"; print Dumper( SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Get_XML() -> result ); POE-Component-Server-SOAP-1.14/examples/test-server.perl0000555000175000017500000000413111141457064021444 0ustar apocapoc#!/usr/bin/perl use strict; use warnings; # Include the local directory to LIB use FindBin qw($Bin); use lib "$Bin/../lib"; use POE; sub POE::Component::Server::SOAP::DEBUG () { 2 } 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, Dump_Things => \&do_dump, LocalTime => \&do_time, Get_XML => \&do_xml, } ); $poe_kernel->run; exit 0; sub setup_service { my $kernel = $_[KERNEL]; $kernel->alias_set( 'MyServer' ); $kernel->post( 'MySOAP', 'ADDMETHOD', 'MyServer', 'Sum_Things' ); $kernel->post( 'MySOAP', 'ADDMETHOD', 'MyServer', 'Get_XML' ); $kernel->post( 'MySOAP', 'ADDMETHOD', 'MyServer', 'Dump_Things', 'MyServer', 'DUMP' ); $kernel->post( 'MySOAP', 'ADDMETHOD', 'MyServer', 'LocalTime', 'TimeServer', 'Time' ); } sub shutdown_service { $_[KERNEL]->post( 'MySOAP', 'DELMETHOD', 'MyServer', 'Sum_Things' ); $_[KERNEL]->post( 'MySOAP', 'DELMETHOD', 'MyServer', 'DUMP' ); $_[KERNEL]->post( 'MySOAP', 'DELSERVICE', 'TimeServer' ); } 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, 'Add:Error', 'The sum must be above 100' ); } else { $response->content( $sum ); $_[KERNEL]->post( 'MySOAP', 'DONE', $response ); } } sub do_dump { my $response = $_[ARG0]; require Data::Dumper; $response->content( Data::Dumper::Dumper( $response->soapbody ) ); $_[KERNEL]->post( 'MySOAP', 'DONE', $response ); } sub do_time { my $response = $_[ARG0]; $response->content( scalar( localtime() ) ); $_[KERNEL]->post( 'MySOAP', 'DONE', $response ); #$_[KERNEL]->post( 'MySOAP', 'SHUTDOWN', 'GRACEFUL' ); } sub do_xml { my $response = $_[ARG0]; $response->content( '57abc' ); $_[KERNEL]->post( 'MySOAP', 'RAWDONE', $response ); } POE-Component-Server-SOAP-1.14/Changes0000444000175000017500000000534211141457064015754 0ustar apocapocRevision history for Perl extension POE::Component::Server::SOAP. * 1.14 Converted to Build.PL Removed stupid Test::* module requirements, thanks BiNGOs! revamped test suite to modernize it * 1.13 removed Test::* modules from dependency list - thanks RT #36725 dos2unix fixes - thanks RT #36704 added Build.PL * 1.12 Kwalitee-related fixes * 1.11 Added ability to override HTTP return code - thanks RT #25514 Minor updates to examples for SOAP::Lite update * 1.10 Documentation tweaks Finally use a Changes file - thanks RT #18981 learned about the difference between ref $self and ref( $self ) Kwalitee-related fixes * 1.09 Yann Kerherv� spotted a bug where having no Content-Type results in a warning -> which dies... This is long overdue - thanks again! * 1.08 vkroll @ #POE @ MAGNet made some excellent suggestions - print the exact SOAP envelope to stderr if DEBUG == 2 - the ability to generate the XML yourself, added the RAWDONE/RAWFAULT events Realized that the examples were using ssl, I did not supply directions so the ssl part was removed Hopefully by the next release or two, full SOAP/1.2 support will be included ( also waiting on SOAP::Lite to get out of beta ) The next release will have the option to "attach" to an existing SimpleHTTP session ( so there is 1 less webserver running, yay! ) * 1.07 Made the documentation clearer for ADDRESS, thanks to Kaare Rasmussen! * 1.06 Rearranged DEBUG printouts Added ability to pass arguments to SimpleHTTP ( mainly for the SSL stuff ) * 1.05 Followed SimpleHTTP's STARTLISTEN, STOPLISTEN, SHUTDOWN GRACEFUL changes Some minor internal tweaks POD tweaks * 1.04 Big change! The deserializer is now hooked into SOAP::Lite for full SOAP/1.1 interop :) Big change! The output envelope is now hooked into SOAP::Lite instead of SOAP::EnvelopeMaker :) Made debugging more productive by adding service/method/IP to output Got rid of the CHANGES file, it is redundant ;) The headers is now an arrayref of SOAP::Header objects ( if any ) Got rid of SOAP::Defs, replaced them with SOAP::Constants ( from SOAP::Lite ) Added the MUSTUNDERSTAND parameter to new() * 1.03 I realized that I didn't like having the SOAP Fault event called "ERROR" and changed it to "FAULT" :) Fixed the Fault Code in the SYNOPSIS from Add:Error to the more SOAPy one Rocco Caputo helped me with some POD errors/typos/stuff Fixed new() to remove options that exist, but is undef -> results in croaking when DEBUG is on * 1.02 POD Formatting ( I'm still not an expert ) I forgot to add the test to the MANIFEST, so the distribution had no tests... *gah* * 1.01 Took over ownership of this module from Rocco Caputo Broke just about everything :) * 0.03 Old version from Rocco Caputo POE-Component-Server-SOAP-1.14/LICENSE0000444000175000017500000004341611141457064015472 0ustar apocapocThis software is copyright (c) 2009 by Apocalypse. This is free software; you can redistribute it and/or modify it under the same terms as perl itself. Terms of Perl itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2008 by the POE authors. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2008 by the POE authors. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End POE-Component-Server-SOAP-1.14/Makefile.PL0000444000175000017500000000131111141457064016423 0ustar apocapoc# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01 require 5.006; use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'POE::Component::Server::SOAP', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/POE/Component/Server/SOAP.pm', 'PREREQ_PM' => { 'SOAP::Lite' => '0.55', 'SOAP::Constants' => 0, 'POE::Component::Server::SimpleHTTP' => '1.54', 'POE::Session' => 0, 'POE' => 0, 'Carp' => 0 } ) ; POE-Component-Server-SOAP-1.14/MANIFEST.SKIP0000444000175000017500000000063411141457064016356 0ustar apocapoc# Avoid Eclipse stuff \.includepath$ \.project$ \.settings/ # Avoid version control files. \B\.svn\b \B\.git\b # Avoid Makemaker generated and utility files. \bMANIFEST\.SKIP \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib$ # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ # our tarballs \.tar\.gz$ POE-Component-Server-SOAP-1.14/README0000444000175000017500000004644611141457064015353 0ustar apocapocNAME POE::Component::Server::SOAP - publish POE event handlers via SOAP over HTTP 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 ); } } ABSTRACT An easy to use SOAP/1.1 daemon for POE-enabled programs DESCRIPTION This module 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. Starting Server::SOAP To start Server::SOAP, just call it's new method: POE::Component::Server::SOAP->new( 'ALIAS' => 'MySOAP', 'ADDRESS' => '192.168.1.1', 'PORT' => 11111, 'HOSTNAME' => 'MySite.com', 'HEADERS' => {}, ); This method will die on error or return success. This constructor accepts only 7 options. "ALIAS" This will set the alias Server::SOAP uses in the POE Kernel. This will default to "SOAPServer" "ADDRESS" This value will be passed to POE::Component::Server::SimpleHTTP to bind to. Examples: ADDRESS => 0 # Bind to all addresses + localhost ADDRESS => 'localhost' # Bind to localhost ADDRESS => '192.168.1.1' # Bind to specified IP "PORT" This value will be passed to POE::Component::Server::SimpleHTTP to bind to. "HOSTNAME" This value is for the HTTP::Request's URI to point to. If this is not supplied, POE::Component::Server::SimpleHTTP will use Sys::Hostname to find it. "HEADERS" This should be a hashref, that will become the default headers on all HTTP::Response objects. You can override this in individual requests by setting it via $response->header( ... ) The default header is: Server => 'POE::Component::Server::SOAP/' . $VERSION For more information, consult the HTTP::Headers module. "MUSTUNDERSTAND" This is a boolean value, controlling whether Server::SOAP will check for this value in the Headers and Fault if it is present. This will default to true. "SIMPLEHTTP" This allows you to pass options to the SimpleHTTP backend. One of the real reasons is to support SSL in Server::SOAP, yay! To learn how to use SSL, please consult the POE::Component::Server::SimpleHTTP documentation. Of course, you could totally screw up things, just use this with caution :) You must pass a hash reference as the value, because it will be expanded and put in the Server::SimpleHTTP->new() constructor. Events There are only a few ways to communicate with Server::SOAP. "ADDMETHOD" This event accepts four arguments: - The intended session alias - The intended session event - The public service name ( not required -> defaults to session alias ) - The public method name ( not required -> defaults to session event ) Calling this event will add the method to the registry. NOTE: This will overwrite the old definition of a method if it exists! "DELMETHOD" This event accepts two arguments: - The service name - The method name Calling this event will remove the method from the registry. NOTE: if the service now contains no methods, it will also be removed. "DELSERVICE" This event accepts one argument: - The service name Calling this event will remove the entire service from the registry. "DONE" This event accepts only one argument: the SOAP::Response object we sent to the handler. Calling this event implies that this particular request is done, and will proceed to close the socket. The content in $response->content() will be automatically serialized via SOAP::Lite's SOAP::Serializer NOTE: This method automatically sets some parameters: - HTTP Status = 200 ( if not defined ) - HTTP Header value of 'Content-Type' = 'text/xml' To get greater throughput and response time, do not post() to the DONE event, call() it! However, this will force your program to block while servicing SOAP requests... "RAWDONE" This event accepts only one argument: the SOAP::Response object we sent to the handler. Calling this event implies that this particular request is done, and will proceed to close the socket. The only difference between this and the DONE event is that the content in $response->content() will not be serialized and passed through intact to the SOAP envelope. This is useful if you generate the xml yourself. NOTE: - The xml content does not need to have a header - In SOAP::Lite, the client sees '5489' as '54' only! The solution is to enclose the xml in another name, i.e. '5489' - If the xml is malformed or is not escaped properly, the client will get terribly confused! It will be inserted here: ...YOURSTUFFHERE... "FAULT" This event accepts five arguments: - the HTTP::Response object we sent to the handler - SOAP Fault Code ( not required -> defaults to 'Server' ) - SOAP Fault String ( not required -> defaults to 'Application Faulted' ) - SOAP Fault Detail ( not required ) - SOAP Fault Actor ( not required ) Again, calling this event implies that this particular request is done, and will proceed to close the socket. Calling this event will generate a SOAP Fault and return it to the client. NOTE: This method automatically sets some parameters: - HTTP Status = 500 ( if not defined ) - HTTP Header value of 'Content-Type' = 'text/xml' - HTTP Content = SOAP Envelope of the fault ( overwriting anything that was there ) "RAWFAULT" This event accepts only one argument: the SOAP::Response object we sent to the handler. Calling this event implies that this particular request is done, and will proceed to close the socket. The only difference between this and the FAULT event is that you are given freedom to create your own xml for the fault. It will be passed through intact to the SOAP envelope. Be sure to read the SOAP specs :) This is very similar to the RAWDONE event, so go read the notes up there! It will be inserted here: ...YOURSTUFFHERE... "CLOSE" This event accepts only one argument: the SOAP::Response object we sent to the handler. Calling this event will proceed to close the socket, not sending any output. "STARTLISTEN" Starts the listening socket, if it was shut down "STOPLISTEN" Simply a wrapper for SHUTDOWN GRACEFUL, but will not shutdown Server::SOAP if there is no more requests "SHUTDOWN" Without arguments, Server::SOAP does this: Close the listening socket Kills all pending requests by closing their sockets Removes it's alias With an argument of 'GRACEFUL', Server::SOAP does this: Close the listening socket Waits for all pending requests to come in via DONE/FAULT/CLOSE, then removes it's alias Processing Requests if you're new to the world of SOAP, reading the documentation by the excellent author of SOAP::Lite is recommended! It also would help to read some stuff at http://www.soapware.org/ -> they have some excellent links :) Now, once you have set up the services/methods, what do you expect from Server::SOAP? Every request is pretty straightforward, you just get a Server::SOAP::Response object in ARG0. The Server::SOAP::Response object contains a wealth of information about the specified request: - There is the SimpleHTTP::Connection object, which gives you connection information - There is the various SOAP accessors provided via Server::SOAP::Response - There is the HTTP::Request object Example information you can get: $response->connection->remote_ip() # IP of the client $response->soaprequest->uri() # Original URI $response->soapmethod() # The SOAP method that was called $response->soapbody() # The arguments to the method Probably the most important part of SOAP::Response is the body of the message, which contains the arguments to the method call. The data in the body is a hash, for more information look at SOAP::Lite -> SOAP::Deserializer. I cannot guarantee what will be in the body, it is all up to the SOAP serializer/deserializer. I can provide some examples: NOTE: It is much easier to play around with parameters if they are properly encoded. If you are using SOAP::Lite, make extensive use of SOAP::Data->name() to create parameters :) Calling a SOAP method with no arguments: print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things() -> result The body will look like this: $VAR1 = undef; Calling a SOAP method with multiple arguments: print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things( 8, 6, 7, 5, 3, 0, 9, 183 ) -> result The body will look like this: $VAR1 = { 'c-gensym17' => '183', 'c-gensym5' => '6', 'c-gensym13' => '0', 'c-gensym11' => '3', 'c-gensym15' => '9', 'c-gensym9' => '5', 'c-gensym3' => '8', 'c-gensym7' => '7' }; NOTE: The original array ordering can be received by sorting on the keys. Calling a SOAP method with an arrayref print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things( [ 8, 6, 7, 5, 3, 0, 9, 183 ] ) -> result The body will look like this: $VAR1 = { 'Array' => [ '8', '6', '7', '5', '3', '0', '9', '183' ] }; Calling a SOAP method with a hash: print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things( { 'FOO' => 'bax', 'Hello' => 'World!', } ) -> result The body will look like this: $VAR1 = { 'c-gensym21' => { 'Hello' => 'World!', 'FOO' => 'bax', } }; Calling a SOAP method using SOAP::Data methods: print SOAP::Lite -> uri('http://localhost:32080/') -> proxy('http://localhost:32080/?session=MyServer') -> Sum_Things( SOAP::Data->name( 'Foo', 'harz' ), SOAP::Data->name( 'Param', 'value' ), )-> result The body will look like this: $VAR1 = { 'Param' => 'value', 'Foo' => 'harz' }; Simply experiment using Data::Dumper and you'll quickly get the hang of it! When you're done with the SOAP request, stuff whatever output you have into the content of the response object. $response->content( 'The result is ... ' ); The only thing left to do is send it off to the DONE event :) $_[KERNEL]->post( 'MySOAP', 'DONE', $response ); If there's an error, you can send it to the FAULT event, which will convert it into a SOAP fault. # See this website for more details about what "SOAP Fault" is :) # http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383507 $_[KERNEL]->post( 'MySOAP', 'FAULT', $response, 'Client.Authentication', 'Invalid password' ); Server::SOAP Notes This module is very picky about capitalization! All of the options are uppercase, to avoid confusion. You can enable debugging mode by doing this: sub POE::Component::Server::SOAP::DEBUG () { 1 } use POE::Component::Server::SOAP; In the case you want to see the raw xml being received/sent to the client, set DEBUG to 2. Yes, I broke a lot of things in the release ( 1.01 ), but Rocco agreed that it's best to break things as early as possible, so that development can move on instead of being stuck on legacy issues. Using SSL So you want to use SSL in Server::SOAP? Here's a example on how to do it: POE::Component::Server::SOAP->new( ... 'SIMPLEHTTP' => { 'SSLKEYCERT' => [ 'public-key.pem', 'public-cert.pem' ], }, ); # And that's it provided you've already created the necessary key + certificate file :) Ah, to use SSL in SOAP::Lite, simply use https://blah.com instead of http://blah.com SUPPORT You can find documentation for this module with the perldoc command. perldoc POE::Component::Server::SOAP Websites * AnnoCPAN: Annotated CPAN documentation * CPAN Ratings * RT: CPAN's request tracker * Search CPAN Bugs Please report any bugs or feature requests to "bug-poe-component-server-soap at rt.cpan.org", or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SEE ALSO The examples directory that came with this component. POE HTTP::Response HTTP::Request POE::Component::Server::SOAP::Response POE::Component::Server::SimpleHTTP SOAP::Lite POE::Component::SSLify AUTHOR Apocalypse I took over this module from Rocco Caputo. Here is his stuff: POE::Component::Server::SOAP is Copyright 2002 by Rocco Caputo. All rights are reserved. POE::Component::Server::SOAP is free software; you may redistribute it and/or modify it under the same terms as Perl itself. Rocco may be contacted by e-mail via rcaputo@cpan.org. COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. POE-Component-Server-SOAP-1.14/META.yml0000444000175000017500000000135011141457064015725 0ustar apocapoc--- name: POE-Component-Server-SOAP version: 1.14 author: - 'Apocalypse Eapocal@cpan.orgE' abstract: An easy to use SOAP/1.1 daemon for POE-enabled programs license: perl resources: license: http://dev.perl.org/licenses/ requires: Carp: 0 POE: 0 POE::Component::Server::SimpleHTTP: 1.54 POE::Session: 0 SOAP::Constants: 0 SOAP::Lite: 0.55 perl: 5.006 dynamic_config: 0 provides: POE::Component::Server::SOAP: file: lib/POE/Component/Server/SOAP.pm version: 1.14 POE::Component::Server::SOAP::Response: file: lib/POE/Component/Server/SOAP/Response.pm version: 1.14 generated_by: Module::Build version 0.280801 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.2.html version: 1.2