Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.AxisEngine$TranportNonBlockingInvocationWorker


        private void handleException(String msg, Exception e, HttpResponse response) {
            log.error(msg, e);

            try {
                AxisEngine engine = new AxisEngine(configurationContext);
                msgContext.setProperty(MessageContext.TRANSPORT_OUT, response.getOutputStream());
                msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, response.getOutputStream());
                MessageContext faultContext = engine.createFaultMessageContext(msgContext, e);
                engine.sendFault(faultContext);

            } catch (Exception ex) {
                response.setHeader(CONTENT_TYPE, TEXT_PLAIN);
                OutputStreamWriter out = new OutputStreamWriter(
                    response.getOutputStream());
View Full Code Here


        } catch (AxisFault e) {
            HttpResponse response = request.createHttpResponse();

            try {
                AxisEngine engine = new AxisEngine(configurationContext);
                msgContext.setProperty(MessageContext.TRANSPORT_OUT, response.getOutputStream());
                msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, response.getOutputStream());

                MessageContext faultContext = engine.createFaultMessageContext(msgContext, e);
                engine.sendFault(faultContext);

                response.setStatus(ResponseStatus.INTERNAL_SERVER_ERROR);

            } catch (Exception ex) {
                response.setStatus(ResponseStatus.INTERNAL_SERVER_ERROR);
View Full Code Here

            log.error("Error creating response SOAP envelope", e);
        } catch (IOException e) {
            log.error("Error closing input stream from which message was read", e);
        }

        AxisEngine engine = new AxisEngine(cfgCtx);
        try {
            engine.receive(responseMsgCtx);
        } catch (AxisFault af) {
            log.error("Fault processing response message through Axis2", af);
        }

        try {
View Full Code Here

     */
    public void init(ConfigurationContext cfgCtx, TransportInDescription transportIn)
        throws AxisFault {
       
        this.cfgCtx = cfgCtx;
        this.engine = new AxisEngine(cfgCtx);
        this.transportIn  = transportIn;
        this.transportOut = cfgCtx.getAxisConfiguration().getTransportOut(transportName);

        if (useAxis2ThreadPool) {
            //this.workerPool = cfgCtx.getThreadPool(); not yet implemented
View Full Code Here

     * @throws AxisFault on error
     */
    public void init(ConfigurationContext cfgCtx, TransportOutDescription transportOut)
        throws AxisFault {
        this.cfgCtx = cfgCtx;
        this.engine = new AxisEngine(cfgCtx);
        this.transportIn  = cfgCtx.getAxisConfiguration().getTransportIn(transportName);
        this.transportOut = transportOut;
    }
View Full Code Here

        log.debug(e.getStackTrace().toString());
      }

      if (resenvelope != null) {
        responseMessageContext.setEnvelope(resenvelope);
        AxisEngine engine = new AxisEngine(msgCtx
            .getConfigurationContext());
       
        if (isFaultEnvelope(resenvelope)) {
          engine.receiveFault(responseMessageContext);
        }else {
          engine.receive(responseMessageContext);
        }
      }
     
    } catch (Exception e) {
      String message = "No valid Sync response...";
View Full Code Here

             
              if (!AxisOperationFactory.MEP_URI_IN_ONLY.equals(msgToInvoke.getAxisOperation().getMessageExchangePattern())) {
                invocationTransaction.commit();
              }
             
              new AxisEngine (msgToInvoke.getConfigurationContext())
                  .resume(msgToInvoke);
              invoked = true;
             
              if (!AxisOperationFactory.MEP_URI_IN_ONLY.equals(msgToInvoke.getAxisOperation().getMessageExchangePattern())) {
                invocationTransaction = storageManager.getTransaction();
View Full Code Here

   
    FaultManager faultManager = new FaultManager();
    RMMsgContext faultMessageContext = faultManager.checkForUnknownSequence(terminateSeqRMMsg,sequenceId);
    if (faultMessageContext != null) {
      ConfigurationContext configurationContext = terminateSeqMsg.getConfigurationContext();
      AxisEngine engine = new AxisEngine(configurationContext);
     
      try {
        engine.sendFault(faultMessageContext.getMessageContext());
      } catch (AxisFault e) {
        throw new SandeshaException ("Could not send the fault message",e);
      }
      return;
    }
View Full Code Here

    terminateSeqResponseRMMsg.setFlow(MessageContext.OUT_FLOW);
    terminateSeqResponseRMMsg.setProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE,"true");

    outMessage.setResponseWritten(true);
   
    AxisEngine engine = new AxisEngine (terminateSeqMsg.getConfigurationContext());
   
    EndpointReference toEPR = terminateSeqMsg.getTo();
   
    try {
      engine.send(outMessage);
    } catch (AxisFault e) {
      String message = "Could not send the terminate sequence response";
      throw new SandeshaException (message,e);
    }
   
View Full Code Here

    rmMsgCtx.setProperty(Sandesha2Constants.MESSAGE_STORE_KEY,key);
    rmMsgCtx.setProperty(Sandesha2Constants.SET_SEND_TO_TRUE,Sandesha2Constants.VALUE_TRUE);
    rmMsgCtx.getMessageContext().setTransportOut(new Sandesha2TransportOutDesc ());
    addTerminateSeqTransaction.commit();
   
      AxisEngine engine = new AxisEngine (configurationContext);
      try {
      engine.send(msgContext);
    } catch (AxisFault e) {
      throw new SandeshaException (e.getMessage());
    }
  }
View Full Code Here

TOP

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

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.