Hi everyone! Ryan and I are having little discussion about abstracting the transport layer and we think you may want to join us.
I pointed that XmlWriter shouldn't always add the XML prolog. > We decided to send an entire XML document because we > thought creating XML from a method name and method parameters was a > separate concern from transporting that XML to the server. Why would > you want to have an XML fragment or an XMLWriter? You cannot assume that lower protocol doesn't use XML. > From your message, > I assume that Jabber is an "XML based transport", does that mean this > RPC message will be turned into an XML fragment and embedded in a > larger XML document? if plugin puts RPC message into an XML document (or stream), such message would look like this: <?xml version='1.0'?> <some-protocol-specific-tag> <!-- here goes xml-rpc --> <?xml version='1.0'?> <methodName> ... You can see that's not valid XML, that's why only the plugin knows whether message should contain the prolog. The problem with the jabber-rpc is that there is a third party: jabber server, which cares about XML validity. > If this is the case then you should at least > consider writing a JabberXmlRpcClient. I can always do that, I don't need any abstraction. Imagine that someone wants to store a massage in XML document or XML DB. Again, he needs the document without the prolog. That's another reason to handle the message without the prolog until it's really needed. regards, rufio