分类目录

链接

2011 年 12 月
 1234
567891011
12131415161718
19202122232425
262728293031  

近期文章

热门标签

新人福利,免费薅羊毛

现在位置:    首页 > .NET > 正文
webservice方法重载 的实现方法
.NET 暂无评论 阅读(2,440)

  1. 方法:
  2. (1)在每个方法名前,加上MessageName 属性 [WebMethod(MessageName = "不同的名称")]
  3. (2)在类名前修改WebServiceBinding,[WebServiceBinding(ConformsTo = WsiProfiles.None)]

  4. /// <summary>
  5.  
  6. /// description:ItemAddInStorage 的摘要说明
  7.  
  8. /// date:2011-12-09
  9.  
  10. /// auther:数据库之家
  11.  
  12. /// </summary>
  13.  
  14. [WebService(Namespace = "http://jewelry.sc.ufida.com.cn/")]
  15. [System.ComponentModel.ToolboxItem(false)]
  16. [WebServiceBinding(ConformsTo = WsiProfiles.None)]
  17. public class ItemAddInStorage : System.Web.Services.WebService
  18. {
  19.           [WebMethod(MessageName = "Item")]
  20.          public bool ItemInStorage(List<DB.Item> silist, string username, string password)
  21.          {         
  22.                   try         
  23.                   {         
  24.                   }  catch (Exception ex)
            {
                 throw new Exception(ex.Message);
             }
  25.          }

  1.    [WebMethod(MessageName = "BareDrill")]
  2.         public bool ItemInStorage(List<DTO.BareDrill> list, string username, string password)
  3.         {
  4.             try
  5.             {
  6.             }catch (Exception ex)
  7. {
               throw new Exception(ex.Message);
          }

============ 欢迎各位老板打赏~ ===========

本文版权归Bruce's Blog所有,转载引用请完整注明以下信息:
本文作者:Bruce
本文地址:webservice方法重载 的实现方法 | Bruce's Blog

发表评论

留言无头像?