Handling and Shaping XML Messages with XML Maps

Web services you build communicate with their clients and other web services through text messages formatted in the syntax of Extensible Markup Language (XML). There may be occasions when the messages your web service receives and sends must conform to a specific format. When this is the case, you can ensure a functional relationship between the parts of a message and the Java types of your service code by using XML maps.

In addition, using XML maps supports loose coupling between your web service's code and other components such as clients and resources used by your service; in other words, you need not change your Java code to meet the needs of components with which your service communicates.

An XML map acts as a bridge between your Java code and an XML message's structure — or shape. Using XML maps, you can anticipate the shape of incoming messages or control the shape of outgoing messages.

Note: This section assumes that you are familiar with the basics of XML. For basic information about XML, see Introduction to XML.

# Topics Included in This Section

Why Use XML Maps?

Introduces XML maps and ECMAScript for mapping.

Getting Started with XML Maps

Offers starting places for working with XML maps.

Matching XML Shapes

Provides topics on specific tasks you can accomplish with XML maps.

Getting Started with Script for Mapping

Offers starting places for working the ECMAScript functions used with XML maps.

Handling XML with ECMAScript Extensions

Provides topics on specific tasks you can accomplish with operators that are part of the ECMAScript extensions for XML.

Functions for Manipulating XML

Offers a reference on the functions available with extended ECMAScript.

A Few Things to Remember About XML Maps and Script

Lists a few guidelines that may be useful when using XML maps and script.

# Samples

The following illustrate XML maps:

- SimpleMap.jws

- OutputMap.jws

- OutputScriptMap.jws

- InputMapMultiple.jws

- ConsolidateAddress.jws

For general information about samples, see Samples.

Related Topics

@jws:parameter-xml Tag

@jws:return-xml Tag

XML Map Tag Reference

Introduction to XML