I’ve seen a number of places where it’s documented that zero byte files pulled in through the FTP adapter throw an error. It would probably be more factual to say that zero byte files pulled in through the FTP adapter are passed on to the Flat File Disassembler, which fails. Either way, this behavior is often an annoyance, since the File Receive adapter manages some voodoo that doesn’t generate the error.
I’ve taken the BizTalk Server Pipeline Component Wizard and done something very simple in the Execute method:
if (inmsg.Body.Data.Length == 0)
return null;
else
return inmsg;
I’ve seen other people suggest creating a custom pipeline component, but I’ve never seen how or that “this” works.
I got over-eager and wanted to create the component to be an “any” type component. This way it could be dropped in the pipeline at any point a developer thought he might end up with a zero byte stream. The first error was that I hadn’t implemented the IDisassemblerComponent
interface. All well and good; I implemented the interface as a passthrough.
It seems that BizTalk attempts to publish to the Message Box whatever comes out of the GetNext
method. Since, in my case, I was returning the raw stream (which was not XML), there wasn’t anything that BizTalk could match to that as a subscriber, and the message failed. I ended up rolling back my changes and setting the component as a Decode component.