Wednesday, November 27, 2013

How to use SFTP Adapter using BizTalk Server 2013



Introduction 

BizTalk server has supported the FTP (File Transfer Protocol) adapter since its early release. 
With the BizTalk 2010 release, Microsoft enhanced the existing FTP adapter to support SSL (FTPS), which encrypts the data transfers between systems. In the BizTalk 2013 release, Microsoft added SFTP (SSH File Transfer Protocol also called Secure File Transfer Protocol). This has been much anticipated over the years and it is great that a true SFTP adapter now exists with BizTalk server. In the past for one had to rely on the open source adapter developed by Blogical found on CodePlex or an adapter from commercial third parties (like /n software SFTP). Now you will have advantages of Microsoft support for out-of-the-box of SFTP adapter.
For more information of BizTalk Server 2013 new features check this link
http://www.microsoft.com/en-us/biztalk/whats-new.aspx
In this article I will demonstrate step by step of the followings:
  • How to prepare a testing environment to communicate with the SFTP adapter as Figure 1?
  • How to configure BizTalk  SFTP Adapter?
  • How to test BizTalk Adapter?
Figure 1
Figure 1. Demo Architecture


How to prepare a testing environment to communicate with the SFTP adapter?

  1. Create a new local user Control Panel -> Administrative Tools -> Computer Management -> Local Users and Groups -> right click User -> New User-> Specify a User name and password.

  2.  Switch and Login for one time using SFTPUser to create user related folder and files.
  3. Download Windows SFTP server tool that allows you to connect, retrieve and put files to try out the functionality of the SFTP Adapter.There are many  tools For this demo I am using the following one http://dl.bitvise.com/BvSshServer-Inst.exe ,Then install it with default settings and restart your machine and make sure that Bitvise SSH Server service is started.
  4. Download any SFTP client tool in this demo I am using the following tool http://winscp.net/download/winscp517setup.exe .Then install it with default settings and restart your machine.
  5. Open WinSCP and enter Host Name , username and password as figure 2 then click login button then click yes in warning dialog .

    Figure 2

    Figure 2. WinSCP Login Dialog .

    Now you will see the following window as Figure 3.

    Figure 3
    Figure 3. WinSCP Start-up window


  6. Create a new Directory  by selecting Files-> New -> Directory as figure 4.

    Figure 4.Creating new Folder in WinSCP

  7. In create Folder window enter folder name in this demo I named it MessageTesting and check Set permissions as figure 5.

    Figure 5 
    Figure 5.Set Folder Permissions in WinSCP
  8. Create folder IN and OUT inside folder MessageTesting same settings of Step 7 and the path for receive location should be as figure 6.
    Figure 6.Path of IN Folder in WinSCP

    Now we are ready to configure the BizTalk SFTP Adapter.

How to configure BizTalk SFTP Adapter?

  1. ​Create a receive port I name it Rcv_SFTP then create receive location Rcv_SftpLoc then choose type of receive location to SFTP from drop down list then click Configure then change AcceptAnySSHServerHostKey property to True then fill other settings as Figure 7.
    Figure 7.Configuring Receive SFTP Adapter

    You can copy path of sftp folder to clipboard as figure 8.


    Figure 8.Copy Path to Clipboard in WinSCP


  2. Create Send port and Name Snd_SFTP select type from drop down list  SFTP then click Configure then fill setting as Figure 9.
    Figure 9.Send SFTP Adapter Configuration

  3. Configure Filter of send port subscribe messages from port Rcv_SFTP as figure 10.


    Figure 10.Filter SFTP send port Configuration
  4. Enable receive location and Start send port.

How to test BizTalk Adapter?

  1. Copy any file to IN folder path by drag drop from left window panel to right panel as Figure 11.

    Figure 11.Copy dialog window in WinSCP
  2. Check OUT folder for generated file as Figure 12
Figure 12.Copy dialog window in WinSCP

Conclusion


In this demonstration, we investigated:
  •  The receive and send SFTP adapter, which is a new Feature comes with BizTalk Server 2013.
  •  The step by step of preparation of an environment for testing the transfer of messages using the SFTP adapter.
  •  And how to configure and test SFTP adapter.

See Also

Read suggested related topics:
Another important place to find a huge amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki.

No comments: