You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-auto@ws.apache.org by "Jochen Wiedmann (JIRA)" <xm...@ws.apache.org> on 2008/08/05 16:48:44 UTC

[jira] Resolved: (XMLRPC-154) ClassCastException getting faultCode in XmlResponseParser.addResult

     [ https://issues.apache.org/jira/browse/XMLRPC-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Wiedmann resolved XMLRPC-154.
------------------------------------

    Resolution: Invalid

Must be fixed in Bugzilla code.


> ClassCastException getting faultCode in XmlResponseParser.addResult
> -------------------------------------------------------------------
>
>                 Key: XMLRPC-154
>                 URL: https://issues.apache.org/jira/browse/XMLRPC-154
>             Project: XML-RPC
>          Issue Type: Bug
>          Components: Source
>    Affects Versions: 3.1
>         Environment: Windows server 2003
>            Reporter: Wes
>
> In 3.1 XmlRpcResponseParser.addResult(Object), the following unguarded code throws a ClassCastException:
> 			Integer faultCode = (Integer) map.get("faultCode");
> The server (in this case Bugzilla::WebService::Bug::get_bugs.pm) might be using the wrong type (String) for faultCode , but this exception hides the true error being reported so it would be nice if the code were guarded.
> I'm using binaries from xmlrpc-3.1-bin.tar.gz.  
> (As an aside, I can't figure out what Object[] to send to get_bugs: neither Integer nor String works.)
> java.lang.ClassCastException: java.lang.String incompatible with java.lang.Integer
> 	at org.apache.xmlrpc.parser.XmlRpcResponseParser.addResult(XmlRpcResponseParser.java:58)
> 	at org.apache.xmlrpc.parser.RecursiveTypeParserImpl.endValueTag(RecursiveTypeParserImpl.java:71)
> 	at org.apache.xmlrpc.parser.XmlRpcResponseParser.endElement(XmlRpcResponseParser.java:183)
> 	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:175)
> 	at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)
> 	at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
> 	at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:44)
> 	at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
> 	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
> 	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
> 	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
> Thanks,
> Wes

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.