public MessageEnvelope createMessage(String vl)
        {
            MessageEnvelope message = new MessageEnvelope();

            message.Id = "MsgId-" + vl;
            MessageBody     msgBody  = new MessageBody();
            MessageUserBody userBody = new MessageUserBody();

            userBody.UserBody   = new byte[] { (byte)0xFF, (byte)0xFE };
            userBody.ConsumerId = this.ToString();
            userBody.QueuePath  = "testQueuePath/Temp";
            msgBody.selectMessageUserBody(userBody);
            message.Body = msgBody;
            return(message);
        }
Ejemplo n.º 2
0
        public virtual MessageEnvelope createEnvelope()
        {
            MessageEnvelope result      = new MessageEnvelope();
            MessageBody     messageBody = new MessageBody();
            MessageUserBody userBody    = new MessageUserBody();

            System.IO.MemoryStream output = new System.IO.MemoryStream();
            encoder.encode <T>(Body, output);
            userBody.UserBody  = output.ToArray();
            userBody.SenderId  = SenderId;
            userBody.QueuePath = QueuePath;
            messageBody.selectMessageUserBody(userBody);
            result.Body = messageBody;
            result.Id   = this.Id;
            result.DeliveryReportReq = true;

            return(result);
        }