I use only the XmlRpc Server, as Client i use the JAVA from Marquee(http://xmlrpc.sourceforge.net/).
When i send Raw Data in Base64 decoded, the Java Client brings always an Error "Error decoding BASE64 element: Miscalculated data length.".
So my Problem ist the Decoding in C++ or the Encoding
in Java bad.
Where i can find about the Decoing/Encoding algorithmus?
Thanks
Sven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
in the Base64.java the function decode(),
there will be calculate the array length
int len = ( ( data.length + 3 ) / 4 ) * 3;
But the C++ Server send the byte Code with /r/n
<base64>iVBORw0KG.....
AAlwSFlzAAA......
zQgJGomhIc.....
u93uOLMXq.....
</param></params></methodResponse>
The /r will be ignored but the /n (new Line) makes trouble in the decode routine from Base64.
So i fix it for me, but i don't know how say's the specifaction to the transmit of Base64 Raw data.
mfg.
Sven Grnbacher
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use only the XmlRpc Server, as Client i use the JAVA from Marquee(http://xmlrpc.sourceforge.net/).
When i send Raw Data in Base64 decoded, the Java Client brings always an Error "Error decoding BASE64 element: Miscalculated data length.".
So my Problem ist the Decoding in C++ or the Encoding
in Java bad.
Where i can find about the Decoing/Encoding algorithmus?
Thanks
Sven
I've found the problem:
in the Base64.java the function decode(),
there will be calculate the array length
int len = ( ( data.length + 3 ) / 4 ) * 3;
But the C++ Server send the byte Code with /r/n
<base64>iVBORw0KG.....
AAlwSFlzAAA......
zQgJGomhIc.....
u93uOLMXq.....
</param></params></methodResponse>
The /r will be ignored but the /n (new Line) makes trouble in the decode routine from Base64.
So i fix it for me, but i don't know how say's the specifaction to the transmit of Base64 Raw data.
mfg.
Sven Grnbacher