BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

SAAJ - Fine in Theory, Broken in Practice?

by Stefan Tilkov on May 19, 2008 |

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?

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

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT