[ http://issues.apache.org/jira/browse/XMLRPC-13?page=all ]
     
Jochen Wiedmann closed XMLRPC-13:
---------------------------------

    Resolution: Fixed
     Assign To:     (was: rpc-dev mailing list)

It is quite likely, that this problem no longer applies with versions 2 and 3. 
Consequently, I am closing the issue now. If required, please reopen.


> Unexpected XML parser behavior
> ------------------------------
>
>          Key: XMLRPC-13
>          URL: http://issues.apache.org/jira/browse/XMLRPC-13
>      Project: XML-RPC
>         Type: Bug

>   Components: Source
>     Versions: unspecified
>  Environment: Operating System: Windows NT/2K
> Platform: PC
>     Reporter: Philippe Maseres
>  Attachments: Base64.patch, Base64Test.patch
>
> 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();
> 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();
> I think these two cases should be handled both as a same invalid invocation. 
> The client seems not to use the XML-RPC protocol, for instance because of a 
> bad 
> url configuration, and i'm not sure answering an XML-RPC fault is the best 
> way. 
> I'd prefer the XmlRpcServer to throw a specific java exception, and thus give 
> the main program (in our case, servlets) a chance to handle the error at the 
> lower HTTP level. In deed, any IO exception during the XML/XML-RPC parsing 
> could also be processed this way.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to