Running OpenXRI Client Code (Classpath Setup and Implementation)

Copyright 2006 OpenXRI Fondation
Author :
Distributed under Apache 2.0 License

IMPORTANT :

This document is intended for regular users of openxri code who don't plan on making any code changes in openxri codebase, and just want to deploy the server based on instructions provided in

%OPENXRI_HOME%\org.openxri.server\DBSTORE_INSTALL.txt

and make requests to this server from Client side.

Please follow these steps to generates list of Jar files that needs to be classpath in client side application

STEP 1 :

From command prompt go to following folder,

"%OPENXRI_HOME%\org.openxri.soapadmin\

In this step we will be creating "xrisoapclient.jar" which is required on Client Side to invoke the SOAP requests.

To generate this file, from the command prompt run.

prompt>ant

This command takes the WSDL file provided as part of distribution

(%OPENXRI_HOME%\org.openxri.soapadmin\schemas\soap\openxri.wsdl)

and generates the following file,

"%OPENXRI_HOME%\org.openxri.soapadmin\dist\client\jar\xrisoapclient.jar"

STEP 2 :

From command prompt run following command,

prompt> ant clientjars

This will generate following file,

%OPENXRI_HOME%\org.openxri.soapadmin\dist\client\clientreqjars\clientreqjars.zip

IMPORTANT :

All the Jar files in

%OPENXRI_HOME%\org.openxri.soapadmin\dist\client\clientreqjars\clientreqjars.zip

Need to be in classpath on Client Side Application which plans to invoke SOAP requests and also resolve the XRI

If you don't plan on doing SOAP based administration, you can remove the SOAP Jars from Classpath

STEP 3 :

Check out following file,

%OPENXRI_HOME%\org.openxri.server\schemas\soap\users.lst

The SOAP requests are protected by UserName/Password combination

This file lists all the users who can access and invoke the SOAP requests.

After deployment of WAR file, this file is copied to following location,

%TOMCAT_HOME%\webapps\openxri\WEB-INF\users.lst

You can change Passwords for any of the users as required.

IMPORTANT

If you add any more new users to "users.lst" file , then the following file

%OPENXRI_HOME%\org.openxri.server\schemas\soap\server-config.wsdd

which at run time is copied to following location,

%TOMCAT_HOME%\webapps\openxri\WEB-INF\server-config.wsdd

check for following line,

<parameter name="allowedRoles" value="xriuser1,xriuser2"/>

and add or removes for value as required.

IMPORTANT :

After the deployment, to make it more secure, on the Unix Box, remove all permissions on these 2 files,

%TOMCAT_HOME%\webapps\openxri\WEB-INF\server-config.wsdd
%TOMCAT_HOME%\webapps\openxri\WEB-INF\users.lst

and give Read Privileges only to "tomcat" user.

STEP 4 :

For notes on how to invoke SOAP requests please refer to following file,

%OPENXRI_HOME%\org.openxri.soapadmin\test\SoapTest.java

This one list JUnit Test Cases which show how to invoke each of the SOAP Requests