2.5.2.3 XML Data Mapping

XML data mapping is performed using similar rules as the mapping used in SOAP mode.

Note:

  • Floating point numbers without decimal value get represented as integers, for example: 10.0 is printed as 10. This is currently a limitation.
  • No namespaces is generated or processed, since HTTP mode does not use interfaces.
  • Simple buffers (STRING, CARRAY, MBSTRING, and XML) are sent and received as is, without any XML processing. The behavior is identical to JSON processing (i.e.,no mapping is necessary.
  • FML and FML32 requests must be wrapped by a root element (which name is ignored, as long as the XML is formed properly), and replies are wrapped in an element with the same name as the subtype as specified in the HTTP/Service/@outputbuffer attribute of the SALTDEPLOY configuration file, or <root> element if subtype is not configured. VIEW, VIEW32, X_COMMON, and X_C_TYPE buffers use the subtype name as the root element name.

The different Oracle Tuxedo buffer types are converted into/from XML in the following manner as shown in table below:

Table 2-17 XML Data Mapping

Oracle Tuxedo Buffer Type Description HTTP XML Mapping Example
STRING Oracle Tuxedo STRING typed buffers are used to store character strings that terminate with a NULL character. Oracle Tuxedo STRING typed buffers are self-describing. HELLO WORLD!
CARRAY Oracle Tuxedo CARRAY typed buffers store character arrays, any of which can be NULL. CARRAY buffers are used to handle data opaquely and are not self-describing. Binary content
MBSTRING Oracle Tuxedo MBSTRING typed buffers are used for multibyte character arrays. Oracle Tuxedo MBSTRING buffers consist of the following three elements:

- Code-set character encoding

- Data length

- Character array of the encoding.

In order to transmit encodings other than UTF-8, the "enableMultiEncoding" property must be set to "true" in the SALTDEPLOY configuration.

Multi-byte string encoded according to Content-Type setting.
XML Oracle Tuxedo XML typed buffers store XML documents.

The GWWS server validates that the actual XML data is well-formed. It will not do any other enforcement validation, such as Schema validation.

Only a single root XML buffer is allowed to be stored in the payload; the GWWS server checks for this.

Any original XML document prologue information cannot be carried within the payload.

In order to transmit encodings other than UTF-8, the "enableMultiEncoding" property must be set to "true" in the SALTDEPLOY configuration.

XML fragment as-is
X_C_TYPE Same as VIEW/VIEW32 -
X_COMMON Same as VIEW/VIEW32 -
X_OCTET Same as CARRAY -
VIEW/VIEW32 Oracle Tuxedo VIEW and VIEW32 typed buffers store C structures defined by Oracle Tuxedo applications.

VIEW structures are defined by using VIEW definition files. A VIEW buffer type can define multiple fields.

VIEW supports the following field types:

  • short
  • int
  • long
  • float
  • double
  • char
  • string
  • carray (represented as base64 encoded content)
  • bool
  • unsigned char
  • signed char
  • wchar_t* wchar_t
  • unsigned int
  • unsigned long
  • long long
  • unsigned long long
  • long double
<VIEW>
<viewfieldname>
fieldcontent
</viewfieldname>
</VIEW>
- VIEW32 supports all the VIEW field types, mbstring, and embedded VIEW32 type.

The name of the sub-element is the VIEW field name. The occurrence of the sub-element depends on the count attribute of the VIEW field definition. The value of the sub-element should be in the VIEW field data type corresponding XML Schema type.

-
FML/FML32 Oracle Tuxedo FML and FML32 type buffers are proprietary Oracle Oracle Tuxedo system self-describing buffers. Each data field carries its own identifier, an occurrence number, and possibly a length indicator.

FML supports the following field types:

  • FLD_CHAR
  • FLD_SHORT
  • FLD_LONG
  • FLD_FLOAT
  • FLD_DOUBLE
  • FLD_STRING
  • FLD_CARRAY (as base64 encoded content)

FML32 supports all the FML field types and FLD_PTR, FLD_MBSTRING, FLD_FML32, and FLD_VIEW32.

Nested FLD_VIEW32: the name of the view subtype must be the name of the embedded VIEW32. For Example:
VIEW32 example.v definition file:
VIEW v32example
char flag1 - 1 ---
string str - 1 - 100
XML content (EVIEW32 is a FLD_VIEW32 fml32 type):
<EVIEW32>
<v32example>
<flag1>x</flag1>
<str>somestring</str>
</v32example>
</EVIEW32>
RECORD RECORD buffer type represents copybook record. RECORD types must have subtypes that designate individual record structures.

Generated COBOL types:

  • RECORD
  • COMP-1
  • COMP-2
  • S9(18)
  • 9(18)
  • S9(9)
  • 9(9)
  • S9(4)
  • S9(10)V9(10)
  • X(1024)
  • @binary=true
<myRecord>
  <name>aaa</name>
  <num>1000</num>
  <subgroup>
    <long1> 3000 </long1>
    <string1> www </string1>
  </subgroup>
</myRecord>

Note:

Non-structured buffer types (STRING, CARRAY, X_OCTET and MBSTRING) will not wrap data as XML objects, the data is transmitted as is.