我有一些奇怪的问题。
我们有一个WSDL并从中生成了JAXB代码。该服务的第一次部署是使用Spring XML配置,我们将端点配置为
<jaxws:endpoint id="paymentProcess"
implementor="com.path.implementation.class"
address="/paymentProcess"/>
在不知不觉中,客户端系统向其中一个Web方法请求添加了一个属性(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 :(得分:0)
问题在于我的JDK和CXFversions,目标系统部署在JDK 6上,这让我将CXF降级到版本3.0。一切都很顺利。