Click here to Skip to main content
12,703,067 members (28,065 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET WebService
I have a WebMethod in Webservice which is returning an XmlDocument.The Webserive works fine when i am executing it and providing the necessary parameters.

I have created a proxy to this serivce in another application.proxy is created well and good.

Now the problem is,when i try to access the methods from that serivce its getting all the methods from the service but the return type of the method is showing as XmlNode instead of XmlDocument.

Let us say for example:

public class DataService : System.Web.Services.WebService
    public XmlDocument GetData(int ID)


Now i have one windows application which is using this service.

Created an object to the serive through proxy.

DRService.DataService  drService = new DRService.DataService();

Now i am trying to access the service methods.


The return type of the above method call should be XmlDocument but it is returning XmlNode as return type.

Any idea how to solve this?
Posted 28-Jan-13 23:59pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I think that is the default behavior when you try to pass XmlDocument as either parameter or as return value. And mostly you can't do much.

You need to modify the consumer appropriately. Please refer[^]

Hope that helps

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 29 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100