Package org.apache.axis2.context

Examples of org.apache.axis2.context.ConfigurationContextFactory.buildConfigurationContext()


    public ConfigurationContext createNewConfigurationContext() throws Exception {
        File file = new File(MAIL_TRANSPORT_ENABLED_REPO_PATH);
        assertTrue("Mail repository directory "+ file.getAbsolutePath() + " does not exsist",file.exists());
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        ConfigurationContext configContext =
            builder.buildConfigurationContext(file.getAbsolutePath());
        return configContext;
    }
   
}
View Full Code Here


    }
    public ConfigurationContext createServerConfigurationContext() throws Exception {
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        ConfigurationContext configContext =
            builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);

        TransportInDescription transportIn =
            new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "foo@127.0.0.1"));
View Full Code Here

    }

    public ConfigurationContext createClientConfigurationContext() throws Exception {
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        ConfigurationContext configContext =
            builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);

        TransportInDescription transportIn =
            new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "bar@127.0.0.1"));
View Full Code Here

    }

    public TCPServer(int port, String dir) throws AxisFault {
        try {
            ConfigurationContextFactory erfac = new ConfigurationContextFactory();
            ConfigurationContext configContext = erfac.buildConfigurationContext(dir);
            this.configContext = configContext;
            Thread.sleep(3000);
            serversocket = new ServerSocket(port);
        } catch (DeploymentException e1) {
            throw new AxisFault(e1);
View Full Code Here

    public void init(ServletConfig config) throws ServletException {
        try {
            ServletContext context = config.getServletContext();
            String repoDir = context.getRealPath("/WEB-INF");
            ConfigurationContextFactory erfac = new ConfigurationContextFactory();
            configContext = erfac.buildConfigurationContext(repoDir);
            configContext.setProperty(Constants.CONTAINER_MANAGED, Constants.VALUE_TRUE);
            lister = new ListingAgent(configContext);
        } catch (Exception e) {
            throw new ServletException(e);
        }
View Full Code Here

    }

    public void testDeployment() throws Exception {
        String filename = "./target/test-resources/deployment";
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        AxisConfiguration er = builder.buildConfigurationContext(filename).getAxisConfiguration();

        assertNotNull(er);
        ServiceDescription service = er.getService(new QName("service2"));
        assertNotNull(service);
        //commentd since there is no service based messgeRecivers
View Full Code Here

        this.port = port;
        this.user = userid;
        this.password = password;
        try {
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            configurationContext = builder.buildConfigurationContext(dir);
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            System.out.println("Sleeping for a bit to let the engine start up.");
View Full Code Here

    public static void main(String args[]) throws AxisFault {
        if (args.length != 1) {
            System.out.println("java SimpleMailListener <repository>");
        } else {
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            ConfigurationContext configurationContext = builder.buildConfigurationContext(args[0]);
            SimpleMailListener sas = new SimpleMailListener();
            TransportInDescription transportIn =
                configurationContext.getAxisConfiguration().getTransportIn(
                    new QName(Constants.TRANSPORT_MAIL));
            if (transportIn != null) {
View Full Code Here

    public void testInvalidService() {
        try {
            String filename = "./target/test-resources/InvalidDeployment";
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            er = builder.buildConfigurationContext(filename).getAxisConfiguration();
            String msg = (String) er.getFaulytServices().get("invalidService");
            if (msg == null || msg.equals("")) {
                fail("this must failed gracefully with AxisFault ervice specifi module can not" +
                        "refer system pre defined phases");
            }
View Full Code Here

    AxisConfiguration er;

    public void testparseService1() throws PhaseException, DeploymentException, AxisFault, XMLStreamException {
        String filename = "./target/test-resources/deployment";
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        er = builder.buildConfigurationContext(filename).getAxisConfiguration();
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.