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]

Secure XML messaging with JMS, Part 1: Extending JMS to support XML authoring and processing

Enhance your enterprise applications by integrating these technologies

Bilal Siddiqui (xml4java@yahoo.co.uk), Consultant, 自由职业者
Bilal Siddiqui is an electronics engineer, an XML consultant, and the co-founder of WaxSys, a company focused on simplifying e-business. After graduating in 1995 with a degree in electronics engineering from the University of Engineering and Technology, Lahore, he began designing software solutions for industrial control systems. Later, he turned to XML and used his experience programming in C++ to build Web- and Wap-based XML processing tools, server-side parsing solutions, and service applications. He is a technology evangelist and a frequently-published technical author.

Summary:  Java Message Service (JMS) is a Java™ language-based messaging API. XML provides a simple, human-readable data format for information exchange, and is a popular syntax for the formating of enterprise data. Therefore, integrating XML into JMS applications can provide significant advantages in enterprise applications. This tutorial teaches you how to include support for secure XML messaging over an existing JMS network.

View more content in this series

Date:  22 Nov 2005
Level:  Intermediate PDF:  A4 and Letter (567 KB | 78 pages)Get Adobe® Reader®

Activity:  9707 views
Comments:  

Before you start

About this tutorial series

This two-part tutorial demonstrates the use of Java Messaging Service (JMS) for secure XML messaging in enterprise applications. JMS is a Java-based messaging API developed under the Java Community Process (JCP) against Java Specification Request (JSR) number 914 (see Resources).

The focus of this tutorial is to demonstrate, step-by-step, how to extend JMS functionality to incorporate support for authoring and processing secure XML messages. While doing this, I will explain and demonstrate the following:

  1. The architecture of JMS
  2. How client applications use JMS functionality
  3. How to extend JMS functionality to include the authoring and processing of secure XML messages
  4. How to use X.509 certificates for security in XML messages
  5. How to use a random number as an encryption key in XML messages
  6. How to use XML Security Suite for Java (XSS4J) from IBM alphaWorks to author and process secure XML documents
  7. How to integrate XSS4J into a JMS application for secure XML messaging
  8. How to develop a sample JMS-based messaging application that uses the security features of XSS4J

About this tutorial

This first tutorial covers the first five of the eight points listed above. Part 1 covers everything mentioned above except XSS4J, which I will explore in Part 2.


Prerequisites

This tutorial is aimed at Java programmers, so you should have a solid understanding of the Java language. (For more background on this topic, visit the developerworks New to Java technology page.) Specific knowledge of JMS is not necessary but helpful.

You also need to understand XML at least to the extent of being able to manually read and write XML files. (Visit the developerWorks New to XML page for more background.) You need to know how the Document Object Model (DOM) works only if you wish to change the code in this tutorial to suit your own applications. However, if you just wish to understand the material in this tutorial, you don't need to know DOM.

It is helpful (but not necessary) for you to be familiar with basic concepts of security, such as private and public keys, signatures, and encryption.


Should I take this tutorial?

This tutorial does not discuss all the details of how to use JMS for normal enterprise messaging. If you wish to learn how to use JMS, you can refer to the following IBM developerWorks resources:


Tutorial topics

Part 1 is divided into the following sections:

  1. Tutorial introduction.
  2. An enterprise message exchange scenario that establishes the need for secure XML messaging. This section also introduces the JMS architecture.
  3. Demonstration of how clients use JMS functionality.
  4. Strategy for incorporating XML authoring and processing capability into JMS. This section also demonstrates how to implement this strategy. At the end of this section, you will have a running XML-JMS application, which is not yet secure.
  5. Discussion of XML digital signatures and an explanation of how the message exchange scenario (from the second section) uses digital signatures for authentication.
  6. Discussion of XML encryption that shows how to incorporate confidentiality into XML messaging between the different departments of an enterprise.
  7. Summary of the discussion which includes a brief introduction to Part 2.

Code samples and installation requirements

The code for this tutorial works with any JMS 1.1-compliant implementation. I have listed several JMS implementations in Resources, which you can download and try.

I ran the code in this tutorial with the following JMS implementations:

  • The reference implementation that comes with Java 2 Enterprise Edition Software Development Kit (J2EE SDK) version 1.4.1 from Sun. You can download J2EE SDK from the J2EE Web site.
  • OpenJMS, an open source JMS implementation, which you can download from the OpenJMS Web site.

For any JMS implementation to work, you need to have the Java Development Kit (JDK) installed in your computer. I tried the samples of this tutorial with JDK version 1.4.2, which you can download from Sun's Web site (see Resources).

1 of 10 | 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=XML, Java technology
ArticleID=138377
TutorialTitle=Secure XML messaging with JMS, Part 1: Extending JMS to support XML authoring and processing
publish-date=11222005
author1-email=xml4java@yahoo.co.uk
author1-email-cc=dwxed@us.ibm.com

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.