I have some kind of strange problem.
We had a WSDL and generated the JAXB codes from it. The first deployment of the service was using Spring XML config and we configured the endpoint as
<jaxws:endpoint id="paymentProcess"
implementor="com.path.implementation.class"
address="/paymentProcess"/>
Unknowingly the client system added a property (an xml element) to one of web-method requests, but nothing happened in this code. And it ignored the extra property.
But now I have changed the code using JavaConfig as
@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;
}
After this change, we encounter many problems, and after lots of effort we found out that the client sends an extra property (an xml element) which was not in the initial WSDL, and because of that unmarshalling errors happen.
Is there any way so I can make CXF to ignore these extra element(s)?
The problem was with my JDK and CXFversions, the target system was deployed on JDK 6, and that made me down-grading the CXF to version 3.0. And everything went fine.