You need to sign in to do that
Don't have an account?

How to parse response from remoteFunction() and request timeout 400 code
Hi all,
I'm working with the remoteFunction() to make a GET call to an external webservice. The service returns an XML back and I was wondering if the Ajax toolkit contains any functions to parse the XML response. This is how I'm making the GET call:
sforce.connection.remoteFunction({
url : "my_http_request_link_w_querystring",
requestHeaders: {
"Content-Type": "text/xml",
"SOAPAction":},
mimeType: "text/xml",
method: "GET",
onSuccess : function(response) {
alert(response);
},
onFailure : function(response) {
alert("Problem with REST call w/ response = " +
response);
}
);
Thanks in advance.
Quick question: using the remoteFunction(), I'm able to make the GET request fine to a site like Google Maps and amazon, but I'm getting the following error when I make a GET call to a webserver on port 8080:
400 Unable to forward request due to: Read timed out
Xml parsing is pretty simple using the built in XML libraries. Good article here.
As for the timeout, the port may are may not be supported by the toolkit. I would step through the remoteFunction call in a debugger to see exactly what was happening.