I have read a few post about this (on stackoverflow as well) and cant seem to get a relevant solution.
I have a standard .NET web service that has one method as below:
[WebMethod]
public SupplyResponseMessage GetSupply(SupplyRequestMessage SupplyRequest)
{
...
}
To debug it, im using log4net writing to a log file and I want it to log the serialized SupplyRequestMessage (hoping in XML) as well, but cant seem to get access to the current HttpContext to do so. What is the recommended way to log the incoming XML that the web service deserializes to create the SupplyRequestMessage object?
SOLUTION
I found exactly what I was looking for in the SoapExtensionAttribute. Here is an article that will help anyone looking for something similar:
Efficient Tracing Using SOAP Extensions in .NET