Webservice Lookups

A webservice lookup allows you to perform a GET operation to a REST based webservice. It is executed by the Lookup & Data Cleanse Functions .

ID

The id of the lookup. The ID value forms the first argument in the WebserviceLookup function.

Description

A description of the lookup.

Webservice Behaviour

The webservice behaviour used for authentication, base url, paging & throttling.

Content Type

Select whether the webservice responds with Xml or JSON.

Query Url

This is the Url sent to the webservice.

If a webservice behaviour is specified the Query Url will be combined with the Base Url of the Webservice Beahviour to make the full Url. If no Webservice Behaviour is defined this must be the full Url.

The Url may be parameterised using by specifying in the form of %[1], %[2], %[3], and so on, where the each parameter is replaced with the corresponding values passed from the wherevalues argument of WebserviceLookup function.

In comparison to other lookups each parameter must be enclosed in square brackets e.g. %[1], %[2] (as shown above).

Return Path

The return path specifies the path of the value being returned from the lookup.

The return path should be in the either syntax of XPath or JPath dependent on the return content type of the lookup.

In the example above, the return path is returning the “id” property from the first object of the “customers” array.

The return path is optional and can be overridden from the returnpath parameter of the WebserviceLookup function.

Parameterised Return Path

The return path may also be parametrised using the same syntax as the Query, thereby allowing you to dynamically substitute sections of return path.

This can be useful when a response from a service contains a collection of results instead of the specific record desired. Parametrising the return path provides the means to return the matching record with a specific criteria.

It is important to note that placeholder numbers continue from the Query Url. E.g. if the Query Url had placeholders %[1] and %[2] the first parameter in the return path would be %[3].

In the below screenshot illustrates a parameter in the return path to return the value of the 'id' node where the 'name' property matches a specific value.

Cache Results

When enabled the function saves (or caches) the result of the function so subsequent calls to the lookup are checked prior to querying the webservice. Caching is improves performance markedly as it means any similar request does not issue a webservice request.