Retrieving data from a web service
To retrieve data from a web service, the model in ION Desk is as follows. A document flow contains a web service activity, usually at the start of the flow. In the activity, the web service connection point to be used is selected. This diagram is an example document flow:
In this scenario the invocation of the web service is based on a schedule, the same web service operation is invoked multiple times. If the operation always returns full set of data, the same data is sent multiple times to the next step in the flow.
In the web service connection point the connection settings must be defined and the WSDL must be loaded, as described earlier.
After that, you can model:
- The operation to be used.
- The BOD document to be used. The document is defined using a document type (such as SalesOrder) and a verb. In this scenario, these verbs can be used: Sync, Process, Load or Update.
- A schedule to define how often the
web service must be invoked. You can either specify:
- A basic schedule where the trigger is every 'x' seconds/ minutes / hours /days.
- An advance schedule that is based on a CRON expression.
- The input to be used for the web service. The ION Desk provides a template based on the XSD from the web service operation. You can specify values as required or remove irrelevant elements. Note that the input is fixed in this scenario.
- Whether the output must be split
into multiple BODs. Use this option if the web service returns multiple objects. For
example, a GetOrders operation can retrieve multiple orders. In that case, for each
order a BOD can be published.
When using this option, you must select the (repeating) element. For example, if the output of the web service is:
Orders Order OrderNumber Customer Smith Order OrderNumber 2 Customer Jones
Then you can select the Order element. The Order elements are input for the transformation to the BOD documents .
When using splitting, all elements above the split element are not used. These elements are unavailable in the transformation.
- The transformation from the web service output to the BOD document.
-
You can use an automatic transformation. In that case the web service output is put inside the noun element of the BOD. The output of the web service operation is known, because an XSD is included in the WSDL. Therefor, a custom BOD can be generated in the ION Registry.
- To use your own transformation
select Advanced.
Provide an XSLT to map the web service response to the BOD to be sent. This
provides more flexibility. You can use header elements from the web service
response, or include data from the web service in a specific location in the
BOD. In spite of that, it is more complex to model.
When using the advanced transformation, click
to specify the transformation. If no XSLT was specified before, a default XSLT is provided, to be used as a starting point.The Advanced transformation option supports both XSLT "1.0" and "2.0" standards. Specify the appropriate version to use in the version attribute of the XSLT header.
-