예제 #1
0
        public static void TestReadMessages(IMessageReader messageReader)
        {
            IMessageReader _messageReader = messageReader;

            _messageReader.ReadMessage();

            XmlDocument messageXML = new XmlDocument();

            messageXML.Load(@"C:\Temp\RequestMessage_1423572802_File187E1E8A7F16147A6B87962E07933B406_acknowledgement_20150210125836_.xml");

            string[] results = _messageReader.GetMessageResults <string[]>();

            foreach (var s in results)
            {
                Console.WriteLine(s);
            }

            // GovTalkMessage message = _messageReader.Message(messageXML.ToXDocument());

            string bodytype = _messageReader.GetBodyType();

            Console.WriteLine(bodytype);

            ErrorResponse err = _messageReader.GetBody <ErrorResponse>();
        }