This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
SOAP Transport Classes
|
353
superclass constructor; only the Jabber URI is handled locally. It’s used to set up
the
Net::Jabber::Client instance that manages the actual communications.
SOAP::Transport::LOCAL
The SOAP::Transport::LOCAL module is designed to provide a no-transport client
class for tracing and debugging communications traffic. It links
SOAP::Client and
SOAP::Server so that the same object that “sends” the request also “receives” it.
SOAP::Transport::LOCAL::Client
Inherits from: SOAP::Client, SOAP::Server.
The implementations of the
new and send_receive methods aren’t noticeably differ-
ent in their interface. Their behavior warrants description, however:
new
When the constructor creates a new object of this class, it sets up a few things
beyond the usual
SOAP::Client layout. The is_success method is set to a default
value of
1. The dispatch_to method inherited from SOAP::Server is called with
the current value of the global array
@INC, allowing the client to call any meth-
ods that can be found in the current valid search path. And as with most of the
constructors in this module, the optional key/value pairs are treated as method
names and parameters.
send_receive
The implementation of this method simply passes the envelope portion of the
input data to the
handle method of SOAP::Server. While no network traffic
results (directly) from this, it allows for
debug signals to be sent through the
SOAP::Trace facility.
SOAP::Transport::MAILTO
This transport class manages SMTP-based sending of messages from a client perspec-
tive. It doesn’t provide a server class. The class gets selected when a client object
passes a URI to
proxy or endpoint that starts with the characters, mailto:.
SOAP::Transport::MAILTO::Client
Inherits from: SOAP::Client.
The client class for this protocol doesn’t define any new methods. The constructor
functions in the same style as the others class constructors. The functionality of the
send_receive method is slightly different from other classes, however.
When invoked, the
send_receive method uses the MIME::Lite package to encapsu-
late and transmit the message. Because mail messages are one-way communications

Get Programming Web Services with Perl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.