【问题标题】:Using spring together with jbossws-cxf on jboss 6在 jboss 6 上使用 spring 和 jbossws-cxf
【发布时间】:2012-02-01 18:59:39
【问题描述】:

我想将 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 以使其不会被忽略:-)。 So I installed spring for 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" />

`

【问题讨论】:

    标签: spring jboss6.x jbossws


    【解决方案1】:

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

    <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库(我认为推荐使用jboss自带的spring库,自动动态部署)

    这可能是另外一回事

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-07-18
      • 1970-01-01
      • 1970-01-01
      • 2010-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多