Kuddi: Report wrong code of xmlrpc

"Weerayut Youngklai" <[email protected]> Thu, 15 May 2003 05:13:29 +0700
Newsgroups gmane.comp.java.enhydra.kxmlrpc
Message-ID <[email protected]>
<html><div style='background-color:'><DIV>Hello,<BR>&nbsp;According the XML-RPC specification: Updated 10/16/99 DW and your implementation kXmlRPC version 0.6.&nbsp; I have found something mis-understand the XMLRPC spec are not fix the number of &lt;param&gt;..&lt;/param&gt; as following this sentense.</DIV>
<DIV>&nbsp;</DIV>
<DIV>XML-RPC specification:<BR>If the procedure call has parameters, the &lt;methodCall&gt; must contain a &lt;params&gt; sub-item. <BR>The &lt;params&gt; sub-item can contain any number of &lt;param&gt;s, each of which has a &lt;value&gt;. </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;My english language is not quite good, If you think that your implementation is correct. I would say apologize to you.<BR>By the way, same kxmlRPC implement have one think shall be wrong in XmlRpcParser.java file in the parseParams() method.</DIV>
<DIV>136&nbsp;&nbsp;&nbsp; void parseParams() throws IOException {<BR>137&nbsp;parser.read( Xml.START_TAG, "", "params" );<BR>138&nbsp;parser.skip();<BR>139<BR>140&nbsp;while( parser.peek().getType() != Xml.END_TAG ) {<BR>141&nbsp;&nbsp;&nbsp;&nbsp; parser.read( Xml.START_TAG, "", "param" );<BR>142&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Retrieve a Java representation of the XML-RPC parameter value<BR>143&nbsp;&nbsp;&nbsp;&nbsp; params.addElement( parseValue() );<BR>144&nbsp;&nbsp;&nbsp;&nbsp; parser.skip();<BR>145&nbsp;&nbsp;&nbsp;&nbsp; parser.read( Xml.END_TAG, "", "param" );<BR>146&nbsp;&nbsp;&nbsp;&nbsp; parser.skip();<BR>146&nbsp;}//end while( parser.peek().getType() != Xml.END_TAG )</DIV>
<DIV><BR>&nbsp;I have added one line[142]: parser.skip() to solve the exception.<BR>&nbsp;&nbsp;<BR>136&nbsp;&nbsp;&nbsp; void parseParams() throws IOException {<BR>137&nbsp;parser.read( Xml.START_TAG, "", "params" );<BR>138&nbsp;parser.skip();<BR>139<BR>140&nbsp;while( parser.peek().getType() != Xml.END_TAG ) {<BR>141&nbsp;&nbsp;&nbsp;&nbsp; parser.read( Xml.START_TAG, "", "param" );<BR>142&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parser.skip();<BR>143&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Retrieve a Java representation of the XML-RPC parameter value<BR>144&nbsp;&nbsp;&nbsp;&nbsp; params.addElement( parseValue() );<BR>145&nbsp;&nbsp;&nbsp;&nbsp; parser.skip();<BR>146&nbsp;&nbsp;&nbsp;&nbsp; parser.read( Xml.END_TAG, "", "param" );<BR>147&nbsp;&nbsp;&nbsp;&nbsp; parser.skip();<BR>146&nbsp;}//end while( parser.peek().getType() != Xml.END_TAG )</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank for your implementation<BR>Weerayut Youngklai<BR></DIV></div><br clear=all><hr>Protect your PC - <a href="http://g.msn.com/8HMTEN/2755??PS=">Click here</a> for McAfee.com VirusScan Online </html>