Some weeks ago I was faced with a problem, as entry, I had a flatfile schema with positional fields. Before processing this file I needed to validate that every field is ok.

I had a problem with dates, since if I received let's say 10 space characters (representing and empty date) then the schema was not valid. So how the hell could we have resolved the problem? How could we say to BizTalk that for space characters on the Date it is ok, and it should go forward?

Here we needed BizTalk Server to stop processing any wrong file, we did not want BizTalk to continue any further. 

Every solution must be on the schema, solutions in other parts of BizTalk (mapping, custom pipeline, orchestration, ...etc.) was not a state of the art solution.

So What I did was simple :

  • In the schema you specify that the padding character is spaces
Padding Schema BizTalk
  • you specify that the empty fields are authorized
Empty Nodes BizTalk Schema Properties

These two actions were enough and solved my problem