A key Role in the Initial Growth of the World Wide Web

Apache Web Server Journal

Subscribe to Apache Web Server Journal: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get Apache Web Server Journal: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Apache Web Server Authors: Liz McMillan, Elizabeth White, Pat Romanski, Janakiram MSV, Gil Allouche

Related Topics: Java EE Journal, Apache Web Server Journal, XML Magazine, SOA & WOA Magazine

J2EE Journal: Article

XML Binding Frameworks in the Context of Service-Oriented Architecture

Make an informed choice about a binding framework for your SOA needs

This article critically evaluates the role of XML binding frameworks play in the context of service-oriented architecture (SOA) platforms, and it also provides an objective evaluation of the popular XML binding frameworks in a J2EE environment.

XML binding refers to the mapping of XML documents to/from any suitable internal representation (e.g., object-based representation) that is understandable by the underlying system, and in the process facilitating easy and intuitive access to the data in XML documents. In a J2EE context, this translates to an easier and logically meaningful way of accessing the data in XML documents, rather than using the low-level DOM/SAX parsers.

To illustrate, in Listing 1, an order-processing application would find it easy to access Order, Item, and Customer objects rather than using the XML-specific data elements listing each element, its text, and its attributes as in a DOM/SAX approach. Due to this abstraction, the applications can directly deal with the business entities as part of the business functionality.

XML binding also abstracts away many low-level document details, and it requires less memory than a document model-based approach (such as DOM or JDOM).

Listing 1: An XML listing of data

<Order ordNo="O123">
<Customer custNo="C123">
<CustName>ABC</CustName>
<Street>123 Main St. </Street>
<City>Hyd</City>
<State>AP</State>
<PostCode>50003</PostCode>
</Customer>
<Items>
<Item ItemNo="1">
<Model>M12</Model>
<Qnty>10</Qnty>
</Item>
<Item ItemNo="2">
<Model>M10</Model>
<Qnty>5</Qnty>
</Item>
</Items>
</Order>

The Role of XML Binding in SOA
In the context of SOA, XML is of vital importance and has become the lingua franca of communication. We will first outline the importance of XML binding in SOA platforms. Some of the key advantages of using XML binding in the context of an SOA are described below.

Serialization/deserialization of SOAP payloads in Web services platforms with increased interoperability
Web services represent the most popular SOA formalism, and are based on strict XML-based standards for communication (XML Schema for data, and SOAP for wire-level messaging). Web services rely on SOAP marshalling and demarshalling capabilities on the service provider and consumer side (See Figure 1). The marshalling and demarshalling is required to and from the XML document passed over the wire to the native format. Typically the XML payload of a SOAP message needs to be serialized at the requestor end, and deserialized at the provider end (or vice versa). Thus, XML binding frameworks are crucial to handling the serialization and deserialization requirements in SOAP invocations.

Typically SOAP servers have specific custom serialization/deserialization mechanisms for XML data in SOAP payloads. In J2EE, JAXB is a core Java-based standard for XML binding. A JAXB-compliant application is able to utilize different JAXB implementations by just regenerating the schema classes without any change to the application code.

Without relying on an underlying SOAP implementation where there is variance in serialization/de-serialization mechanisms, a J2EE Web Service application can use a JAXB based XML binding framework for the payload marshalling and de-marshalling. This decoupling of XML binding from a SOAP provider increases reuse and interoperability. Further, the same XML Binding framework can be used for Web Service requests alongside applications like configuration reader etc.

Working with business entities is eased, and reuse is made possible
The binding frameworks build an abstraction layer, thereby hiding the long parsing algorithms and complexity of the DOM/SAX API. Developers need work only with business logic and not with the finer details of data binding and transformation. The business entities represented by mapped object versions of XML documents/parts of documents can be reused across multiple services. On a related front, there is ample scope for improvement of the performance of SOA-based applications by caching at the mapped object level.

Configuration and customization becomes flexible and parameterized
SOA-based applications can leverage XML to provide dynamic configuration, deployment, and customization. Since configuration/deployment files leverage XML format, the use of XML binding frameworks significantly eases dynamic configurability and customization. In the long term, it is envisaged that metadata based on XML will be the foundation of service mediation technologies to enable typical SOA needs like service versioning, service personalization, and dynamic service provisioning. In view of this, XML binding frameworks will be key constituents of SOA life-cycle management frameworks.

More Stories By Dr. Srinivas Padmanabhuni

Dr. Srinivas Padmanabhuni is a principal researcher with the Web Services Centre of Excellence in SETLabs, Infosys Technologies, and specializes in Web Services, service-oriented architecture, and grid technologies alongside pursuing interests in Semantic Web, intelligent agents, and enterprise architecture. He has authored several papers in international conferences. Dr. Padmanabhuni holds a PhD degree in computing science from University of Alberta, Edmonton, Canada.

More Stories By Bijoy Majumdar

Bijoy Majumdar is a member of the Web Services COE (Center of Excellence) for Infosys Technologies, a global IT consulting firm, and has substantial experience in publishing papers, presenting papers at conferences, and defining standards for SOA and Web services. Prior to Infosys, Bijoy Majumdar worked as an IT Analyst, and had been a member of the GE Center of Excellence (e-center) under the E-Business Practice of Tata Consultancy Services.

More Stories By Ujval Mysore

Ujval Mysore is a member of the Web Services COE (Center of Excellence) for Infosys Tehcnologies, a global IT consulting firm, and have substantial experience in publishing papers, presenting papers at conferences, and defining standards for SOA and Web services. The Web Services COE specializes in SOA, Web services, and other related technologies. Dr. Srinivas Padmanabhuni heads the Web Services COE.

More Stories By Vikram Sitaram

Vikram Sitaram is a member of the Web Services COE (Center of Excellence) for Infosys Tehcnologies, a global IT consulting firm, and have substantial experience in publishing papers, presenting papers at conferences, and defining standards for SOA and Web services. The Web Services COE specializes in SOA, Web services, and other related technologies. Dr. Srinivas Padmanabhuni heads the Web Services COE.

Comments (2) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
tejasvi 08/12/05 12:13:44 PM EDT

this article is excellent

XML News Desk 08/02/05 04:46:17 PM EDT

XML Binding Frameworks in the Context of Service-Oriented Architecture. This article critically evaluates the role of XML binding frameworks play in the context of service-oriented architecture (SOA) platforms, and it also provides an objective evaluation of the popular XML binding frameworks in a J2EE environment.