Version 6

    This action allows invocation of external (ESB unaware) Http endpoints from an ESB action pipeline.

     

    Basica configuration is as follows:

        <action name="httprouter" class="org.jboss.soa.esb.actions.routing.http.HttpRouter">
            <property name="endpointUrl" value="http://localhost:12345/blah"></property>
            <property name="method" value="GET" ></property> <!-- Currently only supports GET or POST - easy to add more! -->
            <property name="responseType" value="STRING" ></property> <!-- Response should be set back on message as STRING or BYTES - default STRING -->
            <property name="headers">
                <header name="blah" value="blahval" ></header>
            </property>
        </action>
    

     

    The HttpRouter uses Apache Commons HttpClient to execute Http requests.  It uses the HttpClientFactory to create and configure the HttpClient instance.  For details on how to configure a HttpClient instance via the HttpClientFactory, see HttpClientFactory.

     

    Specifying the HttpClientFactory configuration on the HttpRouter is very easy.  Just add an additional property to the "endpointUrl" property as follows:

        <property name="endpointUrl" value="http://localhost:12345/blah">
            <http-client-property name="file" value="/localhost-https-12345.properties" ></http-client-property>
        </property>
    

     

    The "file" property value will be evaluated as a filesystem, classpath or URI based resource (in that order).  The properties can also be added inline in the ESB configuration.