Herong's Tutorial Notes on Web Service and SOAP
Dr. Herong Yang, Version 4.00

Methods on SOAP::Lite 0.710 Client Object

This section provides all methods that are available on SOAP::Lite 0.710 client object.

Before using SOAP::Lite 0.710 to call any Web services, let's take a quick look at all methods listed in the manual for the client object:

  • new() - The Constructor. It may take any property values as arguments.
  • transport() - Gets or sets the transport object used for sending/receiving SOAP messages.
  • serializer() - Gets or sets the serializer object used for creating XML messages.
  • packager() - Gets or sets the packager object that the client uses to manage the use of attachments.
  • proxy() - Gets or sets the proxy object to be used by the transport object. proxy object represents a server or endpoint to which the client is going to connect.
  • endpoint() - Gets or sets the endpoint object to which the client is going to connect. It must be called after the proxy object is set by calling proxy(). This method allows the caller to change the endpoint that the client is currently set to connect to, without reloading the relevant transport code.
  • service() - Gets or sets the service object represents Web service descriptions, like a WSDL document. This method loads the specified WSDL schema and uses it as the basis for generating method stubs.
  • outputxml() - Gets or sets the flag for receiving response result in raw XML format.
  • autotype() - Gets or sets the flag to be used by the serializer for automatically deducing data types when generating request message.
  • readable() - Gets or sets the flag to be used by the serializer for making request message readable with spaces and line breaks.
  • default_ns() - Gets or sets current namespace as a "default" namespace.
  • ns() - Gets or sets the current namespace as a named namespace.
  • soapversion() - Gets or sets the SOAP version number, 1.1 and 1.2 are supported.
  • envprefix() - Gets or sets the prefix of the SOAP envelop namespace to be used by the serializer.
  • encprefix() - Gets or sets the prefix of the SOAP encoding rules namespace to be used by the serializer.
  • encoding() - Gets or sets URN to be used by the serializer to be specified as the encoding scheme for the message.
  • typelookup() - Gets or sets the type-lookup table to be used by the serializer.
  • multirefinplace() - Gets or sets the flag to be used by the serializer to control how the serializer handles values that have multiple references to them.
  • parts() - Gets or sets an array of MIME::Entity objects to be attached to request.
  • call() - Call the remote server with the request message. The method may be built up from a the SOAP::Data object, so as to allow full control over the namespace associated with the tag, as well as other attributes like encoding.
  • on_action() - Gets or sets the call back function to generate the SOAPAction header line.
  • on_nonserialized() - Gets or sets the call back function to handle data that can not be serialized.

I will try some of these methods in the next tutorial.

Last update: 2009.

Sections in This Chapter

Installing SOAP::Lite 0.710 to Support SOAP 1.2

Features in SOAP::Lite 0.710

Methods on SOAP::Lite 0.710 Client Object

Testing SOAP::Lite Client Objects

Request Differences between SOAP 1.1 and SOAP 1.2

GetSpeech_localhost.pl - Testing GetSpeech on Local Host

soapversion('1.2') and envprefix('soap12') Must Used Together

default_ns() - Setting Default namespace for Body Elements

SOAP::Data - Utility Class to Generate XML Elements

SOAPAction - Not Needed, But No Way to Remove It

Unsupported Media Type: "application/soap"

DEFAULT_HTTP_CONTENT_TYPE='application/soap+xml'

content_type() method in the HTTP::Headers Class

GetSpeech_SOAP_1_2.pl - SOAP::Lite for SOAP 1.2 Web Service

Dr. Herong Yang, updated in 2009
Methods on SOAP::Lite 0.710 Client Object