internal bool Parse_s2sHeader(s2sMessage target, object source)
        {
            ModuleProc PROC   = new ModuleProc(this.DYN_MODULE_NAME, "Parse_s2sHeader");
            bool       result = default(bool);
            s2sHeader  s2s    = source as s2sHeader;

            try
            {
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return(result);
        }
Example #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,
                }
            });
        }
        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);
        }