After exchanging some information with Jochen, he ran some tests 
which confirmed for him that this could not be a problem with XmlRpc.

After some extensive debugging, I found the problem, which, due to the
size
of the packet and the complicatedness of my code, turned out to be a
very
silly but hard-to-find typo in my code.

So I will now confirm Jochen's diagnosis.  My bad!

With regard to the hard-to-findness of this bug, it would have been much
simpler if I 
would have had at hand a utility that could perform an improved
toString() on an arbitrary 
Object returned by XmlRpc.  In particular, one that properly expands
Object[]s.  Does
anyone on this list have a utility that he uses for this purpose?

Steve Cohen



-----Original Message-----
From: COHEN, STEVEN M (SBCSI) 
Sent: Friday, October 06, 2006 3:58 PM
To: xmlrpc-dev@ws.apache.org
Subject: RE: Is there a "distributon" for ws-commons-java5


Jochen:
As my example includes proprietary data, I am sending it to you at your
private gmail address as shown below.  Please check there and you will
see my example.

Steve Cohen

-----Original Message-----
From: Jochen Wiedmann [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 05, 2006 2:24 PM
To: xmlrpc-dev@ws.apache.org
Subject: Re: Is there a "distributon" for ws-commons-java5


On 10/5/06, COHEN, STEVEN M (SBCSI) <[EMAIL PROTECTED]> wrote:
>         /**
>          * @param o an Object[] or List returned from an XML-RPC array
> type
>          * @return a List containing the same elements as the array
>          * @throws ClassCastException if o is not an Object[] or a
List
>          */
>         protected static List getAsList(Object o)
>         {
>                 if (o instanceof List && o != null) {
>                         return (List) o;
>                 }
>                 List newlist = new LinkedList();
>
>                 if (o != null) {
>                         newlist.addAll(Arrays.asList((Object[]) o));
>                 }
>                 return newlist;
>         }
>
> If the first three lines are commented out, ClassCastExceptions
result.

The only reason I can think of is that you were using the
LocalTransport (as opposed to the LocalStreamTransport). That may be,
because this transport simply returns what you give him.

Otherwise, I refuse to believe this unless you show me an example,
sorry. Note, that the result objects are created by instances of
TypeParser. In particular, there is an ObjectArrayParser. However,
there is no such thing as a ListParser.


Jochen


-- 
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to