1

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

Community
  • 1
  • 1
Andy
  • 2,248
  • 7
  • 34
  • 57

2 Answers2

3

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.

  • Either reside in a separate project.
  • Reside in a different versin of the DLL
  • Have a different Type Name (This is usually the quickest and best option)

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.

Community
  • 1
  • 1
Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
  • 1
    The system that ends up reading this file has a few requirements that i cant do with passThrough. The preservceBOM is set to false and the add xmldeclaration to True. This creates a file the target system can read. As a quick question, how do you add the namespace in the biztalk solution? basically create a schema with a namespace and map to that schema, then use the remove namespace component (ESB Toolkit) to remove it again? – Andy Nov 03 '16 at 08:30
  • 1
    Well, things are working fine exept removing the namespace. I am trying to use the esb toolkit removenamespace pipeline component but it is trowing an 'Exception of type 'Microsoft.BizTalk.Message.Interop.BTSException' error. and nothing more. mLooking on the internet for this error i find that the error occurs mainly in receive/send ports but my current port is a FILE send port. This leaves me somewhat lost at what is wrong. – Andy Nov 03 '16 at 10:10
  • 1
    I am not sure if the adding and removing the namespaces is the solution. if i add an namespace then remove it with the esb removing, my tests seem to indicate the "xsi:noNamespaceSchemaLocation="../lib/interface_order_header.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" gets removed to noNamespaceSchemaLocation="../lib/interface_order_header.xsd". I cant really see a way to readd the missing parts. – Andy Nov 04 '16 at 11:10
  • 1
    @andy Given you an option B to try – Dijkgraaf Nov 04 '16 at 17:53
0

Sometime this error comes if we did not restart the host instances properly. The below steps needs to be check.

1.Check the root node and target name space of the flat file schema. If we are taking reference of any other schma make sure rootnode should be name of the BO.

  1. If the above steps is ok.. Then go to application and then go to Schema node and check whether both the rootnode and schema present in the deployed file or not.

3.If above 2 are fine.. Then restart all the host instances. Only applications host instances will not work.. Restart all and it will work.

Above solution worked for me.