2.5.1.3 XML Data Mapping
XML data mapping is performed using similar rules as the mapping used in SOAP mode.
The following differences are to be noted:
- 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 are generated or processed, since REST mode does not use interfaces.
- Simple buffers (
STRING
,CARRAY
,MBSTRING
andXML
) are sent and received as is, without any XML processing. The behavior is identical to JSON processing (i.e.,no mapping is necessary)_. -
FML
andFML32
requests are 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 theREST/Service/Method/@inputbuffer
attribute of the SALTDEPLOY configuration file, or<root>
element, since there is not necessarily one if subtype is not configured.VIEW
,VIEW32
,X_COMMON
andX_C_TYPE
buffers are the subtype name as root element name.
The different Oracle Tuxedo buffer types are converted into/from XML as shown in the following table:
Table 2-14 XML Data Mapping
Tuxedo Buffer Type | Description | REST 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:
In order to transmit encodings other than |
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 Any original XML document prologue information cannot be carried within the payload. In order to transmit encodings other than UTF-8, the " |
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.
The name of the sub-element is the |
<VIEW>
|
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.
|
Nested FLD_VIEW32 : the name of the view subtype must be the name of the embedded VIEW32. For Example:
|
RECORD
|
RECORD buffer type represents copybook record. RECORD types must have subtypes that designate individual record structures.
Generated COBOL types:
|
|
Note:
Non-structured buffer types (STRING
, CARRAY
, X_OCTET
and MBSTRING
) do not wrap data as XML objects, the data is transmitted as is.