Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.AxisConfiguration.addService()


        as1.addOperation(operation1);
        as1.addOperation(operation2);

        ConfigurationContext cc = ConfigurationContextFactory.createEmptyConfigurationContext();
        AxisConfiguration ac = cc.getAxisConfiguration();
        ac.addService(as1);
        messageContext = cc.createMessageContext();

        messageContext.setTo(new EndpointReference(
                "http://127.0.0.1:8080/axis2/services/Service1/operation2"));
        messageContext.setAxisService(as1);
View Full Code Here


            WSDL11ToAllAxisServicesBuilder builder = new WSDL11ToAllAxisServicesBuilder(
                    new FileInputStream(testResourceFile));
            AxisService axisService = builder.populateService();
            ConfigurationContext configContext = ConfigurationContextFactory.createDefaultConfigurationContext();
            AxisConfiguration axisConfig = configContext.getAxisConfiguration();
            axisConfig.addService(axisService);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            axisService.printWSDL(baos);
            assertXMLEqual(new FileReader(testResourceFile), new StringReader(new String(baos.toByteArray())));
        } catch (Exception e) {
            System.out.println("Error in WSDL : " + testResourceFile.getName());
View Full Code Here

    private MessageContext initMsgCtxFromMessage(String messageResource) throws Exception {
        MessageContext ctx = new MessageContext();

        AxisConfiguration axisConfiguration = new AxisConfiguration();
        AxisService axisService = new AxisService("TestService");
        axisConfiguration.addService(axisService);
        AxisServiceGroup axisServiceGroup = new AxisServiceGroup();
        axisConfiguration.addServiceGroup(axisServiceGroup);
        ctx.setConfigurationContext(new ConfigurationContext(axisConfiguration));
        axisServiceGroup.addService(axisService);
        ServiceGroupContext gCtx = ctx.getConfigurationContext().createServiceGroupContext(axisServiceGroup);
View Full Code Here

    private MessageContext initMsgCtxFromMessage(String messageResource) throws Exception {
        MessageContext ctx = new MessageContext();

        AxisConfiguration axisConfiguration = new AxisConfiguration();
        AxisService axisService = new AxisService("TestService");
        axisConfiguration.addService(axisService);
        AxisServiceGroup axisServiceGroup = new AxisServiceGroup();
        axisConfiguration.addServiceGroup(axisServiceGroup);
        ctx.setConfigurationContext(new ConfigurationContext(axisConfiguration));
        axisServiceGroup.addService(axisService);
        ServiceGroupContext gCtx = ctx.getConfigurationContext().createServiceGroupContext(axisServiceGroup);
View Full Code Here

        AxisService as1 = new AxisService("Service1");
        ConfigurationContext cc = null;
        try {
            cc = ConfigurationContextFactory.createEmptyConfigurationContext();
            AxisConfiguration ac = cc.getAxisConfiguration();
            ac.addService(as1);
            messageContext = cc.createMessageContext();
            messageContext.setAxisService(as1);

            SOAPEnvelope se = soapFactory.createSOAPEnvelope();
View Full Code Here

        as1.addOperation(operation1);
        as1.addOperation(operation2);

        ConfigurationContext cc = ConfigurationContextFactory.createEmptyConfigurationContext();
        AxisConfiguration ac = cc.getAxisConfiguration();
        ac.addService(as1);
        messageContext = cc.createMessageContext();

        messageContext.setAxisService(as1);

        SOAPEnvelope se = OMAbstractFactory.getSOAP11Factory().createSOAPEnvelope();
View Full Code Here

        AxisService svc1 = new AxisService();
        QName svc1QN = new QName("http://service.name/space/1", "service1");
        String portName = "port1";
        setupAxisService(svc1, svc1QN, portName);
        axisCfg.addService(svc1);
       
        AxisService foundService = ActivateUtils.findService(axisCfg, AxisService.class.getName(),
                generateAxisServiceName(svc1QN, portName), null);
        assertSame("Did not find expected AxisService using null extraName", svc1, foundService);
       
View Full Code Here

        AxisService svc1 = new AxisService();
        QName svc1QN = new QName("http://service.name/space/1", "service1");
        String portName = "port1";
        setupAxisService(svc1, svc1QN, portName);
        axisCfg.addService(svc1);
       
        AxisService foundService = ActivateUtils.findService(axisCfg, AxisService.class.getName(),
                generateAxisServiceName(svc1QN, portName + "_NoMatch"), null);
        assertNull("Should not have found a matching AxisService", foundService);
       
View Full Code Here

        AxisService svc1 = new AxisService();
        QName svc1QN = new QName("http://service.name/space/1", "service1");
        String portName = "port1";
        setupAxisService(svc1, svc1QN, portName);
        axisCfg.addService(svc1);
       
        String extraName = ActivateUtils.getAxisServiceExternalizeExtraName(svc1);
        AxisService foundService = ActivateUtils.findService(axisCfg, AxisService.class.getName(),
                generateAxisServiceName(svc1QN, portName + "_NoMatch"), extraName);
        assertSame("Did not find expected AxisService using null extraName", svc1, foundService);
View Full Code Here

        AxisService svc1 = new AxisService();
        QName svc1QN = new QName("http://service.name/space/1", "service1");
        String portName = "port1";
        setupAxisService(svc1, svc1QN, portName);
        axisCfg.addService(svc1);
       
        String extraName = ActivateUtils.getAxisServiceExternalizeExtraName(svc1) + "_NoMatch";
        AxisService foundService = ActivateUtils.findService(axisCfg, AxisService.class.getName(),
                generateAxisServiceName(svc1QN, portName), extraName);
        assertNull("Should not have found matching service without matching extraname", foundService);
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.