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.  You will only need to download activation.jar and put it into lib/activation (see README), mail.jar and put it into lib/javamail  (see README) and optionally j2ee.jar or other jar file with J2EE APIs and put it into lib/j2ee (see README). All of those files must be downloaded separately as they can not be distributed. j2ee.jar is required if you would like to compile EJB, JCA or JMS providers or run samples that use those providers.

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