Announcement Announcement Module
No announcement yet.
Response form HTTP Outbound Gateway Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Response form HTTP Outbound Gateway

    Here is what I'm trying to achieve

    web-client --- > http-inboundgatway -----> http-putboundgateway -----> Spring REST service

    Now for http outbound gateway I have

    <int-http:outbound-gateway request-channel="paymentCoreAddPaymentInstrumentRequestCha nnel"

    From the web-client I have in headers values for Accept="application/xml" and Content-Type="application/xml"

    The problem I'm facing is that since the expected-response-type="java.lang.String", the response that gets sent back is String and not xml. My REST service is returning correct xml response and I just want to send it back as it is without having to transform it to a calsses objet.

    For the work around I have done way with the int-http:outbound-gateway and have written a class that makes a rest request using the RestTemplate.

    The problem with RestTemplate is that I have to extend the REST Template class for handling error response 40* types. Isn't there a way that the REST Call using the outbound gateway just returns back whatever response it gets back..