July 4, 2011, 4:14 p.m.
posted by max
Other Java-XML Technologies
Up to now, we have discussed the Web service-specific technologies that are a mandatory part of the J2EE platform. As such, these technologies must be present in any J2EE implementation from any vendor. Apart from these, there are other Java-XML technologies that, while not a mandatory requirement of the J2EE platform, still prove very useful for implementing Web services. While there are a number of such technologies, we discuss here only those referenced throughout this book. One such non-mandatory but useful Java-XML technology is the Java Architecture for XML Binding (JAXB), which standardizes the representation of an XML document as an in-memory object.
As we have already seen, when two parties communicate by passing XML documents between them, the XML documents should follow some structure so that the communicating parties can understand the contents of the documents. XML document structure is defined using the standard schema facility for XML documents. Of course, while developers can use a DOM or SAX parser to parse such documents, it is much easier if the various parts of the XML documents are mapped or bound to in-memory objects that truly represent the document's intended meaning, as per the schema definition. In addition to using these objects, developers have access to the schema definitions as part of their logic. Such a facility is commonly called an XML data-binding facility. JAXB provides a good quality XML data-binding facility for the J2EE platform. Figure shows the overall architecture of the JAXB data-binding facility.
8. JAXB Architecture
JAXB consists of three main components:
For more details on JAXB, refer to the JAXB specification available through the link provided in the next section.
Apart from JAXB, there are other emerging Java technologies that support Web service standards in terms of long-lived transactions, business process workflow, and so forth. At the time of this writing, they have not been finalized and hence will be dealt with in a future version of this book.