Click here to Skip to main content
11,641,209 members (64,869 online)
Rate this: bad
good
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:

Service.asmx
------------
public class DataService : System.Web.Services.WebService
{
    [WebMethod]
    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.

drService.GetData(1)

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 22:59pm

1 solution

Rate this: bad
good
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 http://support.microsoft.com/kb/330600[^]

Hope that helps
Milind
  Permalink  

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

  Print Answers RSS
0 Mika Wendelius 400
1 OriginalGriff 205
2 DamithSL 203
3 CPallini 185
4 Afzaal Ahmad Zeeshan 129
0 Mika Wendelius 400
1 OriginalGriff 205
2 DamithSL 203
3 CPallini 185
4 Afzaal Ahmad Zeeshan 129


Advertise | Privacy | Mobile
Web03 | 2.8.150731.1 | Last Updated 29 Jan 2013
Copyright © CodeProject, 1999-2015
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