NAME
SOAP::WSDL - SOAP with WSDL support
SYNOPSIS
my $soap = SOAP::WSDL->new(
wsdl => 'file://bla.wsdl',
readable => 1,
)->wsdlinit();
my $result = $soap->call('MyMethod', %data);
DESCRIPTION
SOAP::WSDL provides easy access to Web Services with WSDL descriptions.
The WSDL is parsed and stored in memory.
Your data is serialized according to the rules in the WSDL and sent via SOAP::Lite's transport mechanism.
METHODS
servicename
$soap->servicname('Name');
Sets the service to operate on. If no service is set via servicename, the first service found is used.
Returns the soap object, so you can chain calls like
$soap->servicename->('Name')->portname('Port');
_wsdl_init_methods
- DESCRIPTION
-
Creates a lookup table containing the information required for all methods specified for the service/port selected.
The lookup table is used by call.
Differences to previous versions
WSDL handling
SOAP::WSDL 2 is a complete rewrite. While SOAP::WSDL 1.x attempted to process the WSDL file on the fly by using XPath queries, SOAP:WSDL 2 uses a SAX filter for parsing the WSDL and building up a object tree representing it's content.
The object tree has two main functions: It knows how to serialize data passed as hash ref, and how to render the WSDL elements found into perl classes.
Yup your're right, there's a builting code generation facility.
outputxml
call() with outputtxml set to true now returns the complete SOAP envelope, not only the body's content.
Differences to SOAP::Lite
Auto-Dispatching
SOAP::WSDL does does not support auto-dispatching.
This is on purpose: You may easily create interface classes by using SOAP::WSDL 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.
SOAP::Lite's autodispatching mechanism is - though convenient - a constant source of errors: Every typo in a method name gets caught by AUTOLOAD and may lead to unpredictable results.
Bugs and Limitations
readable
readable() must be called before calling wsdlinit. This is a bug.
Unsupported XML Schema definitions
The following XML Schema definitions are not supported:
choice group union simpleContent complexContent
Serialization of hash refs dos not work for ambiguous values
If you have list elements with multiple occurences allowed, SOAP::WSDL has no means of finding out which variant you meant.
Passing in item => [1,2,3] could serialize to
<item>1 2</item><item>3</item> <item>1</item><item>2 3</item>
Ambiguos data can be avoided by passing an object tree as data.
XML Schema facets
Almost all XML schema facets are not yet implemented. The only facets currently implemented are:
fixed default
The following facets have no influence yet:
minLength maxLength minInclusive maxInclusive minExclusive maxExclusive pattern enumeration
LICENSE
Copyright 2004-2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself
AUTHOR
Martin Kutter <martin.kutter fen-net.de>