AS2PayloadContentType

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › AS2PayloadContentType

Viewing 1 reply thread
  • Author
    Posts
    • #18781

      Has anyone ever devised a way to use the context property “AS2PayloadContentType” in order to determine the original (source) filename?  You can not use the %SourceFileName% macro to name the received file, and thus far – every indication is that you either come up with your own filename or use %MessageID%.txt or something like %datetime%.txt – problem is, you completely loose the orginal filename this way. 

      Recently, one of the inbound AS2 messages sent to us errored out and therefore was in the suspended queue.  I could see the AS2PayloadContentType property – and there was the original filename (grin)… just asking to be used (LOL).  OK, now what?

       Thanks, Mark

    • #18794

      No takers here?

      OK… in case anyone else painfully stumbles across this thread… here’s what I ended up with.  I developed a custom pipeline component that snags the AS2PayloadContentType context property, examines it, and (if present) uses the value after the “name=” section. As a backup, I alternatively name the file “AS2in_20080116_141300.txt” – where the date and time is used to make it a unique filename.  Could also (I suppose) gain access to the AS2 messages Message ID property and use that in the pipeline component, but this was fine for me.

      The component is dropped into the Encode stage of a pipeline… and that’s all.  This effectively makes this equivelent to a PassThruTransmit pipeline, with the added benefit of KEEPING the source filename in place so you can use the %SourceFileName% macro on the FILE adapter.

      I’d be happy to share the component with anyone else out there experiencing bewilderment at why Microsoft couldn’t do this for us and preserve the source file name.  Just email me at mscott[at]k2b[dot]net. 

      Take care,

      Mark

      p.s. Thanks BizTalk group at Microsoft for the unnecessary pain here Smile

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.