Package org.apache.axis2.description

Examples of org.apache.axis2.description.AxisOperation


    // Set the Sequence timout property to 1 second.
    Iterator operations = service.getOperations();
   
    while (operations.hasNext())
    {
      AxisOperation op = (AxisOperation) operations.next();
      SandeshaPolicyBean propertyBean =
        SandeshaUtil.getPropertyBean(op);

      // Indicate that the sequence should timeout after 1 second
      if (propertyBean != null)
View Full Code Here


    // Set the Sequence timout property to 1 second.
    Iterator operations = service.getOperations();
   
    while (operations.hasNext())
    {
      AxisOperation op = (AxisOperation) operations.next();
      SandeshaPolicyBean propertyBean =
        SandeshaUtil.getPropertyBean(op);

      // Indicate that the sequence should timeout after 1 second
      // And that it should be deleted after 2 seconds
View Full Code Here

    // Set the Sequence timout property to 1 second.
    Iterator operations = service.getOperations();
   
    while (operations.hasNext())
    {
      AxisOperation op = (AxisOperation) operations.next();
      SandeshaPolicyBean propertyBean =
        SandeshaUtil.getPropertyBean(op);

      // Indicate that the sequence should timeout after 2 second
      // And that it should be deleted after 2 seconds
View Full Code Here

   
    // Create an RMSBean so the create sequence message can be created
    messageContext.setWSAAction(pingAction);

    // Set the AxisOperation to be InOut
    AxisOperation operation = messageContext.getAxisService().getOperation(Sandesha2Constants.RM_IN_OUT_OPERATION);
    operation.setMessageReceiver(new RMMessageReceiver());
    messageContext.setAxisOperation(operation);

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
   
    // Serialize the application message
View Full Code Here

   
    // Create an RMSBean so the create sequence message can be created
    messageContext.setWSAAction(pingAction);

    // Set the AxisOperation to be InOut
    AxisOperation operation = messageContext.getAxisService().getOperation(Sandesha2Constants.RM_IN_OUT_OPERATION);
    operation.setMessageReceiver(new RMMessageReceiver());
    messageContext.setAxisOperation(operation);

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
   
    // Serialize the application message
View Full Code Here

   
    // Create an RMSBean so the create sequence message can be created
    messageContext.setWSAAction(pingAction);

    // Set the AxisOperation to be InOut
    AxisOperation operation = messageContext.getAxisService().getOperation(Sandesha2Constants.RM_IN_OUT_OPERATION);
    operation.setMessageReceiver(new RMMessageReceiver());
    messageContext.setAxisOperation(operation);

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
   
    // Serialize the application message
View Full Code Here

        return axisService;
    }

    protected void initAxisOperations(AxisService axisService) {
        for (Iterator<?> i = axisService.getOperations(); i.hasNext();) {
            AxisOperation axisOp = (AxisOperation)i.next();
            Operation op = getOperation(axisOp);
            if (op != null) {

                if (op.isNonBlocking()) {
                    axisOp.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_ONLY);
                } else {
                    axisOp.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_OUT);
                }

                MessageReceiver msgrec = null;
                if (op.isNonBlocking()) {
                    msgrec = new Axis2ServiceInMessageReceiver(this, op);
                } else {
                    msgrec = new Axis2ServiceInOutSyncMessageReceiver(this, op);
                }
                axisOp.setMessageReceiver(msgrec);
            }
        }
    }
View Full Code Here

            Method operationMethod = getMethod(serviceInterface, operationName);
            SDODataBinding dataBinding = new SDODataBinding(cl, typeHelper, responseTypeQN, omd.isDocLitWrapped());
            WebServiceEntryPointInOutSyncMessageReceiver msgrec = new WebServiceEntryPointInOutSyncMessageReceiver(entryPointProxy, operationMethod,
                    dataBinding, cl);

            AxisOperation axisOp = axisService.getOperation(operationQN);
            axisOp.setMessageExchangePattern(WSDLConstants.MEP_URI_IN_OUT);
            axisOp.setMessageReceiver(msgrec);
        }

        return axisService;
    }
View Full Code Here

            serviceProviderAnnot.setServiceName(service.getName());
            serviceProviderAnnot.setTargetNamespace(service.getTargetNamespace());
        }

        for(Iterator<AxisOperation> opIterator = service.getOperations() ; opIterator.hasNext() ;){
            AxisOperation operation = opIterator.next();
            operation.setMessageReceiver(JAXWSMessageReceiver.class.newInstance());
            String MEP = operation.getMessageExchangePattern();
            if (!WSDLUtil.isOutputPresentForMEP(MEP)) {
                List<MethodDescriptionComposite> mdcList = dbc.getMethodDescriptionComposite(operation.getName().toString());
                for(Iterator<MethodDescriptionComposite> mIterator = mdcList.iterator(); mIterator.hasNext();){
                    MethodDescriptionComposite mdc = mIterator.next();
                    //TODO: JAXWS spec says need to check Holder param exist before taking a method as OneWay
                    mdc.setOneWayAnnot(true);
                }
View Full Code Here

   
    // If the call application is a 2-way MEP, and uses a anonymous replyTo, and the
    // RM 1.1 spec level, then we must have MakeConnection enabled. We check that here,
    // before we start creating a new Sequence.
    if(!serverSide) {
      AxisOperation op = msgContext.getAxisOperation();
      int mep = WSDLConstants.MEP_CONSTANT_INVALID;
      if(op != null) {
        mep = op.getAxisSpecifMEPConstant();
      }
      if(mep == WSDLConstants.MEP_CONSTANT_OUT_IN) {
        String specVersion = null;
        if(rmsBean == null) {
          specVersion = SequenceManager.getSpecVersion(msgContext, storageManager);
        } else {
          specVersion = rmsBean.getRMVersion();
        }
        if(specVersion == Sandesha2Constants.SPEC_VERSIONS.v1_1) {
          SandeshaPolicyBean policy = SandeshaUtil.getPropertyBean(configContext.getAxisConfiguration());
          if(!policy.isEnableMakeConnection()) {
            String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.makeConnectionDisabled);
            throw new SandeshaException(message);
          }
        }
      }
    }

    //setting the reference msg store key.
    if (rmsBean!=null && rmsBean.getReferenceMessageStoreKey()==null) {
      //setting this application message as the reference, if it hsnt already been set.
     
      String referenceMsgKey = SandeshaUtil.getUUID();
      storageManager.storeMessageContext(referenceMsgKey, msgContext);
      rmsBean.setReferenceMessageStoreKey(referenceMsgKey);
    }
   
    String outSequenceID = null;

    if (rmsBean == null) {
      // SENDING THE CREATE SEQUENCE.
      synchronized (RMSBeanMgr.class) {
        // There is a timing window where 2 sending threads can hit this point
        // at the same time and both will create an RMSBean to the same endpoint
        // with the same internal sequenceid
        // Check that someone hasn't created the bean
        rmsBean = SandeshaUtil.getRMSBeanFromInternalSequenceId(storageManager, internalSequenceId);
       
        // if first message - setup the sending side sequence - both for the
        // server and the client sides.
        if (rmsBean == null) {
          rmsBean = SequenceManager.setupNewClientSequence(msgContext, internalSequenceId, storageManager);
          rmsBean = addCreateSequenceMessage(rmMsgCtx, rmsBean, storageManager);
        }
      }
   
    } else {
      outSequenceID = rmsBean.getSequenceID();
    }
   
    // the message number that was last used.
    long systemMessageNumber = rmsBean.getNextMessageNumber();

    // The number given by the user has to be larger than the last stored
    // number.
    if (givenMessageNumber > 0 && givenMessageNumber <= systemMessageNumber) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.msgNumberNotLargerThanLastMsg, Long
          .toString(givenMessageNumber));
      throw new SandeshaException(message);
    }

    // Finding the correct message number.
    long messageNumber = -1;
    if (givenMessageNumber > 0) // if given message number is valid use it.
                  // (this is larger than the last stored due
                  // to the last check)
      messageNumber = givenMessageNumber;
    else if (systemMessageNumber > 0) { // if system message number is valid
                      // use it.
      messageNumber = systemMessageNumber + 1;
    } else { // This is the first message (systemMessageNumber = -1)
      messageNumber = 1;
    }

    if (serverSide) {
      // Deciding whether this is the last message. We assume it is if it relates to
      // a message which arrived with the LastMessage flag on it.
      RMDBean rmdBean = SandeshaUtil.getRMDBeanFromSequenceId(storageManager, inboundSequence);     
      // Get the last in message
      String lastRequestId = rmdBean.getLastInMessageId();
      RelatesTo relatesTo = msgContext.getRelatesTo();
      if(relatesTo != null && lastRequestId != null &&
          lastRequestId.equals(relatesTo.getValue())) {
        lastMessage = true;
      }
     
      //or a constant property may call it as the last msg
      Boolean inboundLast = (Boolean) msgContext.getProperty(Sandesha2Constants.MessageContextProperties.INBOUND_LAST_MESSAGE);
      if (inboundLast!=null && inboundLast.booleanValue())
        lastMessage = true;
    }
   
    if (lastMessage)
      rmsBean.setLastOutMessage(messageNumber);   

    // set this as the response highest message.
    rmsBean.setHighestOutMessageNumber(messageNumber);
   
    // saving the used message number, and the expected reply count
    boolean startPolling = false;
    if (!dummyMessage) {
      rmsBean.setNextMessageNumber(messageNumber);

      // Identify the MEP associated with the message.
      AxisOperation op = msgContext.getAxisOperation();
      int mep = WSDLConstants.MEP_CONSTANT_INVALID;
      if(op != null) {
        mep = op.getAxisSpecifMEPConstant();
      }

      if(mep == WSDLConstants.MEP_CONSTANT_OUT_IN) {
        // We only match up requests and replies when we are doing sync interactions
        EndpointReference replyTo = msgContext.getReplyTo();
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.AxisOperation

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.