SOAP-Lite

 view release on metacpan or  search on metacpan

lib/SOAP/Serializer.pod  view on Meta::CPAN

# ======================================================================
#
# Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com)
# SOAP::Lite is free software; you can redistribute it
# and/or modify it under the same terms as Perl itself.
#
# ======================================================================

=pod

=head1 NAME

SOAP::Serializer - the means by which the toolkit manages the expression of data as XML

=head1 DESCRIPTION

The SOAP::Serializer class is the means by which the toolkit manages the expression of data as XML. The object that a SOAP::Lite instance uses by default is generally enough for the task, with no need for the application to create its own. The main p...

=head1 METHODS

=over

=item new(optional key/value pairs)

    $serialize = SOAP::Serializer->new( );

This is the constructor method for the class. In addition to creating a basic object and initializing it with default values, the constructor can also take names and values for most of the accessor methods that the class supports.

=item envelope(method, data arguments)

    $serialize->envelope(fault => $fault_obj);

Provides the core purpose for the SOAP::Serializer class. It creates the full SOAP envelope based on the input passed in to it. The data arguments passed in the list of parameters to the method are divided into two sublists: any parameters that are L...

=item context

    $serialize->context->packager();

This provides access to the calling context of C<SOAP::Serializer>. In a client side context the often means a reference to an instance of SOAP::Lite. In a server side context this means a reference to a SOAP::Server instance.

=over

=item method

The envelope is being created to encapsulate a RPC-style method call.

=item response

The message being created is that of a response stemming from a RPC-style method call.

=item fault

For this specifier, the envelope being created is to transmit a fault.

=item freeform

This identifier is used as a general-case encoding style for messages that
don't fit into any of the previous cases. The arguments are encoded into the
envelope's Body tag without any sort of context sensitivity.

=back

Any value other than these four results in an error.

=item envprefix(optional value)

    $serialize->envprefix('env');

Gets or sets the prefix that labels the SOAP envelope namespace. This defaults to SOAP-ENV.

=item encprefix(optional value)

    $serialize->envprefix('enc');

Gets or sets the prefix that labels the SOAP encoding namespace. Defaults to SOAP-ENC.

=item soapversion(optional value)

    $serialize->soapversion('1.2');

If no parameter is given, returns the current version of SOAP that is being used as the basis for serializing messages. If a parameter is given, attempts to set that as the version of SOAP being used. The value should be either 1.1 or 1.2. When the S...

=item xmlschema(optional value)

    $serialize->xmlschema($xml_schema_1999);

Gets or sets the URN for the schema being used to express the structure of the XML generated by the serializer. If setting the value, the input must be the full URN for the new schema and is checked against the list of known SOAP schemas.

=item register_ns

The register_ns subroutine allows users to register a global namespace
with the SOAP Envelope. The first parameter is the namespace, the second
parameter to this subroutine is an optional prefix. If a prefix is not



( run in 0.439 second using v1.01-cache-2.11-cpan-39bf76dae61 )