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> According the XML-RPC specification: Updated 10/16/99 DW and your implementation kXmlRPC version 0.6. I have found something mis-understand the XMLRPC spec are not fix the number of <param>..</param> as following this sentense.</DIV>
<DIV> </DIV>
<DIV>XML-RPC specification:<BR>If the procedure call has parameters, the <methodCall> must contain a <params> sub-item. <BR>The <params> sub-item can contain any number of <param>s, each of which has a <value>. </DIV>
<DIV> </DIV>
<DIV> 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 void parseParams() throws IOException {<BR>137 parser.read( Xml.START_TAG, "", "params" );<BR>138 parser.skip();<BR>139<BR>140 while( parser.peek().getType() != Xml.END_TAG ) {<BR>141 parser.read( Xml.START_TAG, "", "param" );<BR>142 // Retrieve a Java representation of the XML-RPC parameter value<BR>143 params.addElement( parseValue() );<BR>144 parser.skip();<BR>145 parser.read( Xml.END_TAG, "", "param" );<BR>146 parser.skip();<BR>146 }//end while( parser.peek().getType() != Xml.END_TAG )</DIV>
<DIV><BR> I have added one line[142]: parser.skip() to solve the exception.<BR> <BR>136 void parseParams() throws IOException {<BR>137 parser.read( Xml.START_TAG, "", "params" );<BR>138 parser.skip();<BR>139<BR>140 while( parser.peek().getType() != Xml.END_TAG ) {<BR>141 parser.read( Xml.START_TAG, "", "param" );<BR>142 parser.skip();<BR>143 // Retrieve a Java representation of the XML-RPC parameter value<BR>144 params.addElement( parseValue() );<BR>145 parser.skip();<BR>146 parser.read( Xml.END_TAG, "", "param" );<BR>147 parser.skip();<BR>146 }//end while( parser.peek().getType() != Xml.END_TAG )</DIV>
<DIV> </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>