Package org.apache.axis2.description

Examples of org.apache.axis2.description.AxisServiceGroup.addService()


        ConfigurationContext configCtx = new ConfigurationContext(axisConfig);
        AxisServiceGroup serviceGroup = new AxisServiceGroup(axisConfig);
        AxisService service = new AxisService("TestService");
        AxisOperation operation = new InOutAxisOperation(new QName("ns", "op1"));
        service.addOperation(operation);
        serviceGroup.addService(service);

        // Register a listener and make sure it starts out clean
        MyListener listener = new MyListener();
        configCtx.addContextListener(listener);
        assertNull(listener.getLastContext());
View Full Code Here


        inMC.setEnvelope(envelope);
        AxisConfiguration axisConfig = new AxisConfiguration();
        AxisService as = new AxisService();
        as.setName("ScriptService");
        AxisServiceGroup asg = new AxisServiceGroup(axisConfig);
        asg.addService(as);
        as.addParameter(new Parameter("script.js",
                                      "function invoke(inMC, outMC) { outMC.setPayloadXML(" +
                                              payload + ")}"));
        ConfigurationContext cfgCtx = new ConfigurationContext(axisConfig);
        ServiceGroupContext sgc = cfgCtx.createServiceGroupContext(asg);
View Full Code Here

        // First create a ServiceGroup with S1 and S4
        AxisServiceGroup axisServiceGroup1 = new AxisServiceGroup();
        axisServiceGroup1.setServiceGroupName("ServiceGroup1");
        AxisService service1 = new AxisService();
        service1.setName(SERVICE1);
        axisServiceGroup1.addService(service1);

        AxisService service4 = new AxisService();
        service4.setName(SERVICE4);
        axisServiceGroup1.addService(service4);
        config.addServiceGroup(axisServiceGroup1);
View Full Code Here

        service1.setName(SERVICE1);
        axisServiceGroup1.addService(service1);

        AxisService service4 = new AxisService();
        service4.setName(SERVICE4);
        axisServiceGroup1.addService(service4);
        config.addServiceGroup(axisServiceGroup1);

        // Now create another ServiceGroup with S2 and S4
        AxisServiceGroup axisServiceGroup2 = new AxisServiceGroup();
        axisServiceGroup2.setServiceGroupName(SERVICE_GROUP2);
View Full Code Here

        // Now create another ServiceGroup with S2 and S4
        AxisServiceGroup axisServiceGroup2 = new AxisServiceGroup();
        axisServiceGroup2.setServiceGroupName(SERVICE_GROUP2);
        AxisService service2 = new AxisService();
        service2.setName(SERVICE2);
        axisServiceGroup2.addService(service2);

        AxisService service24 = new AxisService();
        service24.setName(SERVICE4);
        axisServiceGroup2.addService(service24);
        try {
View Full Code Here

        service2.setName(SERVICE2);
        axisServiceGroup2.addService(service2);

        AxisService service24 = new AxisService();
        service24.setName(SERVICE4);
        axisServiceGroup2.addService(service24);
        try {
            // This should fail!
            config.addServiceGroup(axisServiceGroup2);
        } catch (AxisFault axisFault) {
            // This is expected because S4 was a duplicate name to an already existing service
View Full Code Here

        AxisConfiguration ac = new AxisConfiguration();
        ConfigurationContext cc = new ConfigurationContext(ac);
        AxisService as1 = new AxisService("Service1");
        AxisServiceGroup sg = new AxisServiceGroup(ac);
        sg.addService(as1);
        ServiceGroupContext sgc = cc.createServiceGroupContext(sg);

        ServiceContext sc1 = sgc.getServiceContext(as1);

        AxisService as2 = new AxisService("Service2");
View Full Code Here

        ServiceGroupContext sgc = cc.createServiceGroupContext(sg);

        ServiceContext sc1 = sgc.getServiceContext(as1);

        AxisService as2 = new AxisService("Service2");
        sg.addService(as2);
        ServiceContext sc2 = sgc.getServiceContext(as2);

        ac.addService(as1);
        ac.addService(as2);
View Full Code Here

    HttpServletResponse response = (HttpServletResponse) pathParams.getParameter( "httpresponse" ); //$NON-NLS-1$
    ServletConfig servletConfig = (ServletConfig) pathParams.getParameter( "servletconfig" ); //$NON-NLS-1$

    // create a service group and group context for this service
    AxisServiceGroup axisServiceGroup = new AxisServiceGroup( context.getAxisConfiguration() );
    axisServiceGroup.addService( axisService );
    ServiceGroupContext serviceGroupContext = new ServiceGroupContext( context, axisServiceGroup );
    // create a service context
    ServiceContext serviceContext = serviceGroupContext.getServiceContext( axisService );
    // get an operation by name, if possible
    AxisOperation axisOperation = axisService.getOperationByAction( operationName );
View Full Code Here

        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);
        ServiceContext serviceContext = gCtx.getServiceContext(axisService);
        ctx.setServiceContext(serviceContext);
        ctx.setAxisService(axisService);
        OutInAxisOperation outInAxisOperation = new OutInAxisOperation(new QName("http://rampart.org", "test"));
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.