The %SourceFileName% macro can only be used with the http://schemas.microsoft.com/BizTalk/2006/sftp-properties namespace

1.1k Views Asked by At

Overview

I have a custom send port pipeline component that replaces the file name of the file being mapped on the send pipeline with a specific file mask format. The pipelines code takes the ReceivedFileName property and applies transformation to it. This process has been working for over a year, but after deploying a new schema and maps resource, the pipeline has ceased to work. I now get no file created due to the below warnings and errors. I am hoping that someone may have had a similar experience and could give me insight into this issue.

Notes: The maps and schemas work (new and old) when not using the pipeline. The only change to the maps and schema artifacts were an addition of 2 TypedPolling schemas, 2 FlatFile schemas, and 2 maps.

Here is the Warning and Error I got using the SFTP adapter

Warning

The adapter failed to transmit message going to send port "SEND_FileFormat_BSFTP" with URL "SFTP://xxx.xxx.xxx.xxx:22/ToPartner/sftp/%SourceFileName%". It will be retransmitted after the retry interval specified for this Send Port. Details:"An unexpected failure occurred while processing a message. The text associated with the exception is "[SftpTransmitterEndpoint] Unable to transmit file . Inner Exception:

The %SourceFileName% macro can only be used with the http://schemas.microsoft.com/BizTalk/2006/sftp-properties namespace. . Changing any Send Port Transport properties might require the host to be restarted, as the connection pool might still have connections".".

Error

A message sent to adapter "SFTP" on send port "SEND_FileFormat_BSFTP" with URI "SFTP://xxx.xxx.xxx.xxx:22/ToPartner/sftp/%SourceFileName%" is suspended. Error details: System.ArgumentException: A property with the name 'http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileName' is not present.

Server stack trace: at System.ServiceModel.Channels.MessageProperties.get_Item(String name)
at Microsoft.BizTalk.Adapter.Sftp.SftpOutputChannel.BuildFileName(Message message) at Microsoft.BizTalk.Adapter.Sftp.SftpOutputChannel.Send(Message message, TimeSpan timeOut) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]: at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndSend(IAsyncResult result)

Exception rethrown at [1]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at System.ServiceModel.Channels.IOutputChannel.EndSend(IAsyncResult result) at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendCallback(IAsyncResult result) MessageId: {055A8864-AB06-4849-ADC3-A5CB93016106} InstanceID: {FF1E3802-89CD-466C-B68E-2CF4EC662DF4}

Here is the error I got using the Blogical SFTP adapter

Method: Blogical.Shared.Adapters.Sftp.SftpTransmitterEndpoint.ProcessMessage Error: [SftpTransmitterEndpoint] Unable to transmit file . Inner Exception: The %SourceFileName% macro can only be used with the http://schemas.microsoft.com/BizTalk/2006/sftp-properties namespace. . Changing any Send Port Transport properties might require the host to be restarted, as the connection pool might still have connections

------------------------------ Information: Type: Blogical.Shared.Adapters.Sftp.SftpException Target: Microsoft.BizTalk.Message.Interop.IBaseMessage ProcessMessageInternal(Microsoft.BizTalk.Message.Interop.IBaseMessage, Blogical.Shared.Adapters.Sftp.ISftp) Message: [SftpTransmitterEndpoint] Unable to transmit file . Inner Exception: The %SourceFileName% macro can only be used with the http://schemas.microsoft.com/BizTalk/2006/sftp-properties namespace. . Changing any Send Port Transport properties might require the host to be restarted, as the connection pool might still have connections Stacktrace: at Blogical.Shared.Adapters.Sftp.SftpTransmitterEndpoint.ProcessMessageInternal(IBaseMessage message, ISftp sftp) at Blogical.Shared.Adapters.Sftp.SftpTransmitterEndpoint.ProcessMessage(IBaseMessage message)

------------------------------ Type: System.Exception Target: System.String ReplaceMacros(Microsoft.BizTalk.Message.Interop.IBaseMessage, System.String) Message: The %SourceFileName% macro can only be used with the http://schemas.microsoft.com/BizTalk/2006/sftp-properties namespace. Stacktrace: at Blogical.Shared.Adapters.Sftp.SftpTransmitProperties.ReplaceMacros(IBaseMessage message, String uri) at Blogical.Shared.Adapters.Sftp.SftpTransmitterEndpoint.ProcessMessageInternal(IBaseMessage message, ISftp sftp)

I have tried:

  • Refreshing the pipeline, schema, and map artifacts
  • Using %MessageId%, %SourceFileName%, and *.dat as my SFTP filename values
  • Stopping the send ports, restarting the host instances
  • Stopping everything in the app and restarting all host instances
  • Re-gaccing the artifacts
  • Using a File adapter instead of SFTP
1

There are 1 best solutions below

1
Emeria On BEST ANSWER

This was solved by completely redeploying the pipeline assemblies. The DLLs got out of sync as they were published. The GAC versions did not match the versions deployed to BizTalk.