ActivePerl Documentation
|
NAMESOAP::Envelope - Creates SOAP streams
SUPPORTED PLATFORMS
SYNOPSIS
use SOAP::Envelope;
sub output_fcn {
my $string = shift;
print $string;
}
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();
$header = $env->header("urn:b", "MyHeaderB",
undef, undef,
0, 0);
...
$header->term();
my $body = $env->body("urn:c", "MyCall",
undef, undef);
...
$body->term();
$env->term();
DESCRIPTIONThis 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.
The new functionCreates 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).
The header functionCreates 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
The body functionCreates 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
The term functionThis writes an end tag, terminating the SOAP envelope.
DEPENDENCIESSOAP::OutputStream SOAP::Packager SOAP::Defs
AUTHORKeith Brown
SEE ALSOSOAP::OutputStream SOAP::Transport::HTTP
|