是否有一种方式来获得从一个ASP.NET WebMethod的原始SOAP请求? [英] Is there a way to get the raw SOAP request from within a ASP.NET WebMethod?

查看:176
本文介绍了是否有一种方式来获得从一个ASP.NET WebMethod的原始SOAP请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如:

 公共类服务1:System.Web.Services.WebService
{
   [WebMethod的]
   公众诠释添加(INT X,int y)对
   {
       字符串请求= getRawSOA prequest(); //你怎么能实现这部分?
       // ..做一些完整的SOAP请求

       INT总和= X + Y;
       返回总和;
   }
}
 

解决方案

是的,你可以使用SoapExtensions做到这一点。下面是一个贯穿始终的过程不错的文章

Example:

public class Service1 : System.Web.Services.WebService
{
   [WebMethod]
   public int Add(int x, int y)
   {
       string request = getRawSOAPRequest();//How could you implement this part?
       //.. do something with complete soap request

       int sum = x + y;
       return sum;
   }
}

解决方案

Yes, you can do it using SoapExtensions. Here's a nice article that runs through the process.

这篇关于是否有一种方式来获得从一个ASP.NET WebMethod的原始SOAP请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆