rufio wrote: > 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.
Yes you can - that's what the XML-RPC specification says. > >> 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. Yes but this isn't XML-RPC and XML-RPC is what the Apache code is supposed to implement. > >> 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. Currently the Apache XML-RPC implementation *has* to generate an XML declaration because it uses the 8859-1 encoding. It therefore has to generate an encoding attribute in the declaration. If we were to change this it would remove the need for the encoding attribute (there are several options which would allow this) and we would "accidentally" solve your problem. John Wilson The Wilson Partnership http://www.wilson.co.uk