Package org.apache.axis2.description

Examples of org.apache.axis2.description.OperationDescription


                    new QName(ATTNAME));
            if(op_name_att == null){
                throw new DeploymentException(Messages.getMessage("Invalide Operations"));
            }
            String opname = op_name_att.getValue();
            OperationDescription op_descrip = service.getOperation(new QName(opname));
            if(op_descrip == null){
                op_descrip = new OperationDescription();
                op_descrip.setName(new QName(opname));
                log.info(Messages.getMessage(DeploymentErrorMsgs.OP_NOT_FOUN_IN_WSDL, opname));
            }

            //setting the mep of the operation
            OMAttribute op_mep_att = operation.getAttribute(
                    new QName(MEP));
            if(op_mep_att !=null){
                String mep = op_mep_att.getValue();
                op_descrip.setMessageExchangePattern(mep);
            }

            //Opeartion Paramters
            Iterator paramters = operation.getChildrenWithName(
                    new QName(PARAMETERST));
            processParameters(paramters,op_descrip,service);

            // loading the message recivers
            OMElement receiverElement = operation.getFirstChildWithName(
                    new QName(MESSAGERECEIVER));
            if(receiverElement !=null){
                MessageReceiver messageReceiver = loadMessageReceiver(
                        service.getClassLoader(),receiverElement);
                op_descrip.setMessageReceiver(messageReceiver);
            else {
                //setting default message reciver
                MessageReceiver msgReceiver = loadDefaultMessageReciver();
                op_descrip.setMessageReceiver(msgReceiver);
            }

            //Process Module Refs
            Iterator modules = operation.getChildrenWithName(
                    new QName(MODULEST));
View Full Code Here


        ServiceDescription service = new ServiceDescription(serviceName);
        service.setStyle(WSDLService.STYLE_DOC);
        engineContext.getAxisConfiguration().addService(service);

        OperationDescription axisOp = new OperationDescription(operationName);
        axisOp.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messgeCtx) throws AxisFault {

            }
        });
        service.addOperation(axisOp);

        mc = new MessageContext(engineContext, transportIn, 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

                        .getOperations());
        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
        String operationName = req.getParameter("operation");
        if (serviceName != null && moduleName != null && operationName != null) {
            try {
                OperationDescription od =
                        configContext.getAxisConfiguration().getService(
                                serviceName)
                                .getOperation(new QName(operationName));
                od.engageModule(
                        configContext.getAxisConfiguration().getModule(
                                new QName(moduleName)));
                req.getSession().setAttribute(Constants.ENGAGE_STATUS,
                        moduleName +
                                " module engaged to the operation Successfully");
View Full Code Here

                    service.addParameter(new ParameterImpl(parameter.getName(),para));
                }
                HashMap operation = service.getOperations();
                Collection op_col = operation.values();
                for (Iterator iterator = op_col.iterator(); iterator.hasNext();) {
                    OperationDescription operationDescription =
                            (OperationDescription) iterator.next();
                    String op_name = operationDescription.getName().getLocalPart();
                    ArrayList operation_para = operationDescription.getParameters();
                    for (int i = 0; i < operation_para.size(); i++) {
                        Parameter parameter = (Parameter) operation_para.get(i);
                        String para =  req.getParameter(op_name + "_" + parameter.getName());
                        operationDescription.addParameter(
                                new ParameterImpl(parameter.getName(),para));
                    }
                }
            }
            res.setContentType("text/css");
View Full Code Here

            //processing Operations
            Iterator op_itr = moduleElement.getChildrenWithName(new QName(OPRATIONST));
            ArrayList opeartions = processOpeartions(op_itr);
            for (int i = 0; i < opeartions.size(); i++) {
                OperationDescription opeartion = (OperationDescription) opeartions.get(i);
                module.addOperation(opeartion);
            }


        } catch (XMLStreamException e) {
View Full Code Here

                    new QName(ATTNAME));
            if(op_name_att == null){
                throw new DeploymentException(Messages.getMessage("Invalide Operations"));
            }
            String opname = op_name_att.getValue();
            OperationDescription op_descrip = new OperationDescription();
            op_descrip.setName(new QName(opname));

            //Opeartion Paramters
            Iterator paramters = operation.getChildrenWithName(
                    new QName(PARAMETERST));
            processParameters(paramters,op_descrip,module);


            //setting the mep of the operation
            OMAttribute op_mep_att = operation.getAttribute(
                    new QName(MEP));
            if(op_mep_att !=null){
                String mep = op_mep_att.getValue();
                op_descrip.setMessageExchangePattern(mep);
            }

            // loading the message recivers
            OMElement receiverElement = operation.getFirstChildWithName(
                    new QName(MESSAGERECEIVER));
            if(receiverElement !=null){
                MessageReceiver messageReceiver = loadMessageReceiver(
                        engine.getCurrentFileItem().getClassLoader(),receiverElement);
                op_descrip.setMessageReceiver(messageReceiver);
            else {
                //setting default message reciver
                MessageReceiver msgReceiver = loadDefaultMessageReciver();
                op_descrip.setMessageReceiver(msgReceiver);
            }
            //Process Module Refs
            Iterator modules = operation.getChildrenWithName(
                    new QName(MODULEST));
            processOpeasrtionModuleRefs(modules, op_descrip);
View Full Code Here

     */

    public OMElement invokeBlocking(String axisop, OMElement toSend)
            throws AxisFault {

        OperationDescription opDesc =
                serviceContext.getServiceConfig().getOperation(new QName(axisop));
        opDesc = createOpDescAndFillInFlowInformation(opDesc,axisop);
        opDesc.setParent(serviceContext.getServiceConfig());
        MessageContext msgctx = prepareTheSOAPEnvelope(toSend);

        this.lastResponseMessage = super.invokeBlocking(opDesc, msgctx);
        SOAPEnvelope resEnvelope = lastResponseMessage.getEnvelope();
        return resEnvelope.getBody().getFirstElement();
View Full Code Here

     * @throws AxisFault
     */
    public SOAPEnvelope invokeBlocking(String axisop, SOAPEnvelope envelope)
            throws AxisFault {

        OperationDescription opDesc =
                serviceContext.getServiceConfig().getOperation(new QName(axisop));
        opDesc = createOpDescAndFillInFlowInformation(opDesc,axisop);

        MessageContext msgctx = new MessageContext(serviceContext.getEngineContext());
        msgctx.setEnvelope(envelope);
View Full Code Here

    public void invokeNonBlocking(
            String axisop,
            OMElement toSend,
            Callback callback)
            throws AxisFault {
        OperationDescription opDesc =
                serviceContext.getServiceConfig().getOperation(new QName(axisop));
        opDesc = createOpDescAndFillInFlowInformation(opDesc,axisop);
        MessageContext msgctx = prepareTheSOAPEnvelope(toSend);
        //call the underline implementation
        super.invokeNonBlocking(opDesc, msgctx, callback);
View Full Code Here

    public void invokeNonBlocking(
            String axisop,
            SOAPEnvelope envelope,
            Callback callback)
            throws AxisFault {
        OperationDescription opDesc =
                serviceContext.getServiceConfig().getOperation(new QName(axisop));
        opDesc = createOpDescAndFillInFlowInformation(opDesc,axisop);

        MessageContext msgctx = new MessageContext(serviceContext.getEngineContext());
        msgctx.setEnvelope(envelope);
View Full Code Here

TOP

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

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.