NAME

SOAP::Transport::ActiveWorks::AutoInvoke::Client - Automarshall methods for Perl SOAP

SYNOPSIS

#!/usr/bin/perl -w

#
#  Client example that goes with server example
#  in SOAP::Transport::ActiveWorks::AutoInvoke::Client
#
use strict;

package Calculator;
use base qw( SOAP::Transport::ActiveWorks::AutoInvoke::Client );


package main;

my $calc = new Calculator;


print "sum = ", $calc->add ( 1, 2, 3 ), "\n";

DESCRIPTION

The intention of the AutoInvoke package is to allow a SOAP client to use a remote class as if it were local. The remote package is treated as local with a declaration like:

package MyClass;
use base qw( SOAP::Transport::ActiveWorks::AutoInvoke::Client );

The SOAP::AutoInvoke base class will "Autoload" methods called from an instance of "MyClass", send it to the server side, and return the results to the caller's space.

Provided Methods

new:

The 'new' method may be called with option arguments to reset variables from the defaults.

my $class = new MyClass (
                _soap_host       => 'anywhere.com',
                _soap_port       => 8849,
                _soap_client_group   => 'NotSOAP',
                _soap_method_uri => 'urn:com-name-your'
            );

It is advisable to set the package defaults at installation time in the SOAP/Transport/ActiveWorks/AutoInvoke/Client.pm (this) file. The variables may also be reset after instantiation with the 'set' methods.

The '_soap_' variable is relevant only to the local instantiation of "MyClass". The remote instantiation will call "new" with any arguments you have passed to the local instantiation that did not begin with '_soap_':

my $class = new MyClass (
                _soap_host => 'anywhere.com',
                arg1,
                arg2,
                @arg3,
                arg4   => $value,
                :
            );

This works so long as the data types being passed are something the SOAP package can serialize. SOAP::AutoInvoke can send and receive simple arrays.

To reset the name of the "new" to be called remotely:

my $class = new MyClass (
                :
                _soap_new_method => 'create',
                :
            );

To not call any new method remotely:

my $class = new MyClass (
                :
                _soap_new_method => undef,
                :
            );
_soap_get_post:

returns the contents of $class->{_soap_host}.

_soap_set_post:

sets the contents of $class->{_soap_host}.

_soap_get_port:

returns the contents of $class->{_soap_port}.

_soap_set_port:

sets the contents of $class->{_soap_port}.

_soap_get_broker:

returns the contents of $class->{_soap_broker}.

_soap_set_broker:

sets the contents of $class->{_soap_broker}.

_soap_get_client_group:

returns the contents of $class->{_soap_client_group}.

_soap_set_client_group:

sets the contents of $class->{_soap_client_group}.

_soap_get_method_uri:

returns the contents of $class->{_soap_method_uri}.

_soap_set_method_uri:

sets the contents of $class->{_soap_method_uri}.

_soap_get_new_args:

returns the contents of $class->{_soap_new_args}.

_soap_set_new_args:

sets the contents of $class->{_soap_new_args}.

_soap_get_new_method:

returns the contents of $class->{_soap_new_method}.

_soap_set_new_method:

sets the contents of $class->{_soap_new_method}. The default is "new".

DEPENDENCIES

SOAP-0.28 SOAP::Transport::ActiveWorks Data::Dumper

AUTHOR

Daniel Yacob, yacob@rcn.com

SEE ALSO

perl(1). SOAP(3). SOAP::Transport::ActiveWorks::AutoInvoke::Server(3).

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 281:

'=item' outside of any '=over'

Around line 391:

You forgot a '=back' before '=head1'