diff --git a/src/docbkx/common.xml b/src/docbkx/common.xml index 46a894c2..2f0e9b32 100644 --- a/src/docbkx/common.xml +++ b/src/docbkx/common.xml @@ -96,14 +96,54 @@ <classname>SaajSoapMessageFactory</classname> The SaajSoapMessageFactory uses the SOAP with Attachments API for Java to - create SoapMessage implementations. SAAJ is part of J2EE 1.4, so it should be - supported under most modern application servers. You wire up a + create SoapMessage implementations. SAAJ is part of + J2EE 1.4, so it should be supported under most modern application servers. + Here is an overview of the SAAJ versions supplied + by common application servers: + + + + + Application Server + SAAJ Version + + + + + BEA WebLogic 8 + 1.1 + + + BEA WebLogic 9 + 1.1/1.2 + + Weblogic 9 has a known bug in the SAAJ 1.2 + implementation: it implement all the 1.2 interfaces, but throws a + UnsupportedOperationException when called. + Spring Web Services has a workaround: it uses SAAJ 1.1 + when operating on WebLogic 9. + + + + + IBM WebSphere 6 + 1.2 + + + SUN Glassfish 1 + 1.3 + + + + + Additionally, Java SE 6 includes SAAJ 1.3. + You wire up a SaajSoapMessageFactory like so: ]]> - SAAJ is based on DOM, the Document Object Model. This means that all SOAP messages are + SAAJ is based on DOM, the Document Object Model. This means that all SOAP messages are stored in memory. For larger SOAP messages, this may not be very performant. In that case, the AxiomSoapMessageFactory might be more applicable. @@ -113,9 +153,9 @@ <classname>AxiomSoapMessageFactory</classname> The AxiomSoapMessageFactory uses the AXis 2 Object Model to create - SoapMessage implementations. AXIOM is based on StAX, the Streaming - API for XML. StAX provides a pull-based mechanism for reading XML messages, which can be more - efficient for larger messages. + SoapMessage implementations. AXIOM is based on + StAX, the Streaming API for XML. StAX provides a pull-based mechanism for + reading XML messages, which can be more efficient for larger messages. To increase reading performance on the AxiomSoapMessageFactory, @@ -132,6 +172,53 @@ ]]> +
+ <acronym>SOAP</acronym> 1.1 or 1.2 + + Both the SaajSoapMessageFactory and the + AxiomSoapMessageFactory have a soapVersion property, + where you can inject a SoapVersion constant. By default, the version + is 1.1, but you an set it to 1.2 like so: + + + + + + + + + +]]> + + In the example above, we define a SaajSoapMessageFactory that only accepts + SOAP 1.2 messages. + + + + Even though both versions of SOAP are quite similar in format, the 1.2 + version is not backwards compatible with 1.1 because it uses a different XML namespace. + Other major differences between SOAP 1.1 and 1.2 include the different structure + of a Fault, and the fact that SOAPAction HTTP headers are deprecated, which + means that you cannot use the + SoapActionEndpointMapping or the + SoapActionAnnotationMethodEndpointMapping. + + + One important thing to note with SOAP version numbers, or WS-* specification + version numbers in general, is that the latest version of a specification is + generally not the most popular version. + For SOAP, this means that currently, the best version to use is 1.1. + Version 1.2 might become more popular in the future, but currently 1.1 is the safest bet. + + +
<interfacename>MessageContext</interfacename> @@ -257,7 +344,7 @@ public class MyXPathClass {
<classname>XPathTemplate</classname> - The XPathExpression allows you to evaluate only a single, pre-compiled + The XPathExpression only allows you to evaluate a single, pre-compiled expression. A more flexible, though slower, alternative is the XpathTemplate. This class follows the common template pattern used throughout Spring (JdbcTemplate, JmsTemplate, etc.). Here is an example: diff --git a/src/docbkx/server.xml b/src/docbkx/server.xml index 5b8a5ece..650895ce 100644 --- a/src/docbkx/server.xml +++ b/src/docbkx/server.xml @@ -575,7 +575,7 @@ public class AnnotationOrderEndpoint { be routed to the 'createOrderEndpoint'.
-
+
<classname>SoapActionEndpointMapping</classname> Rather than base the routing on the contents of the message with the @@ -606,8 +606,13 @@ public class AnnotationOrderEndpoint { The mapping above routes requests which have a SOAPAction of http://samples/RequestOrder to the 'getOrderEndpoint'. Requests with http://samples/CreateOrder will be routed to the 'createController'. - Note that using SOAP Action headers is SOAP-specific, so it cannot be used with Plain Old XML messages. + + + Note that using SOAP Action headers is SOAP 1.1-specific, so it cannot be used when using Plain Old + XML, nor with SOAP 1.2. + +
<classname>MethodEndpointMapping</classname> diff --git a/src/site/fml/faq.fml b/src/site/fml/faq.fml index fc516828..7577a291 100644 --- a/src/site/fml/faq.fml +++ b/src/site/fml/faq.fml @@ -139,7 +139,7 @@ javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/Mes Weblogic 9 has a known bug in the SAAJ 1.2 implementation: it implement all the 1.2 interfaces, but throws UnsupportedOperationExceptions when you call them. Confusingly, the exception message is This class does not support SAAJ 1.1, even though - supports SAAJ 1.1 just fine; it just doesn't support SAAJ 1.2. + it supports SAAJ 1.1 just fine; it just doesn't support SAAJ 1.2. See also this BEA forum post.