Are you using the <http:gateway> ? If so, see the HttpGateway docs re getting request info. There you'll see how to get the HttpRequest instance from the ESB message and then from the HttpRequest you can get the list of HttpHeaders.
Thanks Tom for the info. For a bit inside to my problem, you can have a look here in another thread: http://community.jboss.org/thread/166625?tstart=0
I am using HttpRouter action and haven't used http gateway before. I am now going to look into the docs you have given reference too. May be if you could provide me with some small code snippet example that would be great.
Thanks again! much appreciated.
this is how i am trying to do as per your suggestion:
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5">
<action name="NextServiceRouter" class="org.jboss.soa.esb.actions.StaticRouter">
<route-to service-category="YpsilonService" service-name="Router"/>
<service category="YpsilonService" name="Router" description="" invmScope="GLOBAL">
<!-- Service Aactions.... -->
<action name="httpClient" class="com.traveltainment.integra.middleware.ypsilon.httpClient.httpClientRouter"/>
And the httpClientRouter class
public class httpClientRouter implements ActionLifecycle
public Message process(final Message message)
HttpRequest requestInfo = HttpRequest.getRequest(message);
But in my class above, I could not able to make an instance of class HttpRequest to proceed further?
I am getting compilation error. The HttpRequest is not found.
Do I need to add some common library in my POM?
A bit of more success, earlier i was using jbossesb 4.4 and hence couldnt find HttpRequest class, but now i have upgraded to 4.8.
Now in my httpRequest object, i need to set the following headers:
POST / HTTP/1.1\r
accessid: conso_id agent_id\r
authorization: Basic dGVzdHVzZXI6bXlzZWNyZXQ=\r
Could you help me set that ?