BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

SAAJ - Fine in Theory, Broken in Practice?

| by Stefan Tilkov Follow 0 Followers on May 19, 2008. Estimated reading time: 1 minute |

SAAJ, the SOAP with Attachments API for Java™, is the standard API used by Java Web services developers to work directly with a SOAP message. Since version 1.2, the SAAJ javax.xml.soap interfaces extend the appropriate DOM interfaces, enabling developers to use standard JAXP processing to create or work with an XML payload that is sent or received using SOAP.

Unfortunately, many application servers seem to support SAAJ 1.2 only half-heartedly. Spring Web Services lead developer Arjen Poutsma has written a small test that uses SAAJ to create a SOAP message and DOM to create the body, and Geronimo, JBoss, OC4J and Weblogic all failed to process it correctly (see Arjen’s blog post for the table with details).

Developers who prefer to work with XML directly instead of relying on a databinding technology (such as JAXB, XMLBeans or Castor) have a wide variety of choices in terms of which XML API they want to use (including JDOM, XOM, dom4j, or the Axis2 Axiom library). Sadly, the only one of these that is standardized is DOM, which apart from being cumbersome to use does not provide the portability one would expect in this case.

What is your preferred way to work with SOAP messages in Java? Did you run into the problem Arjen describes?

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT