Description
The callback service performs a main service and then runs a second service to post-process the response from the first.
The main purpose of the callback service is to run script-based callback logic after another service. This is particularly required where the first service may take a long time, and calling it from a script would not be practical because of the restrictions on long-running scripts.
The elements on the Callback service, other than <service> and <callback>, are passed into the service and callback service if not already present. This means that credentials and the protected parameter are passed, plus any other parameters.
The callback service is also passed a <serviceResponse> element which contains the response element from the main service. Errors in the main service are passed in using normal response conventions into the callback service. Exceptions are captured and passed into the callback service as errors.
If the <Callback> itself has a <serviceResponse> element, which would be copied to the callback service request, then the response from the main service is prepended to this, i.e. added as the first element. This means that if there is a Callback within a Callback, the callback service in the inner Callback can retrieve the response from the inner main service as 'serviceResponse/*[1]' and the response from the outer main service as 'serviceResponse/*[2]'.
The main service and callback service are both passed through the <Run> service to ensure that only authorised services can be run.
Input
<Callback>
<userLogonReference>userid</userLogonReference>
<password>password</password>
<service>
<MainService/>
</service>
<callback>
<CallbackService/>
</callback>
</Callback>
<service> and <callback> each contain a single element, the main service and callback service respectively. These can be any service.
Output
The output of the service is the response from the callback service.
Errors
103 - parameter error
Any other errors are as set by the callback service.