NonStop SOAP 4.1 User's Manual
<phase name="userPhase1"/>
</phaseOrder>
<phaseOrder type="outflow">
<phase name="userPhase2"/>
<phase name="MessageOut"/>
<phase name="userPhase3"/>
</phaseOrder>
Update the axis2.xml configuration file and restart the NonStop SOAP 4 server. A user-defined
phase is added to the phase order. You can now attach handlers and modules to the user-defined
phase.
Deploying and Attaching a Module
Modules can be attached to a user-defined phase or a pre-defined phase in a NonStop SOAP 4
deployment.
A module is deployed by copying the handler DLLs and the module.xml file to the <NonStop
SOAP Deployment Directory>/modules/<module_ name> directory. The NonStop SOAP
4 server loads each module.xml configuration file during startup and attaches the handlers with
the phase defined in the module.xml configuration file.
For more information about developing handlers and modules, see “Developing a Sample Module
for NonStop SOAP 4” (page 132).
You can attach a module at the global level or service level. When a module is configured at the
global level, it will be attached to all the services in a particular NonStop SOAP 4 deployment.
To attach a module at the global level, set the ref attribute of the module element in the axis2.xml
configuration file.
When a module is configured at the service level, it will be attached only for a specific service in
the NonStop SOAP 4 deployment. To attach a module at the service level, set the ref attribute of
the module element in the services.xml configuration file.
For example, to attach the transaction module available in the NonStop SOAP 4 distribution
for a particular service in your NonStop SOAP 4 deployment, add the <module
ref="transaction"/> element under the Service element in the services.xml file. Similarly,
to attach the transaction module at the global level, add the <module
ref="transaction"/> element under the global module section in the axis2.xml file.
During startup, NonStop SOAP 4 will load the transaction handler DLL from the <NonStop SOAP
4 Deployment Directory>/modules/transaction/<transaction handler DLL
name>.so . The transaction handler will be attached to the phase defined in the <NonStop SOAP
4 Deployment Directory>/modules/transaction/module.xml configuration file. For
more information about services.xml, axis2.xml, and module.xml, see “NonStop SOAP 4
Configuration Files” (page 177).
Developing a Sample Module for NonStop SOAP 4
This section describes the procedure to develop a sample module named logging and its handlers:
loggingInHandler and loggingOutHandler.
The logging module enables you to log the input and output XML message in a log file.
• The loggingInHandler handler is engaged in the inflow and logs the request message
to a log file.
• The loggingOutHandler handler is engaged in the outflow and logs the response
message to a log file.
The logging module is engaged with the empdb service. You must have the empdb service
deployed in your NonStop SOAP 4 deployment. For more information on deploying the empdb
service, see “Installing NonStop SOAP” (page 36).
Developing the logging module involves the following tasks:
132 Customizing NonStop SOAP 4 Message Processing










