> I am using a SOAP WebMethod -ASP.net (wse2.0)
>
[quoted text clipped - 8 lines]
> though I didnt have it when I built my response messsage.Any idea how
> to make it not indent?
How exactly did you build your response message? Truthfully, it really doesn't matter how you build it because it gets loaded into an XmlDocument (SoapEnvelope's base class), so all that is retained is the infoset representation. To the best of my knowledge, there is no way to change the formatting. If you look at SoapEnvelope.Save in ildasm you'll see that it constructs it's XmlTextWriter over a Stream and simply specifies a text encoding. It doesn't set the XmlTextWriter.Formatting property anywhere, which is what controls the text represetation of the instance document as it is output.
HTH,
Drew
Drew Marsh - 03 Nov 2004 05:36 GMT
I wrote:
> To the best of my knowledge, there is no
> way to change the formatting. If you look at SoapEnvelope.Save in
> ildasm you'll see that it constructs it's XmlTextWriter over a Stream
> and simply specifies a text encoding. It doesn't set the
> XmlTextWriter.Formatting property anywhere, which is what controls the
> text represetation of the instance document as it is output.
On and just to be clear, you *could* Save the SoapEnvelope yourself yourself by passing an XmlTextWriter implementation configured how you like to the Save(XmlWriter) overload (inherited from XmlDocument). All I'm saying is that I don't see anyway, in the default architecture. You should definitely be able to cruft together your own custom configuration to acheive this. How much work it will be, I don't know. It looks like you might want to write your own ISoapFormatter. SoapPlainFormatter for example, simply calls SoapEnvelope.Save(Stream) which does what I explained earlier.
HTH,
Drew