Package org.apache.axis2.addressing

Examples of org.apache.axis2.addressing.RelatesTo


                     // synapse AxisOperation always has the synapse message receiver. And also to be send in the synapse
                     // fault mediators we need to set the SENDING_FAULT property as well.
                    } else if (msgReceiver != null && tempBean.getMessageType() == Sandesha2Constants.MessageTypes.APPLICATION) {
                        try {
                            //since there is no reponse we set this message as the fault reply
                            context.getOptions().setRelationships(new RelatesTo[]{new RelatesTo(context.getMessageID())});
                            context.setProperty("SENDING_FAULT", Boolean.TRUE);
                            msgReceiver.receive(context);
                        } catch (AxisFault axisFault) {
                            log.error(axisFault.getMessage());
                            throw new SandeshaException("Can not invoke the message receiver ", axisFault);
View Full Code Here


    // If we are doing sync 2-way over WSRM 1.0, then we may just have received one of
    // the reply messages that we were looking for. If so we can remove the matching sender bean.
    int mep = msgCtx.getAxisOperation().getAxisSpecificMEPConstant();
    if(specVersion!=null && specVersion.equals(Sandesha2Constants.SPEC_VERSIONS.v1_0) &&
        mep == WSDLConstants.MEP_CONSTANT_OUT_IN) {
      RelatesTo relatesTo = msgCtx.getRelatesTo();
      if(relatesTo != null) {
        String messageId = relatesTo.getValue();
        SenderBean sender = storageManager.getSenderBeanMgr().retrieve(messageId);
        if(sender != null) {
          if(log.isDebugEnabled()) log.debug("Deleting sender for sync-2-way message");
         
          storageManager.removeMessageContext(sender.getMessageContextRefKey());
View Full Code Here

                        org.apache.axis2.Constants.VALUE_TRUE);
            }

            if (axisOutMsgCtx.getMessageID() != null) {
                response.setRelationships(
                        new RelatesTo[]{new RelatesTo(axisOutMsgCtx.getMessageID())});
            }

            // create the synapse message context for the response
            Axis2MessageContext synapseInMessageContext =
                    new Axis2MessageContext(
View Full Code Here

        int insertPos = 0;
        RelatesTo[] newRelates = new RelatesTo[relates.length];

        for (int i = 0; i < relates.length; i++) {
            RelatesTo current = relates[i];
            boolean found = false;
            for (int j = 0; j < newRelates.length && j < insertPos; j++) {
                if (newRelates[j].equals(current) ||
                        newRelates[j].getValue().equals(current.getValue())) {
                    found = true;
                    break;
                }
            }
            if (!found) {
View Full Code Here

        faultContext.setTransportIn(processingContext.getTransportIn());
        faultContext.setTransportOut(processingContext.getTransportOut());

        faultContext.setMessageID(UUIDGenerator.getUUID());
        faultContext.setRelatesTo(
                new RelatesTo(
                        processingContext.getOptions().getMessageId(),
                        AddressingConstants.Final.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE));
        faultContext.setProperty(MessageContext.CHARACTER_SET_ENCODING,
                processingContext.getProperty(MessageContext.CHARACTER_SET_ENCODING));
View Full Code Here

    public void addCallback(String MsgID, Callback callback) {
        callbackStore.put(MsgID, callback);
    }

    public void receive(MessageContext messageCtx) throws AxisFault {
        RelatesTo relatesTO = messageCtx.getOptions().getRelatesTo();
        String messageID = relatesTO.getValue();
        Callback callback = (Callback) callbackStore.get(messageID);
        AsyncResult result = new AsyncResult(messageCtx);

        if (callback != null) {
            callback.onComplete(result);
View Full Code Here

        }

        newmsgCtx.setFaultTo(oldOptions.getTo());
        newmsgCtx.setFrom(oldOptions.getTo());
        newmsgCtx.setRelatesTo(
                new RelatesTo(
                        oldOptions.getMessageId(),
                        AddressingConstants.Submission.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE));
        newmsgCtx.setWSAAction(oldOptions.getAction());
        newmsgCtx.setOperationContext(inMessageContext.getOperationContext());
        newmsgCtx.setServiceContext(inMessageContext.getServiceContext());
View Full Code Here

                        new QName(AddressingConstants.WSA_RELATES_TO_RELATIONSHIP_TYPE));
        String relationshipTypeDefaultValue =
                Submission.WSA_NAMESPACE.equals(addressingNamespace)
                        ? Submission.WSA_DEFAULT_RELATIONSHIP_TYPE
                        : Final.WSA_DEFAULT_RELATIONSHIP_TYPE;
        RelatesTo relatesTo =
                new RelatesTo(
                        address,
                        relationshipType == null
                                ? relationshipTypeDefaultValue
                                : relationshipType.getAttributeValue());
        messageContextOptions.addRelatesTo(relatesTo);
View Full Code Here

        TargetResolver targetResolver = newmsgCtx.getConfigurationContext().getAxisConfiguration().getTargetResolverChain();
        if(targetResolver != null){
            targetResolver.resolveTarget(newmsgCtx);
        }

        newmsgCtx.addRelatesTo(new RelatesTo(oldOptions.getMessageId()));

        AxisService axisService = inMessageContext.getAxisService();
        if (axisService != null && Constants.SCOPE_SOAP_SESSION.equals(axisService.getScope())) {
            newmsgCtx.setReplyTo(new EndpointReference(AddressingConstants.Final.WSA_ANONYMOUS_URL));
            // add the service group id as a reference parameter
View Full Code Here

        faultContext.setSessionContext(processingContext.getSessionContext());
        faultContext.setTransportIn(processingContext.getTransportIn());
        faultContext.setTransportOut(processingContext.getTransportOut());

        faultContext.setMessageID(UUIDGenerator.getUUID());
        faultContext.addRelatesTo(new RelatesTo(processingContext.getOptions().getMessageId()));
        faultContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
                processingContext.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING));
        faultContext.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,
                processingContext.getProperty(AddressingConstants.WS_ADDRESSING_VERSION));
        faultContext.setProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
View Full Code Here

TOP

Related Classes of org.apache.axis2.addressing.RelatesTo

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.