next up previous 107
Next: Creating a Fourier Transform using web serices
Up: Web services
Previous: Web services


Displaying a time series using web serices

The web service interface allows FROG to be used as a display tool. The interfface will allows the user to load and display a time series by passing a SOAP message to the FROG web server.

Below is an example Perl script using the SOAP::Lite toolkit to access the FROG web service to display a time series.

  #!/usr/bin/perl

  use SOAP::Lite;
  use Getopt::Long;

  unless ( scalar @ARGV >= 1 ) {
     die "USAGE: $0 [-host host] [-port port] -file filename\n";
  }
    
  my $status = GetOptions( "host=s"       => \$host,
                           "port=s"       => \$port,
                           "file=s"       => \$file );
  
  # default hostname
  unless ( defined $host ) {
     # localhost.localdoamin
     $host = "127.0.0.1";
  } 

  # default port
  unless( defined $port ) {
     # default port for the user agent
     $port = 8084;   
  } 
  
  my $data;
  if( defined $file ) {
     unless ( open ( FILE, "<$file") ) {
        die "ERROR: Cannot open $file\n";
     }
     undef $/;
     $data = <FILE>;
     close FILE;
  } else {
     die "ERROR: No data file specified.\n";
  }
  
  my $service = SOAP::Lite->service(
      "http://$host:$port/services/FrogSOAPServices?wsdl" );
    
  print $service->displaySeries( $data ) . "\n";



next up previous 107
Next: Creating a Fourier Transform using web serices
Up: Web services
Previous: Web services

FROG - A Time Series Analysis Package
Starlink User Note 254
Alasdair Allan
21 Apr 2004
E-mail:frog@starlink.ac.uk

Copyright © 2001-2004 Council for the Central Laboratory of the Research Councils