Symptoms
Assume that you convert XML to JSON by using JSON encoder in Microsoft BizTalk Server. When your XML schema contains an element with the same name as the record that the element is part of, you may receive an error message that resembles the following:
Unable to cast object of type 'System.Xml.Schema.XmlSchemaSimpleType' to type 'System.Xml.Schema.XmlSchemaComplexType'.
There was a failure executing the send pipeline: "CustomerComponent.Project.Pipelinename_JSON_SendPipeline, CustomerComponent.Project, Version=1.0.0.0, Culture=neutral, PublicKeyToken=TokenNumber" Source: "JSON encoder" Send Port: "Customer.SendPort" URI: "http://namespaceinformation" Reason: Value cannot be null. Parameter name: theParameterStatus
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Resolution
This problem is fixed in the following cumulative updates for BizTalk Server:
-
Cumulative Update 1 for BizTalk Server 2020
-
Cumulative Update 7 for BizTalk Server 2016
References
For information about the service packs and cumulative update list for BizTalk Server, see the following article in the Microsoft Knowledge Base:
2555976 Service pack and cumulative update list for BizTalk Server
For more information about BizTalk Server hotfixes, see the following article in the Microsoft Knowledge Base:
2003907 Information about BizTalk hotfixes and Cumulative Update support