Programming 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

Tuxedo ATMI Programming for Web Services

This topic contains the following topics:

 


Overview

Oracle SALT allows you to import external Web Services into Tuxedo Domains. To import external Web services into Tuxedo application, a WSDL file must first be loaded and converted. The Oracle SALT WSDL conversion utility, wsdlcvt, translates each wsdl:operation into a Oracle SALT proxy service. The translated SALT proxy service can be invoked directly through standard Tuxedo ATMI functions.

Oracle SALT proxy service calls are sent to the GWWS server. The request is translated from Tuxedo typed buffers into the SOAP message, and then sent to the corresponding external Web Service. The response from an external Web Service is translated into Tuxedo typed buffers and returned to the Tuxedo application. The GWWS acts as the proxy intermediary.

If an error occurs during the service call, the GWWS server sets the error status using tperrno, which can be retrieved by Tuxedo applications. This enables you to detect and handle the SALT proxy service call error status.

 


Converting WSDL Model Into Tuxedo Model

Oracle SALT provides a WSDL conversion utility, wsdlcvt, that converts external WSDL files into Tuxedo specific definition files so that you can develop Tuxedo ATMI programs to access services defined in the WSDL file.

WSDL-to-Tuxedo Object Mapping

Oracle SALT converts WSDL object models into Tuxedo models using the following rules:

Table 4-1 lists detailed mapping relationships between the WSDL file and Tuxedo definition files.

Table 4-1 WSDL Model / Tuxedo Model Mapping Rules
WSDL Object
Tuxedo/SALT Definition File
Tuxedo/SALT Definition Object
/wsdl:binding
SALT Web Service Definition File (WSDF)
/WSBinding
/wsdl:portType
/WSBinding/Servicegroup
/wsdl:binding/soap:binding
/WSBinding/SOAP
/wsdl:portType/operation
Metadata Input File (MIF)
/WSBinding/service
/wsdl:types/xsd:schema
FML32 Field Defintion Table
Field name type

 


Invoking SALT Proxy Services

The following sections include information on how to invoke the converted SALT proxy service from a Tuxedo application:

Oracle SALT Supported Communication Pattern

Oracle SALT only supports the Tuxedo Request/Response communication patterns for outbound service calls. A Tuxedo application can request the SALT proxy service using the following communication Tuxedo ATMIs:

Oracle SALT does not support the following Tuxedo communication patterns:

Tuxedo Outbound Call Programming: Main Steps

When the GWWS is booted and Oracle SALT proxy services are advertised, you can create a Tuxedo application to call them. To develop a program to access SALT proxy services, do the following:

Managing Error Code Returned from GWWS

If the GWWS server encounters an error accessing external Web services, tperrno is set accordingly so the Tuxedo application can diagnose the failure. Table 4-2 lists possible Oracle SALT proxy service tperrno values.

Table 4-2 Error Code Returned From GWWS/Tuxedo Framework
TPERRNO
Possible Failure Reason
TPENOENT
Requested SALT proxy service is not advertised by GWWS
TPESVCERR
The HTTP response message returned from external Web service application is not valid
The SOAP response message returned from external Web service application is not well-formed.
TPEPERM
Authentication failure.
TPEITYPE
Message conversion failure when converting Tuxedo request typed buffer into XML payload of the SOAP request message.
TPEOTYPE
Message conversion failure when converting XML payload of the SOAP response message into Tuxedo response typed buffer.
TPEOS
Request is rejected because of system resource limitation
TPETIME
Timeout occurred. This timeout can either be a BBL blocktime, or a SALT outbound call timeout.
TPSVCFAIL
External Web service returns SOAP fault message
TPESYSTEM
GWWS internal errors. Check ULOG for more information.

Handling Fault Messages in a Tuxedo Outbound Application

All rules listed in used to map WSDL input/output message into Tuxedo Metadata inbuf/outbuf definition. WSDL file default message can also be mapped into Tuxedo Metadata errbuf, with some amendments to the rules:

Rules for fault mapping:

There are two modes for mapping Metadata errbuf into SOAP Fault messages: Tux Mode and XSD Mode.

Table 4-3 lists the outbound SOAP fault errbuf definitions.

Table 4-3 Outbound SOAP Fault Errbuf Definition
Meta Parameter
SOAP Version
Type
Required
Memo
faultcode
1.1
string
Yes
 
faultstring
1.1
string
Yes
 
faultactor
1.1
string
No
 
detail
1.1
fml32
No
If no wsdl:fault is defined, this field will contain an XML field.
Code
1.2
fml32
Yes
Contain Value and optional Subcode
Reason
1.2
fml32
Yes
Contains multiple Text
Node
1.2
string
No
 
Role
1.2
string
No
 
Detail
1.2
fml32
No
same as detail field


  Back to Top       Previous  Next