none
Custom File Name- As2 Send Pipeline

    Question

  • Hi All,

    I am trying to set a custom file name for the out bound file. We use AS2Send pipeline to send the files. I am trying to use the custom pipeline component to achieve this.

    Could anyone help me with detailed approach to achieve this..

    FYI, I have read this post..http://social.msdn.microsoft.com/Forums/eu/biztalkediandas2/thread/97c3b4f0-e7c7-47d5-a4c5-5cfe940a5cd4

     We use BizTalk Server 2006 R2

    Could anyone explain how do I set the MIME headers for the filenames in custom pipeline component.


     

     

    Monday, December 19, 2011 11:07 PM

All replies

  • Take a look at the following blog post explainging how to do it:

    http://blogs.msdn.com/b/biztalkb2b/archive/2009/08/05/as2-filename-preservation.aspx

    Best regards

    Tord Glad Nordahl
    Bouvet ASA, Norway
    http://www.BizTalkAdmin.com |@tordeman

    Please indicate ”Mark as Answer” if this post has answered the question.

    Tuesday, December 20, 2011 9:07 AM
  • Hi Tord,

    The blog uses FileNamePerservation feature which is avaibalbe only in BizTalk Server 2009 NOT in 2006.

    Tuesday, December 20, 2011 9:14 AM
  • The blog only tells about the receive side in biztalk. The question is how to set a custom file name for the out bound AS2 file. Can anyone explain how do I set the MIME headers for the filenames in custom pipeline component. I am also facing the same issue since i am using Biztalk server 2006 R2 and not biztalk 2010. Any help is greatly appreciated.
    Thursday, January 10, 2013 10:32 AM
  • Hi,

    We can create custom pipeline componet to get access to File context proprty FileName, Which you can change before sending file to location.

    Please try below code, it may be useful for resolution of above issue.

    string

    filename = (string)pInMsg.Context.Read("ReceivedFileName", http://schemas.microsoft.com/BizTalk/2003/file-properties);

    int lastindex = filename.LastIndexOf(@"\");

    filename = filename.Substring(lastindex + 1);

    bodyPart.PartProperties.Write(

    "FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", filename);


    Pooja Jagtap Software Engineer KPIT Cummins

    Thursday, January 17, 2013 2:58 PM
  • Hi Pooja,

    I have tried to update the file name as mentioned. I can see the file name as required when i use file send port and my custom pipeline. But when i use http port, the receiving trading partner only gets file name in format "<ENVIRONMENT>_<MessgeId>.file". Could really use help on this.

    PS: The trading partner uses BizTalk Server 2010 while we use BizTalk Server 2006 R2.


    Tuesday, January 29, 2013 3:41 AM