Running WSE Services on Different Machines within the OMII Container

Community Grids Lab, Indiana University

 

This document provides instructions and results pertaining to the running of WS-Eventing services on different machines within the OMII Container. 

 

Listed below are the directories that are relevant to this demo. The variable names here are self-descriptive.

 

OMII HOME: /usr/local/OMII
 
OMII TOMCAT HOME: <omii_home>/jakarta-tomcat-5.0.25
 
OMII AXIS HOME: <omii_home>/axis-1_2beta
 
WSE Base (distribution) Directory: <omii_home>/webservices/wse
 
WSE Client Directory: <omii_home>/webservices/wse/dist/client
 
WSE Server Directory: <omii_home>/webservices/wse/dist/server
 
Host1 IP Address where Sink Service is Deployed = 156-56-104-135.dhcp-bl.indiana.edu
 
Host2 IP Address where Source and SubscriptionManager Services are deployed = 156-56-104-200.dhcp-bl.indiana.edu
 

 

Step 1: We have deployed the WseSink Web Service within Host1’s (156-56-104-135.dhcp-bl.indiana.edu) Tomcat running on port 18080 within the OMII container using our distribution's ant target commands. The WseSource and WseSM Services were similarly deployed within Host2’s (156-56-104-200.dhcp-bl.indiana.edu) Tomcat. Here we note that this port number for the Tomcat server could be any other number and is under the user’s control. For information pertaining to the deployment of the aforementioned services please refer to the “FINS-Deployment of WSE within OMII” file located under the “docs/installation” folder. 
 

Step 2: The user also needs to change the host-name and port number in the “services.properties” file located under the “config/wse” folder at both Tomcat and client. This can be achieved by following the instructions below.

1)       Open the “services.properties” file located under the OMII TOMCAT HOME(/usr/local/OMII/Jakarta-tomcat-5.0.25)/classes/config/wse/ folder and change the hostname and port number with your machine name and tomcat port number.

2)       Open the file “services.properties” file located under the WSE Client directory (/usr/local/OMII/webservices/wse/dist/client)/config/wse/ folder and change the hostname and port number.

 

In our settings we have changed host names for SinkAddress, SourceAddress and SMAddress and port number with 18080. This results in the following addresses for the services involved.

SinkAddress=http://156-56-104-135.dhcp-bl.indiana.edu:18080/axis/services/WseSink

SourceAddress=http://156-56-104-200.dhcp-bl.indiana.edu:18080/axis/services/WseSource

SMAddress=http://156-56-104-200.dhcp-bl.indiana.edu:18080/axis/services/WseSM

Figure 1 shows the services.properties file after changing the hostname and port number.

Figure 1 Services.Properties file

 

Step 3: Restart the Tomcat server.

 

Step 4: The user first needs to open a new terminal window on the host1 (156-56-104-135.dhcp-bl.indiana.edu) machine and then use the cd shell command to enter the WSE Client Directory (/usr/local/OMII/webservices/wse/dist/client). Next the user needs to execute the ANT target command “ant wseaxis-sink” to run the sink client as depicted in Figure 2 below.

 

Figure 2 Sink Client

 

Step 5: The user can then type “h” to list all the available options for the sink client as depicted in Figure 3 below

 

 

 

 

 

 

Figure 3 List of Commands at Sink Client

 

Step 6: The user can issue a WS-Eventing Subscription request by typing “sub t” or “sub r” or “sub x” where “t”, “r” and “x-” correspond to Topics, Regular Expression and XPath Query based subscription formats respectively.

 

Users can check the status of their subscription by typing “status [subID]” where [subID] corresponds to the subscription identifier of a previously registered subscription.

Users can renew their subscription by typing “renew [subID]” command

User can unsubscribe by typing “unsub [subID]” command

 

In our demo we will be issuing a topic subscription to the source by typing “sub t”. When a user does this the Sink Client creates a well-formed WS-Eventing Subscribe request and sends it to the Sink Web Service.

 

Step 7: The Subscription request received by the Sink Web Service can be seen in the “Catalina.out” file located in the (/usr/local/OMII/jakarta-tomcat-5.0.25/logs) folder under host1’s (156-56-104-135.dhcp-bl.indiana.edu) machine. Figure 4 shows the Subscription request received by the Sink Web Service from the Sink Client.
 

 

Figure 4 Subscription Request received by Sink Web Service from Sink Client Service

 

Form the figure it can been seen that the WS-Addressing wsa:To element indicates that the subscription request originated from the Sink (http://156-56-104-135.dhcp-bl.indiana.edu:18080/axis/services/WseSink) and is targeted to the source (http://156-56-104-200.dhcp-bl.indiana.edu:18080/axis/services/WseSource). The subscription is topic based ─ “/Literature/Shakespere”. Any notifications from the source will go directly to the address encapsulated within the <wsa:notifyTo> element.

 

Step 8: Upon receipt of this subscription request, the source issues a SubscribeResponse back to the sink. This response contains the subscription identifier generated by the source to uniquely represent the subscription. This UUID-base subscription identifier is necessary for all exchanges (renew, status and unsubscribe) pertaining to the aforementioned subscription.  Figure 5 shows subscription response received by the Sink Web Service from the Source Web Service. The Subscription ID contained within this response is “570b2ff3-a9d0-4a4b-a8a8-9ba7608ddd51”. User can check this message from the Catalina.out file available in the (/usr/local/OMII/jakarta-tomcat-5.0.25/logs) folder located on host2 (156-56-104-200.dhcp-bl.indiana.edu) .

 

 

 

Figure 5 Subscription Response received by Sink Web Service from Source Web Service

 

Step 9: At the same time, Source Web Service also sends the Subscription SOAP message to the Subscription Manager.  This message contains both the original subscription request from the sink along with the response issued by the source. Figure 6 shows the SOAP message sent by the Source Web Service to the Subscription Manager Service.

 

 

Figure 6 Subscription Request and Response received by Subscription Manager Web Service

 

Step 10: Next the user should open a new terminal window on host2 (156-56-104-200.dhcp-bl.indiana.edu) and go to the client directory (/usr/local/OMII/webservices/wse/dist/client). Execute the “ant wseaxis-source” command to run the source client and to send notifications back to the sink. Typing “h” displays the list of available commands at the Source. Type “s” to issue a notification. Figure 7 depicts  the result of this at the Source client.

 

 

Figure 7 Source Client

 

Step 11: Figure 8 shows one of the notification messages sent by the source Web Service to the Sink that is subscribed for the topic “Literature/Shakespere”. This can be viewed by checking the message from Catalina.out file on host2.

 

Figure 8 Notification sent by Source Web Service to Sink Web Service

 

Step 12: Figure 9 shows the notification message received by the Sink Web Service from the Source Web Service. The notification can be viewed by checking the Catalina.out file on host1.

 

Figure 9 Notification received by Sink Web Service from Source Web Service