NAME
WebService::Eulerian::Analytics - Eulerian Analytics API
DESCRIPTION
This module handles the calls and responses sent to the different services provided by the WebService::Eulerian::Analytics modules. It's the parent class for all other modules and should not be used directly.
METHODS
new : constructor called by other modules
input
hash reference with the following options
o apikey : API key allowing you to request the API, mandatory (provided by Eulerian Technologies), must be sent with each requests in the SOAP Enveloppe.
o host : the host on which you have to send your API requests, mandatory (provided by Eulerian Analytics)
o timeout : in seconds the timeout after which a request is aborted, defaults to 60.
o debug : set to 1 if you want to check the raw SOAP requets, defaults to 0.
o version : indicate the version of the API you are requesting, defaults to the newest version.
output
a Perl object corresponding to the service you instantiated
fault : indicates if the last call generated a fault on the server
input
none
output
1 if a fault was generated, 0 otherwise
faultdetails : returns a hash reference containing the details on the last generated fault
input
none
output
hash reference
o code : fault code
o string : fault string
faultcode : returns the faultcode of the last generated fault
input
none
output
code describing the fault
faultstring : returns the faultstring of the last generated fault
input
none
output
text describing the fault
call : generic SOAP call method (private)
This method should not be called directly, use the main classes.
input
name of the method to be called
array of parameters sent to the method call
output
if no error : returns the value of the Response part of the SOAP call
if error : returns undef and set the fault flag to 1 and faultdetails with fault information
sample
my $rh_return = $service->call('MyMethodName', 'param1', { hash => 'param2' }, [ 'param3' ]);
#
# test if the server generated a fault
if ( $service->fault ) {
# die on fault and display the faultstring
die $service->faultstring();
}
#
# no fault : process the returned structure
use Data::Dumper;
print Dumper($rh_return);
SEE ALSO
AUTHOR
Mathieu Jondet <mathieu@eulerian.com>
COPYRIGHT
Copyright (c) 2008 Eulerian Technologies Ltd http://www.eulerian.com
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA