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.

Viewing and Editing Properties

Following properties should be specified:


Figure: Properties - REST Service Application

Parameters

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.

Test


Figure: Properties - Test

Configuration


Figure: Properties - Configuration

Security

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 key/value pair gets added to the header of the HTTP request.

You can add and delete the rows in the HTTP headers table.

Comments

Click the Comments tab to add comments for the application. To add the comment, specify the comment in the text box and click Submit. The newest comment gets displayed at the top of the table. To delete the comment, select the comment and click the Delete icon. The user, who has submitted the comment, can delete that comment. If the other user selects the comment or no comment is selected, the Delete icon remains in disabled state.


Figure: Comments

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>
<bean id="http" class="org.apache.camel.component.http.HttpComponent">
<property name="camelContext" ref="defaultCamelContext" />
<property name="httpConfiguration" ref="httpConfiguration" />
</bean>