Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Develop a SOAP/JMS JAX-WS Web services application with WebSphere Application Server V7 and Rational Application Developer V7.5

Phil Adams (phil_adams@us.ibm.com), Senior Software Engineer, IBM
Phil Adams is a senior software engineer in the IBM Software Group. For the last 9 of his 23 years with IBM, he has been a part of the WebSphere development team. For the past 6 years he has focused on web services, starting with the JAX-RPC web services engine. Phil was responsible for the design and implementation of the SOAP/JMS support introduced in the WebSphere® Application Server 5.0.2 release, and has been involved in designing and implementing various enhancements to the SOAP/JMS support since then. Phil is now a member of the W3C SOAP/JMS Working Group, whose mission is to produce a SOAP/JMS interoperability specification
Zina Mostafia (zina@ca.ibm.com), Advisory Software Engineer, IBM
Zina Mostafia is an Advisory Software Engineer in the IBM Software Group. Zina has been part of the WebSphere Web Services Tools team in the Rational Application Developer (RAD) group for over 7 years. She is also an inventor of an IBM Web Services patent disclosure, and she has presented the Web Services Tools in Rational Application Developer in conferences such as the IBM WebSphere Technical Conference (WSTC) and CASCON. One of Zina's main interests is to enable simpler scenarios within RAD to create Web Services based on EJBs. She designed and created the scenarios for EJB-Based Web Services for both JAX-WS and JAX-RPC runtimes. These scenarios support SOAP/JMS and SOAP/HTTP bindings. She is also an active participant in the open source community. She has also been involved with Web services security and interoperability.

Summary:  IBM® WebSphere® Application Server V7 provides support for SOAP over Java™ Message Service (JMS) with JAX-WS Web service applications. SOAP over JMS can be used as an alternative to SOAP over HTTP for transmitting SOAP request and response messages. This tutorial shows you how to use IBM Rational® Application Developer V7.5 to develop and deploy a JAX-WS Web service application that uses SOAP over JMS.

Date:  18 Mar 2009
Level:  Intermediate PDF:  A4 and Letter (1959 KB | 31 pages)Get Adobe® Reader®

Activity:  60750 views
Comments:  

Introduction

The Java Message Service (JMS) is a portable, standard messaging API that enables Java programs to communicate by exchanging messages. JMS is a component of the Java Platform, Enterprise Edition (Java EE) specification.

Why would you want to use JMS? Web services applications typically use HTTP as the transport for transmitting SOAP request and response messages. However, if you are interested in a more reliable transport, or would like to use a more asynchronous messaging paradigm, an enterprise messaging system that implements the JMS API might be preferable.

The use of JMS in conjunction with Web services applications was introduced in IBM WebSphere Application Server V5.0.2, back in 2003. Since there was no standard for SOAP over JMS interoperability at that time, the Web services runtime within the application server employed an IBM proprietary protocol for exchanging SOAP request and response messages within an enterprise messaging system. More recently, an effort was initiated to establish an interoperability standard for SOAP over JMS. The SOAP-JMS W3C Working Group was formed in 2008 to produce an approved specification for SOAP-JMS interoperability. Achievement of a W3C recommendation is tentatively targetted for April 2009.

Support for the emerging SOAP over JMS binding specification has been added to WebSphere Application Server V7. (Because this specification has not yet been approved, we will continue to track the progress of the standardization effort.) Prior to Version 7.0, the SOAP over JMS support in WebSphere Application Server was restricted to JAX-RPC Web services and clients. In Version 7.0, however, the SOAP over JMS capabilities have been expanded to include JAX-WS Web services and clients.

How does SOAP over JMS work?

Figure 1 shows the relationship between the Web service run time components and the underlying messaging provider.


Figure 1. Overview of Web service run time components
Figure 1. Overview of Web service run time components

At a high level, these are the steps involved with processing a Web services request that uses SOAP over JMS:

  1. The JAX-WS client application uses the JAX-WS programming model to invoke a Web service operation.
  2. The message sender component of the WebSphere Application Server Web services client runtime processes the request by sending a SOAP request message to the request queue identified by the endpoint location URI associated with the invocation (for example, jms:jndi:jms/MyQueue&jndiConnectionFactoryName=jms/MyCF&targetService=Port1). The message sender component uses the standard JMS API layer provided by the underlying messaging provider (for example, IBM WebSphere MQ) to send the request message.
  3. The SOAP request message is delivered to the request queue by the messaging provider.
  4. The message receiving component of the Web services server runtime uses the JMS API to receive the SOAP request message.
  5. The Web services server runtime uses the EJB container (a component of the WebSphere Application Server environment) to dispatch the request to the Web service implementation class, named "MyServiceImpl" in Figure 1.
  6. After the Web service operation finishes, the Web services server runtime uses the JMS API to send the SOAP response message to the reply queue.
  7. The Web services client runtime then uses the JMS API to receive the reply message. The client then processes the reply to finish the invocation, and returns control back to the client application.

Before you begin

In this tutorial, you will implement an EJB-based JAX-WS Web service that is similar to the JAX-WS Web services sample application delivered with WebSphere Application Server V7. You will implement your Web service using a top-down approach, starting with a WSDL document that is similar to the one supplied with the sample application.

Objectives

By following the exercises in this tutorial, you will learn how to use IBM Rational Application Developer to develop a JAX-WS Web services application that uses SOAP over JMS, how to configure the various JMS-related objects (queue, connection factory, and so on), and how to test the application using the test client generated by Rational Application Developer.

Prerequisites

This tutorial is for application developers and system administrators who have experience with WebSphere Application Server, Web services, and the JAX-WS programming model. You should have some familiarity with a messaging provider, along with its administrative functions. The examples throughout this tutorial will use the default messaging provider included in WebSphere Application Server.

System requirements

To run the examples in this tutorial, you will need IBM WebSphere Application Server V7.0 and IBM Rational Application Developer V7.5 installed and operational.

Duration

1.5 hours (time approximate)

1 of 14 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=372657
TutorialTitle=Develop a SOAP/JMS JAX-WS Web services application with WebSphere Application Server V7 and Rational Application Developer V7.5
publish-date=03182009
author1-email=phil_adams@us.ibm.com
author1-email-cc=
author2-email=zina@ca.ibm.com
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.