WS Apache logoWSIF site

the WSIF site
 
   

WSIF Samples


print-friendly
version

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.

  • activation.jar
  • mail.jar
  • jms.jar
  • j2ee.jar; if you plan to download this it includes the above three so you won't need to download those separately.

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):

  • SampleName.wsdl: WSDL file for sample
  • README.html: README file describing the sample, what WSIF features it demonstrates, and how to run it.
  • service: Subdirectory containing service implementation files, deployment files, README file describing how to deploy service. In case the sample uses a publicly available service, this directory will contain only a README file describing where the service is hosted, and pointing to further information on the service.
  • client: Subdirectory containing two further subdirectories, dynamic and stub. The dynamic subdirectory contains files for a client that uses WSIF's DII (dynamic invocation interface) to invoke the sample service. The stub subdirectory contains a pregenerated set of files that allow invocation of the service through a JAX-RPC compliant service interface. Each of these subdirectories may contain README files for useful information about that particular client.

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
Built with Apache Forrest logo