ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karnes, Derek" <>
Subject RE: <i4> and array type question,please help
Date Tue, 01 Nov 2005 19:29:24 GMT
1. According to the spec, if no type is indicated, the type is string.
<int> and <i4> fields appear to be handled the same and subject to the
same rules, so changing the tag from int to i4 shouldn't affect any
compliant parser.
&#32; is the space character, so the generated XML is compliant to the
spec and would be interpreted correctly by a compliant client. I know of
no way to make the generated xml display exactly as you described
without hacking apache's code.

2. The spec has been updated to state that int fields collapse leading
zeros in int values. To keep the leading zeros you'd have to store it as
another type, for example string or base64
Hope this helps,

From: Yixing Ma [] 
Sent: Tuesday, November 01, 2005 1:35 PM
Subject: <i4> and array type question,please help
Importance: High

As I'm starting to use apache's XML-RPC java api, I found couple of
1)  The standard XML-RPC spec defines the array type as something like:
    <value><string>Something Here</string></value>
But I was unable to put <i4> into the array by using java Vector. I
could only put <int></int> instead of <i4>. Also the <string></string>
tag in red is missing.  The blank space was replaced by "&#32;" in the
generated XML.
My code is: 
Vector v=new Vector();        * 
v.add(new Integer("1404")); *
v.add("Something Here");    *
 The result XML is 
Is there a way to produce the exact same XML as XML-RPC defined by using
apache's api?
2) If I want to generate 
as I want to preserve the zero before 1404. What should I do?
Best regards,
Yixing Ma

View raw message