Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.AxisEngine


        public void run() {
            try {
                System.out.println("MessageSaveAndRestoreWithMTOMTest:Worker thread started");
                Thread.sleep(5000);
                AxisEngine axisEngine = new AxisEngine(configurationContext);
                System.out.println("MessageSaveAndRestoreWithMTOMTest:Resuming processing");
                ObjectInputStream objectInputStream =
                        new ObjectInputStream(new ByteArrayInputStream(serializedMessageContext));
                MessageContext reconstitutedMessageContext =
                        (MessageContext)objectInputStream.readObject();
                reconstitutedMessageContext.activate(configurationContext);
                axisEngine.resume(reconstitutedMessageContext);
            }
            catch (Exception e) {
                e.printStackTrace();
                fail("An error occurred in the worker thread");
            }
View Full Code Here


        }

        public void run() {
            MessageContext msgCtx = createMessageContext(message);

            AxisEngine engine = new AxisEngine(msgCtx.getConfigurationContext());
            try {
                log.debug("Delegating JMS message for processing to the Axis engine");
                try {
                    engine.receive(msgCtx);
                } catch (AxisFault e) {
                    log.debug("Exception occured when receiving the SOAP message", e);
                    if (msgCtx.isServerSide()) {
                        MessageContext faultContext = MessageContextBuilder.createFaultMessageContext(msgCtx, e);
                        engine.sendFault(faultContext);
                    }
                }
            } catch (AxisFault af) {
                log.error("JMS Worker [" + Thread.currentThread().getName() +
                        "] Encountered an Axis Fault : " + af.getMessage(), af);
View Full Code Here

                    //This assumes that we are on the ultimate execution thread
                    ThreadContextMigratorUtil.performMigrationToContext(
                            Constants.THREAD_CONTEXT_MIGRATOR_LIST_ID, axisResponseMsgCtx);

                    //Create the AxisEngine for the reponse and send it.
                    AxisEngine engine =
                            new AxisEngine(axisResponseMsgCtx.getConfigurationContext());
                    engine.send(axisResponseMsgCtx);
                    //This assumes that we are on the ultimate execution thread
                    ThreadContextMigratorUtil.performContextCleanup(
                            Constants.THREAD_CONTEXT_MIGRATOR_LIST_ID, axisResponseMsgCtx);
                }
            }
View Full Code Here

            // This assumes that we are on the ultimate execution thread
            ThreadContextMigratorUtil.performMigrationToContext(Constants.THREAD_CONTEXT_MIGRATOR_LIST_ID,
                                                                axisResponseMsgCtx);
   
            //Create the AxisEngine for the reponse and send it.
            AxisEngine engine =
                    new AxisEngine(axisResponseMsgCtx.getConfigurationContext());
            if (log.isDebugEnabled()) {
                log.debug("Sending async response.");
            }
            engine.send(axisResponseMsgCtx);
           
            //This assumes that we are on the ultimate execution thread
            ThreadContextMigratorUtil.performContextCleanup(Constants.THREAD_CONTEXT_MIGRATOR_LIST_ID,
                                                            axisResponseMsgCtx);
        } catch (Throwable t) {
View Full Code Here

           
            ThreadContextMigratorUtil.performThreadCleanup(Constants.THREAD_CONTEXT_MIGRATOR_LIST_ID,
                eic.getRequestMessageContext().getAxisMessageContext());
           
            //Create the AxisEngine for the reponse and send it.
            AxisEngine engine =
                new AxisEngine(axisResponseMsgCtx.getConfigurationContext());
            engine.sendFault(axisResponseMsgCtx);
           
        } catch (Throwable t) {
            Throwable faultMessage = InvocationHelper.determineMappedException(t, eic);
            if(faultMessage != null) {
                t = faultMessage;
View Full Code Here

                if (__log.isDebugEnabled()) {
                    __log.debug("Reply mgmt for " + msgContext.getAxisService().getName() +
                            "." + msgContext.getAxisOperation().getName());
                    __log.debug("Reply mgmt message " + outMsgContext.getEnvelope());
                }
                AxisEngine engine = new AxisEngine(
                        msgContext.getOperationContext().getServiceContext().getConfigurationContext());
                engine.send(outMsgContext);
            }
        } catch (IllegalAccessException e) {
            throw new OdeFault("Couldn't invoke method named " + methodName + " in management interface!", e);
        } catch (InvocationTargetException e) {
            throw new OdeFault("Invocation of method " + methodName + " in management interface failed!", e);
View Full Code Here

            outMsgContext.setEnvelope(envelope);

            OMElement responseOp = factory.createOMElement(op, _pmapi);
            responseOp.addChild(response);
            envelope.getBody().addChild(response);
            AxisEngine engine = new AxisEngine(
                    messageContext.getOperationContext().getServiceContext().getConfigurationContext());
            engine.send(outMsgContext);
        }
View Full Code Here

      if (__log.isDebugEnabled()) {
                __log.debug("Reply for " + msgContext.getAxisService().getName() + "."
                        + msgContext.getAxisOperation().getName());
        __log.debug("Reply message " + outMsgContext.getEnvelope());
      }
            AxisEngine engine = new AxisEngine(msgContext.getOperationContext().getServiceContext()
                    .getConfigurationContext());
      engine.send(outMsgContext);
    } else {
            if (__log.isDebugEnabled())
                __log.debug("Received one-way message for " + msgContext.getAxisService().getName() + "."
                        + msgContext.getAxisOperation().getName());
            invokeBusinessLogic(msgContext, null);
View Full Code Here

        return invokeAxisEngine(msgContext);
    }

    private static Handler.InvocationResponse invokeAxisEngine(MessageContext messageContext)
            throws AxisFault {
        AxisEngine axisEngine = new AxisEngine(messageContext.getConfigurationContext());
        return axisEngine.receive(messageContext);

    }
View Full Code Here

        }

        public void run() {
            MessageContext msgCtx = createMessageContext(message);

            AxisEngine engine = new AxisEngine(msgCtx.getConfigurationContext());
            try {
                log.debug("Delegating JMS message for processing to the Axis engine");
                try {
                    engine.receive(msgCtx);
                } catch (AxisFault e) {
                    log.debug("Exception occured when receiving the SOAP message", e);
                    if (msgCtx.isServerSide()) {
                        MessageContext faultContext = MessageContextBuilder.createFaultMessageContext(msgCtx, e);
                        engine.sendFault(faultContext);
                    }
                }
            } catch (AxisFault af) {
                log.error("JMS Worker [" + Thread.currentThread().getName() +
                        "] Encountered an Axis Fault : " + af.getMessage(), af);
View Full Code Here

TOP

Related Classes of org.apache.axis2.engine.AxisEngine

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.