On 2 Sep 2004, at 07:39, Shirai,Kaoru wrote:
I have downloaded Apache XML-RPC 1.2-b1, and tried to invoke a remote service with the following code:
XmlRpc.setEncoding("UTF8"); XmlRpcClient client = new XmlRpcClient(url); Object[] args = new Object[] { "__STRING__" }; client.execute("remote.method", new Vector(Arrays.asList(args)));
If __STRING__ contains non-ASCII(c < 0x20 || c > 0xff)-character, it fails with a error "Invalid character data corresponding to XML entity" at XMLWriter.chardata(String).
At XMLWriter.chardata(String) of CVS revision 1.2, it seems to just pass the character to OutputStreamWriter.write(). Is that behaves wrong? Why has it changed in 1.3 and 1.4?
Or is there another way to pass non-ASCII string for <string> value?
Are you sure that it objects to characters with values > 0XFF?
It certainly should refuse to send characters with values less than 0X20 unless they are /n, /r or /t. The XML spec spec does not allow these values in a well formed XML document.
If you need to send arbitrary binary data you will need to use Base64.
John Wilson The Wilson Partnership http://www.wilson.co.uk
