How to set `throwExceptionOnFailure ` to cxf REST client?
Issue
- How to set
throwExceptionOnFailureto cxf REST client? throwExceptionOnFailureset to false is not working when calling REST service- I have a camel route which needs to call a
rest serviceand I am expected to get ahttp 400back with a fault data structure back as response. - My route should send it back as it is to the source calling the service.I have set the
throwExceptionOnFailurevalue to false while calling the targetREST service, but stillexceptionis being thrown. - Part in Blueprint where REST service is called:
<to uri="cxfrs:bean:getUserClient" />
Part where the rsClient is defined:
<cxf:rsClient id="getUserClient"
address="http://localhost/ownerservices/acct/1.0/getUser?bridgeEndpoint=true&throwExceptionOnFailure=false"
serviceClass="com.xxx.service.GetyyyService"
loggingFeatureEnabled="true">
<cxf:providers>
<bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />
</cxf:providers>
<cxf:headers>
<entry key="Content-Type" value="application/json" />
</cxf:headers>
</cxf:rsClient>
Environment
- Red Hat JBoss Fuse
- 6.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
