Friday, 6 March 2009

How to remove NS0 from the Incoming or Outgoing Message of Biztalk

The concept is very simple , Just remove the TargetNamespace from your Incoming /Outgoing Message and maintain Unique Name for Root Element.

How to Remove TargetNamespace ?

Select your Schema level properties and Delete the TargetNamespace. It should be empty.

When you remove the Targetnamespace Message Type identifies your schema based on Root Name , meaning it would be a unique filed to identify the subscriber.

Complex Situations :

1) If two BizTalk Projects wants to keep similar XML Structure as incoming message , You have to change the Root Name.
2) If you want to use the schema as referenced Schemas which will not be useful.

If you look at a Message Type details in Database how BizTalk Stores internally, you can understand better. See the below image. The current scenario will store only the Root Element.

Message Type = TargetNameSpace#RootElement

Now you can Receive Incoming message as below format instead of with NS0
Same Rule apply for Outgoing message also.

but no guarantee that It performs correct action for all adapters. You need to experiment...

You can reach me @