Monday, 11 January 2016

BizTalk XSD- Import multiple schema's with same TargetNamespace


BizTalk  XSD Schema does not allow you to Import more then one schema which has same TargetNameSpace.

There are some situation you might need to reuse the existing schema's without re-creating the same structure with another set of Target namespace.
Wonder if you ever tried to add same targetnamespace schema using VisualStudio BizTalk Project.

Here is the error message you would get it

The namespace of the schema you are trying to add clashes with one of the namespaces already declared. Please choose another Schema.





Here is the alternate way of adding multiple schema's with one unique Target Namespace.

1. Select Schema which you would like to import and find "Fully Qualified Name"
    in my Solution I have a Project called "PublishSchemaTest.Common" which has common Schemas.
   And my Fully Qualified Name is "PublishSchemaTest.Common.CommonTypes"

2. Find Schema Target NameSpace in my case it is "http://www.rajwebjunky.com/Common//Types".

3. Add your Common schema project reference
4. Now Open the Schema which you prefer to import the CommonTypes

My OrderMaster XML Edit mode looks like below.





4. Add Import Schema manually 




5. Save the File and open in BizTalk Editor Mode . Now you would be able refer the schema at "Data Structure Type"



Drop a comment if this article helps you. you can reach me @ raj.webjunky@yahoo.com



No comments:

Post a Comment