The Inbound HTTP component is able to receive messages through HTTP requests. It will act like a webservice that listens for HTTP requests. Once a message is received, it's content will be handed to the next component in the flow.
The Inbound HTTP component has the following configuration options:
A URL to identify this component's endpoint.
Endpointname can only contain letters, numbers and these special characters:
Endpointname should contain between 3 and 50 characters.
Select which protocol will be used to by the web service.
Select which part of the tenant is used in the URL.
Whether you want use the URL of the endpoint as a prefix. See Reaching the webservice with wildcards for more info.
Preserve HTTP headers
Whether you want to keep the Camel HTTP headers on the exchange instead of removing them from the exchange.
This option determines how the component handles the incoming messages. By default
Request reply is selected. This means that the component will reply to a
incoming message with the result of the flow for that incoming message.
When you don't need the result of the flow for the message you sent, then you can
One way as exchange pattern. When the component receives your message it
will respond with status
200 OK and with the body you sent.
See Behavior of the component for more information.
Request replythe timeout option of the flow may need to be increased when the flow takes some time to process the incoming messages.
- The response to the caller will be the existing Exchange body before reaching the first
One waycomponent in the flow.
- When there is an Outbound flow link component
somewhere in the flow you should be cautious with selecting
Request replywhen the Outbound flow link has
One wayselected for its exchange pattern option. There could be some timeouts because the Inbound HTTP component will keep waiting till it receives the processed message to sent back to the caller.
- An Inbound HTTP component should always be the first component in the flow.
Reaching the webservice
An Inbound HTTP with the following settings:
Will have a webservice URL that looks like this (tenant id varies):
An Inbound HTTP with the following settings:
Will have a webservice URL that looks like this (tenant name varies):
The old format of the HTTPS URL's is still supported, but just now shown in the UI. The URL above will look like this in the old format:
8001 for Test and
9001 for production.
Reaching the webservice with wildcards
By default the webservice will only match the exact URL that is specified in the
Endpoint property. In the examples above it is only
possible to reach the webservice by sending messages to the exact
/dovetail/dovetail_test URL. If you also want to reach the same webservice with
/dovetail/dovetail_test/user you can set the
Match prefix? property to
Yes. This way
/dovetail/dovetail_test is the prefix for your webservice and it can
be reached with messages that use different URL's. You can get the URL of the
exchange using the header called
CamelHttpUri. Which is available on the
exchange when the Preserve HTTP Headers option
is set to
Testing the webservice
You can use a REST client, such as POSTMAN, to send messages to the Inbound HTTP component in Dovetail. This makes it possible to manually send test data to the flow.
To send messages you wil need to:
- Enter the URL of the webservice as described above.
- Set the dropdown to
- Choose message format
- Paste a message body (e.g. XML data) in the text area field.
Sendto submit the message
If you want to see if the message has been processed succesfully by Dovetail, you
can open the respective flow in the Flow Manager and go the
Behavior of the component
The Inbound HTTP Component will by default always send back the result of the flow,
even when the flow is asynchronous. This is determined by the
exchange pattern which is
Request reply by
default. In the following diagram it is visually explained:
In some cases this is not desired, depending on the size and complexity of the
flow it can take some time until the Inbound HTTP Component gets back a result
from the flow. Some clients like POSTMAN wait till
they get a response, but other clients or applications don't wait long enough
and get a timeout. If you always want to get back a response immediately you can
set the exchange pattern to
One way. The response
will be of status
200 OK and the the body that was sent will also be sent back.
- The maximum size of a body that can be uploaded is 1 Mb.