PDA

View Full Version : doRequest not returning data


smoyer
06-17-2009, 01:04 PM
We have a laszlo application that loads datacombobox lists from datasets retrieved at runtime. We have several datasets defined on the canvas like this:
<dataset name="ourList" type="http" request="false" timeout="60000" queuerequests="true" />

DoRequest for each is called in the oninit method of the canvas:
ourList.setSrc(pathToServlet);
ourList.setQueryType("GET");
ourList.setQueryString({fileName: 'ourList.xml'});
ourList.doRequest();

The doGet method of a java servlet is called that passes the appropriate xml back to the canvas in the response. This works great for almost all of our users. We have a few users that end up with empty lists in the datacombobox. In this case, the onerror method fires and getErrorString() returns 'client could not parse XML from server'. We have never been able to replicate the error ourselves.

We use OL 3.4 and deploy in SOLO mode on an Apache server. We compile to SWF 8. Java runs on Tomcat. Proxied is set to false on the canvas. The content type of the response is set to "text/xml".

Does anyone see anything that we are doing wrong? Is there anything besides getErrorString() that could provide additional information so that we can resolve this?

pugmaster
06-17-2009, 08:37 PM
and getErrorString() returns 'client could not parse XML from server'. We have never been able to replicate the error ourselves.

This error is generated when the XML returned from the server is not well-formed. I would look at all of the possible XML output returned by the server.

- Norman Klein
Author: Laszlo in Action

smoyer
06-18-2009, 05:39 AM
I possibly phrased things poorly. We have been able to force the error in development. I have set things up so that it never goes into the servlet so we know nothing is being returned. getErrorString() still returns 'client could not parse XML from server'. When I say that we have never been able to replicate the error I mean that we have never seen it happen in production ourselves. The users who have the problem, have it consistently and those who don't, never have it. The issue is specific to users but we don't know why.

mjessup
06-18-2009, 05:49 AM
Is it possibly a character set issue, either of the XML data being sent, or what is available on the client? Do you know of any common factors of the clients who do have errors (browser, OS, language, ...)?