FIX: JSON encoder unable to handle XML schema with the same name for record and one of its elements

Applies to: BizTalk Server 2016 BranchBizTalk Server 2016 EnterpriseBizTalk Server 2016 Standard

Symptoms


Assume that you convert XML to JSON by using JSONencoder inMicrosoft BizTalk Server. When your XMLschema containsan element with the same name as the record that the element is part of, you may receive anerror 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 sendpipeline:"HM.SINC.LabelInformation.SINC.Disco2.Messaging.LabelInformation_Disco2_JSON_SendPipeline,HM.SINC.LabelInformation.SINC.Disco2.Messaging, Version=1.0.0.0,Culture=neutral, PublicKeyToken=TokenNumber" Source: "JSONencoder" Send Port: "LabelInformation.XX.SendPort" URI:"UrlPath"Reason: Value cannot be null.
Parameter name: keyc

Status


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 update for BizTalk Server:

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