Examples of RMConstants


Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      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);
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      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());
         }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      RMCloseSequence o = (RMCloseSequence)object;
      try
      {
         SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
         RMConstants wsrmConstants = provider.getConstants();
        
         // read required wsrm:CloseSequence element
         QName closeSequenceQName = wsrmConstants.getCloseSequenceQName();
         SOAPElement closeSequenceElement = getRequiredElement(soapBody, closeSequenceQName, "soap body");

         // read required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         SOAPElement identifierElement = getRequiredElement(closeSequenceElement, identifierQName, closeSequenceQName);
         String identifier = getRequiredTextContent(identifierElement, identifierQName);
         o.setIdentifier(identifier);
        
         // read optional wsrm:LastMsgNumber element
         QName lastMsgNumberQName = wsrmConstants.getLastMsgNumberQName();
         SOAPElement lastMsgNumberElement = getOptionalElement(closeSequenceElement, lastMsgNumberQName, closeSequenceQName);
         if (lastMsgNumberElement != null)
         {
            String lastMsgNumberString = getRequiredTextContent(lastMsgNumberElement, lastMsgNumberQName);
            long lastMsgNumberValue = stringToLong(lastMsgNumberString, "Unable to parse LastMsgNumber element text content");
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      RMCloseSequence o = (RMCloseSequence)object;
      try
      {
         SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
         RMConstants wsrmConstants = provider.getConstants();
        
         // Add xmlns:wsrm declaration
         soapEnvelope.addNamespaceDeclaration(wsrmConstants.getPrefix(), wsrmConstants.getNamespaceURI());

         // write required wsrm:CloseSequence element
         QName closeSequenceQName = wsrmConstants.getCloseSequenceQName();
         SOAPElement closeSequenceElement = soapEnvelope.getBody().addChildElement(closeSequenceQName);

         // write required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         closeSequenceElement.addChildElement(identifierQName).setValue(o.getIdentifier());
        
         if (o.getLastMsgNumber() != 0)
         {
            // write optional wsrm:LastMsgNumber element
            QName lastMsgNumberQName = wsrmConstants.getLastMsgNumberQName();
            SOAPElement lastMsgNumberElement = closeSequenceElement.addChildElement(lastMsgNumberQName);
            lastMsgNumberElement.setValue(String.valueOf(o.getLastMsgNumber()));
         }
      }
      catch (SOAPException se)
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      RMCloseSequenceResponse o = (RMCloseSequenceResponse)object;
      try
      {
         SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
         RMConstants wsrmConstants = provider.getConstants();
        
         // read required wsrm:CloseSequenceResponse element
         QName closeSequenceResponseQName = wsrmConstants.getCloseSequenceResponseQName();
         SOAPElement closeSequenceResponseElement = getRequiredElement(soapBody, closeSequenceResponseQName, "soap body");

         // read required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         SOAPElement identifierElement = getRequiredElement(closeSequenceResponseElement, identifierQName, closeSequenceResponseQName);
         String identifier = getRequiredTextContent(identifierElement, identifierQName);
         o.setIdentifier(identifier);
      }
      catch (SOAPException se)
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      RMCloseSequenceResponse o = (RMCloseSequenceResponse)object;
      try
      {
         SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
         RMConstants wsrmConstants = provider.getConstants();
        
         // Add xmlns:wsrm declaration
         soapEnvelope.addNamespaceDeclaration(wsrmConstants.getPrefix(), wsrmConstants.getNamespaceURI());

         // write required wsrm:CloseSequenceResponse element
         QName closeSequenceResponseQName = wsrmConstants.getCloseSequenceResponseQName();
         SOAPElement closeSequenceResponseElement = soapEnvelope.getBody().addChildElement(closeSequenceResponseQName);

         // write required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         closeSequenceResponseElement.addChildElement(identifierQName).setValue(o.getIdentifier());
      }
      catch (SOAPException se)
      {
         throw new RMException("Unable to serialize RM message", se);
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      RMAckRequested o = (RMAckRequested)object;
      try
      {
         SOAPHeader soapHeader = soapMessage.getSOAPPart().getEnvelope().getHeader();
         RMConstants wsrmConstants = provider.getConstants();
        
         // read required wsrm:AckRequested element
         QName ackRequestedQName = wsrmConstants.getAckRequestedQName();
         SOAPElement ackRequestedElement = getRequiredElement(soapHeader, ackRequestedQName, "soap header");

         // read required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         SOAPElement identifierElement = getRequiredElement(ackRequestedElement, identifierQName, ackRequestedQName);
         String identifier = getRequiredTextContent(identifierElement, identifierQName);
         o.setIdentifier(identifier);
        
         // read optional wsrm:MessageNumber element
         QName messageNumberQName = wsrmConstants.getMessageNumberQName();
         SOAPElement messageNumberElement = getOptionalElement(ackRequestedElement, messageNumberQName, ackRequestedQName);
         if (messageNumberElement != null)
         {
            String messageNumberString = getRequiredTextContent(messageNumberElement, messageNumberQName);
            long messageNumberValue = stringToLong(messageNumberString, "Unable to parse MessageNumber element text content");
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      RMAckRequested o = (RMAckRequested)object;
      try
      {
         SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
         RMConstants wsrmConstants = provider.getConstants();
        
         // Add xmlns:wsrm declaration
         soapEnvelope.addNamespaceDeclaration(wsrmConstants.getPrefix(), wsrmConstants.getNamespaceURI());

         // write required wsrm:AckRequested element
         QName ackRequestedQName = wsrmConstants.getAckRequestedQName();
         SOAPElement ackRequestedElement = soapEnvelope.getHeader().addChildElement(ackRequestedQName);

         // write required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         ackRequestedElement.addChildElement(identifierQName).setValue(o.getIdentifier());
        
         if (o.getMessageNumber() != 0)
         {
            // write optional wsrm:MessageNumber element
            QName messageNumberQName = wsrmConstants.getMessageNumberQName();
            SOAPElement messageNumberElement = ackRequestedElement.addChildElement(messageNumberQName);
            messageNumberElement.setValue(String.valueOf(o.getMessageNumber()));
         }
      }
      catch (SOAPException se)
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      RMTerminateSequence o = (RMTerminateSequence)object;
      try
      {
         SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
         RMConstants wsrmConstants = provider.getConstants();
        
         // read required wsrm:TerminateSequence element
         QName terminateSequenceQName = wsrmConstants.getTerminateSequenceQName();
         SOAPElement terminateSequenceElement = getRequiredElement(soapBody, terminateSequenceQName, "soap body");

         // read required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         SOAPElement identifierElement = getRequiredElement(terminateSequenceElement, identifierQName, terminateSequenceQName);
         String identifier = getRequiredTextContent(identifierElement, identifierQName);
         o.setIdentifier(identifier);
        
         // read optional wsrm:LastMsgNumber element
         QName lastMsgNumberQName = wsrmConstants.getLastMsgNumberQName();
         SOAPElement lastMsgNumberElement = getOptionalElement(terminateSequenceElement, lastMsgNumberQName, terminateSequenceQName);
         if (lastMsgNumberElement != null)
         {
            String lastMsgNumberString = getRequiredTextContent(lastMsgNumberElement, lastMsgNumberQName);
            long lastMsgNumberValue = stringToLong(lastMsgNumberString, "Unable to parse LastMsgNumber element text content");
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.protocol.RMConstants

   {
      RMTerminateSequence o = (RMTerminateSequence)object;
      try
      {
         SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
         RMConstants wsrmConstants = provider.getConstants();
        
         // Add xmlns:wsrm declaration
         soapEnvelope.addNamespaceDeclaration(wsrmConstants.getPrefix(), wsrmConstants.getNamespaceURI());

         // write required wsrm:TerminateSequence element
         QName terminateSequenceQName = wsrmConstants.getTerminateSequenceQName();
         SOAPElement terminateSequenceElement = soapEnvelope.getBody().addChildElement(terminateSequenceQName);

         // write required wsrm:Identifier element
         QName identifierQName = wsrmConstants.getIdentifierQName();
         terminateSequenceElement.addChildElement(identifierQName).setValue(o.getIdentifier());
        
         if (o.getLastMsgNumber() != 0)
         {
            // write optional wsrm:LastMsgNumber element
            QName lastMsgNumberQName = wsrmConstants.getLastMsgNumberQName();
            SOAPElement lastMsgNumberElement = terminateSequenceElement.addChildElement(lastMsgNumberQName);
            lastMsgNumberElement.setValue(String.valueOf(o.getLastMsgNumber()));
         }
      }
      catch (SOAPException se)
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.