To create your consumer, you need at least these components:
an input component allowing to read a data flow,
a tXMLMap component that will map this flat data to a
hierarchical document, the format expected by ESB
components,
the tESBConsumer components that will request the
corresponding Web service and read its result,
and the tLogRow component that displays the Job execution
result.
For this specific scenario, you will use a tFixedFlowInput as input
component to send a country code request to the tESBConsumer
component.
Creating the data service consumer Job
Procedure
Right-click Job Designs in the
Repository tree view and select Create
Job.
In the dialog box displaying then, only the first field
(Name) is required. Type in airportJob and click
Finish. An empty Job opens on the main window and you
can continue to create the Job of interest.
Dropping and linking the components for the consumer
Procedure
Click the tFixedFlowInput component from the
Misc component group of the
Palette, then click to the left of the design workspace
to place it on the design area.
Do the same to place tXMLMap,
tESBConsumer and a tLogRow
component from their respective group on the Palette.
To link the input components to the mapper, simply right-click
tFixedFlowInput, hold and drop it to
tXMLMap.
To link tXMLMap to tESBConsumer,
right-click tXMLMap, hold and drag to
tESBConsumer. A pop-up window displays, type in the name
you want to give to the output row link: request, for
example and then accept the propagation that prompts you to get the schema from
tESBConsumer.
Link the tESBConsumer component to it with a
Response row link.
The data service consumer Job looks like this:
Results
Then you need to configure each of these components.
Configuring the tFixedflowInput component
Procedure
Double-click tFixedflowInput to open its
Component view.
Click the three-dot button next to the Edit schema field
to open the Schema window.
Click the plus button once to add one Column to the
schema and name it country_code. Keep the
Type field as string.
Click OK to validate this schema. Then in the
Mode area of the tFixedFlowInput
basic settings, the active option should be Use Single
Table and the country_code row is already
added automatically to the Values table
In the Value column of the Values
table, type in CN in quotation marks.
Configuring the tXMLMap component
Procedure
Double-click tXMLMap to open its Map
editor.
To import the WSDL schema for the request, do the same as explained earlier when
creating the data service provider. In this example, the request schema is
getAirportInformationByISOCountryCode. For further information, see
Configuring tXMLMap.
Click country_code in the main flow table of the input side
(left), hold, and drop it to the Expression column
corresponding to the tns:CountryAbbrviation node in the XML tree of the
request table on the output side (right).
Information noteNote: In the real-world operations, tXMLMap is able to
handle the highly complex transformations of hierarchical data.
Double-click the tESBConsumer component to open its
Component view.
Click the [...] button next to the Service
configuration field to open the WSDL editor.
In the editor, browse to the WSDL file provided, the Port
Name and Operation fields are automatically
filled in with the ports and methods available in the Web service.
Select airportSoap in the Port
Name field and select
getAirportInformationByISOCountryCode in the
Operation field.
Click OK to validate the configuration.
The tLogRow component will automatically retrieve the
schema from the previous component. If not, double-click it and click the
Sync columns button in its
Component view.
Executing the consumer Job
Procedure
To execute this Job, press F6.
The Run view opens and displays the execution
results.
Results
This Job sends one country code request to the consumer that requests the Web service
through the provider Job. The response is retrieved by the
tESBProviderResponse and
tESBConsumer components at the same time.
Although the provider Job received some request, it did not stop and is still
listening to new requests.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!