473,327 Members | 2,025 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,327 software developers and data experts.

Namespace prefix change

jb
I have discovered that when the WSDL is auto-generated in .NET (i.e.
http://.../MyService.asmx?WSDL):

* Prior to SP1, it generated xmlns:s0="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as "s0:MyWebMethod" in
<wsdl:message> sections

* At SP1, it generates xmlns:tns="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as "tns:MyWebMethod" in
<wsdl:message> sections

So the namespace is the same, but the namespace *prefix* has changed from
"s0" to "tns".

This is causing problems with external integrations (InfoPath, as it happens).

Is there anything I can do about this, e.g. get it now to use "s0" again if
that's what I want? And/or, why the change?
Nov 23 '05 #1
4 4566
jb wrote:
I have discovered that when the WSDL is auto-generated in .NET (i.e.
http://.../MyService.asmx?WSDL):

* Prior to SP1, it generated xmlns:s0="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as "s0:MyWebMethod"
in <wsdl:message> sections

* At SP1, it generates xmlns:tns="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as
"tns:MyWebMethod" in <wsdl:message> sections

So the namespace is the same, but the namespace *prefix* has changed
from "s0" to "tns".

This is causing problems with external integrations (InfoPath, as it
happens).

Is there anything I can do about this, e.g. get it now to use "s0"
again if that's what I want? And/or, why the change?


While I realize you obviously have a problem and I'm sympathetic to that,
the changing of a prefix really shouldn't matter in terms of XML. The prefix
is just an alias within the scope of declaration in the instance document.
You can technically have infinite prefixes in an instance document that point
to the same namespace URI.

That said, I don't know exactly what the InfoPath side is doing, but I know
InfoPath is aware of namespaces. Can you give more detail on what the error
is? Also, I don't know of any way to change the prefix that the WSDL generator
uses since, from it's perspective (which is correct), the prefix used really
doesn't matter.

Cheers,
Dre

Nov 23 '05 #2
What is the infopath issue?
--------------------
Thread-Topic: Namespace prefix change
thread-index: AcTkY35JG1qSfwb1T8qg68tMZlp5YA==
X-WBNR-Posting-Host: 82.152.32.104
From: "=?Utf-8?B?amI=?=" <jb@discussions.microsoft.com>
Subject: Namespace prefix change
Date: Fri, 17 Dec 2004 10:09:04 -0800
Lines: 20
Message-ID: <FD**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups:
microsoft.public.dotnet.framework.webservices,micr osoft.public.infopath
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.infopath:14973
microsoft.public.dotnet.framework.webservices:8177
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I have discovered that when the WSDL is auto-generated in .NET (i.e.
http://.../MyService.asmx?WSDL):

* Prior to SP1, it generated xmlns:s0="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as "s0:MyWebMethod" in
<wsdl:message> sections

* At SP1, it generates xmlns:tns="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as "tns:MyWebMethod" in
<wsdl:message> sections

So the namespace is the same, but the namespace *prefix* has changed from
"s0" to "tns".

This is causing problems with external integrations (InfoPath, as it
happens).

Is there anything I can do about this, e.g. get it now to use "s0" again if
that's what I want? And/or, why the change?

Nov 23 '05 #3
jb
Thanks, Drew.

Yes, you'd think the prefixes wouldn't matter, but they do in practice for
InfoPath stuff (as explained a bit more in my other reply below).

I've come to the same conclusion as you say: I don't see how to influence
them. Given which, I have decided I have no option but to say my InfoPath
solution will require .NET SP1.

"Drew Marsh" wrote:
jb wrote:
I have discovered that when the WSDL is auto-generated in .NET (i.e.
http://.../MyService.asmx?WSDL):

* Prior to SP1, it generated xmlns:s0="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as "s0:MyWebMethod"
in <wsdl:message> sections

* At SP1, it generates xmlns:tns="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as
"tns:MyWebMethod" in <wsdl:message> sections

So the namespace is the same, but the namespace *prefix* has changed
from "s0" to "tns".

This is causing problems with external integrations (InfoPath, as it
happens).

Is there anything I can do about this, e.g. get it now to use "s0"
again if that's what I want? And/or, why the change?


While I realize you obviously have a problem and I'm sympathetic to that,
the changing of a prefix really shouldn't matter in terms of XML. The prefix
is just an alias within the scope of declaration in the instance document.
You can technically have infinite prefixes in an instance document that point
to the same namespace URI.

That said, I don't know exactly what the InfoPath side is doing, but I know
InfoPath is aware of namespaces. Can you give more detail on what the error
is? Also, I don't know of any way to change the prefix that the WSDL generator
uses since, from it's perspective (which is correct), the prefix used really
doesn't matter.

Cheers,
Drew

Nov 23 '05 #4
jb
The InfoPath are so numerous I can't type it all in; in fact, I can't even
track them all down.

One example: IP saves the text of a condition you type in. If the namespace
prefix gets changed later, it can no longer match up the condition against
the "tree" it maintains of the source's data fields. There are plenty other
cases that go wrong. I'm most worried about the ones that only show up after
a while of testing.

Since I can't seem to influence the WSDL generation, I seem to have little
choice but to require that users of my InfoPath solution must have .NET SP1,
and that's that. So I'm changing all my sources to use the new "tns" prefix
instead of the old "s0".

"Dan Rogers" wrote:
What is the infopath issue?
--------------------
Thread-Topic: Namespace prefix change
thread-index: AcTkY35JG1qSfwb1T8qg68tMZlp5YA==
X-WBNR-Posting-Host: 82.152.32.104
From: "=?Utf-8?B?amI=?=" <jb@discussions.microsoft.com>
Subject: Namespace prefix change
Date: Fri, 17 Dec 2004 10:09:04 -0800
Lines: 20
Message-ID: <FD**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups:
microsoft.public.dotnet.framework.webservices,micr osoft.public.infopath
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.infopath:14973
microsoft.public.dotnet.framework.webservices:8177
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I have discovered that when the WSDL is auto-generated in .NET (i.e.
http://.../MyService.asmx?WSDL):

* Prior to SP1, it generated xmlns:s0="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as "s0:MyWebMethod" in
<wsdl:message> sections

* At SP1, it generates xmlns:tns="http://mynamespace/" in
<wsdl:definitions>, and then output my web methods as "tns:MyWebMethod" in
<wsdl:message> sections

So the namespace is the same, but the namespace *prefix* has changed from
"s0" to "tns".

This is causing problems with external integrations (InfoPath, as it
happens).

Is there anything I can do about this, e.g. get it now to use "s0" again if
that's what I want? And/or, why the change?

Nov 23 '05 #5

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

Similar topics

1
by: Romeo Disca | last post by:
Hello newsgroup, i'm new to xml - what's wrong with this piece code here? i have these two files: test.xml ---- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE a SYSTEM "test.ent"
3
by: Mike Dickens | last post by:
hi, i'm sure this has come up before but havn't managed to find an answer. if i have the following xslt <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet method="xml" version="1.0"...
2
by: Frank Wilson | last post by:
Is there a way to change the namespace prefix of a document? I am sending a document to an application that requires that every element be prefixed with "sm". My inbound document has every...
4
by: Krishna Tulasi via .NET 247 | last post by:
Hi, I am having trouble with creation of XML programmatically using .NET. Specifically Im trying to create an element which looks like below and insert into an existing xml doc: <Worksheet...
2
by: Dale Anderson | last post by:
I have a schema that I'm trying to read. The schema has an element named 'GrantApplication' and one with a namespace prefix named 'SF424:GrantApplication'. When I try to read this schema in, I...
5
by: pneumoconi | last post by:
I've read a lot of posts on this subject each with a slightly different issue and from what I gather my code is fine. But its not. I'm trying to pull out the SQL query from a SQL report document...
3
by: Andy Fish | last post by:
Hi, I am creating a new XmlDocument from scratch, but I can't see how I can make a namespace declaration and associate a prefix with it. For instance in the following example: XmlDocument doc...
18
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr);...
1
by: Tanja Schaettler | last post by:
Hello! I have an existing SOAP message which looks like: <?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.