473,938 Members | 41,795 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1541
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.Sel ectSingleNode(X Path 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.Sel ectSingleNode(X Path 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
6219
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 XmlNodeList nodeList = doc1.SelectNodes("//row"); foreach (XmlNode nodeCode in nodeList) { sb.Append(nodeCode.OuterXml);
7
4913
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: Value of type System.xml.xmldocument cannot be converted to System.IO.textreader. I would think this is possible to do. Code snippet is below:
2
1699
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
7650
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
1651
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 XMLNode evan though it is defined as a XMLDocument in the web server code. Any ideas?
12
5328
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
1997
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
3898
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 XMLDocument and my first question is why does this work? XmlNode neNode; neNode = myHFCService.GetPOs(); DataSet myds = new DataSet();
3
1255
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 object browser for the reference the return type is specified there as being an XmlNode. Although this isn't fatal i'd like the client program to be getting an XmlDocument back. Any ideas or pointers? Thanks, Paul. WEBSERVICE:
0
10131
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
9963
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
11284
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
10652
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9854
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...
0
7377
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
6072
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4901
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
2
4443
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.