Disable response schema validation CXF on JBoss 7.1

Development
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
We are a a Clutch Champion for 2023!
Development
We are a a Clutch Champion for 2023!
Kreitech has been recognized as a 2023 Clutch Champion by Clutch, the leading global marketplace of B2B service provider
Read More
Navigating a Post-2020 World: A Time of Business Challenges and Opportunities
Development
Navigating a Post-2020 World: A Time of Business Challenges and Opportunities
2020 will be remembered as an unprecedented, challenging, and unique year, a significant opportunity for the global
Read More
How Hiring an External Team can Accelerate Development and save costs?
Development
How Hiring an External Team can Accelerate Development and save costs?
In today's fast-paced software industry, companies often face the challenge of meeting deadlines and achieving goals
Read More
Have a project or an idea?
Let's make it real!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.