venneker.net

.NET, BIZTALK, ESB, AZURE

Category: BizTalk (page 2 of 17)

The columns Status and YYY are either duplicated or not in a sequence. Each column can only be selected one time, and columns must be selected in sequence. (wcf-custom adapter)

This error occurred on the production environment of a customer when using a view and the wcf-custom adapter with sql-binding.


<ns0:NACK Type="NACK" xmlns:ns0="http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd">
<NAckID>{D3B42630-4221-4B76-9E55-9B148D4A8C7B}</NAckID>
<ErrorCode>0xc0c0167a</ErrorCode>
<ErrorCategory>0</ErrorCategory>
<ErrorDescription>Microsoft.ServiceModel.Channels.Common.XmlReaderGenerationException: The columns A and B are either duplicated or not in a sequence. Each column can only be selected one time, and columns must be selected in sequence.
at Microsoft.Adapters.Sql.SelectBodyWriter.OnWriteBodyContents(XmlDictionaryWriter writer)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfMarshaller.CreateBizTalkMessageStream(Message wcfMessage, IAdapterConfigInboundMessageMarshalling config, TLConfig tlConfig, RLConfig rlConfig)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfMarshaller.CreateBizTalkMessage(IBaseMessageFactory messageFactory, IAdapterConfigInboundMessageMarshalling marshallingConfig, Message wcfMessage, TLConfig tlConfig, RLConfig rlConfig)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)</ErrorDescription>
</ns0:NACK>

The first solution after googling was to define the columns in the request xml so the order is explicit as stated in Sandro’s blog. This resulted in the same error. Connecting the staging environment to the production server gave no errors, and connecting BizTalk production to the staging database again gave the same error.

Only the production machine gave the error….

For BT2013r2 this was a known issue: “FIX: The element orders in the schema generated by WCF-SQL adapter are different for SQL Server 2012 and SQL Server 2014

After some digging we noticed that the CU1 was installed on all environments except…… the production… After installing there were no more problems with the column order. So if you encounter this problem check if the CU is installed correctly.

cu1 2013 r2

Find more info about the CU here.

BizTalk Health Monitor v3.1

microsoft_logo_56x56

 

BHM is an MMC snap-in that allows the user to monitor the health of BizTalk Server environments and execute maintenance tasks.

Resolving Schema type Name error

When you come accross this error while building a XSD in BizTalk:

This schema file has a TypeName that collides with the RootNode TypeName of one of its root nodes. Make sure that they are different.

Just set the ‘Root Reference’ in the schema properties to a type. This identifies the root node type that corresponds to the type for the schema. The default behaviour is to pick the first root node, and if the root node that shares a type name is not the first then you’ll see this error. Simply change the property to the relevant node and compile away.

GUID simple Type

I received an external schema with the following type in it:

<xs:element minOccurs="1" maxOccurs="1" name="Id" type="wsdl:guid" />

There also was a reference to:

 <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://microsoft.com/wsdl/types/">
<xs:import namespace="http://microsoft.com/wsdl/types/" />

However the build failed with:
Error 6 Type ‘http://microsoft.com/wsdl/types/:guid’ is not declared, or is not a simple type. D:ExternalSchemasschemaname.xsd ExternalSchemas

I came ac cross a few posts for handling guids in schema’s:
http://www.level533.com/2011/01/how-to-define-guid-properties-in-xsd-schemas-for-generating-poco-classes/
http://msdn.microsoft.com/en-us/library/office/aa203890(v=office.11).aspx

The simplest way to solve this is to add a schema with the guid type in it and then add the location in the import. So add a schema:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://microsoft.com/wsdl/types/" elementFormDefault="qualified" targetNamespace="http://microsoft.com/wsdl/types/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="guid">
<xs:annotation>
<xs:documentation xml:lang="en">
The representation of a GUID, generally the id of an element.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" />
</xs:restriction>
</xs:simpleType>
</xs:schema>

Then add the location to the import in the first schema:

<xs:import namespace="http://microsoft.com/wsdl/types/" schemaLocation="SimpleImport.xsd"/>

Builds!

« Older posts Newer posts »

© 2019 venneker.net

Theme by Anders NorénUp ↑