Package org.apache.axis2.description

Examples of org.apache.axis2.description.OperationDescription


                .getOperations());
        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
        String operationName = (String) req.getParameter("operation");
        if (serviceName != null && moduleName != null && operationName != null) {
            try {
                OperationDescription od =
                        configContext.getAxisConfiguration().getService(
                                new QName(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");
            } catch (AxisFault axisFault) {
View Full Code Here


        ModuleDescription m1 = new ModuleDescription(new QName("", "A Mdoule 1"));
        m1.setInFlow(new MockFlow("service module inflow", 4));
        //m1.setFaultInFlow(new MockFlow("service module faultflow", 1));
        service.engageModule(m1);

        OperationDescription operation = new OperationDescription(operationName);
        service.addOperation(operation);

        UtilServer.deployService(service);
        UtilServer.start();
    }
View Full Code Here

        assertTrue(flow.getHandlerCount() > 0);
        flow = service.getOutFlow();
        assertTrue( flow.getHandlerCount() > 0);
        assertNotNull(service.getParameter("para2"));

        OperationDescription op = service.getOperation(new QName("opname"));
        assertNotNull(op);

    }
View Full Code Here

        ConfigurationContext configContext = new ConfigurationContext(new AxisConfigurationImpl());
        LocalTransportReceiver.CONFIG_CONTEXT = configContext;

        ServiceDescription service = new ServiceDescription(serviceName);
        service.addParameter(new ParameterImpl(AbstractMessageReceiver.SERVICE_CLASS, MessageContextEnabledEcho.class.getName()));
        OperationDescription operation = new OperationDescription(operationName);
        operation.setMessageReciever(new RawXMLINOnlyMessageReceiver());
        service.addOperation(operation);
        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        LocalTransportReceiver.CONFIG_CONTEXT.getAxisConfiguration().addService(service);
        Utils.resolvePhases(LocalTransportReceiver.CONFIG_CONTEXT.getAxisConfiguration(), service);
    }
View Full Code Here

                invokePhases(phases, msgContext);
            }
            verifyContextBuilt(msgContext);

            OperationContext operationContext = msgContext.getOperationContext();
            OperationDescription operationDescription = operationContext.getAxisOperation();
            phases = operationDescription.getRemainingPhasesInFlow();

            if (paused) {
                resumeInvocationPhases(phases, msgContext);
            } else {
                invokePhases(phases, msgContext);
            }
            paused = msgContext.isPaused();
            if (msgContext.isServerSide() && !paused) {
                // add invoke Phase
                MessageReceiver reciver = operationDescription.getMessageReciever();
                reciver.recieve(msgContext);
            }
        } catch (Throwable e) {
            handleFault(msgContext, e);
        }
View Full Code Here

            faultContext.setEnvelope(envelope);

            OperationContext opContext = context.getOperationContext();
            if (opContext != null) {
                OperationDescription axisOperation = opContext.getAxisOperation();
                ArrayList phases = axisOperation.getPhasesOutFaultFlow();
                invokePhases(phases, context);
            }
            // Write the the error
            TransportSender sender = context.getTransportOut().getSender();
            sender.invoke(faultContext);
View Full Code Here

        throws AxisFault {

        String action = (String) messageContext.getWSAAction();
        if (action != null) {
            QName operationName = new QName(action);
            OperationDescription op = service.getOperation(operationName);

            return op;
        }
        return null;
    }
View Full Code Here

      
      ServiceContext sessionContext = new ServiceContext(new ServiceDescription(),new ConfigurationContext(null));
    MessageContext messageContext1 = this.getBasicMessageContext();
     
      messageContext1.setMessageID(new Long(System.currentTimeMillis()).toString());
      OperationDescription axisOperation = new OperationDescription(new QName("test"));
      OperationContext operationContext1 = axisOperation.findOperationContext(messageContext1, sessionContext);
     
      MessageContext messageContext2 = this.getBasicMessageContext();
      messageContext2.setMessageID(new Long(System.currentTimeMillis()).toString());
      messageContext2.getMessageInformationHeaders().setRelatesTo(new RelatesTo(messageContext1.getMessageID()));
      OperationContext operationContext2 = axisOperation.findOperationContext(messageContext2, sessionContext);
      assertEquals(operationContext1, operationContext2);
    }
View Full Code Here

        MessageContext messageContext)
        throws AxisFault {

        String action = (String) messageContext.getSoapAction();
        if (action != null) {
            OperationDescription op = service.getOperationBySOAPAction(action);
            if(op == null){
                op = service.getOperation(new QName(action));
            }
            return op;
        }
View Full Code Here

        TransportOutDescription transport = new TransportOutDescription(new QName("null"));
        transport.setSender(new HTTPTransportSender());

        TransportInDescription transportIn = new TransportInDescription(new QName("null"));
        axisOp = new OperationDescription(opearationName);

        service = new ServiceDescription(serviceName);
        axisOp.setMessageReciever(new MessageReceiver() {
            public void recieve(MessageContext messgeCtx) throws AxisFault {
                // TODO Auto-generated method stub
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.