SWAMP Index Design
SWAMP
* Home
* Documentation
* License
* Demo Server
* Wiki
* Screenshots
* F A Q
* Downloads
* Contact
* Credits

SWAMP is supported by:
SourceForge.net Logo
and
Novell

Perl SOAP client

The perl SOAP client enables an easy integration of the SWAMP server into remote applications. It can be downloaded here either as SUSE RPM or source tarball. After installing the perl module "SUSE::Swamp" should be useable from within your perl scripts. To view the module documentation please use:

perldoc SUSE::Swamp
All methods that are available via the SOAP interface are automatically mapped to perl functions. To display all available methods you can use this script:
#!/bin/bash -i
$WSDL='http://<swamp.server>:8080/axis/services/swamp?wsdl'
perl -I. -MSUSE::Swamp -e"print SUSE::Swamp->new('$WSDL')->generateDoc()" | 
	pod2man --name="SWAMP SOAP API" | nroff -man | less;
which will display a manpage with descriptions and signatures of the available methods.

A complete example script on how to use the module is included in its distribution. Usage looks like this:

#!/usr/bin/perl
use strict; 
use SUSE::Swamp;
my $url = 'http://<swamp.url>:8080/axis/services/swamp?wsdl';
my $username = "swamp_user";
my $pwd = "swamp";

my $swamp = SUSE::Swamp->new($url);
my $version = $swamp->doGetProperty( "SWAMP_VERSION", $username, $pwd );
print "SWAMP server version: " . $version . "\n";

# create a workflow: 
my $wfid = $swamp->createWorkflow( 0, "Example", $username, $pwd );
print "Created workflow with id: $wfid" . "\n";

# read data from the workflow 
my $result = $swamp->doGetData( $wfid, "testdataset.reason", $username, $pwd );
print "Value of testdataset.reason: $result" . "\n";


Valid CSS! Valid XHTML 1.0!