Component family |
Internet |
|
Function |
tSOAP sends the defined SOAP message |
|
Purpose |
This component calls a method via a Web service in order to retrieve the |
|
Basic settings |
Schema and Edit schema |
A schema is a row description, it defines the number of fields that will This component always uses a built-in, read-only schema. By default, the schema contains three String type columns: – Header: stores the SOAP message – Body: stores the SOAP message body of – Fault: stores the error information If the Output in Document check box is Click Edit schema to view the schema WarningChanging the schema type may result in loss of the schema |
|
Use NTLM |
Select this check box if you want to use the NTLM authentication Domain: Name of the client domain. |
|
Need authentication |
Select this check box and enter a user name 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 the |
|
Trust server with SSL |
Select this check box to validate the server certificate to the client
TrustStore file: enter the path (including
TrustStore password: enter the password |
|
ENDPOINT |
Type in the URL address of the invoked Web server. |
|
SOAP Action |
Type in the URL address of the SOAPAction HTTP header field to be used to |
|
SOAP version |
Select the version of the SOAP system you are using. WarningThe required SOAP Envelope varies among |
Use a message from the input schema |
Select this check box to read a SOAP message from the preceding component When this check box is selected, the SOAP WarningThis option makes sense only when the |
|
Output in Document | Select this check box to output the response message in XML format. |
|
|
SOAP message |
Type in the SOAP message to be sent to the invoked Web service. The For further information about the context variables, see |
Advanced settings |
Use Kerberos |
Select this check box to choose a tSetKerberosConfiguration component from the Kerberos configuration list. NoteThe OnSubjobOk trigger of tSetKerberosConfiguration should be used for |
|
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at a Job |
Global Variables |
ERROR_MESSAGE: the error message generated by the 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 Talend Studio |
|
Usage |
This component can be used as an input or as an intermediate |
|
Connections |
Outgoing links (from this component to another): Row: Main; Iterate
Trigger: Run if; On Component Ok; On Incoming links (from one component to this one): Row: Main; Iterate
Trigger: Run if; On Component Ok; On For further information regarding connections, see Talend Studio |
|
Log4j |
The activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html. |
|
Limitation |
N/A |
This scenario describes a two-component Job that uses a Web service to retrieve the
country name information of a given country code.
-
Drop the following components from the Palette
onto the design workspace: tSOAP and tLogRow. -
Connect tSOAP to tLogRow using a Row > Main
link. -
Double-click tSOAP to open its Basic settings view and define the component
properties. -
In ENDPOINT field, type in or copy-paste the URL
address of the Web service to be used between the quotation marks:
“http://www.webservicex.net/country.asmx”. -
In the SOAP Action field, type in or copy-paste
the URL address of the SOAPAction HTTP header field that indicates that you want to
retrieve the country name information:
http://www.webserviceX.NET/GetCountryByCountryCode.Note
You can see this address by looking at the WSDL for the Web service you are
calling. For the Web service of this example, in a web browser, append
?wsdl
on the end of the URL of the Web service used in the
ENDPOINT field, open the corresponding web
page, and then see the SOAPAction defined under the operation node:12<wsdl:operation name="GetCountryByCountryCode"><span></span><soap:operation style="document" soapAction="http://www.webserviceX.NET/GetCountryByCountryCode"/> -
From the SOAP Version list, select the version of
the SOAP system being used. In this scenario, the version is SOAP
1.1. -
In the SOAP message field, enter the XML-format
message used to retrieve the country name information from the invoked Web service.
In this example, IS is used as the country code,
so the message is:123456789"<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET"><soapenv:Header/><soapenv:Body><web:GetCountryByCountryCode><!--Optional:--><web:CountryCode>IS</web:CountryCode></web:GetCountryByCountryCode></soapenv:Body></soapenv:Envelope>" -
Save your Job and press F6 to execute it.
The country name information of the given country code IS is returned and displayed on the console of the Run view.
This scenario describes a three-component Job that uses a SOAP message from an input XML
file to invoke a Web service for the country name information which corresponds to the
country code IR, and writes the response to an XML
file.
-
Drop the following components from the Palette
onto the design workspace: tFileInputXML,
tSOAP, and tFileOutputXML. -
Connect the components using Row > Main links.
-
Double-click the tFileInputXML component to
open its Basic settings view. -
Click the […] button next to Edit schema to open the [Schema] dialog box.
-
Click the [+] button to add a column, give it
a name, getCountryName in this example, and
select Document from the Type list. Then, click OK to close
the dialog box. -
In the File name/Stream field, enter the path
to the input XML file that contains the SOAP message to be used, or browse to the
path by clicking the […] button.The input file contains the following SOAP message and you can see that the
given country code is IR:12345678<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET"><soapenv:Header/><soapenv:Body><web:GetCountryByCountryCode><web:CountryCode>IR</web:CountryCode></web:GetCountryByCountryCode></soapenv:Body></soapenv:Envelope> -
In the Loop XPath query field, enter
"/"
to define the root as the loop node of the input file
structure. -
In the Mapping table, fill the XPath query column with
"."
to extract all
data from context node of the source, and select the Get
Nodes check box to build a Document
type data flow.
-
Double-click the tSOAP component to open its
Basic settings view. -
In ENDPOINT field, enter or copy-paste the URL
address of the Web service to be used between the quotation marks:
“http://www.webservicex.net/country.asmx”. -
In the SOAP Action field, enter or copy-paste
the URL address of the SOAPAction HTTP header field that indicates that you want
to retrieve the country name information:
http://www.webserviceX.NET/GetCountryByCountryCode. -
Select the Use a message from the schema check
box, and select a Document type column from the
SOAP Message list to read the SOAP message
from the input file to send to the Web service. In this example, the input schema
has only one column, getCountryName. -
Select the Output in Document check box to
output the response message in XML format.
-
Double-click the tFileOutputXML component to
open its Basic settings view. -
In the File Name field, enter the path to the
output XML file. -
Select the Incoming record is a document check
box to retrieve the incoming data flow as an XML document. Note that a Column list appears allowing you choose a column to
retrieve data from. In this example, the schema contains only one column.