- // Deal with Transaction exceptions
- wsInfo.appendProgressText(jobs[j].jobnum, MessageManager
- .formatMessage("info.server_exception", new Object[]
- { WebServiceName, ex.getMessage() }));
- // always output the exception's stack trace to the log
- Console.warn(WebServiceName + " job(" + jobs[j].jobnum
- + ") Server exception.");
- // todo: could limit trace to cause if this is a SOAPFaultException.
- ex.printStackTrace();
-
- if (jobs[j].allowedServerExceptions > 0)
+ Console.debug(format(
+ "Polling Job %s Result state was:%s(ServerError=%b)",
+ job, job.getState(), job.isServerError()));
+ try
+ {
+ pollJob(job);
+ if (!job.hasResponse())
+ throw new Exception("Timed out when communicating with server. Try again later.");
+ else
+ Console.debug(format("Job %s Result state:%s(ServerError=%b)",
+ job, job.getState(), job.isServerError()));
+ } catch (Exception exc)