Features different from SOAP::Lite

SOAP::WSDL does not aim to be a complete replacement for SOAP::Lite - the SOAP::Lite module has it's strengths and weaknesses and SOAP::WSDL is designed as a cure for the weakness of little WSDL support - nothing more, nothing less.

Nonetheless SOAP::WSDL mimics part of SOAP::Lite's API and behaviour, so SOAP::Lite users can switch without looking up every method call in the documentation.

A few things are quite differentl from SOAP::Lite, though:

SOAP request data

SOAP request data may either be given as message object, or as hash ref (in which case it will automatically be encoded into a message object).

Return values

The result from call() is not a SOAP::SOM object, but a message object.

Message objects' classes may be generated from WSDL definitions automatically - see SOAP::WSDL::Generator::Typelib on how to generate your own WSDL based message class library.

Fault handling

SOAP::WSDL::Client returns a fault object on errors, even on transport layer errors.

The fault object is a SOAP1.1 fault object of the following SOAP::WSDL::SOAP::Typelib::Fault11.

SOAP::WSDL::SOAP::Typelib::Fault11 objects are false in boolean context, so you can just do something like

my $result = $soap->call($method, $data);

if ($result) {
   # handle result
}
else {
   die $result->faultstring();
}

outputxml

SOAP::Lite returns only the content of the SOAP body when outputxml is set to true. SOAP::WSDL::Client returns the complete XML response.

Auto-Dispatching

SOAP::WSDL::Client does does not support auto-dispatching.

This is on purpose: You may easily create interface classes by using SOAP::WSDL::Client and implementing something like

sub mySoapMethod {
    my $self = shift;
    $soap_wsdl_client->call( mySoapMethod, @_);
}

You may even do this in a class factory - SOAP::WSDL provides the methods for generating such interfaces.