473,394 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

The correct way to set XSD namespaces?

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,
Benjy
Jun 24 '06 #1
2 1470
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" <Bi*************@discussions.microsoft.com> wrote in
message news:F4**********************************@microsof t.com...
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,
Benjy

Jun 26 '06 #2
Thanks Priya, thats useful ....

benjy

"Priya Lakshminarayanan" wrote:
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" <Bi*************@discussions.microsoft.com> wrote in
message news:F4**********************************@microsof t.com...
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,
Benjy


Jun 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of...
24
by: Marcin Vorbrodt | last post by:
Here is an example of my code: //Header file #include <vector> using std::vector; namespace Revelation { // class definitions, etc... // class members are of type std::vector }
2
by: Mike Morse | last post by:
What see sample that show xs:element where the xs namespace = http://www.w3.org/2001/XMLSchema However, I see another example with xsi: where xsi = http://www.w3.org/2001/XMLSchema-instance ...
17
by: clintonG | last post by:
Using 2.0 with Master Pages and a GlobalBaseClass for the content pages. I understand the easy part -- the hierarchical structure of a namespace naming convention -- but the 2.0 IDE does not...
11
by: Random | last post by:
I'm confused about the proper use and usefulness of namespaces. I beleive I understand the purpose is so the developer can put classes within namespaces to essentially organize your code. And I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.