Wednesday, November 18, 2009

There was a failure executing the receive pipeline: "Microsoft.Practices.ESB.Itinerary.Pipelines.ItinerarySelectReceiveXml" ... does not match any of the given schemas

This week I encountered an issue using BizTalk 2009 and the ESB Toolkit 2.0 using the standard ESB.ItineraryServices.Response.ProcessItinerary webservice as on ramp.

The problem came in when using an ESB pipeline which uses an XML Disassembler as a pipeline component, specifically in the ItinerarySelectReceiveXml pipeline.

When submitting my XML request to the ProcessItinerary web service/the standard OnRamp.Itinerary.Response.SOAP receive location configured to use the ItinerarySelectReceiveXml pipeline I received this error below:

There was a failure executing the receive pipeline: "Microsoft.Practices.ESB.Itinerary.Pipelines.ItinerarySelectReceiveXml, Microsoft.Practices.ESB.Itinerary.Pipelines, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "OnRamp.Itinerary.Response" URI: "/ESB.ItineraryServices.Response/ProcessItinerary.asmx" Reason: Document type "XXX#Root" does not match any of the given schemas.

The problem was not due to a deployment issue, my schemas were deployed and only 1 schema existed for any given schema type. I also tried to use the DocumentSpecName property on the pipeline configuration to force the pipeline to pick up my schema to validate against, to no avail.

I finally came across this blog by Richard Seroter explaining a similar problem with using a web service/receive location and a pipeline that validates XML.
http://blogs.msdn.com/richardbpi/archive/2006/09/15/Fixing-_2200_SOAP-_2F00_-Envelope-Schema_2200_-Error-In-BizTalk.aspx

So... who to fix this?

I went to the  "C:\Program Files\Microsoft BizTalk ESB Toolkit 2.0\Web\ESB.ItineraryServices.Response\App_Code" folder (default ESB Toolkit install) and edited the "ProcessItinerary.asmx.cs" file, commented out the current bodyTypeAssemblyQualifiedName="XXXXX" line and gave the bodyTypeAssemblyQualifiedName a null value like this below:





I then just did an IIS restart and my problem was solved!

No comments:

Post a Comment