Yixing Ma wrote: > 1) The standard XML-RPC spec defines the array type as something like: > ********************************************************************** > <array> > <data> > <value><i4>1404</i4></value> > <value><string>Something Here</string></value> > </data> > </array> > *********************************************************************** > But I was unable to put <i4> into the array by using java Vector. I could > only put <int></int> instead of <i4>. Also the <string></string> tag in red > is missing. The blank space was replaced by " " in the generated XML.
... > Is there a way to produce the exact same XML as XML-RPC defined by using > apache's api? Your questions boil down to the customization of the generated XML. That discussion came up recently: See http://mail-archives.apache.org/mod_mbox/ws-xmlrpc-dev/200510.mbox/[EMAIL PROTECTED] for more details. As I already have explained in that thread, I'd vote against any attempt to make xml-rpc more customizable in that area by adding more and more flags like "useInt" (and not i4) or "alwaysUseString" (as opposed to omitting the unnecessary type declaration for strings), and so on. On the other hand, I am open for a solution, that allows the xml-rpc user to take over control of the serialization. If you'd like to work in that area, feel free to supply patches. However, keep in mind, that you are doing yourself no favour, when relying on such syntactical details. Best option is not to depend on a certain syntax. Jochen