diff --git a/src/site/fml/faq.fml b/src/site/fml/faq.fml index fba6c9e8..6d2f9052 100644 --- a/src/site/fml/faq.fml +++ b/src/site/fml/faq.fml @@ -17,7 +17,7 @@ If you get the following Exception:

-                    NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
+NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
                 

Most often, this exception is related to an older version of Xalan being used. Make sure to upgrade @@ -118,15 +118,15 @@ Application ServerSAAJ Version BEA WebLogic 81.1 BEA WebLogic 91.1/1.2* + BEA WebLogic 101.3** IBM WebSphere 61.2 SUN Glassfish 11.3 - JBoss 4.21.3** + JBoss 4.21.3*** -

* = See below. -

-

** = See below. -

+

* = See below.

+

** = See below.

+

*** = See below.

Additionally, Java SE 6 includes SAAJ 1.3.

@@ -136,13 +136,13 @@

If you get the following stack trace:

-                    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.soap.saaj.SaajSoapMessageFactory' defined in ServletContext resource [/WEB-INF/springws-servlet.xml]:
-                    Invocation of init method failed;
-                    nested exception is java.lang.NoSuchMethodError:
-                    javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
-                    Caused by:
-                    java.lang.NoSuchMethodError:
-                    javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
+org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.soap.saaj.SaajSoapMessageFactory' defined in ServletContext resource [/WEB-INF/springws-servlet.xml]:
+Invocation of init method failed;
+nested exception is java.lang.NoSuchMethodError:
+javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
+Caused by:
+java.lang.NoSuchMethodError:
+javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
                 

Like most J2EE libraries, SAAJ consists of two parts: the API that consists of interfaces @@ -164,14 +164,14 @@

- Weblogic 9 has a known bug in the SAAJ 1.2 implementation: it implement all the 1.2 interfaces, + 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 it supports SAAJ 1.1 just fine; it just doesn't support SAAJ 1.2. See alsothis BEA forum post.

- Spring-WS has a workaround for this, we basically use SAAJ 1.1 only when dealing with Weblogic 9. + Spring-WS has a workaround for this, we basically use SAAJ 1.1 only when dealing with WebLogic 9. Unfortunately, other frameworks which depend on SAAJ, such as XWSS, do not have this workaround. These frameworks happily call SAAJ 1.2 methods, which throw this exception.

@@ -179,11 +179,36 @@ The solution is to not use BEA's version of SAAJ, but to use another implementation, like the one from Axis 1, or SUN. In you application context, use the following: - - - - - +<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"> + <property name="messageFactory"> + <bean class="com.sun.xml.messaging.saaj.soap.MessageFactoryImpl"/> + </property> +</bean> + +

+
+ + + + I get an UnsupportedOperationException "This class does not support SAAJ 1.1" when I use SAAJ under WebLogic 10. What can I do about it? + + +

+ Weblogic 10 ships with two SAAJ implementations. By default the buggy 9.x implementation is used + (which lives in the package weblogic.webservice.core.soap), + but there is a new implementation, which supports SAAJ 1.3 + (which lives in the package weblogic.xml.saaj). + By looking at the DEBUG logging when Spring Web Services starts up, you can see which SAAJ + implementation is used. +

+

+ To use this new version, you have to create a message factory bean like so: + +<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"> + <property name="messageFactory"> + <bean class="weblogic.xml.saaj.MessageFactoryImpl"/> + </property> +</bean>

@@ -198,11 +223,11 @@ the JBoss implementation, but to use another implementation. For instance, you can use SUN's reference implementation like so: - - - - - +<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"> + <property name="messageFactory"> + <bean class="com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl"/> + </property> +</bean>