AS2 FileName preservation

I see some confusion in folks when using the AS2 Filename Preservation enhancement done in Biztalk 2009 in terms of what context property is used for what. Here is the feature explained.

Filename Preservation is an optional profile in AS2 specification that essentially allows the recipient of the AS2 message to retrieve the filename of the MIME wrapped EDI business document and transfer the received file to its backend system using the received filename.

How we do it in biztalk?

When you are sending a message you can specify the name of the file to be filled in the MIME headers in this UI as a context property. Default value of this property is File.ReceivedFileName which is the property promoted by FILE receive port. So in the end to end scenario, name of the file received by biztalk through file receive port is transmitted across the wire in MIME headers.

On receive side we do two things with the filename in the MIME headers of the message.

1. We write context property EDIINT.PreservedFileName. Now you can use this property anywhere you wish. For eg, in a file send port you can specify this in the desired name of the file to dump the message to.

2. We write FILE.ReceivedFileName. This is just to make sure that in the following scenario the filename is preserved in the message we send in step (b) if you are using the default settings at send time:

a. You AS2Receive a message with filename in MIME headers.

b. You AS2Send this message elsewhere.

 

Hope this clarifies this scenario. 

filenamepres.jpg