Running the Samples

Running the Samples

The JAXM Reference Implementation (RI) is an implementation of the JAXM API plus an implementation of a messaging provider. The RI also includes basic implementations of ebXML and SOAP-RP profiles, which run on top of SOAP. When an enterprise shops for a messaging provider, one of the main considerations is which profiles the messaging provider supports.

The RI also provides some simple examples of JAXM applications that you can run and also a Provider Administration tool that makes it easy to configure the messaging provider.

Before you can run the samples that run in a container or use the Provider Administration tool, you need to start up Tomcat. These are the steps to follow:

  1. Type the following at the command line:


    cd $JWSDP_HOME/bin


    cd %JWSDP_HOME%\bin 
  2. Open a browser window and set it to

  3. On the page that comes up, click on one of the sample programs listed. Then follow the instructions in the new window that comes up.

1 The Sample Programs

The sample programs illustrate various kinds of applications you can write with the JAXM API. Once Tomcat is running, you can run the following sample programs provided with the RI simply by setting your browser to the appropriate URL and following the instructions on the Web page that comes up.

  • Simple— A simple example of sending and receiving a message using the local messaging provider

  • Translator— A simple translation service that translates text into different languages

  • JAXM Tags— An example that uses JSP tags to generate and consume a SOAP message

  • Remote— An example of a round-trip message that uses a JAXM messaging provider that supports the basic ebXML profile to send and receive a message

  • SOAP-RP— An example of a round-trip message that uses a JAXM messaging provider that supports the basic SOAP-RP profile to send and receive a message

There are two other sample programs, jaxm-uddiping and jaxm-standalone, that do not run in Tomcat. To run them, go to the <JWSDP_HOME>/samples/jaxmdirectory, where you will find the directories uddiping and standalone. Each directory contains a README file that explains what to do.

The last part of the JAXM tutorial modifies the code in and also explains in detail how to run it. You might find it more convenient to wait until you have reached that section before trying to run the jaxm-uddiping and jaxm-standalone samples.

The preceding list presented the sample applications according to what they do. You can also look at the sample applications as examples of the three possible types of JAXM clients:

  • Those that do not use a messaging provider and also do not run in a container

    These are called standalone applications. The samples jaxm-standaloneand jaxm-uddiping are examples of standalone clients.

  • Those that do not use a messaging provider and run in a container

    The samples Simple, Translator, and JAXM Tags are examples of this type. Simple differs from the other two in that it uses a local provider, which should not be confused with a messaging provider. The local provider is simply a mechanism for returning the reply to a message that was sent using the method

  • Those that use a messaging provider and run in a container

    The samples Remote and SOAP-RP are examples of this type. The JAXM RI includes an implementation of a messaging provider and also implementations of two profiles that operate on top of SOAP. Remote uses the implementation o f an ebXML profile, and SOAP-RP uses the implementation of a SOAP-RP profile.

2 The Provider Administration Tool

The same index.html page with links to the samples has a link to the Provider Administration tool. This tool requires a user name and password for authentication, which you will have to set up before you can use the tool. All that is involved in the setup is simply opening the file tomcat-users.xml and uncommenting the element for provideradmin. Here are the steps to follow:

  1. Open the file < JWSDP_HOME>/conf/tomcat-users.xml in your favorite editor.

  2. Delete the comment tags (<!-) and (-->) that are before and after the following element:

    <users name="jaxm-provideradmin" password="changeme" 
  3. If Tomcat is running, you will need to shut it down and start it up again. This is so that Tomcat will see the revised version of tomcat-users.xml. Here are the instructions for shutting Tomcat down and then starting it up again:


    cd $JWSDP_HOME/bin


    cd %JWSDP_HOME%\bin 
  4. Set your browser window to

  5. Click on the link "JAXM Provider Administration Tool." A window will come up with text boxes for your login name and password. Use the name and password in the file tomcat-users.xml, which are

    user name: jaxm-provideradmin 
    password: changeme

When the Provider Administration tool comes up, follow the instructions it gives. This tool is normally used by System Administrators, but others may use it as well. Exploring this tool gives you more of an idea of what a messaging provider needs to know. For example, some typical ways to change the provider properties are:

  • To add, modify, or delete an endpoint

  • To change the retry interval (the amount of time the provider will wait before trying to send a message again)

  • To change the number of retries (the number of times the provider will try to send a message)

  • To change the directory where the provider logs messages

     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows