Setting
up Web Services Interface to EIQ Product Servers.. 1
Pre-requisites
for Running the Sample EIQ Web Service. 1
Running
the Sample. 2
The following sample setup demonstrates how to provide Web
Services interface to EIQ Product Servers using an application server such as
Apache Tomcat.
Note that this sample uses Axes JAX-RPC API.
The call flow in the sample setup proceeds in the following
manner:
- When
the client submits a query, a SOAP request is built with the help of the
Apache Axis runtime.
- The
Axis runtime sends the SOAP request over HTTP to Tomcat, which then
invokes the Axis servlet. The Axis servlet builds a Java call for EiqService web service class.
- The
web service connects to the EIQ Product Server through the EIQ_JDBC
driver, submits the query, and retrieves the corresponding results.
- The
results are sent back to the client as a SOAP document.
- The
client then parses this "results" document and prints it out as
plain text.
This is depicted in the figure below:
NOTE: The paths,
directories, and parameters used in the steps below are specific to the sample
setup. You can customize the parameters to your installation needs.
- Install
Java Development Kit JDK 5.0 (http://java.sun.com/j2se/1.5.0/download.jsp
)
- Install
Apache Tomcat 5.5 ( http://jakarta.apache.org/tomcat/index.html
)
- Install
Apache Axis 1.2.1 ( http://ws.apache.org/axis/
)
NOTE: See Axis
Installation Guidelines for Steps 2 and 3.
- Copy
the file EiqService.class
included in 'EIQ Web Services.zip' to '{tomcat_home}\webapps\axis\WEB-INF\classes\samples\eiqservice'.
(e.g. 'C:\Program
Files\Jakarta\jakarta-tomcat-5.5.9\webapps\axis\WEB-INF\classes\samples\eiqservice')
- Copy
the files 'EIQClient.class', 'deploy_eiq.wsdd', and 'undeploy_eiq.wsdd' included in
'EIQ Web Services.zip' to '{axis_home}\samples\eiqservice'.
(e.g.
'C:\Program Files\Apache Axis\axis-1_2_1\samples\eiqservice')
- Copy 'whamjdbc.jar' and 'whamsocketclient.jar' to '{tomcat_home}\webapps\axis\WEB-INF\lib'.
- Start
the Tomcat server. ('{tomcat_home}\bin\startup.bat')
- Deploy
the EIQ Web service:
- In
the command prompt, change directory to '{axis_home}\samples\eiqservice'.
- Run
the command:
java org.apache.axis.client.AdminClient deploy_eiq.wsdd
- You
should see 'EiqService' listed as one of the
web services at http://localhost:8080/axis/servlet/AxisServlet
- Test the
web service using 'EIQClient.class', by querying
a virtual data source.
- In
the same directory as in the previous step, run the command:
java samples.eiqservice.EIQClient
-lhttp://localhost:8080/axis/services/EiqService 127.0.0.1 YOURVDS "select * from mytable"
- You
should see the results in a plain text format in the command window.
- To
un-deploy the web service, run the following command:
java org.apache.axis.client.AdminClient undeploy_eiq.wsdd