EventLog error BizTalk WCF-SQL Receive: finding the document specification by message type failed

EventLog error on a typed-polling BizTalk WCF-SQL Receive Location

There was a failure executing the receive pipeline: “Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35” Source: “XML disassembler” Receive Port: “ReceivePort.dlsqldev1.tmwdev.Integration_Dev.GetSettlementTWMtoIseries” URI: “mssql://sqlserver//dbname?InboundId=XYZData” Reason: Finding the document specification by message type “http://schemas.microsoft.com/Sql/2008/05/TypedPolling/XYZData#TypedPolling” failed. Verify the schema deployed properly.

Anybody around BizTalk a while knows what this error means with flat files. By why is a Receive Location for WCF-SQL typed-polling causing it?

Scenario

Client had originally generated the schema in Visual Studio using some query, which was referred to as “ABCData”.
The system was working fine with the one Receive Location. But then they bought another company, so the goal was to have two separate Receive Locations, each polling with a different “SourceSystem” SQL column name. We wanted them separate so the data of the two companies would stay separate, as we were using a lookup to a config file to identify the CompanyID, and then using Dynamic SQL SendPorts to insert the either database ABC or XYZ. The polling database was separate from the ABC and XYZ database.

So let’s say the SourceSystem will have the value ‘ABC’ or ‘XYZ’, and one table needs to be polled for each of those two codes.
Again, we want to start two separate orchestration for each.

So the receive location was “cloned”, by exporting the bindings, duplicating the ReceiveLocation and changing ABC to XYZ. This resulted in two different Address (URI)s. BizTalk requires that every Receive Location have a unique ID.

Problem Starts

So with “typed polling”, BizTalk uses the URI to determine the namespace. Visual Studio sees the schema with the “ABCData#TypedPolling” namespace. So the ABC receive location continued to work okay. The XYZ receive location was failing, sending errors to the event log (but no suspends). The error in the event log is shown at the top of this blog.

Alternative Solutions

One blog suggested using XML polling instead of typed-polling, but our orchestration was already working, and had many maps depending on the current structure. So my solution was to use a “XML_FixMessage’ pipeline that I had developed earlier. This pipeline has several string replace and RegEx replaces, so we could simply change XYZData to ABCData in the pipeline configuration.

Blogs that helped solve thie

TypedPolling with same sql url in wcf-sql adapter
Finding the document specification by message type Error (Sql TypedPolling)

I also had one related blog on this site – see xrefs below.

Uncategorized  

Leave a Reply