Imperialised
New Member
I am trying to modify response from a Web Service using a ClientMessageInspector. At some point I need to create a \[code\]Message\[/code\] from a modified \[code\]XMLStream\[/code\]. The content of the stream is below:\[code\]<soapenv:Envelope xmlns:soapenv="http://env" xmlns:xsd="http://xsd" xmlns:xsi="http://xsi" xmlns:v1="http://v1"> <soapenv:Body> <v1:VM> <SH> <a>aa</a> <b>bb</b> </SH> </v1:VM> </soapenv:Body></soapenv:Envelope>\[/code\]I try to create the message using:\[code\]System.Xml.XmlReader XMLReader = System.Xml.XmlReader.Create(XMLStream);Message ModifiedReply = System.ServiceModel.Channels.Message.CreateMessage(OriginalReply.Version, null, XMLReader);\[/code\]However when I print the Message content with Message.ToString() I get:\[code\]<s:Envelope xmlns:s="http://env"> <s:Header /> <s:Body> ... stream ... </s:Body></s:Envelope>\[/code\]How can I prevent "...stream..." and get the actual XML parts?