We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Get data from SOAP API using Syncfusion Data Integration Platform

Platform: Big Data Platform |
Control: General |
Published Date: September 21, 2018 |
Last Revised Date: September 28, 2018

Introduction

This ar­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ticle explains how to get data from SOAP API using Syncfusion Data Integration Platform.

 

Objective

 

To get data response using SOAP API and convert that data response in to SQL insert statement and finally store the resultant data in destination SQL server.

Sample used in this article: SOAP_API_sample.xml

 

Example Dataflow get data from SOAP API

 

Overview

 

Prerequisites

Before configuring this workflow, users must know about DBCPConnectionPool in Syncfusion Data Integration Platform. Because, the DBCPConnectionPool is responsible for creating the database connection to perform database operations. Refer to Configure DBCPConnectionPool to configure the DBCPConnectionPool for SQL server.

Note:

To create the required table in target SQL server for the first time, start the following processor.

In properties tab, enter create statement SQL query. Refer to the following screenshot.

List of processors used in workflow:

Processor

Comments

GenerateFlowFile

Creates the body message as FlowFile for SOAP API request.

InvokeHTTP

Gets response from the web service using SOAP API.

UpdateAttribute

Updates the FlowFile attribute value.

SplitXml

Splits the XML incoming FlowFile into multiple FlowFiles.

EvaluateXPath

Evaluates one or more XPath against the FlowFile content and store the resultant data into FlowFile attribute.

ReplaceText

Update the FlowFile content with new input content.

PutSQL

Executes the SQL insert query into target SQL server.

ExecuteSQL

Creates table in the target SQL server.

 

GenerateFlowFile Processor

This processor will generate the FlowFile for SOAP API request, enter SOAP API body message in the Custom Text property as follows.

Body message used

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.holidaywebservice.com/HolidayService_v2/">

<SOAP-ENV:Body>

<ns1:GetHolidaysAvailable><ns1:countryCode>UnitedStates</ns1:countryCode></ns1:GetHolidaysAvailable>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

 

In Scheduling tab, the Run Schedule value is set as 1 day and this can be changed as desired.

InvokeHTTP processor

This processor fetches the data from SOAP API by entering the value for HTTP method, Remote URL, Content-type, and add new property SOAPAction using Add button as follows.

SOAP API call used

 

 http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx?wsdl

 

 

SOAP action method used

 

http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable

 

 

Note:

  • To ignore the failure case, select the auto-terminate option for corresponding relationships. Refer to the following screenshot.

  • Remove empty spaces in Basic authentication password and Proxy password properties value. 

UpdateAttribute Processor

This processor will add a new attribute to the incoming FlowFile called “mime.type”, which can be added using Add button and enter the value as follows.

SplitXml

This processor will split the incoming XML FlowFile based on the split depth property as shown in the following screenshot.

EvaluateXPath Processor                                                                                                                                                                       

This processor will evaluate the incoming FlowFile based on the destination property and two new properties “code” and “description” is added by using Add button as follows.

ReplaceText Processor

This processor will process the incoming FlowFile with the replacement value entered in the property as follows.

Replacement value used

 

insert into holidaycode (Code, Description) values ('${code:replace('\'',' ')}', '${description:replace('\'',' ')}')

 

 

PutSQL

This processor will execute the incoming insert query value in the SQL server using the JDBC connection pool property as follows.

After completing all the configurations, start the workflow. It will transfer the SOAP API data into target SQL server.

ADD COMMENT
You must log in to leave a comment
Comments
Umar AlFarooq
Mar 25, 2021

The Holiday Web service is no longer available. Please update your articles with up-to-date information.

Reply

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile