![]() ![]() ![]() ![]() ![]() ![]() ![]() |
This section contains the following topics:
The SALT configuration file uses XML format to define necessary deployment information for exporting Tuxedo services as Web services. This deployment information includes the following definitions: a Tuxedo service list, WS-ReliableMessaging Policy information, and SOAP protocol binding information. The deployment information generates a corresponding WSDL document. Multiple GWWS instances enable failover capability and generate multiple port information in the WSDL document.
SALT configuration leverages Tuxedo Service Metadata Repository for Tuxedo service contract information. BEA SALT accesses the Tuxedo Service Metadata Repository system server, TMMETADATA, provided by the local Tuxedo domain and gathers corresponding service contract information to generate the SALT WSDL document.
In Listing 2-1, the namespace of this version configuration XML file is defined with a fixed URL string "http://www.bea.com/Tuxedo/Salt/200606"
, which is used to identify the SALT version associated with the configuration file.
<? xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns="http://www.bea.com/Tuxedo/Salt/200606" >
<Servicelist id="simple">
<Service name="toupper" />
<Service name="tolower" />
</Servicelist>
<Policy>
<RMPolicy>RMpolicy.xml</RMPolicy>
</Policy>
<System>
<Certificate>
<PrivateKey>cert.pem</PrivateKey>
</Certificate>
</System>
<WSGateway>
<GWInstance id="GW1">
<HTTP address="//my server" />
<HTTPS address="//my server" />
</GWInstance>
</WSGateway>
</Configuration>
Each BEA SALT configuration file is composed of the following four XML format elements:
Defines a list of Tuxedo services to be exposed as Web services.
Defines a global WS-ReliableMessaging Policy that is applied to all listed Tuxedo services.
Defines system-level parameters
<WSGateway>
Defines one or more SALT GWWS processes that export the specified Tuxedo services
The syntax for each of these for elements is listed in Table 2-1.
BEA SALT supports the WS-ReliableMessaging Policy. The <RMPolicy>
sub-element is used to define the policy.
<System>
defines all system-level or global parameters related to Tuxedo and the operating system. The <System>
element supports the following sub-elements:<Certificate>
element includes private key and certificates parameters necessary for setting up HTTPS connections.<
<Plugin> defines information for the GWWS server plug-in framework to support Tuxedo custom typed buffers.LogLevel
> specifies the log level for information printing during the SALT configuration parsing process.The GWWS gateway must be defined in the SALT configuration file and defined as a Tuxedo server in the UBBCONFIG file. For more information, see Configuring Security.
After defining the GWWS gateway through the SALT configuration file, boot the GWWS server using tmadmin
or tmboot
. When the GWWS gateway is initiated, it loads the specified SALT configuration file, validates the XML configuration file, loads corresponding Tuxedo service contract information from Tuxedo Service Metadata Repository, and loads WS-ReliableMessaging policy definition file.
At runtime, the GWWS server reloads the configuration dynamically. You can also download the WSDL document from the GWWS server which is based on the latest configuration file.
Table 2-1 describes the syntax used in each of these four elements.
BEA SALT leverages the Tuxedo Service Metadata Repository to define service contract information for Web Services. Service contract information of all listed Tuxedo services is obtained by accessing the Tuxedo Service Metadata Repository system service provided by the local Tuxedo domain. SALT calls TMMETADATA system server under the following scenarios:
configreload
command used in wsadmin.
In this case, the GWWS server reloads the information from TMMETADATA.tmwsdlgen
to generate a WSDL file causes SALT to call TMMETADATA.The following topics provide SALT-specific interpretations of the Tuxedo Service Metadata Repository keywords and parameters:
The following Tuxedo Service Metadata Repository service-level keywords have specific SALT interpretations for handling Web Service processing.
Note: | Service-level keywords not specified in Table 2-2 have no special semantics for BEA SALT and are ignored when the Tuxedo Service Metadata Repository is loaded by SALT. |
Specifies the input buffer type. SALT provides default data representation and conversion between SOAP XML payload and the following Tuxedo buffer types:
|
||||
Specifies the output buffer type. SALT provides default data representation and conversion between SOAP XML payload and the following Tuxedo buffer types:
|
||||
The Tuxedo Service Metadata Repository interprets parameters as sub elements encapsulated in a Tuxedo service typed buffer. Each parameter can have its data type, occurrences in the buffer, size restrictions, and other Tuxedo-specific restrictions.
Note: | Parameter-level keywords not specified in Table 2-3 have no special semantics for BEA SALT and are ignored when the Tuxedo Service Metadata Repository is loaded by SALT. |
|
||||
Specifies the view structure name if the parameter type is VIEW32. For any other typed parameter, BEA SALT ignores this value.
|
||||
To use WS-ReliableMessaging functionality, you must create a policy file and specify the policy file in the SALT configuration file. The format of the policy file is defined by the WS-ReliableMessaging Policy specification.
Listing 2-2 shows an RMAssertion syntax example.
<wsrm:RMAssertion [wsp:Optional="true"]? ... >
<wsrm:InactivityTimeout Milliseconds="xsd:unsignedLong" ... /> ?
<wsrm:BaseRetransmissionInterval Milliseconds="xsd:unsignedLong".../>?
<wsrm:ExponentialBackoff ... /> ?
<wsrm:AcknowledgementInterval Milliseconds="xsd:unsignedLong" ... /> ?
<beapolicy:Expires Expires="xsd:duration" ... /> ?
<beapolicy:QOS QOS="xsd:string" ... /> ?
...
</wsrm:RMAssertion>
Listing 2-3 is shows a sample SALT policy file.
<?xml version="1.0"?>
<wsp:Policy wsp:Name="ReliableSomeServicePolicy"
xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:beapolicy="http://www.bea.com/wsrm/policy">
<wsrm:RMAssertion>
<wsrm:InactivityTimeout Milliseconds="600000" />
<wsrm:AcknowledgementInterval Milliseconds="2000" />
<wsrm:BaseRetransmissionInterval Milliseconds="500"/>
<wsrm:ExponentialBackoff />
<beapolicy:Expires Expires="P1D" />
<beapolicy:QOS QOS="ExactlyOnce InOrder" />
</wsrm:RMAssertion>
</wsp:Policy>
All RM assertions are optional, and if not specified, the default value are used. The following definitions describe the RM assertion options.
Specifies the number of milliseconds, specified with the Milliseconds attribute, which defines an inactivity interval. After time has elapsed, if the destination endpoint has not received a message from the source endpoint, the destination endpoint may terminate current sequence due to inactivity. The source endpoint can also use this parameter.
|
|
Specifies the amount of time after which the reliable Web service expires and does not accept any new sequence messages.
|
|
|
You must reference the WS-ReliableMessaging policy file at the end-point level in the SALT configuration file. The following entry in the SALT configuration file shows how to reference the WS-ReliableMessaging policy file.
<Policy>
<RMPolicy>RMpolicy.xml</RMPolicy>
</Policy>
Note: | Reliable Messaging in BEA SALT does not support process/system failure scenarios, which means SALT does not store the message in a persistent storage area. BEA SALT works in a direct mode with the SOAP client. Usually, system failure recovery requires business logic synchronization between the client and server. |
The GWWS gateway provides the connection between the Tuxedo service and the Web service client. Two critical configurations must exist for the GWWS gateway process to reliably access the Tuxedo services.
These two configurations provide the gateway connection that allows SALT to access Tuxedo services.
Configure the GWWS gateway in the Tuxedo UBBCONFIG file to run as a Tuxedo system server. You can define multiple GWWS server instances concurrently in a Tuxedo UBBCONFIG file. Listing 2-4 lists part of the UBBCONFIG file showing how to define GWWS instances for a Tuxedo application.
......
*SERVERS
GWWS SRVGRP=GROUP1 SRVID=10
CLOPT="-A -- -c saltconf_1.xml -i GW1"
GWWS SRVGRP=GROUP1 SRVID=11
CLOPT="-A -- -c saltconf_1.xml -i GW2"
GWWS SRVGRP=GROUP2 SRVID=20
CLOPT="-A -- -c saltconf_2.xml -i GW3"
......
In the UBBCONFIG file *SERVERS
sections, you must specify the SALT configuration file and the ID of the GWWS instances defined in the SALT configuration.
For more information, see GWWS.
Note: | Each Web service client is deemed a workstation client in Tuxedo; therefore, MAXWSCLIENTS must be configured with a valid number in UBBCONFIG for the node where the GWWS server is deployed. |
Note: | Be sure that the TMMETADATA system server is set up in the UBBCONFIG file to start before the GWWS server boots. Because the GWWS server calls services provided by TMMETADATA , it must boot after TMMETADATA . |
Note: | To ensure TMMETADATA is started prior to being called by the GWWS server, put TMMETADATA before GWWS in the UBBCONFIG file or use SEQUENCE parameters in *SERVERS definition in UBBCONFIG file. |
BEA SALT provides point-to-point security using SSL link-level security and uses the Tuxedo security framework for authentication. User profiles are passed via HTTP basic authentication specifications.
To set up link-level security using SSL, you must specify <Certificate>
elements in the <System>
parameter in the SALT configuration so that the GWWS gateway can handle HTTPS request. You can enable link-level security by specifying the HTTPS:// address in the SALT configuration file. For information about how to define <Certificate>
, refer to SALT Configuration Format.
If the GWWS is configured to use SSL, SEC_PRINCIPAL_PASSVAR
and SEC_PRINCIPAL_NAME
must be configured for GWWS in the *SERVER
definition in the UBBCONFIG file.
BEA SALT uses the Tuxedo security framework for system authentication. The GWWS server supports Tuxedo user profile throughput from the Web service client via HTTP basic authentication protocol.
The GWWS gateway supports Tuxedo domain security configuration for the following two authentication patterns:
The GWWS server passes the following string from the HTTP header of the client SOAP request for Tuxedo authentication.
Authorization: Basic <base64Binary of username:password>
The following is an example of a string from the HTTP header:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
In this example, the client sends the Tuxedo username Aladdin
and the password open sesame,
and uses this paired value for Tuxedo authentication.
If Tuxedo uses APP_PW, then the HTTP username value is ignored and the GWWS server only uses the password string as the Tuxedo application password to check the authentication.
If Tuxedo uses USER_AUTH, then both the HTTP username and password value is used. In this case, the GWWS server does not check the Tuxedo application password.
Note: | ACL and MANDATORY_ACL are not supported for Web service clients, which means the Tuxedo system ignores any ACL-related configuration specifications. BEA SALT does not make group information available for Web service clients. |
BEA SALTcomponents validate the given SALT configuration according to the predefined XML Schema file. A valid SALT configuration file is a prerequisite for the GWWS server to start and for tmwsdlgen
to generate the WSDL document file.
The SALT configuration schema file can be found at $TUXDIR/udataobj/saltconfig_200606.xsd
.
BEA SALT uses the schema file to validate the SALT configuration file when:
tmwsdlgen
is used to generate the WSDL document file. If the validation fails, tmwsdlgen
prints the error information to the console.
You can dynamically reload the BEA SALT configuration file by using the wsadmin command. For more information, see the BEA SALT Reference Guide.
At runtime, the GWWS server can dynamically reload the configuration file. You can also download the WSDL document file from the GWWS server (which is based on the latest SALT configuration file).
Use the following command with wsadmin
to reload the configuration:
configreload(creload) -i InstanceID1
This sub command is used to trigger configuration runtime reloading for the specified GWWS process. Option -i
must be specified to indicate one GWWS server for reloading.
Possible reasons for configuration reload failure are:
A Web service is usually defined using a WSDL document and made available via SOAP. WSDL, Web Service Descriptive Language, is an XML format used to describe network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information.
Before generating a WSDL document for the Web client to access services, be sure you complete the following tasks:
When the GWWS server is booted, it loads the specified SALT configuration file, which includes: reading the configuration XML file, validating the XML file, loading corresponding Tuxedo service contract information from Tuxedo Service Metadata Repository, and loading WS-ReliableMessaging policy definition file. The GWWS server can also dynamically reload the BEA SALT configuration file at runtime.
The GWWS process also automatically generates a WSDL document to reflect the latest configuration information so that it can be downloaded from the GWWS server via HTTP GET method. To generate a WSDL document file, use tmwsdlgen
.
For more information, see
tmwsdlgen.
For information about WSDL mapping rules for Tuxedo buffer types, see Data Mapping and Conversions.
The GWWS gateway server, maintains the most recent auto-generated WSDL documents. The GWWS server supports a specific HTTP GET
request from any HTTP client to download WSDL documents. The GWWS server can accept the SOAP version and encoding style indication for different formatted WSDL documents.
You can download the latest WSDL document using the following URL:
"http(s)://<host>:<port>/ wsdl[?[SOAPversion=<1.1 | 1.2> ] [&encstyle=<doc | rpc > ][&mappolicy=<pack|raw>][&toolkit=<wls|axis>]]"
1.1
.
doc
.
pack
is used as the default value.
mappolicy=raw
. Specify the client toolkit used so that the proper WSDL document description for a CARRAY typed buffer MIME attachment is generated. BEA SALT supports WebLogic Server and Axis for SOAP with Attachments. The default value is wls.
Using the following sample BEA SALT configuration file, a corresponding WSDL document can be generated.
<Configuration xmlns="http://www.bea.com/Tuxedo/Salt/200606" >
<Servicelist id="sample">
<Service name="TOUPPER" />
</Servicelist>
<Policy />
<System />
<WSGateway>
<GWInstance id="GW1">
<HTTP address="//webservice.com.abc:8080" />
</GWInstance>
</WSGateway>
</Configuration>
The following WSDL document is generated when the previous SALT configuration is used.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:tuxtype="urn:pack.sample_typedef.salt11" xmlns:tns="urn:sample.wsdl" xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsrp="http://schemas.xmlsoap.org/rp/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:sample.wsdl">
<wsdl:documentation>Generated from conf.xml at 05-22-2006 14:27:26:773</wsdl:documentation>
<wsdl:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:pack.sample_typedef.salt11">
<xsd:element name="TOUPPER">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="inbuf" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="TOUPPERResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="outbuf" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="TOUPPERInput">
<wsdl:part element="tuxtype:TOUPPER" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="TOUPPEROutput">
<wsdl:part element="tuxtype:TOUPPERResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:portType name="sample_PortType">
<wsdl:operation name="TOUPPER">
<wsdl:input message="tns:TOUPPERInput"></wsdl:input>
<wsdl:output message="tns:TOUPPEROutput"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="sample_Binding" type="tns:sample_PortType">
<soap11:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"></soap11:binding>
<wsdl:operation name="TOUPPER">
<soap11:operation soapAction="TOUPPER" style="document"></soap11:operation>
<wsdl:input>
<soap11:body use="literal"></soap11:body>
</wsdl:input>
<wsdl:output>
<soap11:body use="literal"></soap11:body>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TuxedoWebService">
<wsdl:port binding="tns:sample_Binding" name="sample_GW1_HTTPPort">
<soap11:address location="http://webservice.com.abc:8080/sample"></soap11:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
![]() ![]() ![]() |