博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
关于webservice不支持方法重载的解决办法
阅读量:7238 次
发布时间:2019-06-29

本文共 816 字,大约阅读时间需要 2 分钟。

 

由于用到方法重载,没想到在web服务中会出现错误:
System.Data.DataTable Get_SendedEmail(Int32, System.String) 和 System.Data.DataTable Get_SendedEmail(Int32) 同时使用消息名称“Get_SendedEmail”。使用 WebMethod 自定义特性的 MessageName 属性为方法指定唯一的消息名称。
原来,必须在方法中指定messagename来用户唯一标识且在类中指示不支持1.1标准
[WebService(Namespace = 
"
http://www.efreer.cn/
")]
//
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[WebServiceBinding(ConformsTo = WsiProfiles.None)]
public 
class email : System.Web.Services.WebService
[WebMethod(Description = 
"
发件箱(返回table)
",
MessageName=
"
qq
")]
  
public  DataTable Get_SendedEmail(
int userid)
  {
      
return email_BLLSub.Get_SendedEmail(userid); 
  } 
[WebMethod(Description = 
"
发件箱(返回table)
"
MessageName 
"
yy
")]
  
public DataTable Get_SendedEmail(
int userid,
string 
where)
  {
      
return email_BLLSub.Get_SendedEmail(userid,
where); 
  } 

 

 

转载地址:http://uylfm.baihongyu.com/

你可能感兴趣的文章
PHP中把一个文件夹下的一个文件移动到另一个文件夹
查看>>
关于点击空白关闭弹窗的js写法推荐
查看>>
PAT1009
查看>>
根据抓的包用代码模拟登录
查看>>
html中的src与href的区别
查看>>
Base64编码
查看>>
Installing Chocolatey
查看>>
python3+spark2.1+kafka0.8+sparkStreaming
查看>>
jstl自己定义函数的使用
查看>>
使用Visual Studio Code调试React Native报错
查看>>
FineUI 将不再内置 ExtJS (严格遵守 ExtJS 的开源规则)
查看>>
javascript 中contentWindow和 frames和iframe之间通信
查看>>
取得正在运行的Activity
查看>>
UVA 103 Stacking Boxes 套箱子 DAG最长路 dp记忆化搜索
查看>>
二分-hdu-4768-Flyer
查看>>
IE下target获得焦点时存在虚线的问题
查看>>
Web App开发入门
查看>>
PHP实现金额数字转换成大写函数
查看>>
IE读取并显示本地图像文件的方法
查看>>
自学android半年,已从.net转型成android程序员,分享下这个过程
查看>>