Debugging with Perl

Problems with WSDL Interfaces

Because Perl’s SOAP::Lite module does not make explicit reference to the WSDL interface specification, it can be easy to introduce errors which are only detected at run time.

Ensure that any URIs used in the SOAP::Lite objects you construct in your application are correct. To confirm correct URI usage, refer to the reference information in Function Reference

For example, to reference methods in the VirtualServer interface, use the following URI:

http://soap.zeus.com/zxtm/1.0/VirtualServer/

For methods in the Service Protection catalog, use the following URI:

http://soap.zeus.com/zxtm/1.0/Catalogs/Protection/

Using a Fault Handler

Your Perl SOAP::Lite client application can determine whether server or transport errors have occurred by inspecting the SOAP Fault that is raised on an error.

For further information, see Fault Handling.

Recent SOAP::Lite Versions

Versions of SOAP::Lite on or after 0.65_5 have a slightly different interface to earlier versions. When creating a SOAP::Lite connection, use the newer “ns” method instead of the previous “uri” method:

# Versions prior to 0.65_5

my $conn = SOAP::Lite

-> uri('http://soap.zeus.com/zxtm/1.0/VirtualServer/')

-> proxy("$admin_server/soap");

 

# Versions 0.65_5 and later

my $conn = SOAP::Lite

-> ns('http://soap.zeus.com/zxtm/1.0/VirtualServer/')

-> proxy("$admin_server/soap");

Perl Deserializer Example

The SOAP::Lite module does not make use of the Traffic Manager’s WSDL specification and so does not know how to deserialize some enumerations used. For an example of this problem, see Using Perl SOAP::Lite

Tracing

To import the SOAP::Lite module with tracing enabled, use the following:

use SOAP::Lite 0.6 +trace => 'debug';

This causes the SOAP::Lite module to output large amounts of debugging information.

XML-messages observed after you enable tracing are usually not formatted. To make them easier to read, set the readable flag on your connections:

my $conn = SOAP::Lite;

$conn->readable(1);

While the messages sent by the client become more readable, this does not affect messages received from the server.