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(Blogical.Shared.Adapters.Sftp.Schemas.host) = "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.

Comments

No Comments

This Blog

News

    Messenger

    Twitter Updates

      Follow me on twitter

      Visitors

      Feedburner Subscribers

      Locations of visitors to this page

      Disclaimer

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

      Pages

    Syndication