home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_06833961fda1900ce6947df9a36a460e
< prev
next >
Wrap
Text File
|
2000-03-23
|
5KB
|
147 lines
<HTML>
<HEAD>
<TITLE>SOAP::Envelope - Creates SOAP streams</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::Envelope - Creates SOAP streams</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="#the new function">The new function</A></LI>
<LI><A HREF="#the header function">The header function</A></LI>
<LI><A HREF="#the body function">The body function</A></LI>
<LI><A HREF="#the term function">The term function</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::Envelope - Creates SOAP streams</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::Envelope;</PRE>
<PRE>
sub output_fcn {
my $string = shift;
print $string;
}</PRE>
<PRE>
my $namespaces_to_preload = ["urn:foo", "urn:bar"];
my $env = SOAP::Envelope->new(\&output_fcn,
$namespaces_to_preload);
my $header = $env->header("urn:a", "MyHeaderA",
undef, undef,
0, 0);
...
$header->term();</PRE>
<PRE>
$header = $env->header("urn:b", "MyHeaderB",
undef, undef,
0, 0);
...
$header->term();</PRE>
<PRE>
my $body = $env->body("urn:c", "MyCall",
undef, undef);
...
$body->term();</PRE>
<PRE>
$env->term();</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>This class bootstraps and manages the serialization of an object graph
into a SOAP stream. It is used by the SOAP::Transport classes, but may
be used directly as well.</P>
<P>
<H2><A NAME="the new function">The new function</A></H2>
<P>Creates a new envelope. If you know you'll be using certain namespaces
a lot, you can save some space by preloading those namespaces (pass the
set of URI strings as an array when creating a new envelope, as in the example
above).</P>
<P>
<H2><A NAME="the header function">The header function</A></H2>
<P>Creates a new header in the specified namespace URI (which is required).
You can call this function multiple times to create several different headers,
but don't call the body function until you've created all the headers.
If omitted, the typename and typeuri will be taken from the accessor name
and accessor uri, but the accessor name and uri are required.
Be sure to <CODE>term()</CODE> the current header before creating a new one.
For a discussion of the $object optional parameter, please see body(), below.</P>
<P>
<H2><A NAME="the body function">The body function</A></H2>
<P>Creates the body. You can only call this function once per envelope,
and you must call it after you're done creating all the headers you need
to create. If omitted, the typename and typeuri will be taken from the accessor
name and accessor uri, but the accessor name is required.
The $object parameter is optional, but must be passed if headers (or subelements
in the body) may point to the body itself. SOAP::Envelope adds this object
reference into its identity dictionary to correctly deal with these cases
(a doubly-linked list is a simple example of this case).
If you pass $object, you have to be prepared for <CODE>body()</CODE> to return undef,
which indicates that the object was already marshaled into the header area
(because it was referred to by a header element). In this case, the body
element will simply be a reference to the previously marshaled body.
If <CODE>body()</CODE> returns a value, don't forget to call <CODE>term()</CODE> through it when you're done
serializing the body, because this forces the output of any outstanding multi-ref
items.</P>
<P>
<H2><A NAME="the term function">The term function</A></H2>
<P>This writes an end tag, terminating the SOAP envelope.</P>
<P>
<HR>
<H1><A NAME="dependencies">DEPENDENCIES</A></H1>
<P>SOAP::OutputStream
SOAP::Packager
SOAP::Defs</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::OutputStream
SOAP::Transport::HTTP</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::Envelope - Creates SOAP streams</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>