Package org.apache.ode.axis2

Examples of org.apache.ode.axis2.ODEConfigProperties


        } else {
            System.out.println("Profiling config: " + config + ".");
            odeConfigDir = config;
        }
        File configFile = new File(odeConfigDir);
        ODEConfigProperties odeProps = new ODEConfigProperties(configFile);
        odeProps.load();
        Database db = new Database(odeProps);
        String webappPath = getClass().getClassLoader().getResource("webapp").getFile();
        db.setWorkRoot(new File(webappPath, "/WEB-INF"));

        return db;
View Full Code Here


   
    public void init() throws Exception {
        String rootDir = System.getProperty("org.apache.ode.configDir", "ode");
        File confFile = new File(rootDir + "/conf/axis2.xml");
        System.out.println("Conf file " + confFile.getAbsolutePath());
        config = new ODEConfigProperties(new File(rootDir + "/conf"));
        config.load();
        server = new ODEAxis2Server(new File(rootDir).getAbsolutePath(), new File(rootDir).getAbsolutePath(), confFile.getAbsolutePath(), Integer.parseInt(config.getProperty("port")), config);
        server.start();
    }
View Full Code Here

        } else {
            System.out.println("Profiling config: " + config + ".");
            odeConfigDir = config;
        }
        File configFile = new File(odeConfigDir);
        ODEConfigProperties odeProps = new ODEConfigProperties(configFile);
        odeProps.load();
        Database db = Database.create(odeProps);
        String webappPath = getClass().getClassLoader().getResource("webapp").getFile();
        db.setWorkRoot(new File(webappPath, "/WEB-INF"));

        return db;
View Full Code Here

        } else {
            System.out.println("Profiling config: " + config + ".");
            odeConfigDir = config;
        }
        File configFile = new File(odeConfigDir);
        ODEConfigProperties odeProps = new ODEConfigProperties(configFile);
        odeProps.load();
        Database db = new Database(odeProps);
        String webappPath = getClass().getClassLoader().getResource("webapp").getFile();
        db.setWorkRoot(new File(webappPath, "/WEB-INF"));
       
        return db;
View Full Code Here

        } else {
            System.out.println("Profiling config: " + config + ".");
            odeConfigDir = config;
        }
        File configFile = new File(odeConfigDir);
        ODEConfigProperties odeProps = new ODEConfigProperties(configFile);
        odeProps.load();
        Database db = new Database(odeProps);
        String webappPath = getClass().getClassLoader().getResource("webapp").getFile();
        db.setWorkRoot(new File(webappPath, "/WEB-INF"));
       
        return db;
View Full Code Here

        super.stop();
        _odeServer.shutDown();
    }

    protected ODEServer createODEServer() {
        return new ODEServer();
    }
View Full Code Here

        super.stop();
        _odeServer.shutDown();
    }

    protected ODEServer createODEServer() {
        return new ODEServer();
    }
View Full Code Here

            }
            AxisEngine engine = new AxisEngine(
                    msgContext.getOperationContext().getServiceContext().getConfigurationContext());
            engine.send(outMsgContext);
        } catch (IllegalAccessException e) {
            throw new OdeFault("Couldn't invoke method named " + methodName + " in management interface!", e);
        } catch (InvocationTargetException e) {
            throw new OdeFault("Invocation of method " + methodName + " in management interface failed!", e.getTargetException());
        }
    }
View Full Code Here

            try {
                Class beanFactory = Class.forName(clazz.getCanonicalName() + ".Factory");
                return beanFactory.getMethod("parse", XMLStreamReader.class)
                        .invoke(elmt.getXMLStreamReaderWithoutCaching());
            } catch (ClassNotFoundException e) {
                throw new OdeFault("Couldn't find class " + clazz.getCanonicalName() + ".Factory to instantiate xml bean", e);
            } catch (IllegalAccessException e) {
                throw new OdeFault("Couldn't access class " + clazz.getCanonicalName() + ".Factory to instantiate xml bean", e);
            } catch (InvocationTargetException e) {
                throw new OdeFault("Couldn't access xml bean parse method on class " + clazz.getCanonicalName() + ".Factory " +
                        "to instantiate xml bean", e);
            } catch (NoSuchMethodException e) {
                throw new OdeFault("Couldn't find xml bean parse method on class " + clazz.getCanonicalName() + ".Factory " +
                        "to instantiate xml bean", e);
            }
        } else throw new OdeFault("Couldn't use element " + elmt + " to obtain a management method parameter.");
    }
View Full Code Here

    private static OMElement convertToOM(SOAPFactory soapFactory, Object obj) throws AxisFault {
        if (obj instanceof XmlObject) {
            try {
                return new StAXOMBuilder(((XmlObject)obj).newInputStream()).getDocumentElement();
            } catch (XMLStreamException e) {
                throw new OdeFault("Couldn't serialize result to an outgoing messages.", e);
            }
        } else if (obj instanceof List) {
            OMElement listElmt = soapFactory.createOMElement("list", null);
            for (Object stuff : ((List) obj)) {
                OMElement stuffElmt = soapFactory.createOMElement("element", null);
                stuffElmt.setText(stuff.toString());
                listElmt.addChild(stuffElmt);
            }
            return listElmt;
        } else throw new OdeFault("Couldn't convert object " + obj + " into a response element.");
    }
View Full Code Here

TOP

Related Classes of org.apache.ode.axis2.ODEConfigProperties

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.