ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Peristerakis" <peri...@tisec.com>
Subject RE: Is it a bug in the XmlRpcSupport.class(inner class of SimpletXmlRpcClient.class)
Date Fri, 21 May 2004 14:36:39 GMT
Hi,

I know this might be a bit far fetched, but in the objectParsed function an
assert should be placed to see if the variable result is null. I assume that
if the assert is triggered, then the function is called more then once,
which overrides the previous data (ei: the recursion is not properly set
up).

George


 -----Original Message-----
From: xiaobing liu [mailto:xiaobingl@hotmail.com]
Sent: May 21, 2004 10:23
To: xmlrpc-user@ws.apache.org
Subject: Is it a bug in the XmlRpcSupport.class(inner class of
SimpletXmlRpcClient.class)


  HI:

  I' ve downloaded the xmlrpc-1.2-b1-src.zip ,  imported it to my project
and rebuilded it.  I used JSXmlRpcApplet, XmlRpcApplet, SimpletXmlRpcClient
and the classes needed.

  The SimpleXmlRpcClient doesn't work properly when the server sends back a
struct(array/hashtable). I debuged and found :
  1.The response xml ByteStream is right.
  2.The John Wilson'sMinML parser works nice without using
XmlRpcSupport.class as  MinML 's DocumentHandler
      line 202         parser.setDocumentHandler(this);
  3. But the v.value is  null in the  endElement() method
     line 437 objectParsed(v.value);


  I changed the  statement: ObjectParsed(v.value) in the
SimpleXmlRpcClientto.endElement()
  to

  if ( v.type == ARRAY)
  {
      objectParsed( v.array );
  } else if ( v.type == STRUCT )
  {
      objectParsed ( v.struct );
  } else
  {
      objectParsed ( v.value );
  }
  then it works.

  But it  still  does not  work properly when the array/struct is recursive
!

  I'm not  sure if  it's  a bug.   Could you give me some suggestions about
it?


  Thanks in advance!

  Xiaobing Liu



----------------------------------------------------------------------------
--
  MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.

Mime
View raw message