-
1. Re: How to set HTTP header
tcunning Aug 16, 2011 8:27 PM (in response to haradays)Are you using an HTTP provider, or the HTTP Gateway?
-
2. Re: How to set HTTP header
haradays Aug 17, 2011 12:10 AM (in response to tcunning)hi,Tom.
I'm using a jbr-provider
Thanks and Regards,
GoroMy jbossesb.xml is written:
<?xml version="1.0"?>
<jbossesb parameterReloadSecs="5"
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
<providers>
<jbr-provider name="Prov_http" protocol="http">
<jbr-bus busid="jbrBusTest" port="8059"/>
</jbr-provider>
</providers>
<services>
<service category="serviceCategory01"
description="cpe_terminal_description" invmScope="GLOBAL" name="serviceName">
<listeners>
<jbr-listener busidref="jbrBusTest" is-gateway="true" name="jbrListenerTest"/>
</listeners>
<actions mep="RequestResponse">
<action class="com.test.esb.http.PrintHttpBody" name="printHttpBodyTest"/>
</actions>
</service>
</services>
</jbossesb> -
3. Re: How to set HTTP header
tcunning Aug 17, 2011 3:08 PM (in response to haradays)I think you can add it as a message property (inside your action chain - just create a custom action which adds it). Check the Programmer's Guide, it might have more details.
-
4. Re: How to set HTTP header
spyhunter99 Aug 21, 2011 4:37 PM (in response to haradays)I am also trying to set an http header, only I'm trying to set it from an action pipeline processor from within an out of the box "web service proxy basic" from the esb samples (running 4.7). I don't see anywhere obvious in the API to at an http level header.
-
5. Re: How to set HTTP header
spyhunter99 Aug 21, 2011 6:18 PM (in response to spyhunter99)Ahh I figured it out.
public Message process(Message msg) throws ActionProcessingException {
HttpRequest request = HttpRequest.getRequest(msg);
request.getHeaders().add(new HttpHeader("key", "value"));
...
return msg;