Examples of RMException


Examples of org.jboss.ws.extensions.wsrm.api.RMException

   }

   public void validate()
   {
      if (this.acksTo == null)
         throw new RMException("AcksTo must be set");
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.api.RMException

            o.setLastMessage();
         }
      }
      catch (SOAPException se)
      {
         throw new RMException("Unable to deserialize RM message", se);
      }
      catch (RuntimeException re)
      {
         throw new RMException("Unable to deserialize RM message", re);
      }
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.api.RMException

            sequenceElement.addChildElement(lastMessageQName);
         }
      }
      catch (SOAPException se)
      {
         throw new RMException("Unable to serialize RM message", se);
      }
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.api.RMException

            o.setMessageNumber(messageNumberValue);
         }
      }
      catch (SOAPException se)
      {
         throw new RMException("Unable to deserialize RM message", se);
      }
      catch (RuntimeException re)
      {
         throw new RMException("Unable to deserialize RM message", re);
      }
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.api.RMException

            messageNumberElement.setValue(String.valueOf(o.getMessageNumber()));
         }
      }
      catch (SOAPException se)
      {
         throw new RMException("Unable to serialize RM message", se);
      }
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.api.RMException

   }
  
   public static String getRequiredTextContent(SOAPElement element, QName elementQName)
   {
      if (!DOMUtils.hasTextChildNodesOnly(element))
         throw new RMException(
            "Only text content is allowed for element " + elementQName);

      return DOMUtils.getTextContent(element).trim();
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.api.RMException

   public static SOAPElement getRequiredElement(SOAPElement element, QName requiredQName, String context)
   {
      List<Element> childElements = DOMUtils.getChildElementsAsList(element, requiredQName);

      if (childElements.size() < 1)
         throw new RMException(
            "Required " + requiredQName + " element not found in " + context + " element");
     
      if (childElements.size() > 1)
         throw new RMException(
            "Only one " + requiredQName + " element can be present in " + context + " element");
     
      return (SOAPElement)childElements.get(0);
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.api.RMException

   public static String getRequiredTextContent(SOAPElement element, QName attributeQName, QName elementQName)
   {
      String attributeValue = element.getAttributeValue(attributeQName);
     
      if (attributeValue == null)
         throw new RMException(
            "Required attribute " + attributeQName + " is missing in element " + elementQName);

      return attributeValue;
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.api.RMException

   public static SOAPElement getOptionalElement(SOAPElement contextElement, QName optionalQName, QName contextQName)
   {
      List<Element> list = DOMUtils.getChildElementsAsList(contextElement, optionalQName);

      if (list.size() > 1)
         throw new RMException(
            "At most one " + optionalQName + " element can be present in " + contextQName + " element");
     
      return (SOAPElement)((list.size() == 1) ? list.get(0) : null);
   }
View Full Code Here

Examples of org.jboss.ws.extensions.wsrm.api.RMException

      {
         return Long.valueOf(toEvaluate);
      }
      catch (NumberFormatException nfe)
      {
         throw new RMException(errorMessage, nfe);
      }
   }
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.