在jboss 6上将spring与jbossws cxf一起使用



我想将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" />

`

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

<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库,并自动动态部署)

它可能是其他东西加在一起的

最新更新