Solution to error reporting on the client caused by adding fields on the CXF server

To solve this problem, turn off the field verification function

1. Spring framework:

Add the following configuration in the configuration file

<cxf:properties>
   <entry key="set-jaxb-validation-event-handler" value="false"/>
</cxf:properties>

2. Springboot framework:

Add @ endpointproperties annotation on WebService implementation class

@WebService(
        targetNamespace = "http://ws.test.com/",
        serviceName = "demoWebService",
        endpointInterface = "com.test.ws.DemoWebService")
@EndpointProperties({@EndpointProperty(key = "set-jaxb-validation-event-handler", value ="false")})
@Configuration
public class FaultOrderWebServiceImpl implements DemoWebService {

}


Read More: