Package org.apache.axis2.context

Examples of org.apache.axis2.context.OperationContext


            }
           
           
            this.sender = sender;
           
            OperationContext opCtx = this.msgContext.getOperationContext();
           
            if(!this.isInitiator && this.sender) {
                //Get hold of the incoming msg ctx
                MessageContext inMsgCtx;
                if (opCtx != null
                        && (inMsgCtx = opCtx
                                .getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE)) != null
                                && msgContext.getProperty(WSHandlerConstants.RECV_RESULTS) == null) {
                    msgContext.setProperty(WSHandlerConstants.RECV_RESULTS,
                            inMsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS));
                   
                    //If someone set the sct_id externally use it at the receiver
                    msgContext.setProperty(SCT_ID, inMsgCtx.getProperty(SCT_ID));
                }
            }
           
            if(this.isInitiator && !this.sender) {
                MessageContext outMsgCtx;
                if (opCtx != null
                        && (outMsgCtx = opCtx
                                .getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE)) != null) {
                   
                    //If someone set the sct_id externally use it at the receiver
                    msgContext.setProperty(SCT_ID, outMsgCtx.getProperty(SCT_ID));
                }
View Full Code Here


       
        try {
            //if client side then check whether sig conf enabled
            //and get hold of the stored signature values
            if(this.isInitiator && !this.sender && policyData.isSignatureConfirmation()) {
                OperationContext opCtx = msgContext.getOperationContext();
                MessageContext outMsgCtx = opCtx
                        .getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                msgContext.setProperty(WSHandlerConstants.SEND_SIGV, outMsgCtx
                        .getProperty(WSHandlerConstants.SEND_SIGV));
            }
        } catch (AxisFault e) {
View Full Code Here

            return;
        }
       
        //Copy the RECV_RESULTS if available
        if(!rmd.isInitiator()) {
            OperationContext opCtx = msgCtx.getOperationContext();
            MessageContext inMsgCtx;
            if(opCtx != null &&
                    (inMsgCtx = opCtx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE)) != null) {
                msgCtx.setProperty(WSHandlerConstants.RECV_RESULTS,
                        inMsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS));
            }
        }
       
View Full Code Here

       
    }
   
    private boolean isSecurityValidationFault(MessageContext msgCtx) throws AxisFault {
       
        OperationContext opCtx = msgCtx.getOperationContext();
        MessageContext inMsgCtx;
        if(opCtx != null &&
                (inMsgCtx = opCtx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE)) != null) {
                 Boolean secErrorFlag = (Boolean) inMsgCtx.getProperty(RampartConstants.SEC_FAULT);
                
                 if (secErrorFlag != null && secErrorFlag.equals(Boolean.TRUE)) {
                     return true;
                 }
View Full Code Here

        org.apache.axis2.context.MessageContext axis2MC
                = new org.apache.axis2.context.MessageContext();
        axis2MC.setConfigurationContext(this.configContext);

        ServiceContext svcCtx = new ServiceContext();
        OperationContext opCtx = new OperationContext(new InOutAxisOperation(), svcCtx);
        axis2MC.setServiceContext(svcCtx);
        axis2MC.setOperationContext(opCtx);
        MessageContext mc = new Axis2MessageContext(axis2MC, synapseConfig, this);
        mc.setMessageID(UIDGenerator.generateURNString());
        try {
View Full Code Here

            handleException("Error creating an iterated copy of the message", af, synCtx);
        }

        // if the continuation of the parent message is stopped from here set the RESPONSE_WRITTEN
        // property to SKIP to skip the blank http response
        OperationContext opCtx
            = ((Axis2MessageContext) synCtx).getAxis2MessageContext().getOperationContext();
        if (!continueParent && opCtx != null) {
            opCtx.setProperty(Constants.RESPONSE_WRITTEN,"SKIP");
        }

        synLog.traceOrDebug("End : Iterate mediator");

        // whether to continue mediation on the original message
View Full Code Here

            iter.next().mediate(getClonedMessageContext(synCtx, i++, targets.size()));
        }

        // if the continuation of the parent message is stopped from here set the RESPONSE_WRITTEN
        // property to SKIP to skip the blank http response
        OperationContext opCtx
            = ((Axis2MessageContext) synCtx).getAxis2MessageContext().getOperationContext();
        if (!continueParent && opCtx != null) {
            opCtx.setProperty(Constants.RESPONSE_WRITTEN, "SKIP");
        }

        // finalize tracing and debugging
        synLog.traceOrDebug("End : Clone mediator");
View Full Code Here

          msgCtx.getProperty(MessageContext.TRANSPORT_IN));
      responseMessageContext.setServiceContext(msgCtx.getServiceContext());
      responseMessageContext.setServiceGroupContext(msgCtx.getServiceGroupContext());
     
      //copying required properties from op. context to the response msg ctx.
      OperationContext requestMsgOpCtx = msgCtx.getOperationContext();
      if (requestMsgOpCtx!=null) {
           if (responseMessageContext.getProperty(HTTPConstants.MTOM_RECEIVED_CONTENT_TYPE)==null) {
             responseMessageContext.setProperty(HTTPConstants.MTOM_RECEIVED_CONTENT_TYPE,
                 requestMsgOpCtx.getProperty(HTTPConstants.MTOM_RECEIVED_CONTENT_TYPE));
           }
          
           if (responseMessageContext.getProperty(HTTPConstants.CHAR_SET_ENCODING)==null) {
             responseMessageContext.setProperty(HTTPConstants.CHAR_SET_ENCODING,
                 requestMsgOpCtx.getProperty(HTTPConstants.CHAR_SET_ENCODING));
           }
      }

      // If request is REST we assume the responseMessageContext is REST,
      // so set the variable
View Full Code Here

   
    if (faultPart!=null) {
      RelatesTo relatesTo = msgContext.getRelatesTo();
      if (relatesTo!=null) {
        String relatesToValue = relatesTo.getValue();
        OperationContext operationContext = configContext.getOperationContext(relatesToValue);
        if (operationContext!=null) {
          MessageContext requestMessage = operationContext.getMessageContext(OperationContextFactory.MESSAGE_LABEL_OUT_VALUE);
          if (requestMessage!=null) {
            if(SandeshaUtil.isRetriableOnFaults(requestMessage)){
             
              SandeshaListener faultCallback = (SandeshaListener) operationContext.getProperty(SandeshaClientConstants.SANDESHA_LISTENER);
              if (faultCallback!=null) {
               
               
                //constructing the fault
                AxisFault axisFault = getAxisFaultFromFromSOAPFault (faultPart);
View Full Code Here

        String value = relatesTo.getValue();
       
        //TODO do not drop, relationshipTypes other than reply
       
        ConfigurationContext configurationContext = rmMsgContext.getMessageContext().getConfigurationContext();
        OperationContext operationContextFromMap = configurationContext.getOperationContext(value);
        OperationContext operationContext = rmMsgContext.getMessageContext().getOperationContext();
       
       
        //reply messages should be dropped if it cannot be instance dispatched.
        //I.e. both not having a op. ctx not and not having a op. ctx in the global list.
        if (operationContext==null && operationContextFromMap==null) {
View Full Code Here

TOP

Related Classes of org.apache.axis2.context.OperationContext

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.