Web Services Invocation Framework:
Samples

The WSIF distribution comes with a set of sample clients that demonstrate WSIF features. This document describes the features demonstrated by each sample, along with a guide to running them.

Before you run samples you need to make sure that you have required JAR files and set CLASSPATH to contain both WSIF jar files and required JAR files. If you use binary distribution of WSIF most of JAR files is already provided and classpath script can be used to set CLASSPATH.  We redistribute as many of the required JARs as we can; you will only need to download the following and put them into the lib/ directory.

The dependency README tells you where you can download these from and also how they are used, so you can decide for yourself which JARs you really need.

Once you have the necessary jar files, to run samples you can simply call classpath script (on Windows use classpath.bat on UNIX use source classpath.csh if you use TCSH or source classpath.sh if you use BASH) and you will have all required jar files on CLASSPATH.

The samples are present under the samples directory of your WSIF installation. Each sample resides in its own directory. Within each sample directory, you will find the following files (here, SampleName is the name of the sample):

You will find that in most cases the sample WSDLs widely differ, but the client code remains much the same. This is the whole point of WSIF - providing access to services exposed via diverse protocols through a uniform WSDL-based API. So you might have two samples, one of which invokes the EJB binding for a service and the other invoking a SOAP binding. Since the client does not contain any binding specific code, the client code for these samples might be identical.

Below you will find a listing of the available samples and a pointer to the README files for each of them.

What the sample demonstrates Where the sample is available Information on how to setup and run this sample
How to invoke a simple SOAP service The samples/simplesoap directory under your WSIF installation The Sample README
How to invoke a SOAP service that uses custom schema types The samples/complexsoap directory under your WSIF installation The Sample README
How to invoke a local java class as a service The samples/localjava directory under your WSIF installation The Sample README
How to invoke an EJB as a service The samples/ejb directory under your WSIF installation The Sample README
How to invoke software accessible using the JCA (Java Connector Architecture) as a service The samples/jca directory under your WSIF installation The Sample README
How to invoke software accessible via the Java Message Service (JMS) The samples/jms directory under your WSIF installation The Sample README
How to choose between the available bindings of a service at runtime The samples/multibinding directory under your WSIF installation The Sample README
How to customize WSIF to select between bindings using your own heuristics The samples/customfactory directory under your WSIF installation The Sample README
A sample application that builds on the EJB, JMS and complexsoap samples The samples/dslprovider directory under your WSIF installation The Sample README