BizTalk Server General - Extra Information on Problem with Target Namespaces

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > July 2004 > Extra Information on Problem with Target Namespaces





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Extra Information on Problem with Target Namespaces
Glynn Timmins

2004-07-27, 5:53 pm

Sorry, I realised I haven't fully described the problem I'm suffering
with Target Namespaces within referenced schemas in my earlier
posting. I have two xsd schemas provided by an industrial standards
committee. For simplicity, let's call them including.xsd and
included.xsd. Of course, including.xsd includes (references)
included.xsd. Neither schema has a Target Namespace defined. Upon
loading them into Biztalk 2004, they import and validate quite
happily. However, I have a whole library of other xsd schemas that
must also include Included.xsd. They will all be contained within a
single Project, and so it's important that they have different Target
Namespaces. BizTalk help says (in "Schemas that Use other Schemas")
that Included schemas must have a blank Target Namespace, or exactly
the same Target Namespace as the including schema. Excellent! So my
solution would be to import all the schemas into the project, give
them their own Target Namespaces, and leave the Target Namespace for
Included.xsd blank.

However... you can't change the Target Namespace for Included.xsd. You
get an error message: "The attribute Targetnamespace does not match
the designated namespace URI...". I guess that's because you are
supposed to set the Target Namespace before you Include other schemas.
So the solution should therefore be to un-include included.xsd,
configure the namespace of including.xsd, then re-include
including.xsd. Can't do that either, because when you try to remove
Included.xsd from the Imports property of the including.xsd schema, I
get another error message "Schema cannot be removed. Its removal is
causing some conflict with other schemas".

So, another option might be to change the Target namespace to blank
for included.xsd. You can do that, but then Biztalk fails to resolve
the references to included.xsd within including.xsd.

I've found that I can can 'coax' Biztalk into including schemas with a
blank tns into those with a non-blank tns, but only when the schemas
are created from scratch within BTS Editor. When the xsd's are
imported from elsewhere, it's proving impossible!

SO PLEASE! I'd really appreciate of someone could help me out here.
How can I load my two schemas into Biztalk and keep the target
namespace of included.xsd blank, and set the tns of including.xsd to a
non-blank value?

Hope someone has some inspiration!

Glynn
Tatyana Yakushev [MSFT]

2004-07-28, 6:09 pm

It is not always possible to easily change target namespace of a schema if it is already used in other places.
The best solution is to change schema in notepad. (For example you can remove the include in notepad, then open schema in BizTalk Editor, you will get errors, ignore
them, then add the include again.)

There is a note about it in BizTalk documentation
***********************************
When you first create a new schema, regardless of whether it is a message schema or a property schema, it is very important to set the Target Namespace property of
the Schema node properly. You need to establish the target namespace before the schema is used by another schema with the import/include/redefine mechanisms, and
before any property promotions are defined.
***********************************

Thanks,
Tatyana

--------------------
>From: glynnatimmins@hotmail.com (Glynn Timmins)
>Newsgroups: microsoft.public.biztalk.general
>Subject: Extra Information on Problem with Target Namespaces
>Date: 27 Jul 2004 08:26:41 -0700
>Organization: http://groups.google.com
>Lines: 45
>Message-ID: <5228d043.0407270726.7d616f91@posting.google.com>
>NNTP-Posting-Host: 213.194.32.211
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1090942001 25020 127.0.0.1 (27 Jul 2004 15:26:41 GMT)
>X-Complaints-To: groups-abuse@google.com
>NNTP-Posting-Date: Tue, 27 Jul 2004 15:26:41 +0000 (UTC)
>Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!

news.maxwell.syr.edu!postnews2.google.com!not-for-mail
>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:17894
>X-Tomcat-NG: microsoft.public.biztalk.general
>
>Sorry, I realised I haven't fully described the problem I'm suffering
>with Target Namespaces within referenced schemas in my earlier
>posting. I have two xsd schemas provided by an industrial standards
>committee. For simplicity, let's call them including.xsd and
>included.xsd. Of course, including.xsd includes (references)
>included.xsd. Neither schema has a Target Namespace defined. Upon
>loading them into Biztalk 2004, they import and validate quite
>happily. However, I have a whole library of other xsd schemas that
>must also include Included.xsd. They will all be contained within a
>single Project, and so it's important that they have different Target
>Namespaces. BizTalk help says (in "Schemas that Use other Schemas")
>that Included schemas must have a blank Target Namespace, or exactly
>the same Target Namespace as the including schema. Excellent! So my
>solution would be to import all the schemas into the project, give
>them their own Target Namespaces, and leave the Target Namespace for
>Included.xsd blank.
>
>However... you can't change the Target Namespace for Included.xsd. You
>get an error message: "The attribute Targetnamespace does not match
>the designated namespace URI...". I guess that's because you are
>supposed to set the Target Namespace before you Include other schemas.
>So the solution should therefore be to un-include included.xsd,
>configure the namespace of including.xsd, then re-include
>including.xsd. Can't do that either, because when you try to remove
>Included.xsd from the Imports property of the including.xsd schema, I
>get another error message "Schema cannot be removed. Its removal is
>causing some conflict with other schemas".
>
>So, another option might be to change the Target namespace to blank
>for included.xsd. You can do that, but then Biztalk fails to resolve
>the references to included.xsd within including.xsd.
>
>I've found that I can can 'coax' Biztalk into including schemas with a
>blank tns into those with a non-blank tns, but only when the schemas
>are created from scratch within BTS Editor. When the xsd's are
>imported from elsewhere, it's proving impossible!
>
>SO PLEASE! I'd really appreciate of someone could help me out here.
>How can I load my two schemas into Biztalk and keep the target
>namespace of included.xsd blank, and set the tns of including.xsd to a
>non-blank value?
>
>Hope someone has some inspiration!
>
>Glynn
>



--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.

Glynn Timmins

2004-07-29, 2:49 am

Thanks for your response, Tatyana. I've narrowed the problem down a
little more: see my posting (yesterday) regarding hotfix 838795. That
seems to be the core of my difficulties. I have used notepad (and
alternatively XMLSpy) to change the target namespace, but the
problem's in the resolution of referenced elements.
Tatyana Yakushev [MSFT]

2004-07-29, 5:51 pm

If you have additional questions, lets continue this discussing in the other thread with more detailed information.

Thanks,
Tatyana
--------------------
>From: glynnatimmins@hotmail.com (Glynn Timmins)
>Newsgroups: microsoft.public.biztalk.general
>Subject: Re: Extra Information on Problem with Target Namespaces
>Date: 28 Jul 2004 23:37:14 -0700
>Organization: http://groups.google.com
>Lines: 5
>Message-ID: <5228d043.0407282237.2fae4247@posting.google.com>
>References: <5228d043.0407270726.7d616f91@posting.google.com> <9iJWK$NdEHA.3912@cpmsftngxa10.phx.gbl>
>NNTP-Posting-Host: 213.194.32.211
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1091083035 8991 127.0.0.1 (29 Jul 2004 06:37:15 GMT)
>X-Complaints-To: groups-abuse@google.com
>NNTP-Posting-Date: Thu, 29 Jul 2004 06:37:15 +0000 (UTC)
>Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!newsfeed.gamma.ru!Gamma.RU!

newsfeed.media.kyoto-u.ac.jp!postnews2.google.com!not-for-mail
>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:18015
>X-Tomcat-NG: microsoft.public.biztalk.general
>
>Thanks for your response, Tatyana. I've narrowed the problem down a
>little more: see my posting (yesterday) regarding hotfix 838795. That
>seems to be the core of my difficulties. I have used notepad (and
>alternatively XMLSpy) to change the target namespace, but the
>problem's in the resolution of referenced elements.
>



--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com