Web Services Invocation Framework:
Invoking the EJB Sample using WSIF's dynamic invocation interface

First you need to set up the CLASSPATH in your environment. Beyond the standard classpath setting, you also need to add the J2EE client jar files to your classpath. The set of J2EE client JARs is vendor specific; refer to the documentation in your application server on how to set up the environment for an EJB client, and add the JAR files specified. For JBoss users, we have included a script to set up the client environment. To run this script, make sure you are in your base WSIF directory (the one that contains the classpath.bat script. Set the variable JBOSS_HOME to point to your JBoss installation. From there, run the command samples\ejb\client\jboss_setup\jboss.bat. This sets up the entire client classpath required to run the sample using JBoss client JAR files.

The WSDL file that describes the service and its EJB binding is vendor-specific in the <ejb:address> element. The initialContextFactory, jndiName and jndiProviderURL attributes will all depend on your specific deployment; refer to your application server documentation on how to write an EJB client to learn more about JNDI and related issues. Make sure these values are all correct before you try running the client.

After you have set up your classpath, to invoke this sample using WSIF's DII, run the Run class located in this directory. This class will populate an addressbook with two names and then query each of them by invoking various operations supported by the service. To run this class, specify on the command line the location of the WSDL file for the service. For example,
java ejb.clients.dynamic.Run samples/ejb/AddressBook.wsdl

Look at the code in the Run.java file in this directory to see how to use WSIF's DII yourself. Note that the DynamicInvoker class we used to invoke the simplesoap sample dynamically cannot be used for this one since the DynamicInvoker as it stands now is limited to invocation of services using primitive schema types only.