SOAP: Client Example


my $paperNumber = $q->param('paper');

my $paperDetails = SOAP::Lite
  -> uri('/TimeTable')   # static despatch, class name
  -> proxy('https://server.waikato.ac.nz/soap/timetable.cgi')
  -> getPaperTitle($paperNumber);
my @results = $paperDetails->paramsout;

unless ($paperDetails->fault) {
  print "<strong>Params fetched:</strong>";
  foreach my $tempVar (@results) {
    print "<br>$tempVar\n";
  }
} else {
  print "<h2>SOAP Error!!!</h2>" .
  "<br>FaultCode: $paperDetails->faultcode" .
  "<br>FaultString: $paperDetails->faultstring" .
  "<br>FaultDetail: $paperDetails->faultdetail";
}