Rant continued again: Don't put XML in Strings

Shaun's post reminds me of two points to make about my aversion to HTML-encoding XML into strings and then returning the strings from your Web service instead of returning the XML:

  1. Web services are all about wire format and are not about what objects you use to expose our consume your Web service.  That is why SOAP 1.2 is called SOAP and not the Simple Object Access Protocol.  So the fact that an Account object was used in .NET and that you are consuming the Web service on something other than .NET is beside the point.  You did not mention what toolkit you are using, but pretty much all of them can deal with XML in the body of the request as well as they can deal with an HTML-encoded string in one of the text nodes in the XML in the body of the request.
  2. This is not just advice for those of you using .NET to create Web services.  This applies to ALL Web services on all platforms.