8 Replies Latest reply on Jul 11, 2009 9:59 AM by Rune Molin

    Loosing response headers

    Rune Molin Newbie


      I'm trying to proxy a webservice, like this:

       <http-provider name="HTTP" host="localhost" port="8765">
       <http-bus busid="HTTP-2" context="/Security/Unsecured" />
       <service category="Security" name="Unsecured" description="not secured test service"
       <http-listener name="HTTP-Gateway" busidref="HTTP-2"
       maxThreads="10" is-gateway="true">
       <actions mep="RequestResponse">
       <action name="convert" class="org.jboss.soa.esb.actions.converters.ByteArrayToString" />
       <action name="router"
       <property name="endpointUrl" value="" />
       <property name="method" value="POST" />

      It works nicely - almost! The problem is that the response headers are lost along the way - specifically the content type header, which prevents my consumer from getting a correct response.

      I think I have narrowed the problem down to the fact that the HttpRouter class places headers in the message body (in the method attachResponseDetails), but HttpMessageComposer expects the headers to be in the message properties (see HttpMessageComposer#decompose).

      Can anybody confirm this problem, and is there a good work-around ? I suppose I could write some correction action and insert at the bottom of the action pipeline