NonStop SOAP User's Manual

NonStop SOAP User-Exits
NonStop SOAP User’s Manual520501-012
C-7
Nonstop Soap Server User-Exit Processing Flow
The behavior of the Pre_Service() user-exit depends upon whether
skipService() is called by the Pre_Process() user-exit as described here:
°
If the skipService() method is called, then it is mandatory to implement the
Pre_Service() user-exit. In this case, the default NonStop SOAP service()
function will be skipped and the Pre_Service() user-exit must construct the
Service Request buffer and invoke the service provider. The Pre_Service()
user-exit will also receive and process the response from the service provider.
°
If the skipService() method is not called, then the output of the
Pre_Service() user-exit will be passed to the default service() function of
the NonStop SOAP server for normal processing.
The Pre_Service() user-exit can thus be implemented to call services other than
the default Pathway or NonStop processes. This user-exit will be invoked with the
SOAP Request structure, as defined by the request DDL for the service. The
Pre_Service() user-exit must transform this SOAP Request structure as necessary
to create the Service Request buffer (the request in the form expected by the service
provider). It then invokes the service provider (NonStop Tuxedo service) and receives
the response. The Pre_Service() user-exit must then transform the Service
Response buffer as necessary into the expected SOAP Response structure, as
defined by the response DDL for the service (this processing could also be performed
by the Pre_Marshal() user-exit). The SOAP Response structure is then passed to
the Pre_Marshal() user-exit or the default Marshal() function for further
processing.
Pre_Marshal() User-Exit
Input: if not skipService()—SOAP Response structure
if skipService()—SOAP Response structure or Service Response buffer
(depends upon the actions of the Pre_Service() user-exit)
Output: SOAP Response structure
The following actions are associated with the Pre-Marshal user-exit:
°
Invoked after the response is received from the service provider (via the
Service() or Pre_Service() functions)
°
Can be used to transform the Service Response buffer to the SOAP Response
structure (if skipService()), or to modify the SOAP Response structure
Note that in the case where skipService() is in effect, the transformation of the
Service Response buffer to the SOAP Response structure can be performed either by
the Pre_Service() user-exit or by the Pre_Marshal() user-exit. The point here is
that sometime before the default NonStop SOAP marshal() function executes, the
Service Response buffer must be in the correct SOAP Response structure format that
Note. skipService() method can be called from the Pre_Service() user-exit itself
rather than from the Pre_Process() user-exit to produce the same outcome.