SOAP Callback Operations

SOAP callback operations are pre-defined operations that are called before or after a SOAP request is handled for web services call-in or call-out. The callback operations make it possible to add or interpret SOAP header elements, encrypt or decrypt parts of the SOAP envelope, provide SOAP fault error handling, or perform other desired processing of the SOAP envelope.

The operation names and parameters are predefined, but the implementation depends on the developer. The names of the parameters are optional. Any other change to the interface, such as additional parameters or a different operation name, cause the operation to fail.

Note:  The SOAP_CALLOUT_PRE and SOAP_CALLOUT_POST are only available in the U2.0 SOAP connector.

SOAP Callback Operations for Call-Out

This diagram shows where the callback operations are invoked in the request/response cycle between caller and the web service. The caller on the left is a Uniface component calling out to a third-party web service. The caller on the right is a third-party application calling in to a Uniface web service.

Calling a Web Service, with Callback operations

The call-out callback functions allow you to intercept the SOAP envelope that has been prepared by the SOAP connector just before it is sent to the web service, and just after it has been received from the provider.

Similarly, the call-in callback functions intercept the SOAP envelope directly after it has been received from the caller to a Uniface web service and just before the response is sent back to the caller.

To use callback operations, you need to create one or more Uniface services that implement the defined operations, and configure Uniface so that it can find the component containing the callback operations. For call-out callback operations, you need specify the services that implement the callback operations in the assignment file used by the call-out application. For call-in callback operations, you need to specify the services in the assignment files used by the server. By default, this is wasv.asn.

If the services are specified, but the components cannot be found, processing stops and an error is returned.