The JavaTM Web Services Tutorial
Home
TOC
PREV TOP NEXT

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:
    Unix:
          cd $JWSDP_HOME/bin	
          startup.sh
     
    
    Windows:
          cd %JWSDP_HOME%\bin	
          startup.bat
     
    
  2. Open a browser window and set it to
          http://localhost:8080/index.html
     
    
  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.

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.

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/jaxm directory, 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 UddiPing.java 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:

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"	
                role="provider"/>
     
    
  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:
    Unix:
          cd $JWSDP_HOME/bin	
          shutdown.sh	
          startup.sh
     
    
    Windows:
          cd %JWSDP_HOME%\bin	
          shutdown.bat	
          startup.bat
     
    

  1. Set your browser window to
       http://localhost:8080/index.html
     
    
  2. 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:

Home
TOC
PREV TOP NEXT