Home | Business News | Browse by Publication | X | XML Journal

XML messaging with JAXM Part 1 of 2; how to exchange SOAP messages.

Publication: XML Journal
Publication Date: 01-MAR-02
Format: Online
Delivery: Immediate Online Access
Full Article Title: XML messaging with JAXM Part 1 of 2; how to exchange SOAP messages.(Tutorial)

Article Excerpt
MESSAGING WITH JAXM

How to exchange SOAP messages

I could begin this article by expounding on the many applications that has found itself in, but that would be pointless. It's well known XML has found more than a niche in a variety of applications, in tiers of applications, and in all types of applications.

Messaging is one area of application development in which XML is being used more and more. Traditionally, messaging has been done using technologies like the Java Message Service, in which applications exchange data by sending the data to a queue; the data is then taken off the queue and processed by the intended recipient.

Applications that exchange messages must be concerned with how the message will be transported to the recipient. Protocols such as HTTP, FTP, and SMTP are used to define a standard transport for packaging information at a higher level.

Applications must also be concerned with how the payload or body of the message is encoded. Even though XML has become a popular encoding for exchanging messages, the need to have a standard encoding still exists. If every entity exchanging messages had its own encoding, it would be a nightmare to try to make sense of every message you received -- especially when your application may be concerned only with the payload of the message being sent, not necessarily how it got there.

Standards Are Needed

With the many variables present in application development, standards are evolving that will help speed the development and adoption of XML for messaging. Standards already exist for the various protocols that may be in use during execution of the application, ensuring a common understanding between applications that need to communicate. These standards are also being applied toward a common API for using these different technologies together.

Sun Microsystems, along with a host of other contributors, has developed the Java API for XML Messaging, or JAXM. JAXM provides a mechanism for exchanging SOAP messages. Using SOAP for the envelope to package your messages ensures a standard way to package them. At the time of this writing, Sun had just released the 1.0 version of the specification. The examples in this article were written using an Early Access version of the API.

Part 1 of this series focuses on utilizing JAXM to send SOAP messages directly to a recipient. Other functionality will be mentioned briefly, but I'll save the discussion for Part 2.

SOAP Basics

If you're not familiar with SOAP, I'll give you a brief introduction. If you are, skip ahead to the section titled "JAXM Overview."

SOAP -- Simple Object Access Protocol -- is an XML-based protocol for exchanging messages and executing remote procedure calls. Developed before JAXM, it continues to be developed as an independent specification by the W3C (www.w3c.org). SOAP specifies a schema that defines a set of elements and attributes that allow you to construct a SOAP message. For RPCs SOAP uses the XML Schema recommendation for representing serialized types. A simple SOAP message might look like the following:

XML Journal

SOAP messages define an envelope, headers, and a body to construct the SOAP message. A complete discussion of SOAP...

View this article FREE - Now for a Limited Time, try Goliath Business News
Free for 3 Days!



More articles from XML Journal
The world of enterprise messaging: framing enterprise messaging. (mess..., March 01, 2002
XML glue: an XML workflow and integration layer for telecommunication ..., March 01, 2002
Trends in high volume XML publishing: automated makeup techniques. (pu..., March 01, 2002
Markup is madness: the only standard that's mandatory is TCP/IP -- tha..., March 01, 2002
Happy 4th Birthday, XML! As the publisher of XML-Journal, we had to as..., March 01, 2002

Looking for additional articles?
Search our database of over 3 million articles.

Looking for more in-depth information on this industry?
Search our complete database of Industry & Market reports by text, subject, publication name or publication date.

About Goliath
Whether you're looking for sales prospects, competitive information, company analysis or best practices in managing your organization, Goliath can help you meet your business needs.

Our extensive business information databases empower business professionals with both the breadth and depth of credible, authoritative information they need to support their business goals. Whether it be strategic planning, sales prospecting, company research or defining management best practices - Goliath is your leading source for accurate information.