xmlbiztalk

This Assembler cannot retrieve a document specification using this type with a Custom SND_Pipeline


My send-port throws an error and refuses to create an xml because of the following error:

Error details: There was a failure executing the send pipeline "SND_WMS_301" Reason: This Assembler cannot retrieve a document specification using this type: "dcsmergedata".

The send-pipeline is a simple one that has an XML assembler with the added schema "Schema_XML_WMS_301" (I added a Screenshot of the Pipeline)

When I change the pipeline to pass through, I create an xml document with the following root

<dcsmergedata xsi:noNamespaceSchemaLocation="../lib/interface_order_header.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <dataheaders>

The schema seems to have been deployed and is avaible in the Schema's tab in BizTalk. (second screenshot)

I am now out of idea's as to why this could be. This isue also seems very similar but opposite from my other question (Link) so I feel like I am doing something wrong with my pipelines.

send pipeline

Schema's deployed


Solution

  • The issue here looks to be similar to your other issue in that your XML payload does not have a namespace. BizTalk looks up schemas in two different ways

    1) If you have not specified the DocSpecName it does it by a combination of the Namespace and the root node name. If there is no namespace it will try by just the root node name. As you have multiple schemas with the same root node, it does not know which one to use. A good blog post about the various causes of this issue is one by Sandro Pereira

    2) If you specify the DocumentSpecName in the XML Dissasembler or Assembler, it uses the Type Name, the DLL name, the version number and the Public Key token to look it up.

    So that gives you two options.

    Option A: Add a namespace to the schema in the BizTalk solution. Then add a Add Namespace pipeline component to the Receive Pipeline that parses incoming XML, and a Remove Namespace pipeline component to the Send Pipeline to remove that namespace. So externally it does not have that namespace, internally in BizTalk it does.

    Option B: Make sure that the schemas with no namespace but the same root name have unique DocumentSpecName.

    This way when you specify the full doc spec name (which should include the assembly name) in the XML assembler via Visual Studio, it will only find the one schema matching in that DLL. The Docspec name should look like look more like something like DBLOG.ValidateMessage.IntegerSchema, DBLOG.ValidateMessage, Version=1.0.0.0, Culture=neutral, PublicKeyToken=349a4171d9432c58 as per the answer to DocumentSpecNames? which also references the DLL name, version & Public Key in addition to the Type name. In fact it should always look like that in a XML Assembler or Dissasembler even if you do have a namespace.