Использование весны вместе с jbossws-cxf на jboss 6 - PullRequest
0 голосов
/ 01 февраля 2012

Я хочу использовать 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" />

`

1 Ответ

0 голосов
/ 24 июля 2012

Я решил проблему. К сожалению, я не могу вспомнить, как. И, пожалуйста, прости меня - но я не собираюсь возвращаться, чтобы попытаться воспроизвести это :-) В основном ответ «да». Для этой конкретной проблемы это могла быть проблема пространства имен, например, правильно будет

<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"
 xmlns:util="http://www.springframework.org/schema/util"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/util
 http://www.springframework.org/schema/util/spring-util-2.5.xsd
 http://cxf.apache.org/jaxws
 http://cxf.apache.org/schemas/jaxws.xsd">

Возможно, также были развернуты пользовательские библиотеки Spring (я думаю, что рекомендуется использовать библиотеки Spring, поставляемые с jboss, и динамически разворачиваются автоматически)

Это могло быть что-то совсем другое

...