private s2sMessage CreateS2SMessage(ref long messageId)
 {
     // prepare the target
     s2sMessage target = new s2sMessage();
     string FromSystem = BMC.CoreLib.Extensions.GetAppSettingValue("FromSystem", "BMC");
     string ToSystem = BMC.CoreLib.Extensions.GetAppSettingValue("ToSystem", "EBS");
     s2sHeader header = new s2sHeader()
     {
         
         fromSystem = FromSystem,
         toSystem = ToSystem,
         messageId = ++messageId,
     };
     s2sBody body = new s2sBody();
     target.p_header = header;
     target.p_body = body;
     target.Items = new object[] {
             header, body
         };
     return target;
 }
示例#2
0
        public BMC.EBSComms.Contracts.Messages.SMS2EBS.S2SMessagePostOperationResponse S2SMessagePostOperation(BMC.EBSComms.Contracts.Messages.SMS2EBS.S2SMessagePostOperationRequest request)
        {
            ModuleProc PROC = new ModuleProc("", "Method");

            try
            {
                Console.WriteLine("Received : " + request.Request.Request);
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            s2sMessage msg = new s2sMessage();
            s2sHeader hdr = new s2sHeader()
            {
                fromSystem = "EBS",
                toSystem = "SDS",
                dateTimeSent = DateTime.Now,
            };
            s2sBody bdy = new s2sBody()
            {
                Items = new object[] { 
                    new infoUpdate() {
                        propertyId="1313",
                        Item = new infoUpdateDataAck() {}
                    },
                },
            };
            msg.Items = new object[] { hdr, bdy };
            string resp = XmlSerializerHelper.ConvertObjectToXml(msg, null, false, false);

            return new BMC.EBSComms.Contracts.Messages.SMS2EBS.S2SMessagePostOperationResponse
            {
                Response = new BMC.EBSComms.Contracts.Dto.SMS2EBS.ResponseType_13_1()
                  {
                      Response = resp,
                  }
            };
        }