REST Service Application

The REST Application allows to invoke REST Services with Process Data and retrieve data from the response of the REST services into Process Data.

You can perform following operations on a REST Service Application.

Setting REST Service Properties

Apart from the common properties, the following property tabs are provided for a REST Service application:

Figure: Properties - REST Service Application


You can define parameters to access the data associated with the application. The REST Application only allows for zero or one Output Parameter which is representing the HTTP Response content of the REST Service invocation. It allows for multiple Input Parameters. One Input Parameter can be selected to be transferred in the body of the HTTP Request of the REST Service invocation. All other Input Parameters are expected to be provided in the header and hence have to be primitive data. Click the Add icon to add the parameters.

To delete the parameters, select the added parameter and click the Delete icon.


Figure: Properties - Test


Figure: Properties - Configuration


Based on the security mode you need to specify the details. For more information please refer to chapter Security Propagation for Web Applications of the Concepts Security Propagation for Web Applications in the Concepts handbook. The following options are provided in the Security Mode drop down list:

Basic HTTP Basic Authentication

Figure: Basic HTTP Basic Authentication

Custom Security Token

Figure: Custom Security Token

The Security Token value can be derived from a configuration variable, a process data or entered directly.

If the Token Key input field matches a primitive IN parameter, then the Security Token value and CV check box will be made read only.

The key/value pair gets added to the header of the HTTP request.

Proxy Configuration

However, note that you may need to add proxy settings to access the service. To do the proxy settings, add the following bean in the context file or any Spring configuration file.

<bean id="httpConfiguration" class="org.apache.camel.component.http.HttpConfiguration">
<property name="proxyHost" value="<yourhostname>"/>
<property name="proxyPort" value="<yourportname>" />
<bean id="http" class="org.apache.camel.component.http.HttpComponent">
<property name="camelContext" ref="defaultCamelContext" />
<property name="httpConfiguration" ref="httpConfiguration" />