<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/env perl

use strict;
use XML::Compile::SOAP11;
use XML::Compile::WSDL11;
use XML::Compile::Transport::SOAPHTTP;
use Data::Dumper;

eval
{
    # Retriving and processing the WSDL
    my $wsdl  = XML::LibXML-&gt;new-&gt;parse_file('http://pedagogix-tagc.univ-mrs.fr/rsat/web_services/RSATWS.wsdl');
    my $proxy = XML::Compile::WSDL11-&gt;new($wsdl);
    
    # Generating a request message based on the WSDL
    my $client = $proxy-&gt;compileClient('get_result');

    my $ticket = $ARGV[0];

    my %args = (
	'ticket' =&gt; $ticket
	);

    # Calling the service and getting the response
    print "Sending request to the server\n";
    my $answer = $client-&gt;( request =&gt; {%args});

    if ( defined $answer ) {
      if ($answer-&gt;{output}-&gt;{response}-&gt;{client}){
#      if ($answer-&gt;{output}-&gt;{response}-&gt;{server}){
	print "\nResult :\n", $answer-&gt;{output}-&gt;{response}-&gt;{client}, "\n";
#	print "\nResult :\n", $answer-&gt;{output}-&gt;{response}-&gt;{server}, "\n";
	exit 0;
      }
    } else {    
      print "Failed\n";
      exit 1;
    }
};

if ($@)
{
    print "Caught an exception\n";
    print $@."\n";
    exit 1;
}
</pre></body></html>