Package com.eviware.soapui.support.scripting

Examples of com.eviware.soapui.support.scripting.SoapUIScriptEngine


                scriptEnginePools.put(engineId, new ScriptEnginePool(engineId));
            }
        }

        ScriptEnginePool scriptEnginePool = scriptEnginePools.get(engineId);
        SoapUIScriptEngine scriptEngine = scriptEnginePool.getScriptEngine();
        try {
            scriptEngine.setScript(name);
            for (Map.Entry<String, Object> entry : objects.entrySet()) {
                scriptEngine.setVariable(entry.getKey(), entry.getValue());
            }

            Object result = scriptEngine.run();
            return result == null ? null : result.toString();
        } catch (Throwable e) {
            log.error("Error evaluating script", e);
            return e.getMessage();
        } finally {
            scriptEngine.clearVariables();
            scriptEnginePool.returnScriptEngine(scriptEngine);
        }
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.scripting.SoapUIScriptEngine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.