use of com.sap.conn.jco.JCoRuntimeException in project iaf by ibissource.
the class SapListener method handleRequest.
public void handleRequest(JCoServerContext serverCtx, IDocDocumentList documentList) {
log.debug(getLogPrefix() + "Incoming IDoc list request containing " + documentList.getNumDocuments() + " documents...");
IDocXMLProcessor xmlProcessor = JCoIDoc.getIDocFactory().getIDocXMLProcessor();
IDocDocumentIterator iterator = documentList.iterator();
IDocDocument doc = null;
while (iterator.hasNext()) {
doc = iterator.next();
log.debug(getLogPrefix() + "Processing document no. [" + doc.getIDocNumber() + "] of type [" + doc.getIDocType() + "]");
try {
handler.processRequest(this, xmlProcessor.render(doc));
} catch (Throwable t) {
log.warn(getLogPrefix() + "Exception caught and handed to SAP", t);
throw new JCoRuntimeException(JCoException.JCO_ERROR_APPLICATION_EXCEPTION, "IbisException", t.getMessage());
}
}
}
Aggregations