| Next | SOAP::Lite Client Experiences | 11 |
Does this look a little simpler?
my $wsdl = 'http://localhost/cgi-bin/ttsoapcgi.wsdl';
my $schema = 'http://www.w3.org/2001/XMLSchema';
my $soap = SOAP::Lite->service($wsdl)->xmlschema($schema);
my $cookie = $soap->DatabaseLogon($dbName, $dbUser, $dbPass);
if ($soap->call->fault) {
my $faultstring = $soap->call->faultstring;
die "$0: login error: $faultstring\n";
}
my $recordList = $soap->getRecordListForTable(
$cookie, 'Defect', 'Assigned with Estimated Date', '');
if ( $soap->call->fault ) {
my $faultstring = $soap->call->faultstring;
die "$0: record list error: $faultstring\n";
}
for my $recnum (
map { $_->{row}[0]->{value} }
@{$recordList->{records}}
) {
my $action = $soap->getDefect($cookie, $recnum, '');
...
}
The SOAP::Lite module now can create the data types from the WSDL descriptors.
It also has methods for finding the fault codes in the return messages.
| Copyright © 2004 David Baird |