Using the SFTP Adapter in a Dynamic Send Port

Listen with webReader
Published 13 March 08 09:00 PM | Johan Hedberg

In the comments to a previous blog post announcing the Blogical SFTP Adapter I got a question regarding the use of the SFTP Adapter in a Dynamic Send Port. The answer I was forced to give was that the SFTP Adapter did not in its current state support being used in a Dynamic Send Port. Not being one to shy away from a challenge, and eager to show we listen to feedback, I have added the artifacts and code necessary to support Dynamic Send Ports. Mikael has included my change and it will be available in the next release of the adapter to codeplex. The problem was that the adapter had no propertyschema, and so there was no way to access the properties needed from within an orchestration, and no support in the adapter for loading properties from anywhere but its configuration. It now has those things. The installer and source download now includes a propertyschema and the adapter looks at the message context if the config is null, which it will be in a Dynamic Send Port.

So, to use the SFTP adapter from your orchestration and a Dynamic Send Port, use something similiar to the below code:

DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address) = "SFTP://server:22/";
MsgOut(BTS.OutboundTransportType) = "SFTP";
MsgOut( = "server";
MsgOut(Blogical.Shared.Adapters.Sftp.Schemas.portno) = 22;
MsgOut(Blogical.Shared.Adapters.Sftp.Schemas.user) = "user";
MsgOut(Blogical.Shared.Adapters.Sftp.Schemas.identityfile) = @"c:\mysftpkeyfile.ppk";
MsgOut(Blogical.Shared.Adapters.Sftp.Schemas.remotefile) = "OUT_%SourceFileName%";

I'd post a full downloadable sample, but there really isn't anything more to it then that. You should however take a look at the propertyschema, available in both the binary download and the source, to see which properties you can use.


# Mikael Håkanssons Blog said on March 18, 2008 06:38 PM:

We were ask if the adapter supported dynamic send port, and if it was configurable from within orchestrations

# Be Logical - writings by Johan Hedberg said on January 6, 2009 09:00 AM:

So, a year passed. Year-end statistics are always fun. However I really need to make sure we have additional

# lakus said on June 19, 2009 02:29 PM:

Hi Johan,

I am facing a peculiar problem with the send port when using the SFTP Adapter.(not being used as a dynamic port) It tends to hang when 2000+ files are being sent.

Eventviewer displays errors- Unable to connect to remote host.. from time to time.

would be grateful if there are any workarounds.


This Blog



    Twitter Updates

      Follow me on twitter


      Feedburner Subscribers

      Locations of visitors to this page


      All material is provided AS IS voiding any thinkable or unthinkable effect it might have for any use whatsoever. There... is that clear enough ;)