2017-11-25 86 views
0

我有一些奇怪的问题。解组错误whan使用CXF和Spring Java Config,当发送一些额外的属性时(但使用XML配置时没有错误)

我们有一个WSDL并从中生成了JAXB代码。该服务的第一个部署使用Spring XML配置是我们配置的端点

<jaxws:endpoint id="paymentProcess" 
    implementor="com.path.implementation.class" 
    address="/paymentProcess"/> 

不知不觉客户端系统中增加一个属性(XML元素)到网络的方法请求中的一个,但在这个代码什么也没有发生。它忽略了额外的财产。

但现在我已经改变使用JavaConfig代码为

@Bean("cxf") 
public SpringBus springBus() { 
    System.setProperty("org.apache.cxf.logging.enabled", "pretty"); 
    return new SpringBus(); 
} 

@Bean 
public Endpoint paymentServiceEndpoint(InstallmentServicesImpl installmentServices) { 
    EndpointImpl endpoint = new EndpointImpl(springBus(), installmentServices); 
    endpoint.publish("/paymentProcess"); 
    return endpoint; 
} 

这一变化后,我们会遇到许多问题,以及大量的努力之后,我们发现,客户端发送一个额外的属性(XML元素)这不在最初的WSDL中,并且因为发生了解组错误。

有什么办法可以让CXF忽略这些额外的元素吗?

回答

0

问题在于我的JDK和CXFversions,目标系统部署在JDK 6上,这使我将CXF降级到版本3.0。一切都很顺利。

相关问题