5.2.1 How Message Conversion Plug-ins Work
Message Conversion Plug-in is a SALT supported Plug-in defined within the SALT plug-in framework. All Message Conversion Plug-in instances have the same Plug-In ID (“P_CUSTOM_TYPE“). Each particular Message Conversion Plug-in instance may implement two functions, one is used to convert SOAP message payloads to Oracle Tuxedo buffers, and the other is used to convert Oracle Tuxedo buffers to SOAP message payloads.
These two function prototypes are defined in the example below:
Example 5-4 vtable Structure for SALT Plug-in “P_CUSTOM_TYPE” (C Language)
/* custtype_pi_ex.h */
struct custtype_vtable {
CustomerBuffer * (* soap_in_tuxedo__CUSTBUF) (void *
xercesDOMTree, CustomerBuffer * tuxbuf, CustType_Ext *
extinfo)
int (* soap_out_tuxedo__CUSTBUF) (void ** xercesDOMTree,
CustomerBuffer * tuxbuf, CustType_Ext * extinfo)
......
}
The function pointer (* soap_in_tuxedo__CUSTBUF), points to the customized function that converts the SOAP message payload to Oracle Tuxedo typed buffer.
The function pointer (* soap_out_tuxedo__CUSTBUF), points to the customized function that converts the Oracle Tuxedo typed buffer to SOAP message payload.
You may implement both functions defined in the message
conversion plug-in vtable
structure if needed. You may
also implement one function and set the other function with a
NULL
pointer.