> We have a web service that returns a string which happens to be well formed
> XML. The client sees the string ok, except the angle brackets are HTML
> encoded ( > and < ).
>
> Is this expected behavior?
Yes. You told the framework you wanted a string, not XML. The framework had
no way to know your string contained well formed XML, so it's only option is
to encode it to ensure it doesn't generate an invalid SOAP message.
>Is there a way to configure it so that it
> doesn't do this?
Sure. Don't use a String. Use an XmlDocument or XmlNode as the type in the
WebMethod declaration.

Signature
Tomas Restrepo
tomasr@mvps.org
DotNetGruven - 29 Jun 2004 15:52 GMT
Thanks Tomas!
Made your recommended change from a return type of String to XmlDocument and
not only are the angle brackets back, but the output is very nicely
formatted.
Thanks again,
George
> > We have a web service that returns a string which happens to be well
> formed
[quoted text clipped - 12 lines]
> Sure. Don't use a String. Use an XmlDocument or XmlNode as the type in the
> WebMethod declaration.