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 