private void Validate(PublishedRtzMessage entity)
        {
            var msg = Serialization.ByteArrayToString(entity.Message);

            var validator = new StmSchemaValidator();

            //validate the XML against its XSD
            validator.ValidateRTZMessageXML(msg);

            //validate the message content according to our business rules
            validator.ValidateRTZMessage(msg);

            //Validate UVID between header and RTZ
            validator.ValidateUVID(entity.MessageID, msg);
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="entity"></param>
        public void InsertRTZ(UploadedMessage entity)
        {
            var msg       = Serialization.ByteArrayToString(entity.Message);
            var validator = new StmSchemaValidator();

            //validate the XML against its XSD
            validator.ValidateRTZMessageXML(msg);

            //validate the message content according to our business rules
            validator.ValidateRTZMessage(msg);

            //Validate UVID between header and RTZ
            validator.ValidateUVID(entity.MessageID, msg);

            base.Insert(entity);
        }