#!perl -w # Enable Perl warnings use strict; use warnings; use Data::Dumper; # Here I put fixed values, you can of course take them as parameters.... # SOAP::Lite module (tested with version 0.60) use SOAP::Lite; #SOAP::Lite->import(+trace => qw(debug)); # sws.getSites WSDL URL # Look on line for all WSDL URLs. my $WSDL = 'http://bioinformatics.istge.it:8080/axis/services/sws.getSites?wsdl'; # Create the service interface my $soap = new SOAP::Lite ->service($WSDL) ->proxy('http://bioinformatics.istge.it:8080/', timeout => 600, # Client HTTP connection timeout proxy => ['http' => 'http://bioinformatics.istge.it:8080/axis/services/'], # HTTP proxy config ) ->on_fault( # Map SOAP faults to Perl exceptions (i.e. die). sub { my $soap = shift; my $res = shift; if ( ref($res) eq '' ) { die($res); } else { die( $res->faultstring ); } return new SOAP::SOM; } ); # Build the parameters structure my %params=(); $params{'site'} = "EBI"; # Create SOAP objects from the input data and parameters data structures my $paramsData = SOAP::Data->name('params')->type(map=>\%params); # Call the runAndWaitFor method on the service using the proxy my $output = $soap->runAndWaitFor($paramsData); # The output is a hash, where keys are the names of the outputs # and values are their actual values. (output keys may vary) # In this case the value of the 'output' key. print $output->{output}; #use Data::Dumper; warn Dumper \$output;