2.3 Tuxedo-to-XML Data Type Mapping for Oracle Tuxedo Services

SALT provides a set of rules for describing Oracle Tuxedo typed buffers in an XML document as shown in the table below: These rules are exported as XML Schema definitions in SALT WSDL documents. This simplifies buffer conversion and does not require previous Oracle Tuxedo buffer type knowledge.

Table 2-2 Oracle Tuxedo Buffer Mapping to XML Schema

Oracle Tuxedo Buffer Type Description XML Schema Mapping for SOAP Message
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. xsd:string

In the SOAP message, the XML element that encapsulates the actual string data, must be defined using xsd:string directly.

Note:

The STRING data type can be specified with a max data length in the Oracle Tuxedo Service Metadata Repository. If defined in Oracle Tuxedo, the corresponding SOAP message also enforces this maximum. The GWWS server validates the actual message byte length against the definition in Oracle Tuxedo Service Metadata Repository. A SOAP fault message is returned if the message byte length exceeds supported maximums.

If GWWS server receives a SOAP message other than “UTF-8”, the corresponding string value is in the same encoding.

CARRAY (Mapping with SOAP Message plus Attachments) 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. The CARRAY buffer raw data is carried within a MIME multipart/related message, which is defined in the “SOAP Messages with Attachments’ specification.

The two data formats supported for MIME Content-Type attachments are:

  • application/octet-stream

    - For Apache Axis

  • text/xml

    For Oracle WebLogic Server

The format depends on which Web service client-side toolkit is used.

Note:

The SOAP with Attachment rule is only interoperable with Oracle WebLogic Server and Apache Axis

CARRAY data types can be specified with a max byte length. If defined in Oracle Tuxedo, the corresponding SOAP message is enforced with this limitation. The GWWS server validates the actual message byte length against the definition in the Oracle Tuxedo Service Metadata Repository.

CARRAY (Mapping with base64Binary) 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. xsd:base64Binary

The CARRAY data bytes must be encoded with base64Binary before it can be embedded in a SOAP message. Using base64Binary encoding with this opaque data stream saves the original data and makes the embedded data well-formed and readable.

In the SOAP message, the XML element that encapsulates the actual CARRAY data, must be defined with xsd:base64Binary directly.

Note:

CARRAY data types can be specified with a max byte length. If defined in Oracle Tuxedo, the corresponding SOAP message is enforced with this limitation. The GWWS server validates the actual message byte length against the definition in the Oracle Tuxedo Service Metadata Repository.
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.
xsd:string

The XML Schema built-in type, xsd:string, represents the corresponding type for buffer data stored in a SOAP message.

The GWWS server only accepts “UTF-8” encoded XML documents. If the Web service client wants to access Oracle Tuxedo services with MBSTRING buffer, the mbstring payload must be represented as “UTF-8” encoding in the SOAP request message.

Note:

The GWWS server transparently passes the “UTF-8” character set string to the Oracle Tuxedo service using MBSTRING Typed buffer format.The actual Oracle Tuxedo services handles the UTF-8 string.

For any Oracle Tuxedo response MBSTRING typed buffer (with any encoding character set), the GWWS server automatically transforms the string into “UTF-8” encoding and sends it back to the Web service client.

MBSTRING (cont.) - Limitation:

Oracle Tuxedo MBSTRING data type can be specified with a max byte length in the Oracle Tuxedo Service Metadata Repository. The GWWS server checks the byte length of the converted MBSTRING buffer value.

Max byte length value is not used to enforce the character number contained in the SOAP message.
XML Oracle Tuxedo XML typed buffers store XML documents. xsd:anyType

The XML Schema built-in type, xsd:anyType, is the corresponding type for XML documents stored in a SOAP message. It allows you to encapsulate any well-formed XML data within the SOAP message.

Limitation:

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 SOAP body; the GWWS server checks for this.

The actual XML data must be encoded using the “UTF-8” character set. Any original XML document prolog information cannot be carried within the SOAP message.

XML data type can specify a max byte data length. If defined in Oracle Tuxedo, the corresponding SOAP message must also enforce this limitation.

Note:

The SALT WSDL generator will not have xsd:maxLength restrictions in the generated WSDL document, but the GWWS server will validate the byte length according to the Oracle Tuxedo Service Metadata Repository definition.
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
  • bool
  • unsigned char
  • signed char
  • wchar_t* or wchar_t
  • unsigned int
  • unsigned long
  • long long
  • unsigned long long
  • long doubl

VIEW32 supports all the VIEW field types, mbstring, and embedded VIEW32 type.

Each VIEW or VIEW32 data type is defined as an XML Schema complex type. Each VIEW field should be one or more sub-elements of the XML Schema complex 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.

The the field types and the corresponding XML Schema type are listed as follows:

  • short maps to xsd:short
  • int maps to xsd:int
  • long maps to xsd:long
  • float maps to xsd:float
  • double maps to xsd:double
  • char (defined as byte in Oracle Tuxedo Service Metadata Repository definition),maps to xsd:byte
  • char (defined as char in Oracle Tuxedo Service Metadata Repository definition) maps to xsd:string (with restrictions maxlength=1
  • string maps to xsd:string
  • carray maps to xsd:base64Binary
  • mbstring maps to xsd:string
VIEW/VIEW32 (cont.) -
  • bool maps to xsd:Boolean
  • unsigned char maps to xsd:unsignedByte
  • signed char maps to xsd:byte
  • wchar_t* or wchar_t array maps to xsd:string
  • unsigned int maps to xsd:unsignedInt
  • unsigned long maps to xsd:unsignedLong
  • long long maps to xsd:long
  • unsigned long long maps to xsd:unsignedLong
  • long double maps to xsd:double. Do not set the value of C importer option size of long double to 128 bit. This option does not import successfully; use the default 64 bit
  • VIEW32 maps to tuxtype:view <viewname>

For more information, see VIEW/VIEW32 Considerations.

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

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

FML/FML32 buffers can only have basic data-dictionary-like definitions for each basic field data. A particular FML/FML32 buffer definition should be applied for each FML/FML32 buffer with a different type name.

Each FML/FML32 field should be one or more sub-elements within the FML/FML32 buffer XML Schema type. The name of the sub-element is the FML field name. The occurrence of the sub-element depends on the count and required count attribute of the FML/FML32 field definition.

The e field types and the corresponding XML Schema type are listed below:

  • short maps to xsd:short
  • int maps to xsd:int
  • long maps to xsd:long
  • float maps to xsd:float
  • double maps to xsd:double
  • char (defined as byte in Oracle Tuxedo Service Metadata Repository definition) maps to xsd:byte
  • char (defined as char in Oracle Tuxedo Service Metadata Repository definition) maps to xsd:string
  • string maps to xsd:string
  • carray maps to xsd:base64Binary
  • mbstring maps to xsd:string
FML/FML32

(cont.)

-
  • view32 maps to tuxtype:view <viewname>
  • fml32 maps to tuxtype:fml32 <svcname>_p<SeqNum>

To avoid multiple embedded FML32 buffers in an FML32 buffer, a unique sequence number (<SeqNum>) is used to distinguish the embedded FML32 buffers.

Note:

ptr is not supported.

For limitations and considerations regarding mapping FML/FML32 buffers, refer to FML/FML32 Considerations.

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
Each RECORD data type is defined as an XML Schema complex type. Each RECORD field should be one or more sub-elements of the XML Schema complex type.

The COBOL types and the corresponding XML Schema type are listed as follows:

  • RECORD maps to xsd:complexType
  • COMP-1 maps to xsd:float
  • COMP-2 maps to xsd:double
  • S9(18) maps to xsd:long
  • 9(18) maps to xsd:unsignedLong
  • S9(9) maps to xsd:int
  • 9(9) maps to xsd:unsignedInt
  • S9(4) maps to xsd:short
  • S9(10)V9(10) COMP-3 maps to xsd:decimal
  • X(1024) maps to xsd:string
  • @binary=true xsd:base64Binary
X_C_TYPE X_C_TYPE buffer types are equivalent to VIEW buffer types. See VIEW/VIEW32
X_COMMON X_COMMON buffer types are equivalent to VIEW buffer types, but are used for compatibility between COBOL and C programs. Field types should be limited to short, long, and string See VIEW/VIEW32
X_OCTET X_OCTET buffer types are equivalent to CARRAY buffer types See CARRAY