Overview
Application Scenario
You want to fetch and process data from a WebService API.
Function Description
In the Data Transformation node of FineDataLink, you can fetch data from a WebService API using the API Input operator and process the fetched data.
After you import the API configuration, the API Configuration value is generated automatically, and the request parameter and the request body are displayed on the Headers and Body tab pages, respectively. You only need to enter the parameter value or reference the parameter in the request body to complete the configuration of calling a WebService API.

Function Description
WebService API Configuration Import
Choose Import > Import WebService API Configuration in the API Input operator. The page is shown in the following figure.

Setting Item | Description |
---|---|
WSDL Parsing Method | 1. File Upload the existing WSDL file, which will be parsed automatically. 2. URL Fill in the URL of the WSDL file. The file will be downloaded from the URL and parsed automatically. Referencing the parameters is not allowed. |
API Selection | Expand the drop-down list, on which the callable APIs are displayed. |
When you re-open the task and enter this page:
1. If WSDL Parsing Method was set to URL, all other settings will be cleared, and you need to fill in the URL again.
1. If WSDL Parsing Method was set to File, all other settings will be cleared, and you need to upload the WSDL file again.
API Configuration
Settings items in API Configuration are shown in the following figure.
Setting Item | Description |
---|---|
Request method | POST/GET If an API supports both POST and GET methods, the POST request method is preferred. |
Request header | ![]() For SOAP 1.1, the Content-Type value is text/xml; charset=Encoding of the parsed content. For SOAP 1.2, the Content-Type value is application/soap+xml; charset=Encoding of the parsed content. |
Request body | It refers to the XML content in the request after parsing, where a question mark serves as the placeholder for the project to be filled in, as shown in the following figure. Replace the question mark in the XML content with the actual parameter value when calling an API that requires passing the parameter value. Reference the FineDataLink parameter in the ${Parameter name} format. |
Procedure
Prerequisite
For example, you want to extract weather conditions and basic information about different cities from an API, and parse and process the fetched data.
The obtained request URL, headers, and the request parameter are shown in the following figure.
Test the API validity first, as shown in the following figure.
API-Based Data Fetching
Create a new scheduled task, drag a Data Transformation node onto the canvas, and click the node to enter the editing page, as shown in the following figure.
Drag the API Input operator onto the canvas, as shown in the following figure.
Click the operator. Choose Import > Import WebService API Configuration. Set WSDL Parsing Method to URL (which can also be set to File) on the import configuration page, and enter the API URL suffixed with ?WSDL. (The URL is http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?WSDL in this example.) Select the required API.
Click OK. The API Configuration value is generated automatically, and the request parameter and the request body are displayed on the Headers and Body tab pages, respectively. You only need to enter the parameter value or reference the parameter in the request body to complete the configuration of calling a WebService API, as shown in the following figure.
For SOAP 1.1, the Content-Type value is text/xml; charset=Encoding of the parsed content.
For SOAP 1.2, the Content-Type value is application/soap+xml; charset=Encoding of the parsed content.
You can modify the parameter value in the request body. For example, you can modify the parameter value to 3779 (the city code of London) to fetch the weather condition data of London, as shown in the following figure.
Click Data Preview to view data fetched from the XML file, as shown in the following figure.
Subsequent Operations
You can use the XML Parsing operator to parse the XML data returned by the API into row-and-column format data for subsequent processing and storage.