CXFRS Consumer not returning valid http response status code

Solution Verified - Updated -

Issue

  • FLow is Client ->CXFRS ProxyService -> Backend Service.
  • Producer of CXFRS Proxy is receving a 400 status code from backend rest service, but somehow consumer is returning 200 status code back to the client. I can see CamelHttpResponseCode header value is being set as 400, but not sure why 200 is being returned. Here below the header list.
{Cache-Control=no-cache, no-store, CamelHttpResponseCode=400,  connection=close, Content-Security-Policy=referrer origin,  content-type=application/json;charset=utf-8, Date=Mon,  05 Jun 2017 02:19:55 GMT, Expires=Thu, 01 Jan 1970 00:00:00 GMT, Pragma=no-cache, Set-Cookie=PF=pIk30AGiih66zv7A0PQaWG;Path=/;Secure;HttpOnly,  transfer-encoding=chunked, X-Frame-Options=SAMEORIGIN}
  • Logs
21:17:16,022 | INFO  | tp1697624927-211 | LoggingInInterceptor             | 74 - org.apache.cxf.cxf-core - 3.0.4.redhat-621084 | Inbound Messagen  | ----------------------------n  | ID: 4n  | Response-Code: 400n  | Encoding: UTF-8n  | Content-Type: application/json;charset=utf-8n  | Headers: {Cache-Control=[no-cache, no-store], connection=[close], Content-Security-Policy=[referrer origin], content-type=[application/json;charset=utf-8], Date=[Mon, 05 Jun 2017 02:17:15 GMT], Expires=[Thu, 01 Jan 1970 00:00:00 GMT], Pragma=[no-cache], Set-Cookie=[PF=0Y4MXyDHT1TuusGW2WeQRE;Path=/;Secure;HttpOnly], transfer-encoding=[chunked], X-Frame-Options=[SAMEORIGIN]}n  | Payload: {"error":"unsupported_grant_type"}
n  | n  | --------------------------------------
21:17:16,024 | INFO  | tp1697624927-211 | LogTransaction                   | 711 - PingIdentityManager.1.0.0 - 1.0.0 | service=OnlineItineraryService path=null method=null overallDuration=686ms state=null
21:17:16,027 | INFO  | tp1697624927-211 | LoggingOutInterceptor            | 74 - org.apache.cxf.cxf-core - 3.0.4.redhat-621084 | Outbound Messagen  | ---------------------------n  | ID: 3n  | Response-Code: 200n  | Content-Type: application/jsonn  | Headers: {Content-Type=[application/json], Date=[Mon, 05 Jun 2017 02:17:16 GMT]}n  | Payload: {"error":"unsupported_grant_type"}
n  | n  | --------------------------------------

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.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.