[jboss-dev-forums] [JBoss ESB Development] - Re: Http Gateway - requirements please...

ScottDawson do-not-reply at jboss.com
Sat Sep 12 19:08:34 EDT 2009


Tom,
Using your workspace/tfennelly/httpg2 code, I've got a small http-gateway prototype up and running. The initial GET comes in through the gateway and triggers another GET on an RSS feed via HttpRouter. The RSS is transformed into HTML using XsltAction, then returned to the client.

It works great but there's one thing I had to write code for that I think may be configurable in jboss-esb.xml. The content-type HTTP header of the RSS feed is different from the content-type header that I need to send back to the client, so I wrote a few lines of code in a custom action to set the content-type header for the final response:

  |         HttpResponse responseInfo = new HttpResponse(200);
  |         responseInfo.setContentType("text/html");
  |         responseInfo.setResponse(message);
  |         return message;
  | 

Is there a way to do that with configuration instead of code, i.e. a way to specify HTTP headers for the response?

Thanks,
Scott


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254916#4254916

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254916



More information about the jboss-dev-forums mailing list