Consider the following: I have BizTalk project and inside it I have placed xsd schemas for messages. Those schemas are in namespace "A". I have another web service, it uses datacontract with namespaces "A" too. So when I add a service reference to the first 开发者_StackOverflow中文版project which is Biztalk, VS generates schemas for datacontracts that are in the second project. Thus I have 2 schemas with the same namespace and root element.
OK I think I can see your problem now. My question would then be why do you have the name-clash in the first place? If the generated schemas are generated from a running instance of your service then you do not need to code your own schemas, you can just use the generated ones.
Or, I can understand this a different way: the schemas you have developed are for a different purpose, but they just happen to share the same root node name and namespace as the generated schemas. In this case you should refactor your non-generated schemas by either changing the target namespace and/or the root node name.
It is best practise never to re-use target namespaces across messages in BizTalk server. Infact when you build your solution the compiler issues a warning when you do this.
Is this possible for you to do this?
精彩评论