home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_3c8272877bad8c4645bbb6d5095b501b
< prev
next >
Wrap
Text File
|
2000-03-23
|
5KB
|
121 lines
<HTML>
<HEAD>
<TITLE>SOAP::Transport::HTTP::Server - Server side HTTP support for SOAP/Perl</TITLE>
<LINK REL="stylesheet" HREF="../../../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> SOAP::Transport::HTTP::Server - Server side HTTP support for SOAP/Perl</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<UL>
<LI><A HREF="#handle_request(headerarray, body, envelopemaker)">handle_request(HeaderArray, Body, EnvelopeMaker)</A></LI>
<LI><A HREF="#custom_dispatcher(requestedclass, headerarray, body, envelopemaker)">custom_dispatcher(RequestedClass, HeaderArray, Body, EnvelopeMaker)</A></LI>
</UL>
<LI><A HREF="#dependencies">DEPENDENCIES</A></LI>
<LI><A HREF="#author">AUTHOR</A></LI>
<LI><A HREF="#see also">SEE ALSO</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>SOAP::Transport::HTTP::Server - Server side HTTP support for SOAP/Perl</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
<LI>Windows</LI>
</UL>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<PRE>
use SOAP::Transport::HTTP::Server;</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>This class provides all the HTTP related smarts for a SOAP server,
independent of what web browser 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.</P>
<P>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 <CODE>new()</CODE> with no
arguments, and you must implement a single function:</P>
<P>
<H2><A NAME="handle_request(headerarray, body, envelopemaker)">handle_request(HeaderArray, Body, EnvelopeMaker)</A></H2>
<P>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.</P>
<P>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).</P>
<P>HeaderArray and Body are today simply hash references, but in the
future, they may be blessed object references.</P>
<P>If you want to customize this call-dispatching mechanism, you
may pass a code reference for the OptionalDispatcher argument.</P>
<P>The OptionalDispatcher argument allows you to override the default
dispatching behavior with your own code. This should reference a
subroutine with the following signature:</P>
<P>
<H2><A NAME="custom_dispatcher(requestedclass, headerarray, body, envelopemaker)">custom_dispatcher(RequestedClass, HeaderArray, Body, EnvelopeMaker)</A></H2>
<P>sub my_dispatcher {
my ($requested_class, $headers, $body, $em) = @_;</P>
<PRE>
# 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});
}</PRE>
<P>The above example handles each request by invoking a class-level method
on the requested class.</P>
<P>
<HR>
<H1><A NAME="dependencies">DEPENDENCIES</A></H1>
<P>SOAP::Defs
SOAP::Parser
SOAP::EnvelopeMaker</P>
<P>
<HR>
<H1><A NAME="author">AUTHOR</A></H1>
<P>Keith Brown</P>
<P>
<HR>
<H1><A NAME="see also">SEE ALSO</A></H1>
<P>SOAP::Transport::HTTP::EnvelopeMaker
SOAP::Transport::HTTP::Apache</P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> SOAP::Transport::HTTP::Server - Server side HTTP support for SOAP/Perl</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>