IgnoreNamespaceForLinks property in BizTalk Mapper

Recently, I faced an issue related to BizTalk mapper, where I had a composite schema created for WCF-SQL Insert operation. I have four Insert operations.

When I tried to connect a node from the source schema to the destination schema of the first record, we would be able to create the link. As shown below.

But when I want to link a node from the source to the second/third/fourth record of the destination, I would not be able to create the link. The link would get dropped when I tried to connect.

 The reason behind this is, when we create a link, the link is created in the mapper as:
open the map in xml editor to see the link details)

<Link LinkID="19" LinkFrom="/*[local-name()='&lt;Schema&gt;']/*[local-name()='EFACT_D03A_IFTSTA']/*[local-name()='BGM']/*[local-name()='C106']/*[local-name()='C10603']"LinkTo="/*[local-name()='&lt;Schema&gt;']/*[local-name()='IFTSTA_CompositeLVL3']/*[local-name()='Insert']/*[local-name()='Rows']/*[local-name()='BGM_Message']/*[local-name()='BGM_Table_Alias_id']" />

Since we have multiple Insert nodes under IFTSTA node, Visual Studio doesn’t allow the link to be created because during the runtime the engine gets confused to which node should it connect to and can give you runtime exceptions.

To achieve such a scenario, we would have to utilize the “IgnoreNamespaceForLinks” property. We have different namespace for each and every insert record including namespaces will make the link unique and engine will be able to resolve the correct node during runtime. By default the “IgnoreNamespaceForLinks” property is “True”. This property can be found in grid properties of the map.

Once, we set this property to “False”, our scenario will work, as the namespaces will be included in the link.

<Link LinkID="19" LinkFrom="/*[local-name()='&lt;Schema&gt;' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006']/*[local-name()='EFACT_D03A_IFTSTA' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006']/*[local-name()='BGM' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006']" LinkTo="/*[local-name()='&lt;Schema&gt;' and namespace-uri()='http://IFTSTA.IFTSTA_LVL3']/*[local-name()='IFTSTA_CompositeLVL3' and namespace-uri()='http://IFTSTA.IFTSTA_LVL3']/*[local-name()='Insert' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/BGM_Message']/*[local-name()='Rows' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/BGM_Message']/*[local-name()='BGM_Message' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo']/*[local-name()='BGM_Source_Table_Alias_2_id' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/Types/Tables/dbo']"/>

After this change, I would be able to create link with the source schema to any record of the destination schema, as below 

Hope this is useful for BizTalk developers like me. Happy BizTalking!!

 Written by
   Shashidharan Krishnan

Reviewed by
   Shailesh Agre

Microsoft GTSC



Comments (2)

  1. this is a feature which is not well known but very useful. Great post.

  2. Vipul says:

    Saved us a ton of time!! Thanks a lot!

Skip to main content