Say I have the standard Service.svc deployed like this:
public class Service1 : IService1
{
public string GetData(int value)
{
return string.Format("You entered: {0}", value);
}
public CompositeType GetDataUsingDataContract(CompositeType composite)
{
if (composite == null)
{
throw new ArgumentNullException("composite");
}
if (composite.BoolValue)
{
composite.StringValue += "Suffix";
}
return composite;
}
}
and a client like this:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
ServiceReference1.Service1Client s1 = new ServiceReference1.Service1Client();
string str = s1.GetData(1);
}
}
The web service returns the following text to the str variable (as expected): "You entered: 1". How do I see the SOAP/XML that was generated?
I realise I could use Fiddler, however I want to see it in .NET i.e. returned to the str variable..