This package is the base class for talking with web services,
there are specific modules to use depending on the type of service you are calling,
e.g.
SOAP::XML::Client::DotNet or SOAP::XML::Client::Generic

This package helps in talking with web services,
it just needs a bit of XML thrown at it and you get some XML back.
It's designed to be REALLY simple to use.

This method actually calls the web service, it takes a method name and an xml string. If there is a problem with either the XML or the SOAP transport (e.g. web server error/could not connect etc) undef will be returned and the error() will be set.

Each node in the XML supplied (either by string or from a filename) needs to have _value_type defined or the submitted format will default to 'string'.

You can supply 'filename' rather than 'xml' and it will read in from the file.

We check for Fault/faultstring in the returned XML, anything else you'll need to check for yourself.

If fetch returns undef then check this method, it will either be that the filename you supplied couldn't be read, the XML you supplied was not correctly formatted (XML::LibXML could not parse it), there was a transport error with the web service or Fault/faultstring was found in the XML returned.

At the top of your script, before 'use SOAP::XML::Client::<TYPE>' add:

use SOAP::Lite ( +trace => 'all', readable => 1, outputxml => 1, );

It may or may not help, not all web services give you many helpful error messages! At least you can see what's being submitted and returned. It can be the smallest thing that causes a problem, mis-typed data (see _value_type in xml), or typo in xmlns line.

If the type of module (e.g. SOAP::XML::Client::DotNet) doesn't work, switch to one of the other ones and see if that helps.

Encoding defaults to UTF-8, but can be overidden by the 'encoding' argument to the constructor. The encoding setting is used to flag the SOAP message (e.g. <?xml version="1.0" encoding="utf-8"?>), and to decode the received data between the chosen character encoding and internal Perl string format.

Field values and attribute values are no longer encoded (as in v2.2), since this now appears to be handled correctly by XML::LibXML and SOAP::Lite.

Note that this currently expects that the returned message will be in the same character encoding - it does not parse the response for an 'encoding' attribute.