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

WSDL ElementForm Unqualified

Hi -

I have a webservice with WSDL specifying 'elementFormDefault' set to
'unqualified'. I find when I try to process the incoming XML the raw XML
either looks like this:

<s0:rootelement xmlns:s0="myns">
<ChildElement></ChildElement>
</s0:rootelement >

or like this:

<rootelement xmlns="http://tempuri.org/">
<ChildElement></ChildElement>
</rootelement >

So far the only way I can deal with it which works consistently is like this:

XmlNode node = nodeInput.SelectSingleNode("/element");
if (node == null) {
XmlNamespaceManager mgr = new XmlNamespaceManager(node
..OwnerDocument.NameTable);
mgr.AddNamespace("ns", "myns");
node = nodeInput.SelectSingleNode("/ns:element", mgr);
}
which seems wrong. Is there a way of reading the nodes from an XPath which
doesn't require the 'if'?

Thanks,

Simon
Nov 23 '05 #1
1 1987
Hello Simon,
No there is not. Also, its probably not the right thing to do however
to have it set to unqualified... That seems to deviate from the design principle
that wsdl is a contract and clients need to adhere to it. What that essentially
means is you're letting clients send any xml that 'looks' like what the server
expects and the service is having to deal with the various clients.

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi -

I have a webservice with WSDL specifying 'elementFormDefault' set to
'unqualified'. I find when I try to process the incoming XML the raw
XML either looks like this:

<s0:rootelement xmlns:s0="myns">
<ChildElement></ChildElement>
</s0:rootelement >
or like this:

<rootelement xmlns="http://tempuri.org/">
<ChildElement></ChildElement>
</rootelement >
So far the only way I can deal with it which works consistently is
like this:

XmlNode node = nodeInput.SelectSingleNode("/element");
if (node == null) {
XmlNamespaceManager mgr = new XmlNamespaceManager(node
.OwnerDocument.NameTable);
mgr.AddNamespace("ns", "myns");
node = nodeInput.SelectSingleNode("/ns:element", mgr);
}
which seems wrong. Is there a way of reading the nodes from an XPath
which doesn't require the 'if'?

Thanks,

Simon


Nov 23 '05 #2

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

Similar topics

6
by: trexim | last post by:
Hi, I am trying to create a Web Reference for CSTA using the URL http://www.ecma-international.org/standards/ecma-348/csta-wsdl/csta-wsdl-all-operations.wsdl Visual .Net complains that: "...
5
by: Jeff | last post by:
We are using .Net and the wsdl Utility to generate proxies to consume web services built using the BEA toolset. The data architects on the BEA side create XML schemas with various entities in...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project by serveraddresss?wsdl, it gives me following error: Custom tool...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project, it gives me following error: Custom tool error: Unable to import...
1
by: E11 | last post by:
Hi all, I am composing a SOAP request message from a WSDL definition, and it seems that my concept of namespaces is wrong. The "types" section of the WSDL definition is as follows: ...
5
by: CindyRob | last post by:
Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET 2003, hotfixes 892202 and 823639. I create a proxy class using wsdl.exe, and in the serialized XML request, I see...
3
by: jparulan | last post by:
Hi All, I'm using SOAP3.0. I was able to successfully call a WSDL file and get a value properly. But when the WSDL changed to have a MULTIPLE <element name> it was failing. This code works...
3
by: Siva | last post by:
Hi all, I want to Convert a WSDL to a SOAP message. Is there any way to do this. I am using .NET 2.0 Thanks in Advance Siva
2
by: =?Utf-8?B?TWlnaHR5IE1hcms=?= | last post by:
I'd like to generate my WebService interface from an XSD schema. Here's what I've done: 1. created a XML file 2. use the xsd.exe to generate the XSD: C:\>xsd my.xml 3. my.xsd is generated 4....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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
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.