home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_6c60f5696a1520e76606e6b39a347fbf
< prev
next >
Wrap
Text File
|
2000-03-23
|
4KB
|
113 lines
<HTML>
<HEAD>
<TITLE>SOAP::Transport::HTTP::CGI - Generic SOAP CGI handler</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::CGI - Generic SOAP CGI handler</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="#handler(safeclasshash, optionaldispatcher)">handler(SafeClassHash, OptionalDispatcher)</A></LI>
</UL>
<LI><A HREF="#dependencies">DEPENDENCIES</A></LI>
<LI><A HREF="#author">AUTHOR</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>SOAP::Transport::HTTP::CGI - Generic SOAP CGI handler</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>
<P>Use this class to expose SOAP endpoints using vanilla CGI.
Here's an example SOAP endpoint exposed using this class:</P>
<PRE>
package ServerDemo;
use strict;
use SOAP::Transport::HTTP::CGI;</PRE>
<PRE>
sub handler {
my $safe_classes = {
Calculator => undef,
};
SOAP::Transport::HTTP::CGI->handler($safe_classes);
}</PRE>
<PRE>
1;</PRE>
<P>(I leave it up to you to figure out how to get Perl scripts
to run as CGI scripts - please see your Perl docs for details)</P>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>This class encapsulates the details of hooking up to CGI,
and then calls SOAP::Transport::HTTP::Server to do the SOAP-specific
stuff. This way the Server class can be reused with any web server
configuration (including mod_perl), by simply composing it with a different
front-end (for instance, SOAP::Transport::HTTP::Apache, for instance.</P>
<P>
<H2><A NAME="handler(safeclasshash, optionaldispatcher)">handler(SafeClassHash, OptionalDispatcher)</A></H2>
<P>This is the only method on the class, and you must pass a
hash reference whose keys contain the collection of classes
that may be invoked at this endpoint. If you specify class
FooBar in this list, for instance, and a client sends a SOAP
request to <A HREF="http://yourserver/soap?class=FooBar,">http://yourserver/soap?class=FooBar,</A> then the
SOAP::Transport::HTTP::Server class will eventually attempt
to load FooBar.pm, instatiate a FooBar, and call
its handle_request function (see SOAP::Transport::HTTP::Server
for more detail). If you don't include a class in this hash,
SOAP/Perl won't run it. I promise.</P>
<P>By the way, only the keys in this hash are important, the
values are ignored.</P>
<P>Also, nothing is stopping you from messing around with the response
yourself if you'd like to add some headers or whatever;
you can always call <A HREF="../../../../../lib/Pod/perlfunc.html#item_print"><CODE>print()</CODE></A> dump more headers to STDOUT.
Just make sure you finish what you're doing before you
return to SOAP::Transport::HTTP::Server, because at that
point the response is marshaled and sent back.</P>
<P>See SOAP::Transport::HTTP::Server for details on the
OptionalDispatcher parameter.</P>
<P>
<HR>
<H1><A NAME="dependencies">DEPENDENCIES</A></H1>
<P>SOAP::Transport::HTTP::Server</P>
<P>
<HR>
<H1><A NAME="author">AUTHOR</A></H1>
<P>Keith Brown</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::CGI - Generic SOAP CGI handler</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>