- 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 a
http 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 target
REST service, but still
exceptionis 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>
- Red Hat JBoss Fuse
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.