GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SOAP::Transport::HTTP::Server(3) User Contributed Perl Documentation SOAP::Transport::HTTP::Server(3)

SOAP::Transport::HTTP::Server - Server side HTTP support for SOAP/Perl

    use SOAP::Transport::HTTP::Server;

This class provides all the HTTP related smarts for a SOAP server, independent of what web server it's attached to. It exposes a single function (that you'll never call, unless you're adapting SOAP/Perl to a new web server environment) that provides a set of function pointers for doing various things, like getting information about the request and sending response headers and content.

What *is* important to know about this class is what it expects of you if you want to handle SOAP requests. You must implement your class such that it can be created via new() with no arguments, and you must implement a single function:

The first two arguments are the input, an array of header objects (which may be empty if no headers were sent), a single Body object, and a third object to allow you to send a response.

See EnvelopeMaker to learn how to send a response (this is the same class used by a client to send the request, so if you know how to do that, you're cooking with gas).

HeaderArray and Body are today simply hash references, but in the future, they may be blessed object references.

If you want to customize this call-dispatching mechanism, you may pass a code reference for the OptionalDispatcher argument.

The OptionalDispatcher argument allows you to override the default dispatching behavior with your own code. This should reference a subroutine with the following signature:

sub my_dispatcher { my ($requested_class, $headers, $body, $em) = @_;

    # here's a simple example that converts the request
    # into a method call (it doesn't deal with headers though)
    my $method_name = $body->{soap_typename};
    require $requested_class . '.pm';
    my $retval = $requested_class->$method_name(%$body);
    $em->set_body($body->{soap_typeuri}, $method_name . 'Response',
                  0, {return => $retval});
}

The above example handles each request by invoking a class-level method on the requested class.

SOAP::Defs SOAP::Parser SOAP::EnvelopeMaker

Keith Brown

SOAP::Transport::HTTP::EnvelopeMaker SOAP::Transport::HTTP::Apache
2000-09-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.