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:
- Stop your Java Servlet Engine (JSE), e.g. Tomcat.
- Make another copy of the <OpenEdge directory>\servlets\wsa directory (this copy will go into your JSE 's webapps subdirectory).
- Rename the directory to the required name, e.g.: wsatest .
- Set this up to run within your JSE, e.g.: <Tomcat directory>\webapps\wsatest .
When using the OpenEdge Explorer or OpenEdge Management:
- Create a new Web Services Adapter resource in OpenEdge Explorer (Management Console).
- When the New Web Services Adapter dialog screen appears:
- Supply the new WSA instance’s name and URL, e.g.: wsatest and http://localhost:8080/wsatest/wsa1
- Select Local or Remote, depending on whether the WSA is local or remote to the AdminServer.
- 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
- 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:
- 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.
- 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:
- 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.
- 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
- 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:
- 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.
- 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:
- 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>
- 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
- 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.
- 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>"