1 2 3 4 5 6 Previous Next 79 Replies Latest reply on Sep 14, 2009 4:33 AM by tfennelly Go to original post
      • 75. Re: Http Gateway - requirements please...

        Oh sorry.... I should have added there that this new element will replace the originally proposed "sync" attribute.

        • 76. Re: Http Gateway - requirements please...


          "tfennelly" wrote:
          Hey Scott... as it turns out, Kevin would also like the static option, so we'll be adding this too. It will look something like the following...

           <asyncResponse status="202" payload="/async-responses/202.xml" />

          This seem OK?

          So both options will be available... the more dynamic version we described above, as well as this static version.

          Sounds good. I think in some cases the dynamic version will be necessary, for example, when I want to provide a status link that's different for each request. The static version covers the simple case where a generic response is sufficient.


          • 77. Re: Http Gateway - requirements please...

            Actually... I implemented this slightly differently so as to allow setting of the contentType and characterEncoding (optional) when a payload is specified...

            <asyncResponse statusCode="202">
             <payload classpathResource="/readme.txt" contentType="text/plain" characterEncoding="UTF-8" />

            • 78. Re: Http Gateway - requirements please...

              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);
               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?


              • 79. Re: Http Gateway - requirements please...

                Hi Scott.

                Right, this isn't possible at the moment, but I see no reason why we can't add support for it. Seems like something others will also run into. I created a JIRA: https://jira.jboss.org/jira/browse/JBESB-2832

                BTW... the new http-gateway is now available on trunk.

                1 2 3 4 5 6 Previous Next