Disable response schema validation CXF on JBoss 7.1

Disable response schema validation CXF on JBoss 7.1

JBoss 7.1 ships with a new framework for Web services from Apache, called CXF.

This framework, when consuming SOAP web services, validates by default all responses against the provided wsdl.

Sometimes that behavior is not required because of several reasons. For example, the WSDL may change from time to time, adding attributes to the response, which won’t affect the current behavior of the application, or maybe from a performance perspective, since this validation requires an additional step in each request.

Long story short, to disable the schema validation for all SOAP responses, the standalone.xml should be edited, adding the following tag inside:

This configuration disables the validation for all web service clients deployed in the server.

If this is too much for you, you can disable validation programmatically only for the clients you need, adding the following line before calling the web service:

((BindingProvider) wsClient).getRequestContext().put(“set-jaxb-v
See more posts
Have a project or an idea?
Let's make it real!
Prefer a meeting?
Book a meeting or call us (512) 842 9784
Yes! Book me
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
PARTNERS
ECOSYSTEM
PRODUCTS