2012-02-01 24 views
0

我想使用spring和jbossws-cxf。这可能吗?在jboss 6上使用spring和jbossws-cxf 6

首先我试着用spring的bean定义jbossws-cxf.xml。警告消息[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" /> 

`

回答

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来的春天库建议,并动态地自动地部署)

这可能是什么否则全部一起