例如:
公共类服务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.