Few days ago I posted an example which shows how to implement the custom BodyWriter class which helps you to create your own messages.
Now, I found that the posted "writer" has a small problem. If the body writer creates the message body by using of following code
writer.WriteRaw(m_XDoc.OutterXml);
then it works only by sending of the message within a IClientMessageInspector. Unfortunately, if you use the same code at the service side, for example within an IDispatchMessageInspector, then the same code will NOT work. I did not investigate what the exact reason is, but following code works on both sides fine:
writer.WriteNode(new XmlNodeReader(m_XDoc.DocumentElement), true);
Posted
Apr 25 2007, 01:49 PM
by
Damir Dobric