Administration Guide

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Data Mapping and Conversions

This section contains the following topics:

 


Overview

Each Tuxedo buffer type is described using an XML Schema in the generated WSDL document. This means that Tuxedo service request/response data is represented in regular XML format. The XML format input data is automatically converted into Tuxedo typed buffers according to the corresponding buffer type schema definitions.

The converted typed buffers are used as the input of the Tuxedo service. Any typed buffer returned by the Tuxedo service is converted into XML format and returned to the Web service client in SOAP response message.

 


Converting Tuxedo Buffers to/from XML

The GWWS server automatically converts SOAP message into Tuxedo buffer types and Tuxedo buffer types into XML SOAP messages. BEA SALT provides a set of rules for describing Tuxedo typed buffers in an XML document. These rules are exported as XML Schema definitions in SALT WSDL documents. This simplifies buffer conversion and does not require previous knowledge about Tuxedo buffer types.

Table 3-1 Tuxedo Buffer Mapping to XML Schema
Tuxedo Buffer Type
Description
XML Schema Mapping for SOAP Message
STRING
Tuxedo STRING typed buffers are used to store character strings that terminate with a NULL character. Tuxedo STRING typed buffers are self-describing buffer.
xsd:string
In the SOAP message, the XML element that encapsulates the actual string data, must be defined with xsd:string directly.
Notes:
  • STRING data type can be specified with a max data length in the Tuxedo Service Metadata Repository. If defined in Tuxedo, the corresponding SOAP message also enforces this maximum. The GWWS server validates the actual message byte length against the definition in Tuxedo Service Metadata Repository. A SOAP fault message returns if the message byte length exceeds suported maximums.
  • The GWWS gateway process requires that the XML document is encoded with "UTF-8". So the string data in the SOAP message can only be in "UTF-8" encoding.
CARRAY
(Mapping with SOAP Message plus Attachments)
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
    • Use for Apache Axis
  • text/xml
    • Use for BEA WebLogic Server
The format depends on which Web service client side toolkit is used.

Note: The SOAP with Attachment rule is only interoperable with BEA WebLogic Server and Apache Axis.

For more information, see Generating the WSDL Document.
Notes:
CARRAY data type can be specified with a max byte length. If Tuxedo has such a definition, the corresponding SOAP message will also be enforced with this limitation. The GWWS server validates the actual message byte length against the definition in Tuxedo Service Metadata Repository.
CARRAY
(Mapping with base64Binary)
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 into 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.
For more information, see Generating the WSDL Document.

Note: If your Tuxedo service uses tpxmltofml, the <carray> tag value must be a hex string.

Notes:
CARRAY data type can be specified with a max byte length. If defined in Tuxedo, the corresponding SOAP message is be enforced with this limitation. The GWWS server validates the actual message byte length against the definition in Tuxedo Service Metadata Repository.
MBSTRING
Tuxedo MBSTRING Typed Buffers are used for multibyte character arrays. 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 Web service client wants to access 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 into the Tuxedo service with MBSTRING Typed buffer format, and then the actual Tuxedo services handles the UTF-8 string.

For any 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:
Tuxedo MBSTRING data type can be specified with a max byte length in the Tuxedo Service Metadata Repository. if defined in Tuxedo, the corresponding SOAP message should also be enforced with this limitation.

Note: The BEA 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 Tuxedo Service Metadata Repository definition.

XML
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 which 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, but 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.
Be sure the actual XML data is 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 Tuxedo, the corresponding SOAP message also must enforce this limitation.

Note: The BEA 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 Tuxedo Service Metadata Repository definition.

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 type, 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 xsd:base64Binary
VIEW/VIEW32
Tuxedo VIEW and VIEW32 typed buffers store C structures defined by 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
VIEW32 supports all the VIEW field types and mbstring.
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 Tuxedo Service Metadata Repository definition) maps to xsd:byte
  • char (defined as char in 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.)
 
For limitations and considerations regarding mapping VIEW/VIEW32 buffers, refer to VIEW/VIEW32 Considerations.
FML/FML32
Tuxedo FML and FML32 typed buffers are proprietary BEA Tuxedo system self-describing buffers in which 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 requiredcount 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 Tuxedo Service Metadata Repository definition) maps to xsd:byte
  • char (defined as char in 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.

Tuxedo STRING Typed Buffers

Tuxedo STRING typed buffer are used to store character strings that terminate with a NULL character. Tuxedo STRING typed buffers are self-describing buffer.

The following example depicts the TOUPPER Tuxedo service, which accepts a STRING typed buffer. The SOAP message is as follows:

<?xml ... encoding="UTF-8" ?>
   ......
   <SOAP:body>
      <m:TOUPPER xmlns:m="urn:......">
           <inbuf>abcdefg</inbuf>
      </m:TOUPPER>
   </SOAP:body>

The XML Schema for <inbuf> is:

<xsd:element  name="inbuf" type="xsd:string" />

Tuxedo CARRAY Typed Buffers

Tuxedo CARRAY typed buffers are used to store character arrays, any of which can be NULL. They are used to handle data opaquely and are not self-describing. Tuxedo CARRAY typed buffers can map to xsd:base64Binary or MIME attachments. The default is xsd:base64Binary.

Mapping Example Using base64Binary

Listing 3-1 shows the SOAP message for the TOUPPER Tuxedo service, which accepts a CARRAY typed buffer, using base64Binary mapping.

Listing 3-1 Soap Message for a CARRAY Typed Buffer Using base64Binary Mapping
<SOAP:body>
       <m:TOUPPER xmlns:m="urn:......">
              <inbuf>QWxhZGRpbjpvcGVuIHNlc2FtZQ==</inbuf>
       </m:TOUPPER>
</SOAP:body>

The XML Schema for <inbuf> is:

<xsd:element  name="inbuf" type="xsd:base64Binary" />

Mapping Example Using MIME Attachment

Listing 3-2 shows the SOAP message for the TOUPPER Tuxedo service, which accepts a CARRAY typed buffer, as a MIME attachment.

Listing 3-2 Soap Message for a CARRAY Typed Buffer Using MIME Attachment
MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml;
    start="<claim061400a.xml@example.com>"
Content-Description: This is the optional message description.

--MIME_boundary
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <claim061400a.xml@ example.com>

<?xml version='1.0' ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
..
<m:TOUPPER xmlns:m="urn:...">
<inbuf href="cid:claim061400a.carray@example.com"/>
</m:TOUPPER>
..
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--MIME_boundary
Content-Type: text/xml
Content-Transfer-Encoding: binary
Content-ID: <claim061400a. carray @example.com>

...binary carray data...
--MIME_boundary--
The WSDL for carray typed buffer will look like the following:
<wsdl:definitions ...>
<wsdl:types ...>
<xsd:schema ...>
<xsd:element name="inbuf" type="xsd:base64Binary" />
</xsd:schema>
</wsdl:types>

......

<wsdl:binding ...>
    <wsdl:operation name="TOUPPER">
           <soap:operation ...>
           <input>
                 <mime:multipartRelated>
                      <mime:part>
                           <soap:body parts="..." use="..."/>
                      </mime:part>
                      <mime:part>
                           <mime:content part="..." type="text/xml"/>
                      </mime:part>
                 </mime:multipartRelated>
           </input
           ......
    </wsdl:operation>
</wsdl:binding>

</wsdl:definitions>

Tuxedo MBSTRING Typed Buffers

Tuxedo MBSTRING Typed Buffers are used for multibyte character arrays. Tuxedo MBSTRING buffers consist of the following three elements: code-set character encoding, data length, character array encoding.

Note: You cannot embed multibyte characters with non "UTF-8" code sets into the SOAP message directly.

Figure 3-1 shows the SOAP message for the MBSERVICE Tuxedo service, which accepts an MBSTRING typed buffer.

Figure 3-1 SOAP Message for an MBSTRING Buffer

SOAP Message for an MBSTRING Buffer

The XML Schema for <inbuf> is:

<xsd:element  name="inbuf" type="xsd:string" />
WARNING: BEA SALT converts the Japanese character "—" (EUC-JP 0xa1bd, Shift-JIS 0x815c) into UTF-16 0x2015.
WARNING: If you use another character set conversion engine, the EUC-JP or Shift-JIS multibyte output for this character may be different. For example, the Java il8n character conversion engine, converts this symbol to UTF-16 0x2014. The result is the also same when converting to UTF-8, which is the BEA SALT default
WARNING: If you use another character conversion engine and Japanese "—" is included in MBSTRING, TUXEDO server-side MBSTRING auto-conversion cannot convert it back into Shift-JIS or EUC-JP.

Tuxedo XML Typed Buffers

Tuxedo XML typed buffers store XML documents.

Listing 3-3 shows the Stock Quote XML document.

Listing 3-4 shows the SOAP message for the STOCKINQ Tuxedo service, which accepts an XML typed buffer.

Listing 3-3 Stock Quote XML Document
<?xml version="1.0" encoding="UTF-8"?>
<!-- "Stock Quotes". -->
<stockquotes>
  <stock_quote>
     <symbol>BEAS</symbol>
     <when>
       <date>01/27/2001</date>
       <time>3:40PM</time>
     </when>
     <change>+2.1875</change>
     <volume>7050200</volume>
  </stock_quote>
</stockquotes>

Then part of the SOAP message will look like the following:

Listing 3-4 SOAP Message for an XML Buffer
<SOAP:body>
       <m: STOCKINQ xmlns:m="urn:......">
       <inbuf>
       <stockquotes>
              <stock_quote>
                     <symbol>BEAS</symbol>
                     <when>
                     <date>01/27/2001</date>
                     <time>3:40PM</time>
                     </when>
                     <change>+2.1875</change>
                     <volume>7050200</volume>
              </stock_quote>
       </stockquotes>
       </inbuf>
       </m: STOCKINQ >
</SOAP:body>

The XML Schema for <inbuf> is:

<xsd:element  name="inbuf" type="xsd:anyType" />
Note: If a default namespace is contained in a Tuxedo XML typed buffer and returned to the GWWS server, the GWWS server converts the default namespace to a regular name. Each element is then prefixed with this name.
Note: For example, If a Tuxedo service returns a buffer having a default namespace to the GWWS server as shown in Listing 3-5, the GWWS server converts the default namespace to a regular name as shown in Listing 3-6.
Listing 3-5 Default Namespace Before Sending to GWWS Server
<Configuration xmlns="http://www.bea.com/Tuxedo/Salt/200606">
<Servicelist id="simpapp">
<Service name="toupper"/>
</Servicelist>
<Policy/>
<System/>
<WSGateway>
<GWInstance id="GWWS1">
<HTTP address="//myhost:8080"/>
</GWInstance>
</WSGateway>
</Configuration>
Listing 3-6 GWWS Server Converts Default Namespace to Regular Name
	<dom0:Configuration 	
xmlns:dom0="http://www.bea.com/Tuxedo/Salt/200606">
<dom0:Servicelist dom0:id="simpapp">
<dom0:Service dom0:name="toupper"/>
</dom0:Servicelist>
<dom0:Policy></<dom0:Policy>
<dom0:System></<dom0:System>
<dom0:WSGateway>
<dom0:GWInstance dom0:id="GWWS1">
<dom0:HTTP dom0:address="//myhost:8080"/>
</dom0:GWInstance>
</dom0:WSGateway>
</dom0:Configuration>

Tuxedo VIEW/VIEW32 Typed Buffers

Tuxedo VIEW and VIEW32 typed buffers are used to store C structures defined by Tuxedo applications. You must define the VIEW structure with the VIEW definition files. A VIEW buffer type can define multiple fields.

Listing 3-7 shows the MYVIEW VIEW definition file.

Listing 3-8 shows the SOAP message for the MYVIEW Tuxedo service, which accepts a VIEW typed buffer.

Listing 3-7 VIEW Definition File for MYVIEW Service
VIEW MYVIEW
#type     cname       fbname       count       flag       size       null
float     float1       -            1           -          -          0.0
double    double1      -            1           -          -          0.0
long      long1        -            3           -          -          0
string    string1      -            2           -          20        '\0'
END
Listing 3-8 SOAP Message for a VIEW Typed Buffer
<SOAP:body>
       <m: STOCKINQ xmlns:m="http://......">
              <inbuf>
                     <float1>12.5633</float1>
                     <double1>1.3522E+5</double1>
                     <long1>1000</long1>
                     <long1>2000</long1>
                     <long1>3000</long1>
                     <string1>abcd</string1>
                     <string1>ubook</string1>
              </inbuf>
       </m: STOCKINQ >
</SOAP:body>

The XML Schema for <inbuf> is shown in Listing 3-9.

Listing 3-9 XML Schema for a VIEW Typed Buffer
<xsd:complexType name=" view_MYVIEW">
  <xsd:sequence>
       <xsd:element name="float1" type="xsd:float" />
       <xsd:xsd:element name="double1" type="xsd:double" />
       <xsd:element name="long1" type="xsd:long" minOccurs="3" />
       <xsd:element name="string1" type="xsd:string minOccurs="3" />
  </xsd:sequence>
</xsd: complexType >
<xsd:element name="inbuf" type="tuxtype:view_MYVIEW" />

VIEW/VIEW32 Considerations

The following considerations apply when converting Tuxedo VIEW/VIEW32 buffers to and from XML.

Tuxedo FML/FML32 Typed Buffers

Tuxedo FML and FML32 typed buffer are proprietary BEA Tuxedo system self-describing buffers in which each data field carries its own identifier, an occurrence number, and possibly a length indicator.

FML Data Mapping Example

Listing 3-10 shows the SOAP message for the TRANSFER Tuxedo service, which accepts an FML typed buffer.

The request fields for service LOGIN are:

ACCOUNT_ID        1       long              /* 2 occurrences, The withdrawal account is 1st, and the deposit account is 2nd  */
AMOUNT 2 float /* The amount to transfer */

Part of the SOAP message is as follows:

Listing 3-10 SOAP Message for an FML Typed Buffer
<SOAP:body>
       <m:TRANSFER xmlns:m="urn:......">
              <inbuf>
                     <ACCOUNT_ID>40069901</ACCOUNT_ID>
                     <ACCOUNT_ID>40069901</ACCOUNT_ID>
                     <AMOUNT>200.15</AMOUNT>
              </inbuf>
       </m:TRANSFER >
</SOAP:body>

The XML Schema for <inbuf> is shown in Listing 3-11.

Listing 3-11 XML Schema for an FML Typed Buffer
<xsd:complexType name=" fml_TRANSFER_In">
  <xsd:sequence>
       <xsd:element name="ACCOUNT_ID" type="xsd:long" minOccurs="2"/>
       <xsd:element name=" AMOUNT" type="xsd:float" />
  </xsd:sequence>
</xsd: complexType >
<xsd:element name="inbuf" type="tuxtype: fml_TRANSFER_In" />

FML32 Data Mapping Example

Listing 3-12 shows the SOAP message for the TRANSFER Tuxedo service, which accepts an FML32 typed buffer.

The request fields for service LOGIN are:

CUST_INFO            1       fml32         /* 2 occurrences, The withdrawal customer is 1st, and the deposit customer is 2nd  */ 
ACCOUNT_INFO 2 fml32 /* 2 occurrences, The withdrawal account is 1st, and the deposit account is 2nd */
AMOUNT 3 float /* The amount to transfer */

Each embedded CUST_INFO includes the following fields:

CUST_NAME       10       string 
CUST_ADDRESS    11       carray
CUST_PHONE      12       long

Each embedded ACCOUNT_INFO includes the following fields:

ACCOUNT_ID       20       long
ACCOUNT_PW       21       carray

Part of the SOAP message will look as follows:

Listing 3-12 SOAP Message for Service with FML32 Buffer
<SOAP:body>
   <m:STOCKINQ xmlns:m="urn:......">
       <inbuf>
              <CUST_INFO>
                     <CUST_NAME>John</CUST_NAME>
                     <CUST_ADDRESS>Building 15</CUST_ADDRESS>
                     <CUST_PHONE>1321</CUST_PHONE>
              </CUST_INFO>
              <CUST_INFO>
                     <CUST_NAME>Tom</CUST_NAME>
                     <CUST_ADDRESS>Building 11</CUST_ADDRESS>
                     <CUST_PHONE>1521</CUST_PHONE>
              </CUST_INFO>
              <ACCOUNT_INFO>
                     <ACCOUNT_ID>40069901</ACCOUNT_ID>
                     <ACCOUNT_PW>abc</ACCOUNT_PW>
              </ACCOUNT_INFO>
              <ACCOUNT_INFO>
                     <ACCOUNT_ID>40069901</ACCOUNT_ID>
                     <ACCOUNT_PW>zyx</ACCOUNT_PW>
              </ACCOUNT_INFO>

              <AMOUNT>200.15</AMOUNT>
       </inbuf>
   </m: STOCKINQ >
</SOAP:body>

The XML Schema for <inbuf> is shown in Listing 3-13.

Listing 3-13 XML Schema for an FML32 Buffer
<xsd:complexType name="fml32_TRANSFER_In">
  <xsd:sequence>
     <xsd:element name="CUST_INFO" type="tuxtype:fml32_TRANSFER_p1" minOccurs="2"/>
     <xsd:element name="ACCOUNT_INFO" type="tuxtype:fml32_TRANSFER_p2" minOccurs="2"/>
     <xsd:element name="AMOUNT" type="xsd:float" />
  /xsd:sequence>
</xsd:complexType >

<xsd:complexType name="fml32_TRANSFER_p1">
     <xsd:element name="CUST_NAME" type="xsd:string" />
     <xsd:element name="CUST_ADDRESS" type="xsd:base64Binary" />
     <xsd:element name="CUST_PHONE" type="xsd:long" />
</xsd:complexType>

<xsd:complexType name="fml32_TRANSFER_p2">
     <xsd:element name="ACCOUNT_ID" type="xsd:long" />
     <xsd:element name="ACCOUNT_PW" type="xsd:base64Binary" />
</xsd:complexType>

<xsd:element name="inbuf" type="tuxtype: fml32_TRANSFER_In" />

FML/FML32 Considerations

The following considerations apply to converting Tuxedo FML/FML32 buffers to and from XML.

Tuxedo X_C_TYPE Typed Buffers

Tuxedo X_C_TYPE typed buffers are equivalent, and have similar WSDL format to Tuxedo VIEW typed buffers.They are transparent for SOAP clients. However, even though usage is similar to the Tuxedo VIEW buffer type, SALT administrators must configure the Tuxedo Service Metadata Repository for any particular Tuxedo service which uses this buffer type.

Note: All View related considerations also take effect for X_C_TYPE typed buffer.

Tuxedo X_COMMON Typed Buffers

Tuxedo X_COMMON typed buffers are equivalent to Tuxedo VIEW typed buffers. However, they are used for compatibility between COBOL and C programs. Field types should be limited to short, long, and string.

Tuxedo X_OCTET Typed Buffers

Tuxedo X_OCTET typed buffers are equivalent to CARRAY.

Note: Tuxedo X_OCTET typed buffers can only map to xsd:base64Binary type. SALT 1.1 does not support MIME attachment binding for Tuxedo X_OCTET typed buffers.

Custom Typed Buffers

BEA SALT provides a plug-in mechanism to support custom typed buffers. You can validate the SOAP message against your own XML Schema definition, allocate custom typed buffers, and parse data into the buffers and other operations.

XML Schema built-in type xsd:anyType is the corresponding type for XML documents stored in a SOAP message. While using custom typed buffers, you should define and represent the actual data into an XML format and transfer between Web service client and Tuxedo Web service stack. Similar to the XML typed buffers, only a single root XML buffer is allowed to be stored in the SOAP body. The GWWS checks this for consistency.

For more plug-in information, see Introduction to Using Plug-ins with BEA SALT.

 


WSDL Mapping Rules

In order to export Tuxedo services and Web services, Tuxedo service contract information is needed so that it can be converted into a WDSL document. SALT leverages the Tuxedo Service Metadata Repository to access Tuxedo service information.

Figure 3-2 WSDL Component Model

WSDL Component Model

Converting configuration information into WSDL specification compliant information requires mapping rules. Table 3-2 provides the mapping rules for a generated WSDL document.

Table 3-2 Basic WSDL Mapping Rules
WSDL Definition
Description
/wsdl:definitions/wsdl:types
Uses XML Schema as type system
/wsdl:definitions/wsdl:message
Each instance maps to a specific Tuxedo service input buffer or output buffer
/wsdl:definitions/wsdl:portType
Only one instance in the generated WSDL document. All Tuxedo services defined in the certain configuration instance are grouped in one WSDL portType object.
Use <wsdl:portType> to define a set of abstract operations. To associate a Tuxedo service with a <wsdl:portType> definition, use the following rules:
  • /wsdl:portType/@name
  • The name attribute value uses the following syntax:

    <Servicelist_id>_PortType

  • /wsdl:portType/wsdl:operation/@name
  • The string value of attribute name should match the associated service name defined in the SALT configuration file and Tuxedo Service Metadata Repository.

/wsdl:definitions/wsdl:portType/wsdl:operation
Each instance maps to a specific Tuxedo service
/wsdl:definitions/wsdl:binding
Only one instance in the generated WSDL document. It indicates that, only one concrete SOAP protocol, either SOAP 1.1 binding extension or SOAP 1.2 binding extension, is provided for the WSDL binding in the generated WSDL document.
/wsdl:definitions/wsdl:service
Only one instance in the generated WSDL.
/wsdl:definitions/wsdl:port
One or more instances in the generated WSDL document. It depends on the GWWS instance number used for failover.
WSDL target Namespace
The target Namespace of the generated WSDL document is composed using the following syntax:
urn:<Servicelist_ID>.wsdl
The first GWWS instance network parameters are used. Use the following Namespace conventions for each prefix:
  • xsd uses http://www.w3.org/2001/XMLSchema
  • wsdl uses http://schemas.xmlsoap.org/wsdl
  • soap11 uses http://schemas.xmlsoap.org/wsdl/soap
  • soap12 uses http://schemas.xmlsoap.org/wsdl/soap12
  • wsp uses http://schemas.xmlsoap.org/ws/2004/09/policy
  • wsrm uses http://schemas.xmlsoap.org/ws/2005/02/rm
  • beapolicy uses http://www.bea.com/wsrm/policy

WS Policy Attachment Rules

The following rules apply for attaching WS Policy files to WSDL documents.

 


SOAP Message Exchange Pattern Mapping

BEA SALT supports the following mapping rules for each Tuxedo service type and SOAP Message Exchange Pattern (MEP).

Table 3-3 Tuxedo Service to SOAP Message Exchange Pattern Mapping
Tuxedo Service Type (defined in Tuxedo Service Metadata Repository)

SOAP Message Exchange Pattern (MEP)


Required Elements for <wsdl:operation>
service/queue
Request-Response
<input>
<output>
oneway
One-way
<input>

Note: BEA SALT does not support the Tuxedo queue service type, even though it is supported in the Tuxedo Service Metadata Repository.

SOAP Message Encoding Support

BEA SALT supports two traditional message encoding styles for SOAP messages:

Document Message Style

The generated WSDL document supports the abstract message definition in document message style. Because the document style can represent SOAP messages in various XML document structures, there are many ways to define this document structure.

The following rules apply to SALT-generated WSDL documents to create a fixed-structure message description.

/wsdl:message/@name

The message name string syntax is as follows:

<Tuxedo service name + "Input | Output">

Use the Input suffix when describing an input typed buffer. Use the Output suffix when describing an output typed buffer

/wsdl:message/wsdl:part

The following format rules apply for <wsdl:part>:

Document Message Style Example

This example in this section depicts the transfer service definitions in the SALT configuration file, the corresponding transfer service contract information from the Tuxedo Service Metadata Repository, the generated WSDL document, and the associated request and response messages for the transfer service.

Listing 3-14 shows an example of a section of the BEA SALT configuration file definition for the service.

Listing 3-14 Document Message Transfer Service Servicelist Section of the SALT Configuration File
<Configuration>
   <Servicelist id="bank">
       <Service name="transfer" />
   </Servicelist>
.......
</Configuration>

The corresponding Tuxedo Service Metadata Repository transfer service contract information is shown in Listing 3-15.

Listing 3-15 Tuxedo Service Metadata Repository Transfer Service Contract Information
Service=transfer
inbuf=FML
outbuf=STRING

param=ACCOUNT_ID
type=long
access=in
count=2
requiredcount=2

param=SAMOUNT
type=string
access=in

param=result
type=STRING
access=out

BEA SALT generates a WSDL document. Listing 3-16 shows the part of the WSDL document that relates to the transfer service definition.

Listing 3-16 Transfer Service Definition in a WSDL Document
<wsdl:definition
       xmlns:tuxtype="urn:bank_typedef"
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       ......>
 <wsdl:types>
  <xsd:schema targetNamespace="urn:bank_typedef" ...... >
   <xsd:element name="transfer">
    <xsd:complexType>
     <xsd:sequence>
       <xsd:element name="FML" type="tuxtype:fml_transfer_In" />
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
   <xsd:complexType name="fml_transfer_In">
    <xsd:sequence>
       <xsd:element name="ACCOUNT_ID" type="xsd:long" minOccurs="2" maxOccurs="2" />
       <xsd:element name="SAMOUNT" type="xsd:string" />
    </xsd:sequence>
   </xsd:complexType>

   <xsd:element name="transferResponse">
    <xsd:complexType>
     <xsd:sequence>
       <xsd:element name="STRING" type="xsd:string" />
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
   .......
  </xsd:schema>
 </wsdl:types>

 <wsdl:message name="transferInput">
  <wsdl:part name="parameters" element="tuxtype:transfer" />
 </wsdl:message>
 <wsdl:message name="transferOutput">
  <wsdl:part name="parameters" element="tuxtype:transferResponse" />
 </wsdl:message>

 ......
</wsdl:definition>

Listing 3-17 shows the SOAP request message for the transfer service.

Listing 3-17 Sample SOAP1.1 Transfer Service Request Message
<soap:envelope  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >
    <soap:body>
     <transfer xmlns=" urn:bank_typedef">
      <FML>
       < ACCOUNT_ID >111222</ACCOUNT_ID >
       < ACCOUNT_ID >333444</ACCOUNT_ID >
       < SAMOUNT > 100.00 </ SAMOUNT >
      </FML>
     </transfer>
    </soap:body>
</soap:envelope>

Listing 3-18 shows the SOAP response message for the transfer service.

Listing 3-18 Sample SOAP1.1 Transfer Service Response Message
<soap:envelope  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >
    <soap:body>
     <transferResponse xmlns="urn:bank_typedef">
       <STRING>30010.50</STRING>
     </transferResponse>
    </soap:body>
</soap:envelope>

RPC Message Style

The generated WSDL document supports abstract message definitions in RPC message style. The following rules apply to SALT-generated WSDL documents for creating RPC style message definitions.

/wsdl:message/@name

The string of message name is constructed with the following format:

<Tuxedo service name + "Input | Output">

Use the Input suffix when describing an input typed buffer. Use the Output suffix when describing an output typed buffer

/wsdl:message/wsdl:part

The following format rules apply for <wsdl:part>:

RPC Message Style Example

This example in this section depicts the transfer service definitions in the SALT configuration file, the corresponding transfer service contract information from the Tuxedo Service Metadata Repository, the generated WSDL document, and the associated request and response messages for the transfer service.

Listing 3-19 shows an example of a section of the BEA SALT configuration file definition for the service.

Listing 3-19 RPC Message Transfer Service Servicelist Section of the SALT Configuration File
<Configuration>
   <Servicelist id="bank">
     <Service name="transfer" />
   </Servicelist>
   ......
</Configuration>

Listing 3-20 shows the corresponding transfer service contract information retrieved from Tuxedo Service Metadata Repository.

Listing 3-20 Tuxedo Service Metadata Repository Transfer Service Contract Information
Service=transfer
inbuf=FML
outbuf=STRING

param=ACCOUNT_ID
type=long
access=in
count=2
requiredcount=2

param=SAMOUNT
type=string
access=in

param=result
type=STRING
access=out

BEA SALT generates a WSDL document. Listing 3-21 shows the part of the WSDL document that relates to the transfer service definition.

Listing 3-21 RPC Message Transfer Service Definition in the WSDL Document
<wsdl:definition
       xmlns:tuxtype="urn:bank_typedef"
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       ......>
  <wsdl:types>
   <xsd:schema targetNamespace="urn:bank_typedef" ...... >
    <xsd:complexType name="fml_transfer_In">
     <xsd:sequence>
        <xsd:element name="ACCOUNT_ID" type="xsd:long" minOccurs="2" maxOccurs="2" />
       <xsd:element name="SAMOUNT" type="xsd:string" />
     </xsd:sequence>
    </xsd:complexType>
    ......
   </xsd:schema>
  <wsdl:types>

  <wsdl:message name="transferInput">
    <wsdl:part name="inbuf" type="tuxtype: fml_transfer_In" />
  </wsdl:message>
  <wsdl:message name="transferOutput">
    <wsdl:part name="outbuf" type="xsd:string" />
  </wsdl:message>

  ......
</wsdl:definition>

Listing 3-22 shows the SOAP request message for the transfer service.

Listing 3-22 Sample SOAP1.1 Transfer Service Request RPC Message
<soap:envelope  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >
   <soap:body>
     <transfer xmlns:ns="urn:bank_typedef" >
       <inbuf xsi:type="ns:fml_transfer_In" >
          <ACCOUNT_ID xsi:type="xsd:long">111222</ACCOUNT_ID >
          <ACCOUNT_ID xsi:type="xsd:long">333444</ACCOUNT_ID >
          <SAMOUNT xsi:type="xsd:float"> 100.00 </SAMOUNT >
       </inbuf>
     </transfer>
   </soap:body>
</soap:envelope>

 


See Also

Managing Typed Buffers


  Back to Top       Previous  Next