我有一个Web服务(ASMX),我希望我的代码能够从该Web服务访问原始XML。我该怎么办?
[WebMethod]
public sendAttachmentResponse sendAttachments(sendAttachmentRequest request)
{
/***********************************************************/
// somewhere around here I would like to be able to get the XML that was actually sent
// by the client,not the serialization of the "request" parameter
/************************************************************/
var response = new sendAttachmentResponse ();
response.header = new responseHeader();
try
{
using(var repo = new DB())
{
repo.SendAttachmentsrequest(request);
}
response.header.status = "OK";
}
catch(Exception ex)
{
response.header.status = "KO";
response.header.errorCode = ex.HResult.ToString();
response.header.errorDescription = ex.Message;
}
return response;
}