Я хочу использовать spring вместе с jbossws-cxf. Возможно ли это?
Сначала я попытался использовать jbossws-cxf.xml с определениями bean-компонентов spring. Предупреждающее сообщение [DescriptorDeploymentAspect] Spring not available, skipping check for user provided jbossws-cxf.xml / cxf.xml configuration files.
гласит, что файл игнорируется, и означает, что вам следует установить spring, чтобы он не игнорировался :-). Итак, я установил пружину для jboss. .
После установки и запуска простого MathWS вместе с простым примером WS я получаю
[org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringBusFactory] INITIAL_APP_CONTEXT_CREATION_FAILED_MSG: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.binding.soap.customEditorConfigurer' defined in URL [vfs:/D:/lifeDevSuite/jboss/jboss-6.0.0.FinalSpring/common/lib/cxf-rt-bindings-soap.jar/META-INF/cxf/cxf-extension-soap.fixml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'org.springframework.beans.PropertyEditorRegistrar[]' for property 'propertyEditorRegistrars'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.apache.cxf.binding.soap.spring.SoapVersionRegistrar] to required type [org.springframework.beans.PropertyEditorRegistrar] for property 'propertyEditorRegistrars[0]': no matching editors or conversion strategy found
ошибка.
Мой jbossws-cxf.xml выглядит так:
`
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
<bean id="mathBean" class="com.sample.MathWS">
<constructor-arg value="alabama" />
</bean>
<jaxws:endpoint id="MathWSX" implementor="#mathBean" address="http://localhost:8080/HelloCXF" />
`