For the list of all supported Decision Insight downloads and releases, see the Downloads page.

RESTLET

The RESTLET component permits to consume or produce REST requests. Learn how to work with the RESTLET component.

Library

Create a new library with the following jars (in this order):

See also  How to retrieve the Camel version of Decision Insight.

Connectors

SslContextParameters

To configure TLS, you need to create a connector according to How to configure SSL on a component.

Routes

With TLS

Now it's possible to create a route that uses this component. Here the definition of the route:

<routes xmlns="http://camel.apache.org/schema/spring" xmlns:u="http://www.systar.com/aluminium/camel-util">
    <route>
        <from uri="restlet:https://localhost:8888/test?sslContextParameters=#sslContextParameters"/>
        <setBody>
            <simple>Hello ${headers[id]} !</simple>
        </setBody>
        <to uri="log:restlet-test?showHeaders=true"/>
    </route>
</routes>

Without TLS

TLS configuration

Although it is not mandatory, we advise you to always configure TLS connection and forbid non-encrypted communication. If not configured, data are not encrypted.

<routes xmlns="http://camel.apache.org/schema/spring" xmlns:u="http://www.systar.com/aluminium/camel-util">
    <route>
        <from uri="restlet:http://localhost:8888/test"/>
        <setBody>
            <simple>Hello ${headers[id]} !</simple>
        </setBody>
        <to uri="log:restlet-test?showHeaders=true"/>
    </route>
</routes>

Related Links