Esempio n. 1
0
 /// <summary>
 /// 将请求消息转换成目标服务的输入参数
 /// </summary>
 /// <param name="asm"></param>
 /// <param name="request"></param>
 /// <returns></returns>
 private static Object GetRequest(SoapClientItem soapClient, ESB.Core.Schema.服务请求 request)
 {
     object target = null;
     try
     {
         target = soapClient.CreateRequestObject();
         if (target != null)
         {
             soapClient.SetReqObjProperty(target, "主机名称", request.主机名称);
             soapClient.SetReqObjProperty(target, "服务名称", request.服务名称);
             soapClient.SetReqObjProperty(target, "方法名称", request.方法名称);
             soapClient.SetReqObjProperty(target, "消息内容", request.消息内容);
             soapClient.SetReqObjProperty(target, "密码", request.密码);
             soapClient.SetReqObjProperty(target, "请求时间", request.请求时间);
         }
     }
     catch (Exception ex)
     {
         XTrace.WriteLine("构造请求参数失败:" + ex.Message);
     }
     return target;
 }
Esempio n. 2
0
 /// <summary>
 /// 将请求消息转换成目标服务的输入参数
 /// </summary>
 /// <param name="asm"></param>
 /// <param name="request"></param>
 /// <returns></returns>
 private static Object GetRequest(SoapClientItem soapClient, ESB.Core.Schema.服务请求 request)
 {
     object target = null;
     try
     {
         target = soapClient.CreateRequestObject();
         if (target != null)
         {
             soapClient.SetReqObjProperty(target, "主机名称", request.主机名称);
             soapClient.SetReqObjProperty(target, "服务名称", request.服务名称);
             soapClient.SetReqObjProperty(target, "方法名称", request.方法名称);
             soapClient.SetReqObjProperty(target, "消息内容", request.消息内容);
             soapClient.SetReqObjProperty(target, "密码", request.密码);
             soapClient.SetReqObjProperty(target, "请求时间", request.请求时间);
         }
     }
     catch (Exception ex)
     {
         XTrace.WriteLine("构造请求参数失败:" + ex.Message);
     }
     return target;
 }