Package org.apache.axis2.context

Examples of org.apache.axis2.context.ConfigurationContextFactory


            // Get the repository location from the args
            String repo = args[0];
            String port = args[1];

            OMElement payload = getEchoElement();
            ConfigurationContextFactory fac = new ConfigurationContextFactory();
            ConfigurationContext configContext = fac.createConfigurationContextFromFileSystem(repo);
            ServiceClient serviceClient = new ServiceClient(configContext, null);
            Options options = new Options();
            serviceClient.setOptions(options);
            options.setTo(new EndpointReference("http://127.0.0.1:" + port + "/axis2/services/SecureService"));
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
View Full Code Here


            throw new FileNotFoundException("Repository Doesnot Exist");
        }
        //copy the LoggingModule.mar to "modules" folder.
        //then modify the axis2.xml that is generating there according to
        //phases that being included in the "module.xml"
        ConfigurationContext configContext = new ConfigurationContextFactory().
                createConfigurationContextFromFileSystem(repository.getAbsolutePath());
        ServiceClient serviceClient = new ServiceClient(configContext, null);
        serviceClient.engageModule(new QName("LoggingModule"));
//        call.engageModule(new QName("LoggingModule"));
    }
View Full Code Here

                .addService(service);
    }

    public void testRPC() throws Exception {
//        Call call = new Call("test-resources/xmls");
        ConfigurationContext configcontext = new ConfigurationContextFactory()
                .createConfigurationContextFromFileSystem("test-resources/xmls");
        ServiceClient client = new ServiceClient(configcontext, null);
//        Call call = new Call(".");

        // Make the SOAP envelope
View Full Code Here

    private Log log = LogFactory.getLog(getClass());

    public void testPhaseOrderchage() {
        try {
            String filename = "./test-resources/deployment/SystemPhaseRemove";
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            er =
                    builder.createConfigurationContextFromFileSystem(filename)
                    .getAxisConfiguration();
            fail(
                    "this must failed gracefully with DeploymentException \"Invalid System predefined " +
                    "inphases , phase order does not\" +\n support\\n recheck axis2.xml\"");
        } catch (AxisFault e) {
View Full Code Here

    AxisConfiguration er;

    public void testPhaseOrderchage() {
        try {
            String filename = "./test-resources/deployment/BadConfigOrderChange";
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            er = builder.createConfigurationContextFromFileSystem(filename).getAxisConfiguration();
            fail(
                    "this must failed gracefully with DeploymentException \"Invalid System predefined " +
                    "inphases , phase order does not\" +\n support\\n recheck axis2.xml\"");
        } catch (AxisFault e) {
View Full Code Here

    String repo ="./test-resources/deployment/hostConfigrepo";



    protected void setUp() throws Exception {
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        ar = builder.createConfigurationContextFromFileSystem(repo).getAxisConfiguration();
    }
View Full Code Here

     AxisConfiguration er;

    public void testAddingObservs() throws Exception{
        try {
            String filename = "./test-resources/deployment/ConfigWithObservers";
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            er =  builder.createConfigurationContextFromFileSystem(filename).getAxisConfiguration();
            assertNotNull(er);
        } catch (DeploymentException e) {
            throw new DeploymentException(e);
        }
    }
View Full Code Here

        value2.addChild(subValue2);
        value2.addChild(subValue1);
        operation.addChild(value2);
        operation.addChild(value1);

        ConfigurationContextFactory fac = new ConfigurationContextFactory();
        ConfigurationContext configContext = null;
        try {
            configContext = fac.createConfigurationContextFromFileSystem("Search");
        } catch (DeploymentException e) {
            e.printStackTrace();
        }
        msgContext = new MessageContext();
        msgContext.setConfigurationContext(configContext);
View Full Code Here

    public AddressingModuleTest(String testName) {
        super(testName);
    }

    public void testExtractAddressingInformationFromHeaders() throws AxisFault {
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        AxisConfiguration er = builder.createConfigurationContextFromFileSystem("target")
                .getAxisConfiguration();
        File file = new File("target/addressing.mar");
        assertTrue(file.exists());
        ModuleDescription moduleDesc = er.getModule(new QName("addressing"));
        assertNotNull(moduleDesc);
View Full Code Here

    String repo = "./test-resources/deployment/moduleConfig";


    public void testModuleConfigAtAxisConfig() {
        try {
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            ar = builder.createConfigurationContextFromFileSystem(repo).getAxisConfiguration();
            ModuleConfiguration moduleConfiguration =
                    ar.getModuleConfig(new QName("testModule"));
            assertNotNull(moduleConfiguration);
            Parameter para = moduleConfiguration.getParameter("testModulePara");
            assertNotNull(para);
View Full Code Here

TOP

Related Classes of org.apache.axis2.context.ConfigurationContextFactory

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.