Package org.apache.axis2.description

Examples of org.apache.axis2.description.InOutAxisOperation


        AxisService service = new AxisService(serviceName.getLocalPart());

        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        service.addParameter(new Parameter(Constants.SERVICE_CLASS, className));

        AxisOperation axisOp = new InOutAxisOperation(opName);

        axisOp.setMessageReceiver(messageReceiver);
        axisOp.setStyle(WSDLConstants.STYLE_RPC);
        service.addOperation(axisOp);
        service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + opName.getLocalPart(),
                                     axisOp);

        return service;
View Full Code Here


                op_descrip = service.getOperation(new QName(service.getTargetNamespace(),opname));
            }
            if (op_descrip == null) {
                if (mepurl == null) {
                    // assumed MEP is in-out
                    op_descrip = new InOutAxisOperation();
                    op_descrip.setParent(service);

                } else {
                    op_descrip = AxisOperationFactory.getOperationDescription(mepurl);
                }
View Full Code Here

        axisSrvGrp_ABC_save.addService(axisSrv_A_save);
        axisSrvGrp_ABC_save.addService(axisSrv_B_save);
        axisSrvGrp_ABC_save.addService(axisSrv_C_save);

        axisOp_A1_save = new InOutAxisOperation(operation_QName_A1);
        axisOp_A2_save = new InOutAxisOperation(operation_QName_A2);

        axisOp_A1_save.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });

        axisOp_A2_save.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });

        axisSrv_A_save.addOperation(axisOp_A1_save);
        axisSrv_A_save.mapActionToOperation(operation_QName_A1.getLocalPart(), axisOp_A1_save);

        axisSrv_A_save.addOperation(axisOp_A2_save);
        axisSrv_A_save.mapActionToOperation(operation_QName_A2.getLocalPart(), axisOp_A2_save);

        saveAxisConfiguration.addService(axisSrv_A_save);
        saveAxisConfiguration.addService(axisSrv_B_save);
        saveAxisConfiguration.addService(axisSrv_C_save);

        //---------------------

        axisSrvGrp_ABC_restore = new AxisServiceGroup(restoreAxisConfiguration);
        axisSrvGrp_ABC_restore.setServiceGroupName(serviceGroupName_ABC);

        axisSrv_A_restore = new AxisService(service_QName_A.getLocalPart());
        axisSrv_B_restore = new AxisService(service_QName_B.getLocalPart());
        axisSrv_C_restore = new AxisService(service_QName_C.getLocalPart());

        axisSrvGrp_ABC_restore.addService(axisSrv_A_restore);
        axisSrvGrp_ABC_restore.addService(axisSrv_B_restore);
        axisSrvGrp_ABC_restore.addService(axisSrv_C_restore);

        axisOp_A1_restore = new InOutAxisOperation(operation_QName_A1);
        axisOp_A2_restore = new InOutAxisOperation(operation_QName_A2);

        axisOp_A1_restore.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });

        axisOp_A2_restore.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });

        axisSrv_A_restore.addOperation(axisOp_A1_restore);
        axisSrv_A_restore
                .mapActionToOperation(operation_QName_A1.getLocalPart(), axisOp_A1_restore);

        axisSrv_A_restore.addOperation(axisOp_A2_restore);
        axisSrv_A_restore
                .mapActionToOperation(operation_QName_A2.getLocalPart(), axisOp_A2_restore);


        restoreAxisConfiguration.addService(axisSrv_A_restore);
        restoreAxisConfiguration.addService(axisSrv_B_restore);
        restoreAxisConfiguration.addService(axisSrv_C_restore);


        axisOp_A1_save.getRemainingPhasesInFlow().add(phaseSave);
        axisOp_A2_save.getRemainingPhasesInFlow().add(phaseSave);

        axisOp_A1_restore.getRemainingPhasesInFlow().add(phaseRestore);
        axisOp_A2_restore.getRemainingPhasesInFlow().add(phaseRestore);

        //-------------------------------

        axisSrvGrp_ABC_equiv = new AxisServiceGroup(equivAxisConfiguration);
        axisSrvGrp_ABC_equiv.setServiceGroupName(serviceGroupName_ABC);

        axisSrv_A_equiv = new AxisService(service_QName_A.getLocalPart());
        axisSrv_B_equiv = new AxisService(service_QName_B.getLocalPart());
        axisSrv_C_equiv = new AxisService(service_QName_C.getLocalPart());

        axisSrvGrp_ABC_equiv.addService(axisSrv_A_equiv);
        axisSrvGrp_ABC_equiv.addService(axisSrv_B_equiv);
        axisSrvGrp_ABC_equiv.addService(axisSrv_C_equiv);

        axisOp_A1_equiv = new InOutAxisOperation(operation_QName_A1);
        axisOp_A2_equiv = new InOutAxisOperation(operation_QName_A2);

        axisOp_A1_equiv.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });
View Full Code Here

        axisService = new AxisService(serviceName.getLocalPart());
        axisServiceGroup.addService(axisService);


        axisOperation = new InOutAxisOperation(operationName);
        axisOperation.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {

            }
        });
View Full Code Here

        axisService = new AxisService(serviceName.getLocalPart());
        axisServiceGroup.addService(axisService);


        axisOperation = new InOutAxisOperation(operationName);
        axisOperation.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {

            }
        });
View Full Code Here

        axisSrvGrp_ABC.addService(axisSrv_A);
        axisSrvGrp_ABC.addService(axisSrv_B);
        axisSrvGrp_ABC.addService(axisSrv_C);

        axisOp_A1 = new InOutAxisOperation(operation_QName_A1);
        axisOp_A2 = new InOutAxisOperation(operation_QName_A2);

        axisOp_A1.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });

        axisOp_A2.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });

        axisSrv_A.addOperation(axisOp_A1);
        axisSrv_A.mapActionToOperation(operation_QName_A1.getLocalPart(), axisOp_A1);

        axisSrv_A.addOperation(axisOp_A2);
        axisSrv_A.mapActionToOperation(operation_QName_A2.getLocalPart(), axisOp_A2);

        axisConfiguration.addService(axisSrv_A);
        axisConfiguration.addService(axisSrv_B);
        axisConfiguration.addService(axisSrv_C);


        axisOp_A1.getRemainingPhasesInFlow().add(phase1);
        axisOp_A2.getRemainingPhasesInFlow().add(phase1);

        //----------------------------
        // 123 group
        //----------------------------
        axisSrvGrp_123 = new AxisServiceGroup(axisConfiguration);
        axisSrvGrp_123.setServiceGroupName(serviceGroupName_123);

        axisSrv_1 = new AxisService(service_QName_1.getLocalPart());
        axisSrv_2 = new AxisService(service_QName_2.getLocalPart());
        axisSrv_3 = new AxisService(service_QName_3.getLocalPart());
        axisSrv_4 = new AxisService(service_QName_4.getLocalPart());

        axisSrvGrp_123.addService(axisSrv_1);
        axisSrvGrp_123.addService(axisSrv_2);
        axisSrvGrp_123.addService(axisSrv_3);
        axisSrvGrp_123.addService(axisSrv_4);

        axisOp_1_1 = new InOutAxisOperation(operation_QName_1_1);
        axisOp_1_2 = new InOutAxisOperation(operation_QName_1_2);

        axisOp_1_1.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });

        axisOp_1_2.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });

        axisSrv_1.addOperation(axisOp_1_1);
        axisSrv_1.mapActionToOperation(operation_QName_1_1.getLocalPart(), axisOp_1_1);

        axisSrv_1.addOperation(axisOp_1_2);
        axisSrv_1.mapActionToOperation(operation_QName_1_2.getLocalPart(), axisOp_1_2);

        axisConfiguration.addService(axisSrv_1);
        axisConfiguration.addService(axisSrv_2);
        axisConfiguration.addService(axisSrv_3);
        axisConfiguration.addService(axisSrv_4);

        axisOp_1_1.getRemainingPhasesInFlow().add(phase1);
        axisOp_1_2.getRemainingPhasesInFlow().add(phase1);

        //----------------------------
        // DAY group
        //----------------------------
        axisSrvGrp_DAY = new AxisServiceGroup(axisConfiguration);
        axisSrvGrp_DAY.setServiceGroupName(serviceGroupName_DAY);

        axisSrv_Mon = new AxisService(service_QName_Mon.getLocalPart());
        axisSrv_Tue = new AxisService(service_QName_Tue.getLocalPart());
        axisSrv_Wed = new AxisService(service_QName_Wed.getLocalPart());
        axisSrv_Thu = new AxisService(service_QName_Thu.getLocalPart());
        axisSrv_Fri = new AxisService(service_QName_Fri.getLocalPart());

        axisSrvGrp_DAY.addService(axisSrv_Mon);
        axisSrvGrp_DAY.addService(axisSrv_Tue);
        axisSrvGrp_DAY.addService(axisSrv_Wed);
        axisSrvGrp_DAY.addService(axisSrv_Thu);
        axisSrvGrp_DAY.addService(axisSrv_Fri);

        axisOp_Mon_1 = new InOutAxisOperation(operation_QName_Mon_1);
        axisOp_Mon_2 = new InOutAxisOperation(operation_QName_Mon_2);

        axisOp_Mon_1.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {
            }
        });
View Full Code Here

            reg.addParameter(para);

            AxisService service = new AxisService("Service1");
            reg.addService(service);

            AxisOperation opertion = new InOutAxisOperation();
            opertion.setParent(service);
            opertion.addParameter(para);
            fail("This should fails with Parmter is locked can not overide");


        } catch (AxisFault axisFault) {
View Full Code Here

            AxisService service = new AxisService("Service1");
            reg.addService(service);
            service.addParameter(para);

            AxisOperation opertion = new InOutAxisOperation();
            opertion.setParent(service);
            opertion.addParameter(para);
            fail("This should fails with Parmter is locked can not overide");
        } catch (AxisFault axisFault) {

        }
    }
View Full Code Here

        dispatchPhase.addHandler(abd);
        dispatchPhase.addHandler(rud);
        dispatchPhase.addHandler(sabd);
        dispatchPhase.addHandler(smbd);
        configContext.getAxisConfiguration().getInFlowPhases().add(dispatchPhase);
        AxisOperation axisOp = new InOutAxisOperation(operationName);
        axisOp.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) {

            }
        });
        service.addOperation(axisOp);

        AxisEndpoint endpoint = new AxisEndpoint();
        endpoint.setName("NullService");

        AxisBinding binding = new AxisBinding();
        AxisBindingOperation bindingOp = new AxisBindingOperation();

        bindingOp.setAxisOperation(axisOp);
        binding.addChild(bindingOp);
        endpoint.setBinding(binding);
        service.addEndpoint(endpoint.getName(), endpoint);
        service.setEndpointName(endpoint.getName());

        service.mapActionToOperation(operationName.getLocalPart(), axisOp);

        mc = configContext.createMessageContext();
        mc.setTransportIn(transportIn);
        mc.setTransportOut(transportOut);

        mc.setTransportOut(transportOut);
        mc.setServerSide(true);
//        mc.setProperty(MessageContext.TRANSPORT_OUT, System.out);
        SOAPFactory omFac = OMAbstractFactory.getSOAP11Factory();
        mc.setEnvelope(omFac.getDefaultEnvelope());

        Phase phase1 = new Phase("1");
        phase1.addHandler(new TempHandler(1));
        phase1.addHandler(new TempHandler(2));
        phase1.addHandler(new TempHandler(3));
        phase1.addHandler(new TempHandler(4));
        phase1.addHandler(new TempHandler(5));
        phase1.addHandler(new TempHandler(6));
        phase1.addHandler(new TempHandler(7));
        phase1.addHandler(new TempHandler(8));
        phase1.addHandler(new TempHandler(9));

        Phase phase2 = new Phase("2");
        phase2.addHandler(new TempHandler(10));
        phase2.addHandler(new TempHandler(11));
        phase2.addHandler(new TempHandler(12));
        phase2.addHandler(new TempHandler(13));
        phase2.addHandler(new TempHandler(14));
        phase2.addHandler(new TempHandler(15, true));
        phase2.addHandler(new TempHandler(16));
        phase2.addHandler(new TempHandler(17));
        phase2.addHandler(new TempHandler(18));

        Phase phase3 = new Phase("3");
        phase3.addHandler(new TempHandler(19));
        phase3.addHandler(new TempHandler(20));
        phase3.addHandler(new TempHandler(21));
        phase3.addHandler(new TempHandler(22));
        phase3.addHandler(new TempHandler(23));
        phase3.addHandler(new TempHandler(24));
        phase3.addHandler(new TempHandler(25));
        phase3.addHandler(new TempHandler(26));
        phase3.addHandler(new TempHandler(27));

        //TODO
        axisOp.getRemainingPhasesInFlow().add(phase1);
        axisOp.getRemainingPhasesInFlow().add(phase2);
        axisOp.getRemainingPhasesInFlow().add(phase3);

        mc.setWSAAction(operationName.getLocalPart());
        mc.setSoapAction(operationName.getLocalPart());
//        System.out.flush();
View Full Code Here

        org.apache.axis2.context.MessageContext axis2MC
                = new org.apache.axis2.context.MessageContext();
        axis2MC.setConfigurationContext(this.configContext);

        ServiceContext svcCtx = new ServiceContext();
        OperationContext opCtx = new OperationContext(new InOutAxisOperation(), svcCtx);
        axis2MC.setServiceContext(svcCtx);
        axis2MC.setOperationContext(opCtx);
        MessageContext mc = new Axis2MessageContext(axis2MC, synapseConfig, this);
        mc.setMessageID(UUIDGenerator.getUUID());
        try {
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.InOutAxisOperation

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.