handleAs
Null responseXML on xhrGet with handleAs xml
Posted June 10th, 2008 by kwendlandI am experiencing a similar problem what was posted here and am hoping I can pick up some guidance.
I am making an xhrGet http request to a service returning ATOM message XMLs of the type 'application/atom+xml'.
Currently I have a servlet running that serves to parse my URLs and return a well formed statically stored xml file containing an ATOM message. I am using FireFox 2 with Firebug as an aid on Windows XP.
When my file servlet running in my windows environment returns the ATOM xml the xhrGet call invokes my load function with the reponse data in well a well formed ATOM/XML format. This is good.
When my file servlet is running In an AIX/Unix environment, returning the same static xml files, the same bit of code returns with responseXML null but the responseText holds the response.
Firebug's console shows the well formed ATOM message was received and the xhr.responseText holds the string text. This leads me to believe that the reponse is received but just not handled as 'xml'.
It appears to me that in this case Dojo is failing to resolve and handle the response as XML. Below are my args.
var args = {
url: iUrl,
handleAs: 'xml',
load: readyHandlerMethod,
error: errorHandlerMethod,
timeout: 10000,
scDispHandler: displayHandlerMethod,
scDispHandlerArgs: displayHandlerArgs,
scXslPath: xslFile
};
Something to note, I have inserted some custom arguments so that the invoked load handlers can further invoke other functions and pass along context.
Dojo Forum