InfoQ Homepage News SAAJ - Fine in Theory, Broken in Practice?

SAAJ - Fine in Theory, Broken in Practice?


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


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.

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

Community comments

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

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


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.