Package org.jboss.ws.extensions.wsrm

Examples of org.jboss.ws.extensions.wsrm.RMClientSequence


         throw new IllegalStateException("Sequence already registered with proxy instance");

      try
      {
         // set up addressing data
         RMClientSequence candidateSequence = new RMClientSequence(this.epConfigMetaData.getConfig().getRMMetaData());
         String address = getEndpointMetaData().getEndpointAddress();
         String action = RMAddressingConstants.CREATE_SEQUENCE_WSA_ACTION;
         AddressingProperties addressingProps = null;
         URI backPort = candidateSequence.getBackPort();
         if (backPort != null)
         {
            addressingProps = AddressingClientUtil.createDefaultProps(action, address);
            addressingProps.setReplyTo(AddressingBuilder.getAddressingBuilder().newEndpointReference(backPort));
         }
         else
         {
            addressingProps = AddressingClientUtil.createAnonymousProps(action, address);
         }
         Map requestContext = getBindingProvider().getRequestContext();
         requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProps);
         // set up wsrm request context
         QName createSequenceQN = RMProvider.get().getConstants().getCreateSequenceQName();
         Map rmRequestContext = new HashMap();
         List outMsgs = new LinkedList();
         outMsgs.add(createSequenceQN);
         rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES, outMsgs);
         rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, candidateSequence);
         requestContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
         // invoke stub method
         invoke(createSequenceQN, new Object[] {}, getBindingProvider().getResponseContext());
         // read WSRM sequence id from response context
         Map rmResponseContext = (Map)getBindingProvider().getResponseContext().get(RMConstant.RESPONSE_CONTEXT);
         RMCreateSequenceResponse createSequenceResponse = ((RMCreateSequenceResponse)((Map)rmResponseContext.get(RMConstant.PROTOCOL_MESSAGES_MAPPING)).get(RMProvider
               .get().getConstants().getCreateSequenceResponseQName()));
         String outboundId = createSequenceResponse.getIdentifier();
         candidateSequence.setClient(this);
         candidateSequence.setOutboundId(outboundId);
         candidateSequence.setBehavior(createSequenceResponse.getIncompleteSequenceBehavior());
         candidateSequence.setDuration(RMHelper.durationToLong(createSequenceResponse.getExpires()));
         this.wsrmSequence = candidateSequence;
      }
      catch (Exception e)
      {
         throw new RMException("Unable to create WSRM sequence", e);
View Full Code Here


         RMCallbackHandler callbackHandler = null;

         if (backPort != null)
         {
            callbackHandler = RMCallbackHandlerFactory.getCallbackHandler(backPort);
            RMClientSequence sequence = RMTransportHelper.getSequence(rmRequest);
            if (sequence != null)
            {
               callbackHandler.addUnassignedMessageListener(sequence);
            }
         }
View Full Code Here

         RMCallbackHandler callbackHandler = null;

         if (backPort != null)
         {
            callbackHandler = RMCallbackHandlerFactory.getCallbackHandler(backPort);
            RMClientSequence sequence = RMTransportHelper.getSequence(rmRequest);
            if (sequence != null)
            {
               callbackHandler.addUnassignedMessageListener(sequence);
            }
         }
View Full Code Here

         throw new IllegalStateException("Sequence already registered with proxy instance");

      try
      {
         // set up addressing data
         RMClientSequence candidateSequence = new RMClientSequence(getEndpointMetaData().getConfig().getRMMetaData());
         String address = getEndpointMetaData().getEndpointAddress();
         String action = RMAddressingConstants.CREATE_SEQUENCE_WSA_ACTION;
         AddressingProperties addressingProps = null;
         URI backPort = candidateSequence.getBackPort();
         if (backPort != null)
         {
            addressingProps = AddressingClientUtil.createDefaultProps(action, address);
            addressingProps.setReplyTo(AddressingBuilder.getAddressingBuilder().newEndpointReference(backPort));
         }
         else
         {
            addressingProps = AddressingClientUtil.createAnonymousProps(action, address);
         }
         Map requestContext = getBindingProvider().getRequestContext();
         requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProps);
         // set up wsrm request context
         QName createSequenceQN = RMProvider.get().getConstants().getCreateSequenceQName();
         Map rmRequestContext = new HashMap();
         List outMsgs = new LinkedList();
         outMsgs.add(createSequenceQN);
         rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES, outMsgs);
         rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, candidateSequence);
         requestContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
         // invoke stub method
         invoke(createSequenceQN, new Object[] {}, getBindingProvider().getResponseContext());
         // read WSRM sequence id from response context
         Map rmResponseContext = (Map)getBindingProvider().getResponseContext().get(RMConstant.RESPONSE_CONTEXT);
         RMCreateSequenceResponse createSequenceResponse = ((RMCreateSequenceResponse)((Map)rmResponseContext.get(RMConstant.PROTOCOL_MESSAGES_MAPPING)).get(RMProvider.get().getConstants().getCreateSequenceResponseQName()));
         String outboundId = createSequenceResponse.getIdentifier();
         candidateSequence.setClient(this);
         candidateSequence.setOutboundId(outboundId);
         candidateSequence.setBehavior(createSequenceResponse.getIncompleteSequenceBehavior());
         candidateSequence.setDuration(RMHelper.durationToLong(createSequenceResponse.getExpires()));
         this.wsrmSequence = candidateSequence;
      }
      catch (Exception e)
      {
         throw new RMException("Unable to create WSRM sequence", e);
View Full Code Here

         throw new IllegalStateException("Sequence already registered with proxy instance");

      try
      {
         // set up addressing data
         RMClientSequence candidateSequence = new RMClientSequence(this.epConfigMetaData.getConfig().getRMMetaData());
         String address = getEndpointMetaData().getEndpointAddress();
         String action = RMAddressingConstants.CREATE_SEQUENCE_WSA_ACTION;
         AddressingProperties addressingProps = null;
         URI backPort = candidateSequence.getBackPort();
         if (backPort != null)
         {
            addressingProps = AddressingClientUtil.createDefaultProps(action, address);
            addressingProps.setReplyTo(AddressingBuilder.getAddressingBuilder().newEndpointReference(backPort));
         }
         else
         {
            addressingProps = AddressingClientUtil.createAnonymousProps(action, address);
         }
         Map requestContext = getBindingProvider().getRequestContext();
         requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProps);
         // set up wsrm request context
         QName createSequenceQN = RMProvider.get().getConstants().getCreateSequenceQName();
         Map rmRequestContext = new HashMap();
         List outMsgs = new LinkedList();
         outMsgs.add(createSequenceQN);
         rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES, outMsgs);
         rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, candidateSequence);
         requestContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
         // invoke stub method
         invoke(createSequenceQN, new Object[] {}, getBindingProvider().getResponseContext());
         // read WSRM sequence id from response context
         Map rmResponseContext = (Map)getBindingProvider().getResponseContext().get(RMConstant.RESPONSE_CONTEXT);
         RMCreateSequenceResponse createSequenceResponse = ((RMCreateSequenceResponse)((Map)rmResponseContext.get(RMConstant.PROTOCOL_MESSAGES_MAPPING)).get(RMProvider
               .get().getConstants().getCreateSequenceResponseQName()));
         String outboundId = createSequenceResponse.getIdentifier();
         candidateSequence.setClient(this);
         candidateSequence.setOutboundId(outboundId);
         candidateSequence.setBehavior(createSequenceResponse.getIncompleteSequenceBehavior());
         candidateSequence.setDuration(RMHelper.durationToLong(createSequenceResponse.getExpires()));
         this.wsrmSequence = candidateSequence;
      }
      catch (Exception e)
      {
         throw new RMException("Unable to create WSRM sequence", e);
View Full Code Here

TOP

Related Classes of org.jboss.ws.extensions.wsrm.RMClientSequence

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.