2.10.3.2 Using Automatic Conversion
Automatic conversion starts and ends with XML. That is, XML buffers are input, converted and processed to FML/FML32 buffers, and finally reconverted back to XML.
To initiate conversion between XML and FML/FML32 buffers you
must specify the BUFTYPECONV parameter in the
SERVICES section of the UBBCONFIG file.
This parameter accepts only one of two value options:
XML2FML or XML2FML32.
When you boot a server with this parameter, the input buffer is
converted from an XML buffer to an FML/FML32 buffer via client
tpcall(), tpacall(),
tpconnect(), or tpsend()before being
delivered to the service. When tpreturn() or
tpsend() is called, an FML/FML32 buffer is converted
to XML before it is returned.
Services using the BUFTYPECONV parameter allow
clients or other services to send and receive XML buffers without
changing how the existing service handles FML/FML32 buffers.
Note:
Keep in mind the following regardingBUFTYPECONV parameter use:
- When a service uses the
BUFTYPECONVparameter, all output FML/FML32 buffers are converted to XML. Creating a new service name using theBUFTYPECONVparameter allows you to output XML and keep the original service name to output FML/FML32 buffers. - AutomaticXML to FML/FML32 buffers conversion only takes action on input XML data. All other input buffers are not converted even if specified in
BUFTYPECONV. - XML, FML, and FML32 input/output service data is converted only if the service acts as a
server. In other words, if a client or other service makes a request to the service using theBUFTYPECONVparameter. - If a service using the
BUFTYPECONVparameter acts as a client, conversion does not take place. For example, a service with theBUFTYPECONVparameter usingtpcall()on another service. - In
/Qmessaging mode,TMQFORWARDusestpcall()to call a service. If the called service uses theBUFTYPECONVparameter, automatic conversion will take place.
During automatic conversion, the input XML root element name cannot be saved, so the output XML root tag uses the default root tag <FML Type="FML"> or <FML Type="FML32">.