Patterns and Strategies For Building Document-Based Web Services

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Article

Patterns and Strategies for Building Document-Based Web Services: Part 1 in a


Series
By Sameer Tyagi, September, 2004

[Page 1] [Page 2] [Page 3] [Page 4] [Page 5] [Page 6]

The Java programming language provides developers with the ability to write portable code
quickly and efficiently, and XML provides a mechanism to describe data in a portable format.
Java and XML therefore form a natural combination and choice for developing web services.
This is reinforced though the strong support for developing web services in the Java
programming language by the numerous Java specifications addressing different APIs and
standards in the Java Community Process.

Java 2 Platform, Enterprise Edition (J2EE) is a standard Java platform for deploying enterprise
applications and is specified as a set of required APIs, specifications and policies. The J2EE 1.4
platform provides integrated support for web services, which is one of the many service
delivery channels in the platform. The Java API for XML-based RPC (JAX-RPC), a part of
J2EE 1.4, is the Java API of choice for developing and using service endpoints based on SOAP
that are described using WSDL. Although JAX-RPC and its name are based on the RPC model,
it offers features that go beyond basic RPC. It is possible to develop web services that pass
complete documents and also document fragments.

Architects and developers are rapidly adopting the use of XML as the data format and a J2EE-
based technology stack to develop web services that either exposes core business functionality
to business partners, or as a mechanism to integrate applications within the enterprise and
eliminate vertical application silos. It is therefore important for them to understand how such
document-driven web services can be built using JAX-RPC, the different architectural choices,
and the associated tradeoffs. This document outlines some of these alternatives and best
practices that architects and developers should keep in mind when building document-driven
web services using JAX-RPC on the J2EE platform.

Content

• Document-Based Interactions
• Formatting vs. Processing
• Strategies
• Using XML in the SOAP Body
• Using String in the SOAP Body
• Using Base64-Encoded or Raw Bytes in the SOAP Body
• Switch-Off Data Binding
• Using the xsd:any Element in WSDL
• Using the anyType in WSDL
• Using Message Attachments
• Architectures for Asynchronous Processing
• Summary
• References

Code Sample
• Code
• Code • Code • Code • Code Sample 59

You might also like