tWebService
Calls a method via a Web service in order to retrieve the values of the parameters
defined in the component editor.
This component requires a JDK to be functional. It should be noted
that tWebservice will not run in the Talend Cloud.
tWebservice calls the defined method
from the invoked Web service and returns the class as defined, based on the given
parameters.
tWebService Standard properties
These properties are used to configure tWebService running in the Standard Job framework.
The Standard
tWebService component belongs to the Internet family.
The component in this framework is available in all Talend
products.
Basic settings
Property type |
Either Built-in or Repository. |
 |
Built-in: No property data stored |
 |
Repository: Select the repository |
Service configuration |
Click the three-dot button next to the field to open the component In this editor, you can: -select the Web service you want to use, -configure the input parameters of the Web service, -configure the output parameters of the Web service. These |
Mapping links display as |
Auto: By default, the links
Curves: Links between the schema
Lines: Links between the schema and |
Connection Time out |
Set a value in seconds for Web service connection time out. |
Receive Time out |
Set a value in seconds for server answer. |
Input schema |
A schema is a row description. It defines the number of fields – Built-in: No property data – Repository: Select the |
Edit Schema |
Click Edit
|
Sync columns |
This button is available when an input link has been created. |
Output schema |
This field is used to process the output schema. The schema is Warning:
The input schema is not necessarily identical with the |
Use NTLM |
Select this check box if you want to use the NTLM authentication
Domain: Name of the client Host: Client IP address. |
Need authentication |
Select this check box and enter a username and a password in the To enter the password, click the […] button next to the |
Use http proxy |
Select this check box if you are using a proxy server and fill in |
Trust server with SSL |
Select this check box to validate the server certificate to the
TrustStore file: enter the path
TrustStore password: enter the |
Die on error |
Clear this check box to skip the rows in error and to complete the |
Advanced settings
Temporary folder (for wsdl2java) |
Set or browse to a temporary folder that you configured in order |
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at a |
Enable parallel execution |
Select this check box to perform high-speed data processing, by treating
multiple data flows simultaneously. Note that this feature depends on the database or the application ability to handle multiple inserts in parallel as well as the number of CPU affected. In the Number of parallel executions field, either:
Note that when parallel execution is enabled, it is not possible to use global |
Global Variables
Global Variables |
ERROR_MESSAGE: the error message generated by the
NB_LINE: the number of rows processed. This is an After A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
This component can be used as an input or as an intermediate |
Limitation |
A JDK is required for this component to operate. |
Getting country names using tWebService
This scenario describes a three-component Job that uses a Web service to retrieve the
country name corresponding to a given country code.
Linking components
-
Drop the following components from the Palette onto the design workspace: tFixedFlowInput, tWebService, and tLogRow.
-
Connect the components together using Main
Row links.
Configuring the input data
-
Double-click tFixedFlowInput to open its
Basic settings view and define the
component properties. -
Click the three-dot button next to the Edit
schema field to open a dialog box where you can define the
input schema. -
In the open dialog box, click the plus button to add a column to the
schema. -
Click in the column and type in a name, CountryCode
in this example. -
Click OK to close the schema definition
dialog box. The CountryCode column displays in the
Values table in the component Basic settings view. -
In the Values table, click in the
Value column and enter the value of the
CountryCode column, cn in this
example. This country code will be passed to the tWebService component to retrieve the country name
corresponding to it.
Configuring the Web service
Selecting the WSDL
-
Double-click tWebService to open the
component editor, or select the component in the design workspace and in the
Basic settings view, click the
three-dot button next to Service
configuration. -
In the WSDL field, enter the Web service
address or browse to it, if the WSDL is locally stored, by clicking the
Browse… button. In this example,
the WSDL URL is http://www.webservicex.net/
country.asmx?WSDL. -
Click the refresh button next to the WSDL
filed to retrieve the WSDL description and display it in the fields that
follow. -
In the Port Name list, select the port
you want to use, countrySoap in this
example. -
In the Operation list, select the service
you want to use. In this example the selected service is GetCountryByCountryCode(parameters):string.
Configure the input mapping
-
Click Next to open a new view in the
editor. -
In the panel to the right of the Input
mapping view, select [+]
parameters and then click the plus button on top to display
the Parameter Tree dialog box where you
can select any of the listed parameters.The Web service in this example has only one input parameter, CountryCode.Note:If available, use the Auto map!
button, located at the bottom left of the interface, to carry out the
mapping operation automatically.You now need to create a connection between the input schema and the input
parameter of the defined Web service. -
In the Column list, drag the column in
the input schema you want to link to the input parameter of the Web service
to the corresponding parameter in the panel to the right.
Configuring the output mapping
-
Click Next to open a new view in the
editor.In the Element list to the left of the
view, the output parameter of the web service displays automatically.
However, you can add other parameters if you select [+] parameters and then click the plus button on top to
display the Parameter Tree dialog box
where you can select any of the parameters listed.The Web service in this example has only one output parameter: GetCountryByCountryCodeResult. -
In the panel to the right of the view, click the three-dot button next to
Edit Schema to open a dialog box in
which you can define the output schema. -
In the Output list to the right of the
dialog box, click the plus button to add a column to the output
schema. -
Click in the column and type in a name, Result in
this example. This will retrieve the names of the country. -
Click OK to validate your changes and to
close the schema definition dialog box.You now need to create a connection between the output parameter of the
defined Web service and the schema of the output component. -
In the Element list to the right of the
editor, drag parameters.GetCountryByCountryCodeResult to the field that
corresponds to the Result column to the
right of the editor.Note:If available, use the Auto map!
button, located at the bottom left of the interface, to carry out the
mapping operation automatically. -
Click OK to validate your changes and to
close the editor. -
Click the […] button to open the
Schema dialog box, and add a column
to the output schema, Result in this
example. Then click OK to validate the
schema setting and close the dialog box. -
Double-click the tLogRow component to
open its Basic settings view, and click
Sync columns to retrieve the schema
from the proceeding component.
Executing the Job
it.
The country name corresponding to the specified country code is returned from the
Web service.