none
Flat file over AS2 - Preserving file name RRS feed

  • Question

  • Hi All

    i need to send the file name of the flat file sent over AS2.

    I need to sent it as MIME header ,but the FileName property is not available in the pipeline designer or accessible from orchestration.

    In this case do i need to promote it like below ?

     inmsg.BodyPart.PartProperties.Write("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", filename);

    Can I use the FILE.ReceivedFileName property to set the file name dynamic .?

    or is there any other approach to sending the File Name while sending flat file over AS2 as MIME attachment .

    Thanks  


    http://biztalkguide.blogspot.com/ Please mark as answer if this solved the issue.Thanks


    • Edited by amsullu Wednesday, March 14, 2012 4:10 PM
    Friday, March 9, 2012 3:55 PM

Answers

  • Assuming you are able to get your scenario working by changing the Write to Promote, you should have the capability to make the File Name "dynamic".  Where will the dynamic filename come from?

    If you want to preserve the source file name, read the ReceivedFileName value from the message context and promote it to the MIME filename property.


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.


    • Edited by David K. Downing Monday, March 12, 2012 9:16 PM
    • Marked as answer by amsullu Wednesday, March 14, 2012 4:05 PM
    Monday, March 12, 2012 9:14 PM

All replies

  • Hi,

    If I refer this MSDN page here, It says below about file name:

    "Sets the file name header of the MIME/SMIME part",

    So I am sure if you "promote" not write as you are doing above that in the pipeline it should be OK.

    Let me know if you need more details.

    HTH, Naushad(MCC/MCTS) http://alamnaushad.wordpress.com,My NewTechNet Wiki Article “BizTalk Server: Performance Tuning & Optimization"

    If this is helpful or answers your question - please mark accordingly! Please "Vote As Helpful" if this was useful while resolving your question!

    Friday, March 9, 2012 6:40 PM
  • Thanks Naushad.Is this the only way , as I am looking to make the File Name value dynamic .


    http://biztalkguide.blogspot.com/ Please mark as answer if this solved the issue.Thanks

    Monday, March 12, 2012 1:17 PM
  • Assuming you are able to get your scenario working by changing the Write to Promote, you should have the capability to make the File Name "dynamic".  Where will the dynamic filename come from?

    If you want to preserve the source file name, read the ReceivedFileName value from the message context and promote it to the MIME filename property.


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.


    • Edited by David K. Downing Monday, March 12, 2012 9:16 PM
    • Marked as answer by amsullu Wednesday, March 14, 2012 4:05 PM
    Monday, March 12, 2012 9:14 PM
  • Thanks David.

    The file name needed some look up apart from the context or promoted properties.

    So I have overwritten the FILE.ReceivedFileName inside orchestration and configured the

     "Transit File Name in MIME Header" with

    %FILE.ReceivedFileName% on the AS2 Agreement settings , which could mean no need of promotion .

    Regards

    sullu.


    http://biztalkguide.blogspot.com/ Please mark as answer if this solved the issue.Thanks

    Wednesday, March 14, 2012 4:05 PM
  • Hi Naushad. I am also facing the same issue of sending the file name over AS2 in biztalk server 2006 R2. I have put in a custom pipeline which has a custom component after the as2encoder. i have tried both to promote the file name in the custom component as below, but it still does not work as expected since trading partner is still getting some other file name. PS: i have also tried to write instead of promoting without any success. inmsg.BodyPart.PartProperties.Write("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", filename); And inmsg.Context.Promote("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", filename);
    Wednesday, January 30, 2013 6:57 AM
  • Hi

     I am also facing the same issue of sending the file name over AS2 in biztalk server 2006 R2. I have put in a custom pipeline which has a custom component after the as2encoder. i have tried both to promote the file name in the custom component as below, but it still does not work as expected since trading partner is still getting some other file name. PS: i have also tried to write instead of promoting without any success. inmsg.BodyPart.PartProperties.Write("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", filename); And inmsg.Context.Promote("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", filename);

    Any idea of how to make this to work in biztalk server 2006 R2.?

    Wednesday, January 30, 2013 6:59 AM