473,396 Members | 1,832 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,396 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 1501
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
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
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,...

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.