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

Oracle Tuxedo ATMI Programming for Web Services

This chapter contains the following topics:

 


Overview

Oracle SALT allows you to import external Web Services into Oracle Tuxedo Domains. To import external Web services into Oracle 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 Oracle Tuxedo ATMI functions.

Oracle SALT proxy service calls are sent to the GWWS server. The request is translated from Oracle 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 Oracle Tuxedo typed buffers and returned to the Oracle 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 Oracle Tuxedo applications. This enables you to detect and handle the SALT proxy service call error status.

 


Converting WSDL Model Into Oracle Tuxedo Model

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

WSDL-to-Tuxedo Object Mapping

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

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

Table 5-1 WSDL Model / Oracle Tuxedo Model Mapping Rules
WSDL Object
Oracle Tuxedo/SALT Definition File
Oracle 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 an Oracle Tuxedo application:

Oracle SALT Supported Communication Pattern

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

Oracle SALT does not support the following Oracle Tuxedo communication patterns:

Oracle Tuxedo Outbound Call Programming: Main Steps

When the GWWS is booted and Oracle SALT proxy services are advertised, you can create an Oracle 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 Oracle Tuxedo application can diagnose the failure. Table 5-2 lists possible Oracle SALT proxy service tperrno values.

Table 5-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 Oracle 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 Oracle 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 an Oracle Tuxedo Outbound Application

All rules listed in used to map WSDL input/output message into Oracle Tuxedo Metadata inbuf/outbuf definition. WSDL file default message can also be mapped into Oracle 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 5-3 lists the outbound SOAP fault errbuf definitions.

Table 5-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