My environment is a maven project with spring boot. I am using wsimport to generate JAX-WS Code from a WSDL . i want to disable the soap validation when i receive the soap response. I am using the default implementation of jax-WS of the jdk8. the code looks like this :
// (1) Now build webservice client
MyWS_Service service = new MyWS_Service(null, new QName("http://...", "MyWS"));
MyWS port = service.getMyWSSOAP();
BindingProvider bindingProvider = (BindingProvider) port;
//(2) disable the validation
bindingProvider.getRequestContext().put("set-jaxb-validation-event-handler", "false");
// set endpoint
bindingProvider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http//...endpointaddress");
//(3) perform request
respObj = port.myRequest(myRequestObj);
i searched in google and i found an option to disable the validation :
(3) bindingProvider.getRequestContext().put("set-jaxb-validation-event-handler", sc.getSocketFactory());
but i seems that this option is not accepted by the default implementation of jax-WS of the jdk8, however it's accepted by apache cxf. So, how can i disactivate the validation in the default implementation of jax-ws of the jdk8? Is there a way to load the the cxf implementation in my project so i use the previous option to disactivate the validation? is there a way to customise the xml validation?