NonStop SOAP 4.1 User's Manual

1. Add the parameter name MessageReceiverUserFunctions under the axisconfig
element in the axis2.xml file. The value of the MessageReceiverUserFunctions
parameter must be set to the DLL (.so file) class that implements the Message Receiver User
Functions:
<parameter name=MessageReceiverUserFunctions>[Message Receiver User Functions DLL]</parameter>
For example:
<parameter name=MessageReceiverUserFunctions>axis2_MRUF_empdb</parameter>
2. Place the DLL that implements the Message Receiver User Functions in the <NonStop SOAP
Deployment Directory>/MRUserFunctions directory.
NonStop SOAP 4 generates the name of the DLL by adding lib as the prefix and .so as the
suffix to the Message Receiver User Functions DLL class defined in the axis2.xml configuration
file.
NOTE: If Message Receiver User Functions are configured both at the service level and the
global level, NonStop SOAP 4 calls the Message Receiver User Functions at the global level
before the Message Receiver User Functions at the service level. For example, if the global
Message Receiver User Functions change the PATHMON name from $pmon1 to $pmon2, the
service level Message Receiver User Functions will receive the PATHMON value as $pmon2,
not $pmon1.
Modifying the Data Buffer Passed to the Service using NonStop SOAP 4 Message
Receiver User Functions
Message Receiver User Functions enable you to modify the data buffer before it is passed to the
Pathway or NonStop process-based service.
Modifying the data buffer involves the following steps:
“Setting the pre_service and pre_marshal Message Receiver User Functions (page 139)
“Implementing the pre_service and pre_marshal Message Receiver User Functions
(page 141)
Setting the pre_service and pre_marshal Message Receiver User Functions
After loading the Message Receiver User Function DLL, the Pathway Message Receiver invokes the
get_instance()function in the Message Receiver User Function.
The following tasks are performed in the get_instance()function that is implemented as a part
of the Message Receiver User Function:
1. “Creating an instance of the Message Receiver User Function structure (page 139)
2. “Setting pre_service and pre_marshal function names (page 140)
NOTE: The SoapAdminCL tool generates the stub files along with integration functions, such as
get_instance(), create(), and remove_instance(). It also sets the pre_service
and pre_marshal Message Receiver User Functions names and generates the skeleton code for
these functions. You must implement the business logic in the pre_service and pre_marshal
Message Receiver User Functions skeleton code generated by the SoapAdminCL tool.
Creating an instance of the Message Receiver User Function structure
You must invoke the MessageReceiverUserFunctions_create()API from the
axis2_get_instance()function to create an instance of the Message Receiver User Functions
structure call.
Synopsis:
AXIS2_EXPORT axis2_MessageReciverUserFunctions_t *MessageReceiverUserFunctions_create (
const axutil_env_t * env)
Customizing the NonStop SOAP 4 Message Process Using Message Receiver User Functions 139