Package hermes

Examples of hermes.Hermes


    public static Hermes getHermes(WsdlProject project, String sessionName) throws NamingException {
        SoapUIClassLoaderState state = SoapUIExtensionClassLoader.ensure();
        try {
            Context ctx = hermesContext(project);

            Hermes hermes = (Hermes) ctx.lookup(sessionName);
            return hermes;
        } catch (NamingException ne) {
            UISupport
                    .showErrorMessage("Hermes configuration is not valid. Please check that 'Hermes Config' project property is set to path of proper hermes-config.xml file");
            SoapUI.logError(ne, "Error when trying to find JMS session");
View Full Code Here


        try {
            ctx = getHermesContext(iface, hermesConfigPath);
        } catch (Exception e) {
            SoapUI.log.info("no hermes context");
        }
        Hermes hermes = null;
        try {
            if (sessionOptions != null && sessionOptions.length > 0) {
                hermes = (Hermes) ctx.lookup(sessionOptions[0]);
            }
View Full Code Here

        mainForm = builder.createForm("Basic");
        mainForm.addTextField(HERMES_CONFIG, "choose folder where hermes-config.xml is", XForm.FieldType.FOLDER)
                .addFormFieldListener(new XFormFieldListener() {
                    public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
                        if (!"".equals(newValue)) {
                            Hermes hermes = null;
                            try {
                                Context ctx = getHermesContext(iface, newValue);
                                iface.getProject().setHermesConfig(newValue);
                                String[] sessions = getSessionOptions(iface, newValue);
                                mainForm.setOptions(SESSION, sessions);
                                if (sessions != null && sessions.length > 0) {
                                    hermes = (Hermes) ctx.lookup(sessions[0]);
                                }
                            } catch (Exception e) {
                                SoapUI.logError(e);
                            }
                            if (hermes != null) {
                                updateDestinations(hermes);
                            } else {
                                mainForm.setOptions(SESSION, new String[]{});
                                mainForm.setOptions(SEND, new String[]{});
                                mainForm.setOptions(RECEIVE, new String[]{});
                            }
                        }
                    }
                });
        mainForm.addComboBox(SESSION, new String[]{}, "Session name from HermesJMS").addFormFieldListener(
                new XFormFieldListener() {

                    public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
                        String hermesConfigPath = mainForm.getComponent(HERMES_CONFIG).getValue();

                        Hermes hermes = null;
                        try {
                            Context ctx = getHermesContext(iface, hermesConfigPath);
                            hermes = (Hermes) ctx.lookup(newValue);
                        } catch (Exception e) {
                            SoapUI.logError(e);
View Full Code Here

TOP

Related Classes of hermes.Hermes

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.