logo       


Kuddi: Re: Bug in XmlRpcParser.java: msg#00013

Subject: Kuddi: Re: Bug in XmlRpcParser.java
Hi,

I do not know if somebody maintains xml-rpc, my impression is the project is dead. Ask objectweb to take it over, or use

http://cvs.sourceforge.net/viewcvs.py/kobjects/kobjects/src/org/kobjects/xmlrpc/XmlRpcParser.java

instead.

Best regards,
Stefan Haustein



Mark Burke wrote:
Hi,

I've also found another bug related to arrays. The <data> tag is not being
used around
the <value> tags.

Regards,
Mark

XmlRpcWriter: (line 98)
=======================

// java.util.Vector maps to an XML-RPC array
    else if( value instanceof Vector ) {
        writer.startTag( "array" );
        writer.startTag( "data" );    // **** ADDED ****
        Vector v = (Vector) value;
        for( int i = 0; i < v.size(); i++ )
        writeValue( v.elementAt(i) );// recursive call
        writer.endTag();// </data>        // **** ADDED ****
    }

XmlRpcReader: (line 227)
========================

Vector parseArray() throws IOException {
    Vector v = new Vector();
    parser.skip();

    // **** ADDED next 2 lines
    parser.read( Xml.START_TAG, "", "data" );
    parser.skip();

    while( parser.peek().getType() != Xml.END_TAG ) {
        v.addElement( parseValue() ); // parse this element value
        parser.skip();
    }//end while( parser.peek().getType() != Xml.END_TAG )

    // **** ADDED next 2 lines
    parser.read( Xml.END_TAG, "", "data" );
    parser.skip();
    return v;
    }//end parseArray()




-----Original Message-----
From: Alan Slattery [mailto:alan.slattery@xxxxxxxxxxxxxx]
Sent: 20 May 2004 14:38
To: kxmlrpc@xxxxxxxxxxx
Cc: Mark Burke
Subject: Bug in XmlRpcParser.java


Hi there,
   We were working with the latest released version of kXML-RPC (version
0.6)
and found a bug in XmlRpcParser.java.

In the method parseParams() there is the following:

        while( parser.peek().getType() != Xml.END_TAG ) {
            parser.read( Xml.START_TAG, "", "param" );
             // Retrieve a Java representation of the XML-RPC parameter
value
            params.addElement( parseValue() );    // *** BUG ***
            parser.skip();

There should be a call to parser.skip() before the line marked with BUG
above.
If any whitespace exists between the opening of the "param" start tag and
the
value, a parse exception is thrown, as the implementation of parseValue()
expects the next read() to be a start tag for "value" but instead it gets
the
whitespace.

If you have been notified of this already then apologies, but a search of
the
mailing lists returned nothing relevant and the online view of the source is
not
working, so I can't verify if it has already been fixed.

Thanks,
   Alan Slattery



Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe