Business Integration Solutions Documentation
About: WEBSERVICEENDPOINT Activity
In Business Integration Solutions, use the WEBSERVICEENDPOINT activity to send an HTTP request to an external system and optionally handle the response
Usage
Using this activity you can send an GET, POST, PUT and DELETE request with a custom body and custom headers.
Concept
This activity allows the pipeline to send data to an external web service, allowing integration with external systems. The response is then written in the message queue.
To be able to use this activity, you must define at least the URL. See the complete list of the setup properties below.
Property | Usage |
---|---|
Method | Specifies the HTTP request method. GET , POST , PUT and DELETE are supported. |
Security Profile | The security profile which adds the authentication/authorization key(s) and value(s) to the request.To setup a security profile please refer to Setup Security Profile. |
Request URL | The URL of the HTTP request. |
Request Headers | A list of headers related to the request, such as Authorization |
Content Headers | A list of headers related to the request content, such as Content-Type |
Querystring | A list of queries that will be apended to the request URL also known as querystring |
Body Wrapping | Allows the body content from the pipeline to be wrapped, so that the body is in the format expected by the request receiver. Example: <prefix content>%1<sufix content> , where %1 will be replaced by the body content from the pipeline. |
Dynamically Set Properties
This endpoint also works in relation with a HeaderMapper activity, which allows you to map the "Request URL", "Request Headers", "Content Headers" and "Querystring". The "Request URL" is automatically added to the HeaderMapper when you link it to the "WebServiceEndpoint", where as to make any other desired header or query available you can use the "Move to HeaderMapper" action present on each section.
This activity also provides a Test Call
action, which allows you to send a test call with your setup and a specific body if applicable.
Examples
Example | See |
---|---|
Setup a GET request | Web Service Get Request |
Http Actions
The Http Actions page allows the user to set up specific actions that a webservice endpoint can take, based on the code returned by the call. When a webservice endpoint is first created, default values are created into this setup table, actions that can be further modified based on your connection needs.
Default setup
Code From | Code To | Http Action | Number of Retries | Delay |
---|---|---|---|---|
200 | 299 | Success | ||
429 | 429 | Retry | 5 | 5000 |
502 | 504 | Reschedule | 5 |
Property | Usage | Observation |
---|---|---|
Code From | Defines the starting point of the interval of http codes | Accepted values from 100, up to 599 |
Code To | Defines the ending point of the interval of http codes | Accepted values from 100, up to 599, must be greater or equal to Code From |
Http Action | Action to take if the response code falls into the defined interval | Available options: Success, Retry, Reschedule and Error |
Number of Retries | The number of times to apply the action | Works in relation with either Retry or Rechedule |
Delay | The number of milliseconds to wait until the action is applied | Works in relation with Retry only |
Http Action | Behavior |
---|---|
Success | Ends the web service endpoint with a successful message and logs the reply from the call |
Retry | Applies a delay if one is set, and tries to initiate the call again, for the number of retries set |
Reschedule | Sets the message back to waiting, to be picked up the next run of the job queue handler. The action is retried based on the number of retries |
Error | Sets the message to an error state and logs the reply from the call |
Patch is not supported by the httpclient implementation in Business Central, and therefore, BIS cannot support this request method in our product.
If Retry and Reschedule don't end up in a success state after the number of retries has been reached, the webservice endpoint ends in an error state with the details logged in the message entry