I have a .NET web service that returns an object and I get an XML response. I am trying to debug because the response is receiving the correct XML on one machine, but not on another.
I would like to print the XML that is going to be returned from the web service right before the return statement on the web service side. Is there any way to do this?
[WebGet(UriTemplate = MY_URI_TEMPLATE)]
public MyReturnObject DoUpdate(string myParam)
{
...
MyReturnObject retVal = new MyReturnObject(myParam)
//I want to print the XML that is going to be returned for MyReturnObject here
return retVal;
}
How about using the DataContractSerializer. Something along these lines