Search in sources :

Example 6 with SapJcoConnector

use of com.twinsoft.convertigo.beans.connectors.SapJcoConnector in project convertigo by convertigo.

the class SapJcoTransaction method runCore.

@Override
public void runCore() throws EngineException {
    connector = ((SapJcoConnector) parent);
    try {
        Engine.logBeans.debug("[SAP transaction] BAPI named '" + bapiName + "' executing ...");
        Document jcoDoc = connector.executeTransaction(this);
        Engine.logBeans.debug("[SAP transaction] BAPI named '" + bapiName + "' executed.");
        if (jcoDoc != null) {
            Element sap_output = jcoDoc.getDocumentElement();
            if (sap_output != null) {
                Element outputDocumentRootElement = context.outputDocument.getDocumentElement();
                Element jcoImported = (Element) context.outputDocument.importNode(sap_output, true);
                outputDocumentRootElement.appendChild(jcoImported);
                score += 1;
            }
        }
    } catch (Exception e) {
        connector.setData(null);
        throw new EngineException("An unexpected error occured while executing transaction.", e);
    } finally {
    }
}
Also used : SapJcoConnector(com.twinsoft.convertigo.beans.connectors.SapJcoConnector) XmlSchemaElement(org.apache.ws.commons.schema.XmlSchemaElement) Element(org.w3c.dom.Element) EngineException(com.twinsoft.convertigo.engine.EngineException) Document(org.w3c.dom.Document) EngineException(com.twinsoft.convertigo.engine.EngineException)

Aggregations

SapJcoConnector (com.twinsoft.convertigo.beans.connectors.SapJcoConnector)6 SqlConnector (com.twinsoft.convertigo.beans.connectors.SqlConnector)3 EngineException (com.twinsoft.convertigo.engine.EngineException)3 CicsConnector (com.twinsoft.convertigo.beans.connectors.CicsConnector)2 CouchDbConnector (com.twinsoft.convertigo.beans.connectors.CouchDbConnector)2 HtmlConnector (com.twinsoft.convertigo.beans.connectors.HtmlConnector)2 HttpConnector (com.twinsoft.convertigo.beans.connectors.HttpConnector)2 JavelinConnector (com.twinsoft.convertigo.beans.connectors.JavelinConnector)2 SiteClipperConnector (com.twinsoft.convertigo.beans.connectors.SiteClipperConnector)2 XmlSchemaElement (org.apache.ws.commons.schema.XmlSchemaElement)2 CoreException (org.eclipse.core.runtime.CoreException)2 DefaultBlockFactory (com.twinsoft.convertigo.beans.common.DefaultBlockFactory)1 EmulatorTechnology (com.twinsoft.convertigo.beans.common.EmulatorTechnology)1 SapJcoProviderImpl (com.twinsoft.convertigo.beans.connectors.SapJcoConnector.SapJcoProviderImpl)1 Connector (com.twinsoft.convertigo.beans.core.Connector)1 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)1 Project (com.twinsoft.convertigo.beans.core.Project)1 JsonIndex (com.twinsoft.convertigo.beans.couchdb.JsonIndex)1 ImportXsdSchemaReference (com.twinsoft.convertigo.beans.references.ImportXsdSchemaReference)1 XsdSchemaReference (com.twinsoft.convertigo.beans.references.XsdSchemaReference)1