13.7.5. HttpRouter
Class | org.jboss.soa.esb.actions.routing.http.HttpRouter |
This action allows invocation of external HTTP end-points from an action pipeline. This action uses Apache Commons HttpClient.
Property | Description | Required |
---|---|---|
unwrap |
Setting this to
true (the default) will extract the message payload from the Message object before sending. false will send the serialized Message as either XML or Base64 encoded JavaSerialized object, based on the MessageType.
| No |
endpointUrl |
The endpoint to which the message will be forwarded.
| Yes |
http-client-property |
The HttpRouter uses the HttpClientFactory to create and configure the HttpClient instance. You can specify the configuration of the factory by using the file property which will point to a properties file on the local file system, classpath or URI based. See example below to see how this is done.
| No |
method |
Currently only supports GET and POST.
| Yes |
responseType |
Specifies in what form the response should be sent back. Either STRING or BYTES. Default value is STRING.
| No |
headers |
To be added to the request. Supports multiple <header name="test" value="testvalue" /> elements.
| No |
MappedHeaderList |
A comma separated list of header names that should be propagated to the target endpoint. The value for the headers will be retrieved from those present on a request entering the enterprise service bus via the http-gateway or within the properties of the current message.
| No |
<action name="httprouter" class="org.jboss.soa.esb.actions.routing.http.HttpRouter"> <property name="endpointUrl"value="http://host:80/blah"> <http-client-property name="file" value="/ht.props"/> </property> <property name="method" value="GET"/> <property name="responseType" value="STRING"/> <property name="headers"> <header name="blah" value="blahval" ></header> </property> </action>