Disable response schema validation CXF on JBoss 7.1

Category

Blog Development
24 December, 2014 0

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:

<client-config name=”Standard-Client-Config”><property name=”set-jaxb-validation-event-handler” value=”false”/></client-config>

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

COMMENTS

Leave a Reply

Your email address will not be published. Required fields are marked *

bkadmin
Wednesday December 24, 2014 - 22:12 Blog, Development
Recent posts
Managing React server state: a simpler approach

The role of the state The state is a property of each component that holds its data, it gives personality […]

Read More…

Continue reading
17 May, 2021
The Importance Of Retrospectives Meetings

What are retrospectives and why are they important? If you know SCRUM you will be familiar with the retrospective meeting […]

Read More…

Continue reading
10 May, 2021
Using Mockito to create Java Unit Test

Let’s start with the definition given by the official page. “Mockito is a mocking framework that tastes really good. It […]

Read More…

Continue reading
1 December, 2020
From idea to deploy

When the great idea and background just isn’t enough […]

Read More…

Continue reading
11 August, 2020