Install the gateway into a stand-alone appserver

 

This task assumes that you have already completed the step Establishing requirements for using a database with the gateway.

If you want to enable gateway-level security, do so before you install the gateway.

If you want to use DB2 on a UNIX system, the shell in which the install is invoked requires the environment to be set up using the db2profile and usejdbc2 script files. To do this, run both the following commands:

./home/db2_instance/sqllib/db2profile 	
. /home/db2_instance/sqllib/java12/usejdbc2
where db2_instance is the db2 instance to be configured.

Note: The appserver in which you run the gateway must not form part of a cell managed by a deployment manager. In other words, not issue an addNode command for the node containing the appserver in which you run the Web services gateway application. If you do issue the addNode command, then the installed Web services gateway application is deleted by the node synchronization process that takes place within a cell of appservers.

When you installed WebSphere Application Server Network Deployment, all the files that are needed to run a Web services gateway were copied into directories under /opt/WebSphere/DeploymentManager , where /opt/WebSphere/DeploymentManager is the deployment manager root directory (by default WebSphere/DeploymentManager ). Before you can install and run the gateway in a single appserver instance in your network space, first copy these files over to the appserver. One can do this by completing the following steps:

  • Stop the appserver into which you plan to install the Web services gateway. One can use the command stopServer.ext your_server

    where

    • .ext is .bat for a Windows system and .sh for a UNIX system.

    • your_server is your appserver's name.
    For example (UNIX systems): ./stopServer.sh servername .

  • Copy all the EAR files with filenames that begin "wsgw" from the /opt/WebSphere/DeploymentManager/installableApps directory of the machine on which you installed WebSphere Application Server Network Deployment into the stand-alone_WAS_HOME/installableApps directory of the target appserver's install tree, where stand-alone_WAS_HOME is the root directory of your target appserver (by default WebSphere/AppServer ).

  • Copy file /opt/WebSphere/DeploymentManager/lib/WSGWResouceBundles.jar into directory stand-alone_WAS_HOME/lib .

  • Copy directory /opt/WebSphere/DeploymentManager/WSGW and all files and directories within it into directory stand-alone_WAS_HOME/WSGW .

  • If you plan to use the Cloudscape database with the Web services gateway, then copy directory /opt/WebSphere/DeploymentManager/bin/WSGWDB and all files and directories within it into directory stand-alone_WAS_HOME/bin/WSGWDB .

In this task you install the gateway into an individual application server instance in your network space. The major elements of this process are as follows:

  • Database and Table creation (optional - DB2 only).

  • JDBC driver and Datasource creation (optional - only if a database is being installed).

  • Installation of the following enterprise applications:

    • The gateway application.

    • Apache SOAP channel 1.

    • SOAP/HTTP channel 1.

    • The correlation application (optional - only if a database is being installed).

  • Installation of other gateway applications. For example:

To install the gateway into an appserver instance, complete the following steps:

 

  1. (Optional)  

    To create and install a DB2 database and associated tables, complete the following steps:

    1. From a command prompt, go to directory stand-alone_WAS_HOME/WSGW/scripts/install .

    2. Enter the command WSGWinstallDB :

      • [Windows] WSGWinstallDB.bat stand-alone_WAS_HOME db2user_id db2password

      • [UNIX] WSGWinstallDB.sh stand-alone_WAS_HOME db2user_id

      For example (UNIX systems):

      ./WSGWinstallDB.sh $WAS_HOME mydb2id

      Note: Running WSGWinstallDB also creates WSGWInstallDB.log in the stand-alone appserver's /logs directory. Open this file to check that the database was created successfully.

  2. Start the appserver (you can use the command startServer.ext your_server).

  3. From a command prompt, go to directory stand-alone_WAS_HOME/WSGW/scripts/install .

  4. Clear your class path. One can use the following command:

    • (Windows systems): set CLASSPATH=

    • (UNIX systems): unset CLASSPATH

  5. Enter the command stand-alone_WAS_HOME/bin/wsadmin.ext -f setupWSGW.jacl parm1 ... parmN where

    • parm1 is the stand-alone_WAS_HOME directory

    • parm2 is the server name

    • parm3 is the node name (this is case sensitive)

    If you are not using a database, there are no more parameters and wsgwcorr.ear is not installed. For example:

    $WAS_HOME/bin/wsadmin.sh -f setupWSGW.jacl $WAS_HOME servername PHJ2

    Note: The use of forward slashes (/) is compulsory for this command, even on Windows systems.

    If you are using Cloudscape, there is one more parameter:

    • parm4 is the name and location of the WSGWDB directory ( stand-alone_WAS_HOME/bin/WSGWDB ).

    For example:

    $WAS_HOME/bin/wsadmin.sh -f setupWSGW.jacl $WAS_HOME servername PHJ2 $WAS_HOME/bin/WSGWDB

    Note: The use of forward slashes (/) is compulsory for this command, even on Windows systems.

    If you are using DB2, there are four more parameters:

    • parm4 is WSGWDB .
    • parm5 is your DB2 user ID
    • parm6 is your DB2 password
    • parm7 is the name and location of file db2java.zip

    For example:

    $WAS_HOME/bin/wsadmin.sh -f setupWSGW.jacl $WAS_HOME servername PHJ2 WSGWDB mydb2id mydb2pw /PATH/SQLLIB/java/db2java.zip

    Note: The use of forward slashes (/) is compulsory for this command, even on Windows systems. When you run the setupWSGW.jacl command, the following initial set of gateway applications is installed:

    • The gateway itself ( wsgw.ear ).

    • Apache SOAP channel 1 ( wsgwsoap1.ear ).

    • SOAP/HTTP channel 1 ( wsgwsoaphttp1.ear ).

    • (Optionally) The correlation application ( wsgwcorr.ear ).

  6. Install additional gateway applications. For example:

    • Apache SOAP channel 2 ( wsgwsoap2.ear )

    • SOAP/HTTP channel 2 ( wsgwsoaphttp2.ear )

    To install additional gateway applications, complete the following steps:

    Note: If you prefer, you can install these EAR files using the WebSphere Application Server administrative console, as described in the final step of the task Enabling operation-level authorization.

    1. From a command prompt, go to directory stand-alone_WAS_HOME/bin

    2. To start the application server, enter the command startServer.ext your_server

    3. To start the WebSphere administration program, enter the command wsadmin.ext .

    4. For each additional Web services gateway enterprise application that you want to install, enter the following commands at the wsadmin> prompt:

      $AdminApp install path_to_ear_file {-appname application -server your_server 
                                                      -node your_node_name}
      $AdminConfig save
      

      where

      • application is the name of the enterprise application

      • path_to_ear_file is the name and location of the enterprise application's EAR file

      • your_node_name is the node name (this is case sensitive)

      For example (Windows systems):

      $AdminApp install C:/Progra~1/WebSphere/AppServer/installableApps
          /wsgwsoap2.ear {-appname wsgwsoap2 -server servername -node PHJ2}
      $AdminConfig save
      

    5. After you have installed all your additional Web services gateway enterprise applications, close the WebSphere administration program by entering quit or exit at the wsadmin> prompt.

  7. To stop then restart the appserver, complete the following steps:

    1. Enter the command stopServer.ext your_server

    2. Enter the command startServer.ext your_server

 

What to do next

You are now ready to test the installation.


Web services gateway - Completing the installation
Establishing requirements for using a database with the gateway
Installing the gateway into a deployment manager cell
Test the Web services gateway installation
Web services gateway - prerequisites and constraints
Web services gateway troubleshooting tips

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.