How to setup a second instance of the Web Services Adapter

por | 8 octubre, 2014
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 Article 000020481, «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>\servlet\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 .

5. Create a new Web Services Adapter resource in OpenEdge Explorer (Management Console).

6. When the New Web Services Adapter dialog screen appears:
a. Supply the new WSA instance’s name and URL, e.g.: wsatest and http://localhost:8080/wsatest/wsa1 .
b. Select Local or Remote, depending on whether the WSA is local or remote to the AdminServer.
c. Choose on Save.

7. If the WSA instance is remote, perform the following additional steps on the system where the WSA is installed:
a. In the 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.
b. Then edit the properties in the new WSA instance’s section ( [WSA.wsatest] ) as desired.

8. Edit the web.xml file for this WSA instance (see the OpenEdge Application Server: Administration guide, section 5-13 for information 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 file. For example for a WSA instance called «wsatest» ( [WSA.wsatest] section in the, you would modify the web.xml as follows:

<!– Enter this WSA servlet instance’s name that will be used to locate
its properties in the Progress file –>

9. 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>

10. 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 . So the first «wsatest» directory is the Java servlet name and the second one is the WSA instance name as configured in the web.xml.

11. 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/wsa123. The page returned should state «Status:wsa123:OK:<number>».