Click here to Skip to main content
15,909,829 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
------------
C#
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.

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


Now i am trying to access the service methods.

C#
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

1 solution

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
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900