In this tutorial, you learn how to configure all the components required to call an Oracle Tuxedo SCA component, using the Oracle Service Architecture Leveraging Tuxedo (SALT) product.
After completing this course, you should be able to:
Approximately 2 hours including product download and installation time.
Oracle SALT enables developers and administrators to expose Tuxedo services as Web services and SCA components.
This OBE guides you through constructing an application that demonstrates calling Tuxedo SCA components using the SALT SOAP server gateway. The back end for the uBike application is written in Tuxedo. Read the uBike Tuxedo Overview page for detailed information about the back -end services offered on the Tuxedo side of this application. This example only uses the SEARCHINVENTORY service of the uBike application.
In this tutorial, you begin by configuring the SALT environment to expose uBike C++ services as Web services that can be called by any SCA-compliant code, and test that your Web services are working using soapUI to enter a color as input to the service call, which returns the bike inventory available that matches that color.
Here are the differnt sections of this hands-on exercise:
Your company has a pre-existing application, called uBike, that is implemented using C++. The company is investigating how to leverage this IT investment to work within their overall SOA strategy without making major and expensive changes. The company has decided to use Oracle SALT to expose their existing uBike C++ services as Web services in an SCA container that can be easily consumed by SCA-compliant applications. This strategy integrates existing technologies to enable the application server tier to freely use C++ services with very little change.
The diagram below displays the high-level architecture of the solution: 
The following is a list of software requirements:
Before starting this tutorial, you should have performed the following in the order specified:
| . | Installed GNU 4.1.2 Compiler |
|---|---|
| . | Installed Oracle Tuxedo 11gR1 (instructions): Installed to /home/vmuser/tuxedo/tuxedo11g |
| . | Installed Oracle SALT 11gR1 (instructions): Installed to /home/vmuser/tuxedo/tuxedo11g |
| . | Installed soapUI |
| . |
Extract installation files:
The uBikeSCA folder contains all the files needed to perform this exercise. The table below describes the purpose of each file:
|
||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| . | Modify and Run setenv.sh:
cd handson/uBikeSCA
. ./setenv.sh
You are now ready to perform the steps outlined in this lab guide. |
In these steps we will see how to write a C++ interface for our component.
| . |
Open Text Editor :
|
|---|---|
. |
Enter Code for C++ Interface :
Your code should resemble the following:
|
. |
Save File in Correct Location :
You may keep the source editor open for the next tasks in this lab.
|
With these steps, you will see what it takes to develop actual business code for the SALT SCA container.
| . |
Examine and Repair uBike Implementation Code:
From the following SCDL snippet found in $APPDIR/uBike.server/uBike.server.composite the implementation source code is written in a file named uBikeServiceImpl.cpp:
For convenience this file and the related code is already provided in the /home/vmuser/handson/uBikeSCA/uBike.server directory:
|
|---|---|
. |
Build Component :
buildscacomponent -c uBike.server
The resulting file is a libuBike.so shared library. The buildscacomponent command will look at the SCDL code and build all C++ components it finds. Individual components may also be built by qualifying them with command-line options.
|
With these steps, we will see how to create a WSDL interface from a C++ interface, and then expose the component as a Web Service. The steps detailed here can easily be combined in scripts and automated, but are shown here for convenience, and to demonstrate how they can be performed separately in case some customization is needed.
| . |
Generate Metadata Repository Interface:
cd uBike.server scatuxgen -D FML32/BikeInventory -c uBike.server.composite
tmloadrepos -i uBike.server/uBikeService.mif meta.repos
|
|---|---|
. |
Generate WSDL : The following command generates a WSDL interface for the service we just developed. Change directory to $APPDIR, ensure that the tuxconfig file is created by running the tmloadcf command as shown below, then also perform the steps shown: tmloadcf -y ubb tmboot -A -s TMMETADATA tmwsdlgen -c uBike.server/uBikeService.wsdf -y -o uBike.server/uBikeService.wsdl tmshutdown -y
Take a moment and look at the generated WSDL file.
|
. |
Build Server : The buildscaserver command takes the SCDL, parses C++ interface(s) and generates an appropriate bootstrap server that will host SCA components in a Tuxedo environment. The command needs to be executed as follows: buildscaserver -w -c uBike.server -o uBikeSCASvr
This generates a number of files in $APPDIR:
These files are necessary for the operation of the SALT GWWS SOAP gateway.
|
. |
Post-Build Set up: Important:
Run the following commands to accomplish this: tmloadrepos -i uBike.server/uBikeService.mif meta.repos wsloadcf -y GWWS.dep
|
. |
Boot the Application : Run the following command to boot the Tuxedo application: tmboot -y
|
|---|---|
| . |
Test GWWS server WSDL and XSD configuration:
http://localhost:12345/wsdl Your output should resemble the following:
http://localhost:12345/xsd/uBikeService_1.xsd Your output should resemble the following:
Now that you have a valid WSDL and related schema, you can use soapUI to test the services.
|
| . | Run soapUI:
Start soapUI to test the SCA service.
|
| . | Create soapUI project:
Right-click the default workspace node in the left-hand pane, and select New soapUI Project.
Enter uBikeService for the project name and /home/vmuser/handson/uBikeSCA/uBike.server/uBikeService.wsdl for the Initial WSDL property, and click the OK button.
|
| . |
Test the searchBike Service:
Expand the uBikeServiceSOAP node in the uBikeService project and double-click the Request1 node to open the SOAP request and response payload window. Modify the payload contents to send a request to the searchBike service with a COLOR element of ORANGE. Note that colors need to be entered in uppercase. You can also try to test using other colors such as BLACK, WHITE, GREEN, RED, BLUE, YELLOW, and SILVER. Your payload should look similar to the payload in the image below:
Click the
Congratulations, you have validated that the searchBike service is working properly! NOTE: If you like, you can open the Tuxedo administration client, tmadmin, to monitor that your Tuxedo services are actually being called. The tmadmin command used to monitor Tuxedo services is called printservice, or psc for short.
|
Congratulations! You have successfully completed this OBE tutorial.
Oracle SALT exposes Tuxedo services as Web services and SCA components, and is a bidirectional gateway to and from Tuxedo applications. This enables SCA-compliant applications to call Tuxedo SCA components as part of an Enterprise SOA application. Now you can implement your own solutions that use these technologies together.
In this tutorial, you should have learned how to:
Check back on OTN for more OBE tutorials that build on this example to demonstrate other Tuxedo product integration examples.
![]()