473,786 Members | 2,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:definitio ns>, and then output my web methods as "s0:MyWebMethod " in
<wsdl:message > sections

* At SP1, it generates xmlns:tns="http ://mynamespace/" in
<wsdl:definitio ns>, and then output my web methods as "tns:MyWebMetho d" 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 4604
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:definitio ns>, and then output my web methods as "s0:MyWebMethod "
in <wsdl:message > sections

* At SP1, it generates xmlns:tns="http ://mynamespace/" in
<wsdl:definitio ns>, and then output my web methods as
"tns:MyWebMetho d" 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: AcTkY35JG1qSfwb 1T8qg68tMZlp5YA ==
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************ *************** *******@microso ft.com>
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.publi c.dotnet.framew ork.webservices ,microsoft.publ ic.infopath
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
Path: cpmsftngxa10.ph x.gbl!TK2MSFTNG XA03.phx.gbl
Xref: cpmsftngxa10.ph x.gbl microsoft.publi c.infopath:1497 3
microsoft.publi c.dotnet.framew ork.webservices :8177
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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:definitio ns>, and then output my web methods as "s0:MyWebMethod " in
<wsdl:message > sections

* At SP1, it generates xmlns:tns="http ://mynamespace/" in
<wsdl:definitio ns>, and then output my web methods as "tns:MyWebMetho d" 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:definitio ns>, and then output my web methods as "s0:MyWebMethod "
in <wsdl:message > sections

* At SP1, it generates xmlns:tns="http ://mynamespace/" in
<wsdl:definitio ns>, and then output my web methods as
"tns:MyWebMetho d" 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: AcTkY35JG1qSfwb 1T8qg68tMZlp5YA ==
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************ *************** *******@microso ft.com>
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.publi c.dotnet.framew ork.webservices ,microsoft.publ ic.infopath
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
Path: cpmsftngxa10.ph x.gbl!TK2MSFTNG XA03.phx.gbl
Xref: cpmsftngxa10.ph x.gbl microsoft.publi c.infopath:1497 3
microsoft.publi c.dotnet.framew ork.webservices :8177
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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:definitio ns>, and then output my web methods as "s0:MyWebMethod " in
<wsdl:message > sections

* At SP1, it generates xmlns:tns="http ://mynamespace/" in
<wsdl:definitio ns>, and then output my web methods as "tns:MyWebMetho d" 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
7310
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
10043
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" xmlns:ns1="abc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes" media-type="text/xml" standalone="yes" version="1.0"/> <xsl:template match="/">
2
2704
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 element prefixed with "ns0". Is there way to do this without looping through every node? Thanks, Frank
4
20504
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 ss:Name="TKCSheet1"> </Worksheet> The existing xml doc is: <?xml version="1.0"?> <?mso-application progid="Excel.Sheet"?>
2
2012
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 get an exception saying 'A datatable named 'GrantApplication' alread belongs to this dataset'. Why is dotnet not recognizing the namespace prefix and treating these like two separate elements? Thanks for your help.
5
5738
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 which looks something like this: <?xml version="1.0" encoding="utf-8"?> <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">...
3
27063
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 = new XmlDocument(); XmlElement el = doc.CreateElement("foo:data"); doc.AppendChild(el); doc.Save("foo.xml");
18
7739
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); System.out.println(xp.evaluate(new InputSource(new FileInputStream("a.xml"))));
1
5902
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/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body>
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.