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忽略這些額外的元素嗎?