[snip] It would have been better to submit this as two bug reports.
> When bad requests are addressed to the XmlRpcServer, the XML parser > produces strange results. > > Case 1 > ------ > The client sends a wellformed XML request which content is not a > correct XML- RPC call. > The parser seems not to detect the error, and the XmlRpcHandler is > called back with data retained from a previous successful invocation > (method name). When this error occurs in the first request > processing, the handler is called with a null reference... This seems > to be a bad data state management in the server's shared workers. > > Sample client code : > > URL url = new URL(endpoint); > HttpURLConnection http = (HttpURLConnection) url.openConnection(); > http.setRequestMethod("POST"); > http.setDoOutput(true); > PrintWriter pw = new PrintWriter(http.getOutputStream()); > pw.print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"); > pw.print("<a>hello</a>"); > pw.flush(); > This seems a genuine bug in the server - it's almost certainly not a Parser bug. > Case 2 > ------ > The client request content is not XML at all. > The parser detects the invalid format, and sends back an XML-RPC fault > reporting the SAX exception. > > Sample client code : > > URL url = new URL(endpoint); > HttpURLConnection http = (HttpURLConnection) url.openConnection(); > http.setRequestMethod("POST"); > http.setDoOutput(true); > PrintWriter pw = new PrintWriter(http.getOutputStream()); > pw.print("Bye"); > pw.flush(); > This is expected behaviour and is, in my view, correct.