I’m working on a little project that involves a BizTalk pipeline that can configure XmlDasmComp for whatever message is going through the pipeline. The pipeline sniff’s the message and sets up the envelope and document schema and then lets XmlDasmComp do it’s thing.
Generally this is pretty simple stuff, but it totally threw me for a loop because every time I ran it in the debugger I would get a COM+ Exception from XmlDasmReader. I used Reflector to spy on XmlDasmReader and I learned that the exception occurred when it was trying to get the Document spec I had specified. Unfortunately I couldn’t quite find the code that was actually loading the Document spec.
So I threw together a simpler version of my component, one that hard coded the schema. Same thing. Absolutely no explanation.
In desperation I compiled and ran the SchemaResolution sample included in the SDK. It worked! What was the difference? Pipeline.exe versus running inside BizTalk. Apparently whatever loads up your schema (IDocumentSpec) needs a connection to the BizTalk management database. In hind sight it makes perfect sense. But the past 24 hours have been hellish for me.