serialization - Store And Replay WCF Messages -
I want to store WCF messages in some storage and want to read them again for "to run again" I am
Attach some code parts:
Private Zero WriteMessage (Message Message, String Path)
FileStream fileStream = New FileStream (Path, FileMode.Create);
(XmlDictionaryWriter author = XmlDictionaryWriter.CreateBinaryWriter (fileStream))
(XmlDictionaryReader Reader = Message. GetReaderAtBodyContents ())
message.WriteBodyContents ( Author) ;
Authors Flush ();
}
}}
Private Message Read Message (String Path)
(FileStream FS = Using OpenRed (Path))
Experiment (xmlsdirerreader reader = xmladderreader.cttabinereeder (fs, xmlxidereaderkotas.max))
flush ();
Message Message = Message.Scent Message (Reader, int.MaxValue, messageVersion);
Return message. Cretbuftercopy (int.MaxValue) .kat Message (); The problem is that before message archive, Message.ToString () returns the message string as it should, the whole message , But after reading it, ToString () shows the body "... stream ...." And please advise it.
Please note: -)
Please note: Only one message on "writing message" is read and written because the message is wrapped in another message. Take a look at
, you can easily store a session and then play it again. Can edit or even edit individually. Change the request and hostname etc. We use it to prepare, save, test sessions, and then repeat the sessions again to generate useful load tests.
The only downside is the evaluation version 30 minutes, but hey, if you use it all the time, then it is worth a full license cost of Rs. 50.
Comments
Post a Comment