Write file using FTP adapter in OIC
Lets see the development steps in detail :
STEP 1: In the Designer window click Integration and then click Create
- Select App Driven Orchestration
- Enter the below details and then click Create :
*What do you want to call your Integration? – write some meaningful name
STEP 2 : Search for the REST connection name ‘ RESTConnection ‘ and Select it.
( You can access this blog to configure this REST connection )
- Enter the below details and click Next – [as shown in below image ]
*What do you want to call your endpoint ? : write any meaningful name
- Choose the above saved schema “EmployeeDetails.xsd” in next window and then click NEXT.
- Select JSON Sample and then click inline to add response payload
- Enter sample JSON → {“Response” : “” } and click OK
- Click NEXT
- Click DONE
- Enter below details and then click NEXT :
*What do you want to call this endpoint : write any meaningful name
*What does this endpoint do : write meaningful description
- Enter the below details and then click NEXT :
*Select Operation : select Write File
*Output Directory : write / (as shown in below image )
(here you can provide your directory path where you want to generate the file)
*File Name Pattern : write EMP_%SEQ%.csv
(here you can provide any meaningful file name)
- Select Sample delimited document (e.g CSV ) and click Next
- Paste the below text in notepad or any text editor tool and save it as Employee.csv
Emp_Id,Emp_FirstName,Emp_LastName,Emp_Designation,Emp_DC_Location
- Configure the below details and then click NEXT :
*Choose File : select the above saved file Employee.csv
*Enter the Record Name: Employee (you can write any meaningful name)
(you can write any meaningful name)
- Click Done
STEP 4 : Open the FTP adapter mapper and map the columns accordingly
**Make sure to map the Employee node also to configure for each
- you can see the foreach function by clicking on Advance tab
- click Validate and close the mapper.
STEP 5 : Now open the response mapper
- Right click on Response and then select Create Target Node
- Write “Success” in editor window and click Validate and Close the mapper.
STEP 6 : Add the Tracker for your Integration :
Right click on Hamburger sign and then click on Tracking
- Map Emp_Id as tracking variable and then click Save
Assigning Business Identifiers for Tracking Fields ? : Business identifiers enable you to track payload fields in messages during runtime.You must assign business identifiers before you can activate an integration.
STEP 7 : Click Save and then Close the integration. Your Integration is ready to test.
TESTING STEPS :
- Activate the Integration and copy the Endpoint URL
- Click on Endpoint URL (as shown in below image )
- Copy the Endpoint URL
- Open SoapUI tool (5.5.0):
- Click on REST
- Then Paste the above copied endpoint URL and then click OK
- Configure the REQUEST PAYLOAD ( as shown in below image):
- Method : POST
- Media Type : application/xml(download the xml file & paste the same in SoapUI)
The file will get generated in your FTP directory. If you want to see the file
Open FileZilla Tool :
Enter the FTP Connection details (you can see the previous blog for FTP Credentials)
Click OK
file got generated in “/” directory of FTP
Download the file to you local system and opened it. You will see the below data
Thanking You !
You may also like
5 comments
Leave a Reply Cancel reply
Archives
- November 2024
- October 2024
- May 2024
- June 2023
- December 2022
- October 2022
- September 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- August 2021
- July 2021
- May 2021
- March 2021
- January 2021
- November 2020
- October 2020
- September 2020
- May 2020
- March 2020
- February 2020
- January 2020
- December 2019
- August 2019
- July 2019
- June 2019
- May 2019
- March 2019
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||






































Can you please share an example of how zip multiple files using ftp adapter and send the zip file to another sftp server
Hi Kabir,
It is nice..
Please explain the process how we will generate EmployeeDetails.xsd file
create XML file according to you requirement and then You can easily generate XSD file from the XML file on google. Just search 'generate XSD from XML".
How can I add headers?
in mapper image (just above step 5) repeat the 'Employee' node by right clicking it and select 'Repeat Node'.
And after that just hardcode your Header Name in it. I hope this will resolve your issue 🙂