Home TOC |
![]() ![]() ![]() |
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:
- type the following at the command line:
- Unix:
cd $JWSDP_HOME/bin startup.sh- Windows:
cd %JWSDP_HOME%\bin startup.bat- Open a browser window and set it to
http://localhost:8080/index.html- 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.
- 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
andjaxm-standalone
, that do not run in Tomcat. To run them, go to the<JWSDP_HOME>/samples/jaxm
directory, where you will find the directoriesuddiping
andstandalone
. Each directory contains aREADME
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 thejaxm-uddiping
andjaxm-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-standalone
andjaxm-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
SOAPConnection.call
.- 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 of an ebXML profile, and SOAP-RP uses the implementation of a SOAP-RP profile.
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 filetomcat-users.xml
and uncommenting the element forprovideradmin
. Here are the steps to follow:
- Open the file <
JWSDP_HOME>/conf/tomcat-users.xml
in your favorite editor- Delete the comment tags ("<!--") and ("-->") that are before and after the following element
<users name="jaxm-provideradmin" password="changeme" role="provider"/>- 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
- Set your browser window to
http://localhost:8080/index.html- 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 areuser name: jaxm-provideradmin password: changemeWhen 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 |
![]() ![]() ![]() |