Sending MBSTRING Data to an Oracle Tuxedo Domain Receiving MBSTRING Data from an Oracle Tuxedo Domain

Using FML with Oracle WebLogic Tuxedo Connector 7-7

7.6 Using the XmlFmlCnv Class for XML to and From FMLFML32 Translation

An alternative option to using the tBridge to automatically translate XML buffers to and from FMLFML32 is to use the XmlFmlCnv class which supports ordering, grouping and beautifying functionality. The following code listing is an example that uses the XmlFmlCnv class for conversion to and from XML buffer formats. import weblogic.wtc.jatmi.TypedFML32; import weblogic.wtc.jatmi.FldTbl; import weblogic.wtc.gwt.XmlFmlCnv; public class xml2fml { public static void mainString[] args { String xmlDoc = XMLMyStringhelloMyStringXML; TypedFML32 fmlBuffer = new TypedFML32new MyFieldTable; XmlFmlCnv c = new XmlFmlCnv; fmlBuffer = c.XMLtoFML32xmlDoc, fmlBuffer.getFieldTables; String result = c.FML32toXMLfmlBuffer; System.out.printlnresult; } } See Class XmlFmlCnv.

7.6.1 Limitations of XmlFmlCnv Class

The FLD_MBSTRING field in FML32 is not supported by the XmlFmlCnv.FML32toXML method in this release.

7.7 MBSTRING Usage

A TypedMBString object can be used almost identically as a TypedString object in a WTC application code. The only difference is that TypedMBString has a codeset encoding name associated to the string data. This section includes the following topics. ■ Section 7.7.1, Sending MBSTRING Data to an Oracle Tuxedo Domain ■ Section 7.7.2, Receiving MBSTRING Data from an Oracle Tuxedo Domain ■ Section 7.7.3, Using FML with Oracle WebLogic Tuxedo Connector

7.7.1 Sending MBSTRING Data to an Oracle Tuxedo Domain

When an Oracle Tuxedo message that contains an MBSTRING data is sent to another Oracle Tuxedo domain, TypedMBString uses the conversion function of java.lang.String class to convert between Unicode and an external encoding. The TypedMBString has a codeset encoding name associated to the string data. When a TypedMBString object is created by a WTC application code, the encoding name is set to null. The null value of the encoding name means that the default encoding name is used for Unicode string to byte array conversion while sending the MBSTRING data to a remote domain. By default, the Javas default encoding name for byte array string is used for the default encoding name.You can specify encoding or 7-8 Oracle Fusion Middleware WebLogic Tuxedo Connector Programmers Guide for Oracle WebLogic Server accept the default encoding. The following order defines the order of precedence for TypedMBString. 1. Specify the encoding name by setMBEncoding method. 2. Specify the encoding name through the setDefaultMBEncoding method of weblogic.wtc.jatmi.MBEncoding class. 3. Specify the encoding name through the RemoteMBEncoding attribute of the WTCResourcesMBean. 4. MBENCODINGPROPERTY system property value. 5. Accept the Java default encoding name.

7.7.2 Receiving MBSTRING Data from an Oracle Tuxedo Domain

When an Oracle Tuxedo message that contains an MBSTRING data is received from a remote domain, the following actions take place. 1. WTC determines the encoding of the MBSTRING data by the codeset tcm in the received message. 2. WTC creates a TypedMBString object. A TypedMBString object can be used almost identically as a TyepdString object in WTC application code. However, the TypedMBString has a codeset encoding name associated to the string data. 3. WTC passes the TypedMBString object to the WTC application code. The application code knows the encoding of the received MBSTRING data by the instance method getMBEncoding.

7.7.3 Using FML with Oracle WebLogic Tuxedo Connector