So I was working with a co-worker over the past week or so creating the following process:
Each trading partner (including the same one who got two) receives an interchange of EDI 835 payment advices.
So he had created the map and was getting the interchange xml output out of the orchestration where the map lives. However, every time he would attempt to send it through the EDI send pipeline, it would dehydrate stating that the object reference not set to an instance of an object. I searched high and low (and by that I mean that I went to multiple pages in my Google search).
So my co-worker had taken a day off and I was going ‘supposed’ to work on it. I was working on a few other things and knew that I wouldn’t get to it. The night before he took the day off, I knew exactly what the problem was, and I ended up having to think about the fix for an entire 36 hours (torture).
Resolution: We had created a partner specific 835 schema with a target namespace of http://schema.company.com instead of http://schema.microsoft.com. We had even gone into the agreement settings and set the schema from http://schema.microsoft.com to http://schema.company.com. His map was creating (via pure xsl) the interchange message with the transaction’s namespace set to http://schema.microsoft.com. Well, when the EDI assembler received the xml version of the transactions, it went to the GAC to find the 835 schema with the target namespace of http://schema.microsoft.com (this object is referencing), however, we didn’t have the default 835 schema deployed. This meant that the EDI assembler was referencing an instance of an object. (It didn’t lie after all). Once we changed the map to create transactions with the target namespace with http://schema.company.com did it run through without fail.
Now we have a process that runs in seconds, no batching, maintains the order of claim payment advices by order of the Header record.
Update: not only does this apply to when the EDI assembler can’t find the appropriate schema, if your transformation is creating nodes in the xml document that are not found in the schema representing the EDI document, it will throw the same error. If you know that you have deployed the correct schema, then it means that you should go back and unit test your map.