NAME

MOBY::Async::Service - an object for communicating with Asynchronous MOBY Services


AUTHORS

Former developer Enrique de Andres Saiz (enrique.deandres@pcm.uam.es) - INB GNHC-1 (Madrid Science Park, Spain) (2006-2007).

Maintainers Jose Maria Fernandez (jmfernandez@cnio.es), Jose Manuel Rodriguez (jmrodriguez@cnio.es) - INB GN2 (CNIO, Spain).


DESCRIPTION

It provides a class to invoke asynchronous services. Its use is very similar to MOBY::Client::Service because it is its super-class. It also provides additional methods in order to have more control over the asynchronous service execution.


METHODS

new

 Name       :    new
 Function   :    create a service connection.
 Usage      :    $Service = MOBY::Async::Service->new(@args)
 Args       :    service - string with a WSDL defining an asynchronous
                           MOBY service
 Returns    :    MOBY::Async::Service object, undef if no wsdl.

silent

 Name       :    silent
 Function   :    get/set silent mode; if silent is not set, status messages
                 reported when execute method is invoked.
 Usage      :    $Service->silent()
                 $Service->silent($boolean)
 Args       :    $boolean - 0 or 1 (default).
 Returns    :    0 or 1.

execute

 Name       :    execute
 Function   :    execute the asynchronous MOBY service; this method invoke
                 internally to the submit, poll and result methods. It
                 calculates polling time according to the status messages
                 received from the provider. If from that messages is not
                 possible to infer the polling time, it calculates a
                 pseudo-random polling time, whoose value increases until
                 is up to around 1 hour.
 Usage      :    $result = $Service->execute(%args)
 Args       :    XMLinputlist => \@data
 Returns    :    a MOBY message containing whatever the service provides
                 as output.
 Comment    :    for more information about arguments look up execute
                 method at MOBY::Client::Service.

enumerated_execute

 Name       :    enumerated_execute
 Function   :    execute the asynchronous MOBY service using self-enumerated
                 inputs; this method invoke internally to the enumerated_submit,
                 poll and result methods. It calculates polling time according
                 to the status messages received from the provider. If from
                 that messages is not possible to infer the polling time, it
                 calculates a pseudo-random polling time, whoose value increases
                 until is up to around 1 hour.
 Usage      :    $result = $Service->execute(%args)
 Args       :    Input => \%data
 Returns    :    a MOBY message containing whatever the service provides
                 as output.
 Comment    :    for more information about arguments look up enumerated_execute
                 method at MOBY::Client::Service.

submit

 Name       :    submit
 Function   :    submit the asynchronous MOBY service.
 Usage      :    ($EPR, @queryIDs) = $Service->submit(%args)
 Args       :    XMLinputlist => \@data
 Returns    :    WSRF::WS_Address object with an EPR and the input queryIDs.
 Comment    :    for more information about arguments look up execute
                 method at MOBY::Client::Service.

enumerated_submit

 Name       :    enumerated_submit
 Function   :    submit the asynchronous MOBY service using self-enumerated
                 inputs.
 Usage      :    ($EPR, @queryIDs) = $Service->submit(%args)
 Args       :    XMLinputlist => \%data
 Returns    :    WSRF::WS_Address object with an EPR and the input queryIDs.
 Comment    :    for more information about arguments look up enumerated_execute
                 method at MOBY::Client::Service.

poll

 Name       :    poll
 Function   :    gets the status of a set of queryIDs.
 Usage      :    @status = $Service->poll($EPR, @queryIDs)
 Args       :    $EPR      - WSRF::WS_Address object.
                 @queryIDs - an array containing queryIDs values.
 Returns    :    an array of LSAE::AnalysisEventBlock objects.

result

 Name       :    result
 Function   :    get the result of a set of queryIDs.
 Usage      :    @result = $Service->result($EPR, @queryIDs)
 Args       :    $EPR      - WSRF::WS_Address object.
                 @queryIDs - an array containing queryIDs values.
 Returns    :    an array of MOBY messages.

destroy

 Name       :    destroy
 Function   :    destroy the resource associated to the execution of
                 an asynchronous MOBY service.
 Usage      :    $Service->result($EPR);
 Args       :    $EPR - WSRF::WS_Address object.
 Returns    :    nothing.

raw_execute

Calls the service asynchronously with the given scalar XML input. Behaves exactly as execute.