0

我想将 spring 与 jbossws-cxf 一起使用。这可能吗?

首先,我尝试将 jbossws-cxf.xml 与 spring 的 bean 定义一起使用。警告消息[DescriptorDeploymentAspect] Spring not available, skipping check for user provided jbossws-cxf.xml / cxf.xml configuration files.指出该文件被忽略,这意味着您应该安装 spring 以使其不会被忽略:-)。所以我为jboss安装了spring。.

在安装和运行一个简单的 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" />

`

4

1 回答 1

0

我解决了这个问题。可悲的是 - 我不记得是怎么回事。请原谅我 - 但我不会回去尝试重现它:-) 基本上答案是“是”。对于那个特定的问题,它可能是一个命名空间问题,例如正确的是

<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">

可能也部署了自定义弹簧库(我认为建议使用 jboss 附带的弹簧库并自动动态部署)

这可能是别的东西

于 2012-07-24T09:20:55.170 回答