如何在ASMX Web服务上从客户端接收XML?

我有一个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;
}
sttea 回答:如何在ASMX Web服务上从客户端接收XML?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2943656.html

大家都在问