Salesforce

How to setup a second instance of the Web Services Adapter?

« Go Back

Information

 
TitleHow to setup a second instance of the Web Services Adapter?
URL NameP91699
Article Number000141423
EnvironmentProduct: OpenEdge
Version: 10.x , 11.x
OS: All supported platforms
Other: Web Services Adapter, WSA
Question/Problem Description
How to setup a second instance of the Web Services Adapter with Tomcat?
How to setup more than one instance of Web Services Adapter with Tomcat?
How to create a new instance of the WSA using Tomcat?
How to setup more than one WSA using Tomcat?
How to run multiple instances of WSA in the same server with Tomcat?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
Setup your first instance of Web Services Adapter by using a copy of the <OpenEdge directory>\servlets\wsa directory. For an example please refer to KB Article  "How to setup the Web Services Adapter (WSA) with Tomcat on a Windows Platform". To setup a second instance please follow these general guidelines:
  1. Stop your Java Servlet Engine (JSE), e.g. Tomcat.
  2. Make another copy of the <OpenEdge directory>\servlets\wsa directory (this copy will go into your JSE 's webapps subdirectory).
  3. Rename the directory to the required name, e.g.: wsatest .
  4. Set this up to run within your JSE, e.g.: <Tomcat directory>\webapps\wsatest .

When using the OpenEdge Explorer or OpenEdge Management:
  1. Create a new Web Services Adapter resource in OpenEdge Explorer (Management Console).
  2. When the New Web Services Adapter dialog screen appears:
    1. Supply the new WSA instance’s name and URL, e.g.: wsatest and http://localhost:8080/wsatest/wsa1
    2. Select Local or Remote, depending on whether the WSA is local or remote to the AdminServer.
    3. Click on Save. This will create a new section in the %DLC%\properties\ubroker.properties similar to the following:
[WSA.wsatest]
    adminAuth=0
    appAuth=0
    location=local
    logFile=C:\OpenEdge\WRK\wsatest.wsa.log
    loggingLevel=2
    webAppEnabled=1
    webServerAuth=0
    wsaUrl=http://localhost:8080/wsatest/wsa1
  1. If the WSA instance is remote (see How to setup and configure a remote Web Services Adapter?), perform the following additional steps on the system where the WSA is installed:
    1. In the ubroker.properties file, copy and rename the section corresponding to the sample WSA instance provided (e.g. [WSA.wsa1] ) to a new section (e.g. [WSA.wsatest] ). So in essence, cloning wsa1’s section to a new section.
    2. Then edit the properties in the new WSA instance’s section (e.g. [WSA.wsatest] ) as desired. Make sure that the wsaUrl property is pointing to the correct WSA instance. Also make sure that the logFile property is pointing to a unique log file. For example:
[WSA.wsatest]
    location=remote
    logFile=C:\Remote_Server_Dir\Logs\wsatest.wsa.log
    wsaUrl=http://remote_server/wsatest/wsa1

When not using the OpenEdge Explorer or OpenEdge Management:
  1. In the %DLC%\properties\ubroker.properties file, copy and rename the section corresponding to the sample WSA instance provided (e.g. [WSA.wsa1] ) to a new section (e.g. [WSA.wsatest] ). So in essence, cloning wsa1’s section to a new section.
  2. Then edit the properties in the new WSA instance’s section ( [WSA.wsatest] ) as desired. Make sure that the wsaUrl property is pointing to the correct WSA instance. Also make sure that the logFile property is pointing to a unique log file. For example:
[WSA.wsatest]
    adminAuth=0
    appAuth=0
    location=local
    logFile=C:\OpenEdge\WRK\wsatest.wsa.log
    loggingLevel=2
    webAppEnabled=1
    webServerAuth=0
    wsaUrl=http://localhost:8080/wsatest/wsa1
  1. If the WSA instance is remote (see How to setup and configure a remote Web Services Adapter?), perform the following additional steps on the system where the WSA is installed:
    1. In the ubroker.properties file, copy and rename the section corresponding to the sample WSA instance provided ( [WSA.wsa1] ) to a new section ( [WSA.wsatest] ). So in essence, cloning wsa1’s section to a new section.
    2. Then edit the properties in the new WSA instance’s section ( [WSA.wsatest] ) as desired. Make sure that the wsaUrl property is pointing to the correct WSA instance. For example:
[WSA.wsatest]
    location=remote
    logFile=C:\Remote_Server_Dir\Logs\wsatest.wsa.log
    wsaUrl=http://remote_server/wsatest/wsa1

General configuration changes:
  1. Edit the web.xml file for this WSA instance (see the OpenEdge Application Server: Administration guide on configuring the web.xml file). At a minimum you need to change the "instanceName" listed in the web.xml file to correspond to the one listed in the ubroker.properties file. For example for a WSA instance called "wsatest" ( [WSA.wsatest] section in the ubroker.properties), you would modify the web.xml as follows:
    <init-param>
      <param-name>instanceName</param-name>
      <!-- Enter this WSA servlet instance's name that will be used to locate
           its properties in the Progress ubroker.properties file -->
      <param-value>wsatest</param-value>
    </init-param>
  1. If you want to use something other than "wsa1" in the URL, then you can change the URL pattern in the web.xml. For example:
  <servlet-mapping>
    <servlet-name>wsa1_servlet</servlet-name>
    <url-pattern>/wsa123/*</url-pattern>
  </servlet-mapping>

The WSA URL would then be similar to the following: http://localhost:8080/wsatest/wsa123

  1. Restart your JSE (e.g. Tomcat). A new directory containing the WSA instance name will be created within the JSE's servlet directory, for example <Tomcat directory>\webapps\wsatest\wsatest. The first "wsatest" directory is the webapp name and the second one is the WSA instance name as configured in the web.xml file.
  2. To verify that your WSA instance has been configured properly, open a web browser and connect to http://<WSA host>:<port>/<servlet directory name>/<url pattern> . For example
http://myserver:8080/wsatest/wsa1

The page returned should contain the following: "Status:wsa123:OK:<number>"
Workaround
Notes
Keyword Phrase
Last Modified Date9/20/2021 1:13 PM

Powered by