Installation

Top  Previous  Next

Some software and preliminary activities are requested to install XCICS Web Services Connector.

Requirements

THE XCICS Web Services framework requires:

Apache Jakarta Tomcat 4.1.29 or higher
Apache Jakarta AXIS 1.1

ANT building tool is suggested too.

Installation

Preliminary tasks

Before to install and configure the XCICS Web Services framework, both Tomcat and AXIS must be correctly installed and configured. Please refer to their documentation on their respective web sites. Only when AXIS is correctly installed and tested, you may proceed with the XCICS Web Services framework setup.

Please do not forget to define and export an environment variable named AXIS_HOME, that paths to the AXIS installation directory.

Installing the framework

All the services provided by the XCICS Web Services framework, are made available through the deployment of the class named com.hite.connectors.XCicsConnector.

System administrator should have a small background on administration and deployment/undeployment of web services with AXIS. In the same manner, to make use of deployed services, programmer must have knowledge of AXIS programming.

To speed-up services deployment and use, some example files are provided in XFRAME distribution. In the directory $XFRAMEHOME/xje/samples/webservices the following files are available:

build.xml

ANT configuration files

deploy.wsdd

Web services deployment descriptor

undeploy.wsdd

Web services undeployment descriptor

runws

UNIX/Linux shell script for web services clients activation 

runws.bat

Windows script for web services clients activation 

src/TestClient.java

Java source of client using dynamic invocation 

src/TestStub.java

Java source of client using a ws stub

Follow the procedure below, to setup the XCICS Web Service in the AXIS web app.

Tomcat & AXIS setup

First of all Tomcat must be installed. After that, AXIS must be set up and tested. Default settings are normally enough to setup XCICS Web Services.

Do not forget to export CATALINA_HOME and AXIS_HOME.

XCICS configuration

XCICS must be configure to accept Web Services request, from the web server. To do that a "webservice" RCP connector must be declared. In the "xcics.conf" add the following line:

add tcpserver name=LISTENER, port=8093, webservice;

This will add a TCP Server running in Web Service mode on the port 8093. Please refer to TCP Server docs for more information about it.

Deployer configuration

First of all, deployment system must be configured. Edit the file build.xml and change the "editable properties" if needed.

By default the build.xml provided with XFRAME, supposes that the tomcat webserver containing the AXIS application, is running on localhost at pport 8080 and that AXIS has been configured with defaults.

Web Service configuration

edit the file deploy.wsdd and change the values

xcics.ws.host
xcics.ws.port

proving the hostname and port of the XCICS Web Service server for the XCICS application. In the example above the TCP Server is running at port 8093.

Web Service Deployment

Now, the the web service is ready to be deployed. From the directory $XFRAMEHOME/xje/samples/webservices issue the command:

ant deploy

If the command completes succesfully, you should be able to see the XCicsConnector in the list of deployed services, in the AXIS application.

ATTENTION: this step copies some files in the AXIS webapp (usually $CATALINA_HOME/webapps/axis), so be sure to have write permission on the target directory.

Stub generation

Now it's time to transform the WSDL of deployed service into a Java stub for clients. Issue the command:

ant wsdl2java

If the command completes succesfully, a set of Java sources for the stub interfaces are created in the sub-directory "generated"

Java samples compiling

In order to compile example programs, issue:

ant compile

It will compile 2 test program, one using dynamic invocation and another one using stubs.

CICS samples compiling

In order to serve samples, a example server COBOL programs has be provided: WEBSRV.pre. To compile it issue:

xcob -ua WEBSRV.pre

Do not forget to declare the program in PPT, by ading in xcics.conf:

declare program name=WEBSRV;

Running samples

Samples may be run issuing:

runws TestStub
runws testClient http://localhost:8080/axis/services/XCicsConnector