Examples of AxisEngine


Examples of org.apache.axis2.engine.AxisEngine

 
      Sandesha2TransportOutDesc sandesha2TransportOutDesc = new Sandesha2TransportOutDesc();
      msgContext.setTransportOut(sandesha2TransportOutDesc);
 
       // sending the message once through Sandesha2TransportSender.
       AxisEngine engine = new AxisEngine(configurationContext);
 
      if (msgContext.isPaused())
        engine.resumeSend(msgContext);
      else {
        //this invocation has to be a blocking one.
       
        Boolean isTransportNonBlocking = (Boolean) msgContext.getProperty(MessageContext.TRANSPORT_NON_BLOCKING);
        if (isTransportNonBlocking!=null && isTransportNonBlocking.booleanValue())
          msgContext.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, Boolean.FALSE);
       
        engine.send(msgContext);
       
        msgContext.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, isTransportNonBlocking);
      }
    }
    if (log.isDebugEnabled())
View Full Code Here

Examples of org.apache.axis2.engine.AxisEngine

      //
      // We have done all of our updates, so commit the transaction
      if(transaction != null && transaction.isActive()) transaction.commit();
     
      AxisEngine engine = new AxisEngine(context);
      try{
        engine.send(outMessage);       
      }
      catch(AxisFault e){
        FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg,
            SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendCreateSeqResponse,
                                             SandeshaUtil.getStackTraceFromException(e)), e);
View Full Code Here

Examples of org.apache.axis2.engine.AxisEngine

      //says that the inbound msg of this was a LastMessage - so the new msg will also be a LastMessage
      outMessageContext.setProperty(Sandesha2Constants.MessageContextProperties.INBOUND_LAST_MESSAGE, Boolean.TRUE);
      outMessageContext.setProperty(RequestResponseTransport.TRANSPORT_CONTROL, msgContext.getProperty(RequestResponseTransport.TRANSPORT_CONTROL));
      msgContext.getOperationContext().setProperty (Constants.RESPONSE_WRITTEN,Constants.VALUE_TRUE);
     
      AxisEngine engine = new AxisEngine (rmMsgCtx.getConfigurationContext());
      engine.send(outMessageContext);
     
    }
   
   
   
View Full Code Here

Examples of org.apache.axis2.engine.AxisEngine

    if(transaction != null && transaction.isActive()) {
      transaction.commit();
      transaction = null;
    }

    AxisEngine engine = new AxisEngine(closeSequenceMsg.getConfigurationContext());

    try {
      engine.send(closeSequenceResponseMsg);
    } catch (AxisFault e) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendCloseResponse,
          sequenceId, e.toString());
      throw new SandeshaException(message, e);
    }
View Full Code Here

Examples of org.apache.axis2.engine.AxisEngine

      if(transaction != null && transaction.isActive()) transaction.commit();
     
      MessageContext outMessage = terminateSequenceResponse.getMessageContext();
      EndpointReference toEPR = outMessage.getTo();
     
      AxisEngine engine = new AxisEngine(terminateSeqMsg.getConfigurationContext());
           
      outMessage.setServerSide(true);
           
      try {             
        engine.send(outMessage);
      } catch (AxisFault e) {
        if (log.isDebugEnabled())
          log.debug("Unable to send terminate sequence response", e);
       
        throw new SandeshaException(
            SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendTerminateResponse), e);
      }
     
      if (toEPR.hasAnonymousAddress()) {
        terminateSeqMsg.getOperationContext().setProperty(
            org.apache.axis2.Constants.RESPONSE_WRITTEN, "true");
      } else {
        terminateSeqMsg.getOperationContext().setProperty(
            org.apache.axis2.Constants.RESPONSE_WRITTEN, "false");
      }

    } else {
      //if RM 1.0 Anonymous scenario we will be trying to attache the TerminateSequence of the response side
      //as the response message.
     
      String outgoingSideInternalSeqId = SandeshaUtil.getOutgoingSideInternalSequenceID(sequenceId);
      SenderBean senderFindBean = new SenderBean ();
      senderFindBean.setInternalSequenceID(outgoingSideInternalSeqId);
      senderFindBean.setMessageType(Sandesha2Constants.MessageTypes.TERMINATE_SEQ);
      senderFindBean.setSend(true);
      senderFindBean.setReSend(false);
     
      SenderBean outgoingSideTerminateBean = storageManager.getSenderBeanMgr().findUnique(senderFindBean);
      if (outgoingSideTerminateBean!=null) {
     
        EndpointReference toEPR = new EndpointReference (outgoingSideTerminateBean.getToAddress());
        if (toEPR.hasAnonymousAddress()) {
          String messageKey = outgoingSideTerminateBean
              .getMessageContextRefKey();
          MessageContext message = storageManager
              .retrieveMessageContext(messageKey, context);

          RMMsgContext rmMessage = MsgInitializer.initializeMessage(message);
         
          // attaching the this outgoing terminate message as the
          // response to the incoming terminate message.
          message.setTransportOut(terminateSeqMsg.getTransportOut());
          message.setProperty(MessageContext.TRANSPORT_OUT,terminateSeqMsg.getProperty(MessageContext.TRANSPORT_OUT));
          message.setProperty(Constants.OUT_TRANSPORT_INFO, terminateSeqMsg.getProperty(Constants.OUT_TRANSPORT_INFO));
                 
          terminateSeqMsg.getOperationContext().setProperty(org.apache.axis2.Constants.RESPONSE_WRITTEN, "true");
         
          AxisEngine engine = new AxisEngine(context);
          try {             
            engine.send(message);
          } catch (AxisFault e) {
            if (log.isDebugEnabled())
              log.debug("Unable to send terminate sequence response", e);
           
            throw new SandeshaException(
View Full Code Here

Examples of org.apache.axis2.engine.AxisEngine

    RMMsgCreator.addAckMessage(ackRMMsgCtx, sequenceId, rmdBean);
    ackRMMsgCtx.getMessageContext().setServerSide(true);

    if (acksTo.hasAnonymousAddress()) {

      AxisEngine engine = new AxisEngine(ackRMMsgCtx.getMessageContext().getConfigurationContext());

      // setting CONTEXT_WRITTEN since acksto is anonymous
      if (rmMsgCtx.getMessageContext().getOperationContext() == null) {
        // operation context will be null when doing in a GLOBAL
        // handler.
       
        ServiceContext serviceCtx = msgContext.getServiceContext();
        OperationContext opCtx =  ContextFactory.createOperationContext(ackOperation, serviceCtx);

        rmMsgCtx.getMessageContext().setOperationContext(opCtx);
      }

      rmMsgCtx.getMessageContext().getOperationContext().setProperty(org.apache.axis2.Constants.RESPONSE_WRITTEN,
          Constants.VALUE_TRUE);

      rmMsgCtx.getMessageContext().setProperty(Sandesha2Constants.ACK_WRITTEN, "true");

      try {
        engine.send(ackRMMsgCtx.getMessageContext());
      } catch (AxisFault e1) {
        throw new SandeshaException(e1.getMessage());
      }

    } else {
View Full Code Here

Examples of org.apache.axis2.engine.AxisEngine

    ackRMMsgContext.getMessageContext().setProperty(Sandesha2Constants.ACK_WRITTEN, "true");

    ackRMMsgContext.getMessageContext().setServerSide(true);
   
    AxisEngine engine = new AxisEngine(configContext);
    engine.send(ackMsgContext);
   
    if (log.isDebugEnabled())
      log.debug("Exit: AcknowledgementManager::sendAckNow");   
 
View Full Code Here

Examples of org.apache.axis2.engine.AxisEngine

        Sandesha2Constants.SequenceProperties.ADDRESSING_NAMESPACE_VALUE, storageManager);
    String anonymousURI = SpecSpecificConstants.getAddressingAnonymousURI(addressingNamespaceURI);

    if (anonymousURI.equals(acksTo.getAddress())) {

      AxisEngine engine = new AxisEngine(ackRMMsgCtx.getMessageContext().getConfigurationContext());

      // setting CONTEXT_WRITTEN since acksto is anonymous
      if (rmMsgCtx.getMessageContext().getOperationContext() == null) {
        // operation context will be null when doing in a GLOBAL
        // handler.
        try {
          AxisOperation op = AxisOperationFactory.getAxisOperation(WSDL20_2004Constants.MEP_CONSTANT_IN_OUT);
          OperationContext opCtx = new OperationContext(op);
          rmMsgCtx.getMessageContext().setAxisOperation(op);
          rmMsgCtx.getMessageContext().setOperationContext(opCtx);
        } catch (AxisFault e2) {
          throw new SandeshaException(e2.getMessage());
        }
      }

      rmMsgCtx.getMessageContext().getOperationContext().setProperty(org.apache.axis2.Constants.RESPONSE_WRITTEN,
          Constants.VALUE_TRUE);

      rmMsgCtx.getMessageContext().setProperty(Sandesha2Constants.ACK_WRITTEN, "true");

      try {
        engine.send(ackRMMsgCtx.getMessageContext());
      } catch (AxisFault e1) {
        throw new SandeshaException(e1.getMessage());
      }

    } else {
View Full Code Here

Examples of org.apache.axis2.engine.AxisEngine

    closeSequenceResponseMsg.setResponseWritten(true);

    closeSeqResponseRMMsg.addSOAPEnvelope();

    AxisEngine engine = new AxisEngine(closeSequenceMsg.getConfigurationContext());

    try {
      engine.send(closeSequenceResponseMsg);
    } catch (AxisFault e) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendCloseResponse,
          sequenceId, e.toString());
      throw new SandeshaException(message, e);
    }
View Full Code Here

Examples of org.apache.axis2.engine.AxisEngine

    Sandesha2TransportOutDesc sandesha2TransportOutDesc = new Sandesha2TransportOutDesc();
    msgContext.setTransportOut(sandesha2TransportOutDesc);

     // sending the message once through Sandesha2TransportSender.
     AxisEngine engine = new AxisEngine(configurationContext);

    if (msgContext.isPaused())
      engine.resumeSend(msgContext);
    else {
     
      //this invocation has to be a blocking one.
     
      Boolean isTransportNonBlocking = (Boolean) msgContext.getProperty(MessageContext.TRANSPORT_NON_BLOCKING);
      if (isTransportNonBlocking!=null && isTransportNonBlocking.booleanValue()==true)
        msgContext.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, Boolean.FALSE);
     
      engine.send(msgContext);
     
      msgContext.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, isTransportNonBlocking);
    }

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.