You can use XQuery maps to reshape the XML messages that web services send and receive.
Introduction to XQuery Maps
Learn about what XQuery maps are and when to use them.
Using ECMAScript From XQuery Maps
Learn about using ECMAScript to extend XQuery maps.
Related Topics
Handling XML With ECMAScript Extensions
XQuery Map Samples