-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
David Ward opened SPR-6412 and commented
At Alfresco we found that the integration with Apache CXF 2.2.2 that worked with previous snapshots of Spring 3 does not work with RC2.
We are using a set up more or less as documented here
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
It appears to be due to the processing of the @PostConstruct
annotation on org.apache.cxf.binding.AbstractBindingFactory or org.apache.cxf.binding.soap.SoapBindingFactory. SoapBindingFactory is declared as follows in cxf-extension-soap.xml. As you can see, it has a lazy-init.
<bean id="org.apache.cxf.binding.soap.SoapBindingFactory"
class="org.apache.cxf.binding.soap.SoapBindingFactory" lazy-init="true">
<property name="activationNamespaces">
<set>
<value>http://schemas.xmlsoap.org/soap/</value>
<value>http://schemas.xmlsoap.org/wsdl/soap/</value>
<value>http://schemas.xmlsoap.org/wsdl/soap12/</value>
<value>http://www.w3.org/2003/05/soap/bindings/HTTP/</value>
<value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
</set>
</property>
<property name="bus" ref="cxf"/>
</bean>
I found that in order to get it to work I had to manually add in CommonAnnotationBeanPostProcessor and override the SoapBindingFactory to not use lazy-init, as follows:
<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"/>
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<bean id="org.apache.cxf.binding.soap.SoapBindingFactory"
class="org.apache.cxf.binding.soap.SoapBindingFactory">
<property name="activationNamespaces">
<set>
<value>http://schemas.xmlsoap.org/soap/</value>
<value>http://schemas.xmlsoap.org/wsdl/soap/</value>
<value>http://schemas.xmlsoap.org/wsdl/soap12/</value>
<value>http://www.w3.org/2003/05/soap/bindings/HTTP/</value>
<value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
</set>
</property>
<property name="bus" ref="cxf"/>
</bean>
Issue Links:
- Hibernate support does not support Hibernate 3.2 (only 3.3) [SPR-6459] #11125 Hibernate support does not support Hibernate 3.2 (only 3.3) ("depends on")
- Behavior of Bean loading changed in RC2 (Incompatible to Apache CXF) [SPR-6410] #11076 Behavior of Bean loading changed in RC2 (Incompatible to Apache CXF) ("is duplicated by")
1 votes, 3 watchers