Results from Timeout not XML

Jit
Posts: 15
Joined: Mon Jun 11, 2007 8:22 am

Results from Timeout not XML

Post by Jit »

We are currently formatting XML returned from the search appliance in another server using XSLT. The problem becomes when the query times out, the search appliance does not return a valid XML file (I have verified this by doing a search query that timed out on the search appliance itself via mlt.xml?dropXML=1).

This causes the XML transformer to hiccup (mainly display an ugly error) and needless to say, we do not want end users to see this ugly error.

So my question is this...is there anyway for the timeout error to return a valid XML file?

The timeout error (returned as HTML) is as follows:
<TITLE>Timeout</TITLE>
<BODY>
<H2>Timeout</H2>
Your request exceeded the time limit. Please try again.
</BODY>
000 [Default Script]:3248: Timeout
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Results from Timeout not XML

Post by jason112 »

Ok, we'll be releasing an update that will change the timeout error to:
<html>
<head>
<title>Timeout</title>
</head>
<body>
<h2>Timeout</h2>
<p>Your request exceeded the time limit. Please try again.</p>
</body>
</html>
<!-- 000 [Default Script]:3248: Timeout -->


This should be safe to feed into a xml parser. Our hands are somewhat tied with the Timeout's output, so you'll still need to test to see if the root element is not <ThunderstoneResults> to detect this error.
Jit
Posts: 15
Joined: Mon Jun 11, 2007 8:22 am

Results from Timeout not XML

Post by Jit »

Thanks!
I believe that the above change should work well. In the meantime, I have gotten around the problem right now by doing a try/catch in the jsp page when calling the transformation. Obviously, this isn't the preferred solution.
robert.vreeland
Posts: 12
Joined: Thu Mar 29, 2007 1:39 pm

Results from Timeout not XML

Post by robert.vreeland »

I have a similar situation in which the user gets an XML error ("Only one top level element is allowed in an XML document. Error processing resource") when the timeout page comes up. (I'm not parsing the results through another server like the other poster; the XML/timeout error shows up on what should be the standard Thunderstone results page.) Do you think the update mentioned above would also address my problem?
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Results from Timeout not XML

Post by jason112 »

Yes, that error should be resolved by having the xml-safe timeout error message. I believe the update should be
going out within a day or two.