1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Services;
- /// <summary>
- /// WebService 的摘要说明
- /// </summary>
- [WebService(Namespace = "http://tempuri.org/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。
- // [System.Web.Script.Services.ScriptService]
- public class WebService : System.Web.Services.WebService {
-
- public WebService () {
- //如果使用设计的组件,请取消注释以下行
- //InitializeComponent();
- }
- [WebMethod]
- public string HelloWorld() {
- return "Hello World";
- }
- [WebMethod]
- public string CallInterface(string msgHeader, string msgBody)
- {
- if (string.IsNullOrWhiteSpace(msgHeader))
- return "空入参";
- string msgID = "";
- SI.Common.SILogUtil.Debug(msgHeader);
- SI.Common.SILogUtil.Debug(msgBody);
-
- try
- {
- Common com=new Common();
- var tmp = com.Resolve(msgHeader, msgBody);
- msgID = tmp.MsgConID;
- SqlQuery query = new SqlQuery();
- //ReciveEntity rec = new ReciveEntity();
- string rtn = string.Format(Common.MsgRtnEntity, Guid.NewGuid(), DateTime.Now, "AA", tmp.MsgConID, "接收成功");
- tmp.ReplyMsg = rtn;
- query.SaveQuery(tmp);
- return rtn;
- }
- catch(Exception ex)
- {
- string rtn = string.Format(Common.MsgRtnEntity, Guid.NewGuid(), DateTime.Now, "AE", msgID, ex.Message);
- return rtn;
- }
-
- }
-
- }
|