Examples of RMCreateSequenceResponse


Examples of org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse

    * @param soapMessage soap message from which object will be deserialized
    */
   public final void deserialize(RMSerializable object, RMProvider provider, SOAPMessage soapMessage)
   throws RMException
   {
      RMCreateSequenceResponse o = (RMCreateSequenceResponse)object;
      try
      {
         SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
         RMConstants wsrmConstants = provider.getConstants();
        
         // read required wsrm:CreateSequenceResponse element
         QName createSequenceResponseQName = wsrmConstants.getCreateSequenceResponseQName();
         SOAPElement createSequenceResponseElement = getRequiredElement(soapBody, createSequenceResponseQName, "soap body");

         // read required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         SOAPElement identifierElement = getRequiredElement(createSequenceResponseElement, identifierQName, createSequenceResponseQName);
         String identifier = getRequiredTextContent(identifierElement, identifierQName);
         o.setIdentifier(identifier);
        
         // read optional wsrm:Expires element
         QName expiresQName = wsrmConstants.getExpiresQName();
         SOAPElement expiresElement = getOptionalElement(createSequenceResponseElement, expiresQName, createSequenceResponseQName);
         if (expiresElement != null)
         {
            String duration = getRequiredTextContent(expiresElement, expiresQName);
            o.setExpires(RMHelper.stringToDuration(duration));
         }

         // read optional wsrm:IncompleteSequenceBehavior element
         QName behaviorQName = wsrmConstants.getIncompleteSequenceBehaviorQName();
         SOAPElement behaviorElement = getOptionalElement(createSequenceResponseElement, behaviorQName, createSequenceResponseQName);
         if (behaviorElement != null)
         {
            String behaviorString = getRequiredTextContent(behaviorElement, behaviorQName);
            o.setIncompleteSequenceBehavior(RMIncompleteSequenceBehavior.getValue(behaviorString));
         }
        
         // read optional wsrm:Accept element
         QName acceptQName = wsrmConstants.getAcceptQName();
         SOAPElement acceptElement = getOptionalElement(createSequenceResponseElement, acceptQName, createSequenceResponseQName);
         if (acceptElement != null)
         {
            RMCreateSequenceResponse.RMAccept accept = o.newAccept();
           
            // read required wsrm:AcksTo element
            QName acksToQName = wsrmConstants.getAcksToQName();
            SOAPElement acksToElement = getRequiredElement(acceptElement, acksToQName, acceptQName);
            QName addressQName = ADDRESSING_CONSTANTS.getAddressQName();
            SOAPElement acksToAddressElement = getRequiredElement(acksToElement, addressQName, acksToQName);
            String acksToAddress = getRequiredTextContent(acksToAddressElement, addressQName);
            accept.setAcksTo(acksToAddress);

            // set created accept
            o.setAccept(accept);
         }
      }
      catch (SOAPException se)
      {
         throw new RMException("Unable to deserialize RM message", se);
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse

    * @param soapMessage soap message to which object will be serialized
    */
   public final void serialize(RMSerializable object, RMProvider provider, SOAPMessage soapMessage)
   throws RMException
   {
      RMCreateSequenceResponse o = (RMCreateSequenceResponse)object;
      try
      {
         SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
         RMConstants wsrmConstants = provider.getConstants();
        
         // Add xmlns:wsrm declaration
         soapEnvelope.addNamespaceDeclaration(wsrmConstants.getPrefix(), wsrmConstants.getNamespaceURI());

         // write required wsrm:CreateSequenceResponse element
         QName createSequenceResponseQName = wsrmConstants.getCreateSequenceResponseQName();
         SOAPElement createSequenceResponseElement = soapEnvelope.getBody().addChildElement(createSequenceResponseQName);

         // write required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         createSequenceResponseElement.addChildElement(identifierQName).setValue(o.getIdentifier());
        
         if (o.getExpires() != null)
         {
            // write optional wsrm:Expires element
            QName expiresQName = wsrmConstants.getExpiresQName();
            createSequenceResponseElement.addChildElement(expiresQName).setValue(RMHelper.durationToString(o.getExpires()));
         }
        
         if (o.getIncompleteSequenceBehavior() != null)
         {
            // write optional wsrm:IncompleteSequenceBehavior element
            RMIncompleteSequenceBehavior behavior = o.getIncompleteSequenceBehavior();
            QName behaviorQName = wsrmConstants.getIncompleteSequenceBehaviorQName();
            SOAPElement behaviorElement = createSequenceResponseElement.addChildElement(behaviorQName);
            behaviorElement.setValue(behavior.toString());
         }
        
         if (o.getAccept() != null)
         {
            // write optional wsrm:Accept element
            QName acceptQName = wsrmConstants.getAcceptQName();
            SOAPElement acceptElement = createSequenceResponseElement.addChildElement(acceptQName);

            // write required wsrm:AcksTo element
            QName acksToQName = wsrmConstants.getAcksToQName();
            QName addressQName = ADDRESSING_CONSTANTS.getAddressQName();
            acceptElement.addChildElement(acksToQName)
               .addChildElement(addressQName)
                  .setValue(o.getAccept().getAcksTo());
         }
      }
      catch (SOAPException se)
      {
         throw new RMException("Unable to serialize RM message", se);
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse

      return createSequence;
   }
  
   private static RMSerializable newCreateSequenceResponse(RMSequence seq)
   {
      RMCreateSequenceResponse createSequenceResponse = rmFactory.newCreateSequenceResponse();
      createSequenceResponse.setIdentifier(seq.getInboundId());
      createSequenceResponse.setExpires(RMHelper.longToDuration(seq.getDuration()));
      return createSequenceResponse;
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse

         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

Examples of org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse

    * @param soapMessage soap message from which object will be deserialized
    */
   public final void deserialize(RMSerializable object, RMProvider provider, SOAPMessage soapMessage)
   throws RMException
   {
      RMCreateSequenceResponse o = (RMCreateSequenceResponse)object;
      try
      {
         SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
         RMConstants wsrmConstants = provider.getConstants();
        
         // read required wsrm:CreateSequenceResponse element
         QName createSequenceResponseQName = wsrmConstants.getCreateSequenceResponseQName();
         SOAPElement createSequenceResponseElement = getRequiredElement(soapBody, createSequenceResponseQName, "soap body");

         // read required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         SOAPElement identifierElement = getRequiredElement(createSequenceResponseElement, identifierQName, createSequenceResponseQName);
         String identifier = getRequiredTextContent(identifierElement, identifierQName);
         o.setIdentifier(identifier);
        
         // read optional wsrm:Expires element
         QName expiresQName = wsrmConstants.getExpiresQName();
         SOAPElement expiresElement = getOptionalElement(createSequenceResponseElement, expiresQName, createSequenceResponseQName);
         if (expiresElement != null)
         {
            String duration = getRequiredTextContent(expiresElement, expiresQName);
            o.setExpires(RMHelper.stringToDuration(duration));
         }

         // read optional wsrm:IncompleteSequenceBehavior element
         QName behaviorQName = wsrmConstants.getIncompleteSequenceBehaviorQName();
         SOAPElement behaviorElement = getOptionalElement(createSequenceResponseElement, behaviorQName, createSequenceResponseQName);
         if (behaviorElement != null)
         {
            String behaviorString = getRequiredTextContent(behaviorElement, behaviorQName);
            o.setIncompleteSequenceBehavior(RMIncompleteSequenceBehavior.getValue(behaviorString));
         }
        
         // read optional wsrm:Accept element
         QName acceptQName = wsrmConstants.getAcceptQName();
         SOAPElement acceptElement = getOptionalElement(createSequenceResponseElement, acceptQName, createSequenceResponseQName);
         if (acceptElement != null)
         {
            RMCreateSequenceResponse.RMAccept accept = o.newAccept();
           
            // read required wsrm:AcksTo element
            QName acksToQName = wsrmConstants.getAcksToQName();
            SOAPElement acksToElement = getRequiredElement(acceptElement, acksToQName, acceptQName);
            QName addressQName = ADDRESSING_CONSTANTS.getAddressQName();
            SOAPElement acksToAddressElement = getRequiredElement(acksToElement, addressQName, acksToQName);
            String acksToAddress = getRequiredTextContent(acksToAddressElement, addressQName);
            accept.setAcksTo(acksToAddress);

            // set created accept
            o.setAccept(accept);
         }
      }
      catch (SOAPException se)
      {
         throw new RMException("Unable to deserialize RM message", se);
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse

    * @param soapMessage soap message to which object will be serialized
    */
   public final void serialize(RMSerializable object, RMProvider provider, SOAPMessage soapMessage)
   throws RMException
   {
      RMCreateSequenceResponse o = (RMCreateSequenceResponse)object;
      try
      {
         SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
         RMConstants wsrmConstants = provider.getConstants();
        
         // Add xmlns:wsrm declaration
         soapEnvelope.addNamespaceDeclaration(wsrmConstants.getPrefix(), wsrmConstants.getNamespaceURI());

         // write required wsrm:CreateSequenceResponse element
         QName createSequenceResponseQName = wsrmConstants.getCreateSequenceResponseQName();
         SOAPElement createSequenceResponseElement = soapEnvelope.getBody().addChildElement(createSequenceResponseQName);

         // write required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         createSequenceResponseElement.addChildElement(identifierQName).setValue(o.getIdentifier());
        
         if (o.getExpires() != null)
         {
            // write optional wsrm:Expires element
            QName expiresQName = wsrmConstants.getExpiresQName();
            createSequenceResponseElement.addChildElement(expiresQName).setValue(RMHelper.durationToString(o.getExpires()));
         }
        
         if (o.getIncompleteSequenceBehavior() != null)
         {
            // write optional wsrm:IncompleteSequenceBehavior element
            RMIncompleteSequenceBehavior behavior = o.getIncompleteSequenceBehavior();
            QName behaviorQName = wsrmConstants.getIncompleteSequenceBehaviorQName();
            SOAPElement behaviorElement = createSequenceResponseElement.addChildElement(behaviorQName);
            behaviorElement.setValue(behavior.toString());
         }
        
         if (o.getAccept() != null)
         {
            // write optional wsrm:Accept element
            QName acceptQName = wsrmConstants.getAcceptQName();
            SOAPElement acceptElement = createSequenceResponseElement.addChildElement(acceptQName);

            // write required wsrm:AcksTo element
            QName acksToQName = wsrmConstants.getAcksToQName();
            QName addressQName = ADDRESSING_CONSTANTS.getAddressQName();
            acceptElement.addChildElement(acksToQName)
               .addChildElement(addressQName)
                  .setValue(o.getAccept().getAcksTo());
         }
      }
      catch (SOAPException se)
      {
         throw new RMException("Unable to serialize RM message", se);
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse

         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

Examples of org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse

      return createSequence;
   }
  
   private static RMSerializable newCreateSequenceResponse(RMSequence seq)
   {
      RMCreateSequenceResponse createSequenceResponse = rmFactory.newCreateSequenceResponse();
      createSequenceResponse.setIdentifier(seq.getInboundId());
      createSequenceResponse.setExpires(RMHelper.longToDuration(seq.getDuration()));
      return createSequenceResponse;
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequenceResponse

         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
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.