GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SOAP::Packager(3) User Contributed Perl Documentation SOAP::Packager(3)

SOAP::Packager - SOAP internal helper class

    use SOAP::Packager;
    my $packager = SOAP::Packager->new('s:', 1, sub { print shift } );

    # some object used as a reference
    my $object = SOAP::Object->new();

    # on a given packager, register() always returns the same id for a given object
    my $id = $packager->register($env, $object);
    unless($id == $packager->register($env, $object)) { die "internal error" }

    # this serializes objectA
    $packager->seal($envelope);

    # note that the package is still valid
    unless($id == $packager->register($env, $object)) { die "internal error" }

    my $objectB = SOAP::Object->new();
    my $idB = $packager->register($env, $objectB);
    unless($idB == $packager->register($env, $objectB)) { die "internal error" }

    # this just serializes objectB - objectA was already serialized before
    $packager->seal($env);

    # this does nothing except waste some cycles enumerating a hash table
    $packager->seal($env=);

    # hash tables shut down at destruction of packager, releasing object references
    $packager = undef;

This is an internal class used by the SOAP/Perl implementation. It is designed to manage a table of object references and XML ids used for serializing object graphs that may contain multiref data (and perhaps even cycles). If you are extending SOAP/Perl, the above synopsis will probably be all you need if you want to reuse this class. Whatever you pass for the $env reference should implement a function called _alloc_id that returns a unique string each time it is called. This is normally implemented by SOAP::Envelope, so you can see a sample implementation there.

NOTE NOTE NOTE: The SOAP "package" attribute was dropped when the SOAP spec went from version 1.0 to version 1.1. Use package-related functionality at your own risk - you may not interoperate with other servers if you rely on it. I'll eventually remove this feature if it doesn't reappear in the spec soon.

Keith Brown

SOAP::Envelope SOAP::OutputStream
2000-09-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.