Yes, Xindice XML-RPC seats ontop of Apache XML-RPC project (well, that is
org.apache.xmlrpc package). The problem is here:
//posted 2 xindice users (no response, so slow ppl...)
<
Well, I've tried jakarta io taglib to create an XML-RPC call to get a
document from the Xindice. The response looks like follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse><params><param><value><?xml version="1.0"?>
<wd:webdocument
omitted
<wd:paragraph>? ????????????? ?????? ?????? ???????
????????? ?? ?????????? ? ????? ???????????. ???? ????????
????????? ??? ??????? ?????????? ??????????? ? ???????? ?
?????????????? ???? ????? ?? ?????? ????????????
????????.</wd:paragraph>
etc.
</value></param></params></methodResponse>
The problem is that response is in ISO-8859-i enc, and my documents are
UTF-8. Looks like that is why there is so many questions... Could anybody
tell me, what and where should I fix? Please, note, even if I set io taglib
to use UTF-8, it makes no result too...
>
I just need to tell the server (there are sources) that it should determine
document encoding and send it according to this. Will it solve the problem?
If yes, where should I dig in? There is XMLRPCHandler.java with some methods
looks like
XmlRpcServer xmlrpc = new XmlRpcServer();
xmlrpc.addHandler ("db", new RPCOperations());
byte[] result = xmlrpc.execute(gateway.getInputStream());
gateway.setResponseHeader("Content-type", "text/xml");
gateway.setResponseHeader("Content-length",
Integer.toString(result.length));
maybe something like
gateway.setResponseHeader("Content-type", "text/xml;
charset=utf-8"); will make me happy... but it seems to be too stupid
solution...
Phil
----- Original Message -----
From: "John Wilson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 10, 2002 12:28 AM
Subject: Re: xml-rpc & encoding
> Philipp Chudinov wrote:
> > Hi! I have a trouble in returning xml from the Xindice
> > (http://xml.apache.org/xindice) via xml-rpc. It seems, that response
> > is in a wrong encoding. All documents are UTF-8 encoded and I can see
> > them if use any of native XMLDB api ore any of the GUI Browsers. But
> > when I get documents from the same store via XML-RPC, all docs are
> > returned as a '?' symbols. Where could be a problem in this case? How
> > can I explicitly declare encoding?
>
> I'm slightly puzzled by this. Are you using the Apache XML-RPC client and
> server? I would have expected you to send an XML documant as a <string> in
> which case the encoding would be ISO 8859/1.
>
> John Wilson
> The Wilson Partnership
> http://www.wilson.co.uk
>