all groups > dotnet xml > june 2006 >
You're in the

dotnet xml

group:

The correct way to set XSD namespaces?


The correct way to set XSD namespaces? BizTalk Benjamin
6/24/2006 7:47:02 AM
dotnet xml:
Hi, I have created a set of schemas for messages that i need to exchange
between services. I set the targetNamespace ="http://mycompany/services/abc"
and the root elements have names like FindCustomerRequest,
FindCustomerResponse, CreateCustomerRequest and so on.

In Biztalk when a message of any of the above comes in, it validates
correctly because the engine sets the subscription to
"http://mycompany/services/abc#FindCustomerRequest" .

I also managed to create a webservice with these XSDs. However when creating
a proxy i got an error saying that the targetNamespace was duplicated across
schemas. The only way the system will allow me to proceed is if i change the
targetNamespace of everyone of them and add something to it (for instance,
the root element name) . Is this behavior expected? Should i make every
targetnamespace unique? the thing is, all the XSDs import an architectural
schema which defines the core types and there isnt anything special in the
XSD which is why i left the targetNamespace to be common. Perhaps this is the
wrong approach/

Anyone care to comment?

TIA,
Re: The correct way to set XSD namespaces? Priya Lakshminarayanan
6/26/2006 10:05:56 AM
If two schemas A and B have a import relationship where A imports B, then
their targetNamespaces should be different. If you want to keep their
targetNamespace the same, you should use xs:include and not xs:import. ie A
includes B

Thanks,
Priya

"BizTalk Benjamin" <BizTalkBenjamin@discussions.microsoft.com> wrote in
message news:F4AE9C6E-3895-4EBA-AC7D-BBBDA10EFBEA@microsoft.com...
[quoted text, click to view]

Re: The correct way to set XSD namespaces? BizTalk Benjamin
6/27/2006 4:27:02 AM
Thanks Priya, thats useful ....

benjy

[quoted text, click to view]
AddThis Social Bookmark Button