473,394 Members | 1,706 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.

XmlDocument Web method returns type XmlNode


I developed a web method that returns type XmlDocument.

But a client calling the web method will only accept the return value as
datatype XmlNode.

Why?
--
http://antimeme.texeme.com
Jul 21 '05 #1
2 1500
Could be that the client doesn't want the entire xmlDocument.
Change the return type to xmlNode

Then, take your existing xmlDocument and add the following to be returned:
xmlDocument.SelectSingleNode(XPath Expression Goes Here)

"John Bailo" wrote:

I developed a web method that returns type XmlDocument.

But a client calling the web method will only accept the return value as
datatype XmlNode.

Why?
--
http://antimeme.texeme.com

Jul 21 '05 #2
James Flynn wrote:
Could be that the client doesn't want the entire xmlDocument.
Change the return type to xmlNode

Then, take your existing xmlDocument and add the following to be returned:
xmlDocument.SelectSingleNode(XPath Expression Goes Here)
Yes, I can read it via workarounds.

It just disturbs me that an explicitly typed complex return type
XmlDocument is translated to a completely different type when creating
the web reference in the client (!)


"John Bailo" wrote:

I developed a web method that returns type XmlDocument.

But a client calling the web method will only accept the return value as
datatype XmlNode.

Why?
--
http://antimeme.texeme.com

--
http://antimeme.texeme.com
Jul 21 '05 #3

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

Similar topics

2
by: Dave | last post by:
Hi, Is there an easier way to pull a subset of nodes from one XmlDocument to another? I have the code below but would like to know if there is a more streamlined method. Thanks, Dave ...
7
by: SQLScott | last post by:
I have a Web Service in which I am trying to pass an XMLDocument as a parameter to one of the methods. I would like to use the XMLTextReader to read the XML but I am getting the following error: ...
2
by: John Bailo | last post by:
I developed a web method that returns type XmlDocument. But a client calling the web method will only accept the return value as datatype XmlNode. Why? -- http://antimeme.texeme.com
1
by: John Bailo | last post by:
I developed a web method that returns type XmlDocument. But a client calling the web method will only accept the datatype as XmlNode. Why? -- http://www.texeme.com
1
by: mike malone | last post by:
I am creating a very simple web service the recieves a XMLDocument, massages the list and returns the document. The problem is that the return type declartion in referances of the client is a...
12
by: Whoever | last post by:
Hi, I'm trying to return an XmlDocument or XmlNode converted from a typed dataset. public XmlNode whatever() { MyTypedDataSet ds = new MyTypedDataSet(); return new XmlDataDocument(ds); }
4
by: William | last post by:
I would like to pass an XmlDocument to a method as a non-referenced object. Can this be done?
5
by: GaryDean | last post by:
I have a web service method that returns an XMLDocument. The signature is: public XmlDocument GetPOs() The following client code calls this method but it accepts an XMLNode instead of an...
3
by: Carona | last post by:
Hi all, I have a web service with a method that returns a xml document, however, on the client side the result of the call to this method returns a XmlNode. If i look in the Reference.vb or the...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
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,...
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
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.