You need to sign in to do that
Don't have an account?
yh
How can you find out the encoding when using XML-RPC
I'm still using the XML RPC API and I would like to find out what encoding my server is configured for. I noticed in SOAP there is the concept of a describeGlobal. Does anyone know the equivalent in the XML RPC api? Does anyone even know how to get a copy of the documention for XML-RPC anymore? I can't seem to find it anywhere.
As I am sure you know, you really want to convert to the newer SOAP API, since so many of the new features are not available through the XML-RPC.
For XML-RPC, you'll want the 2.0 API reference - the last one which included XML-RPC as a full player. I'll try attaching a copy ...
Scot
java.io.IOException: Invalid character data corresponding to XML entity Œ
At first i thought it was because the sfdc server was not utf8 but it looks like it is...now i'm stumped. Anyone have any ideas why this is happening? By the way, the character in question here is 'Å'
java.io.IOException: Invalid character data corresponding to XML entity Å
At first i thought it was because the sfdc server was not utf8 but it looks like it is...now i'm stumped. Anyone have any ideas why this is happening? By the way, the character in question here is 'Å'
sfdc.loginversion2.0passwordfoousernamefoo@bar.com
Does anyone know how to set the encoding of the xml-rpc call to server?
I'm using Apache's XML RPC API
I found that getting the Apache XML-RPC library to read UTF-8 responses was a bit tricky. It seems to interpret a stream of bytes as a stream of characters, assuming each is 8 bits. If you break the stream up and reconstruct the string then the non-ASCII characters are interpreted correctly by Java:
import org.apache.xmlrpc.*;
During init()
XmlRpcClient xmlrpc = new XmlRpcClient(this.serverUrl);
XmlRpc.setEncoding("UTF-8");
Then:
Object value = hashTableofSforceValues.get(sfdcFieldName);
if (value instanceof String) {
try {
value = new String(((String) value).getBytes(), "UTF-8"); // Break the string into bytes and re-interpret
} catch (UnsupportedEncodingException e) {
logger.warn("Error converting " + (String) htContactSFDC.get(sfdcFieldName) + " to UTF-8", e);
}
}
Hope this helps,
David