Message APIs

Once an XML-based message format definition is available, how should developers access it? They could use DOM, SAX, or even data binding, as described previously. But each one of these requires intimate knowledge of the message formatting details. Developers working in a high-level language like Java should not be concerned with wire formats anymore that they ever consider the format of CORBA, IDL, or JRMP. This section describes some of the standardization efforts underway that address this issue.

JAXM

The Java API for XML Messaging (JAXM) is an attempt to define a JAVA API to access the contents of XML messages, without having to concentrate on the actual message format (which as we have seen, can be quite complex). The idea is to provide a consistent API that provides access to a number of the key fields needed in reliable messaging (such as those described in the examples above — common fields like To, From, MessageID, etc.) without concerning the programmer with the details of how these are realized in the message or potentially in the transport.

In fact, JAXM will not attempt to define its own wire protocol — as we have seen, that's already being done elsewhere. Formats like ebXML, W3C XP, and BizTalk could all be accessed consistently through the same JAXM API.JAXM will support access to reliable messaging features, as well as security features like confidentiality, integrity, non-repudiation, authentication, authorization, and audit. Thus, it can effectively abstract away all the issues of whether these are implemented in a message, or delegated to transport. JAXM will be transport agnostic, although implementations over HTTP and SMTP are to be expected.

Note 

The Java Community Process governs development of JAXM. The JAXM classification is JSR-000067, http://java.sun.com/aboutJava/communityprocess/jsr/jsr_067_jaxm.html. At the time of writing, there is an early access package available for download. It runs in the Tomcat servlet container, and uses ebXML messages as a wire protocol. This is not production code, but is discussion point for project participants and other interested parties. Download the kit from: http://developer.java.sun.com/developer/early/Access/mproject/.

Java APIs for XML-Based RPCs

The goal of the Java APIs for XML-based RPC is to create pure Java APIs that encapsulate XML RPC protocols, like SOAP and the W3C's emerging Xprotocol. The group intends to create tooling that will marshal and unmarshal between Java objects and an XML protocol, and create reverse mappings of an existing class to a particular protocol, and forward mappings to go from an existing XML protocol message schema to Java classes.

Note 

This is registered as JSR-000101 under the Java Community Process. At the time of publication, the expert group was just forming. See http://java.sun.com/aboutJava/communityprocess/jsr/jsr_101_xrpc.html.

CMI

In June 1999, IBM announced the Common Message Interface (CMI). The intent of CMI is to abstract away message construction and examination independent of language. The company also announced the Application Messaging Interface (AMI), which will be a cross-language API for messaging systems (including Java).

CMI will handle binary data like C structs, MQIntegrator dictionaries, and tagged data. In particular, it supports XML messages. CMI is not coupled to a transport API, so JMS, AMI, MQI, or any vendor interface could be used. There has been very little publicity about CMI since its announcement, so the project may be dead.



Professional JMS
Professional JMS
ISBN: 1861004931
EAN: 2147483647
Year: 2000
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net