Package org.apache.ws.sandbox.security.trust

Examples of org.apache.ws.sandbox.security.trust.WSTrustException


   */
  protected void handleSpecificChildren(Element elem) throws WSTrustException {
   
    QName el =  new QName(elem.getNamespaceURI(), elem.getLocalName());
   
      throw new WSTrustException(WSTrustException.INVALID_REQUEST,
          WSTrustException.DESC_INCORRECT_CHILD_ELEM,
        new Object[] {
          TOKEN.getPrefix(),TOKEN.getLocalPart(),
        el.getNamespaceURI(),el.getLocalPart()});
   
View Full Code Here


   */
  public AbstractToken(Element elem) throws WSTrustException {
    QName token = this.getToken();
        QName el =  new QName(elem.getNamespaceURI(), elem.getLocalName());
        if (!el.equals(token))
            throw new WSTrustException(WSTrustException.INVALID_REQUEST, "badTokenType", new Object[]{el});
       
        this.element = elem;
        this.document = elem.getOwnerDocument();
        this.parse(this.element);

View Full Code Here

        QName el =  new QName(elem.getNamespaceURI(), elem.getLocalName());
       
        if(el.equals(BinarySecret.TOKEN)) {
          this.binarySecretElement = new BinarySecret(elem);
        } else {
          throw new WSTrustException(WSTrustException.INVALID_REQUEST,
              WSTrustException.DESC_INCORRECT_CHILD_ELEM,
          new Object[] {
              TOKEN.getPrefix(),TOKEN.getLocalPart(),
          el.getNamespaceURI(),el.getLocalPart()});
        }
View Full Code Here

    QName el =  new QName(elem.getNamespaceURI(), elem.getLocalName());
   
    if(el.equals(CancelTarget.TOKEN)) {
      this.cancelTargetElement = new CancelTarget(elem);
    } else {
          throw new WSTrustException(WSTrustException.INVALID_REQUEST,
              WSTrustException.DESC_INCORRECT_CHILD_ELEM,
          new Object[] {
              TOKEN.getPrefix(),TOKEN.getLocalPart(),
          el.getNamespaceURI(),el.getLocalPart()});
    }
View Full Code Here

    } else if(el.equals(KeySize.TOKEN)) {
      this.keySizeElement = new KeySize(elem);
    } else if(el.equals(Renewing.TOKEN)) {
      this.renewingElement = new Renewing(elem);
    } else {
          throw new WSTrustException(WSTrustException.INVALID_REQUEST,
              WSTrustException.DESC_INCORRECT_CHILD_ELEM,
          new Object[] {
              TOKEN.getPrefix(),TOKEN.getLocalPart(),
          el.getNamespaceURI(),el.getLocalPart()});
    }
View Full Code Here

   * @see org.apache.ws.security.trust.message.token.AbstractToken#deserializeChildElement(org.w3c.dom.Element)
   */
  protected void deserializeChildElement(Element elem)
      throws WSTrustException {
    //There cannot be any children in this token
    throw new WSTrustException(WSTrustException.INVALID_REQUEST,
        WSTrustException.DESC_CHILD_IN_VALUE_ELEM,
        new Object[] {
        this.getToken().getNamespaceURI(),this.getToken().getLocalPart(),
        elem.getNamespaceURI(),elem.getLocalName()});

View Full Code Here

    } else if(el.equals(AllowPostdating.TOKEN)) {
      this.allowPostdatingElement = new AllowPostdating(elem);
    } else if(el.equals(Lifetime.TOKEN)) {
      this.lifetimeElement = new Lifetime(elem);
    } else {
          throw new WSTrustException(WSTrustException.INVALID_REQUEST,
              WSTrustException.DESC_INCORRECT_CHILD_ELEM,
          new Object[] {
              TOKEN.getPrefix(),TOKEN.getLocalPart(),
          el.getNamespaceURI(),el.getLocalPart()});
    }
View Full Code Here

   
    if(el.equals(new QName(WSConstants.WSSE_NS,SecurityTokenReference.SECURITY_TOKEN_REFERENCE)) && this.targetToken == null) {
      try {
        this.securityTokenReference = new SecurityTokenReference(elem);
      } catch (WSSecurityException wsse) {
        throw new WSTrustException(wsse.getMessage(),wsse);
      }
    } else if(this.securityTokenReference == null) {
      this.targetToken = elem;
    }
   
View Full Code Here

        if(el.equals(secTokRef) && this.tokenToBeRenewed == null) {
          try {
          this.securityTokenReference = new SecurityTokenReference(elem);
          } catch (WSSecurityException ex) {
            throw new WSTrustException(WSTrustException.INVALID_REQUEST, ex.getMessage());
          }
        } else if(this.securityTokenReference == null) {
          this.tokenToBeRenewed = elem;
        }
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.apache.ws.security.trust.message.token.AbstractToken#setElementTextValue(org.w3c.dom.Text)
   */
  protected void setElementTextValue(Text textNode) throws WSTrustException {
    throw new WSTrustException(WSTrustException.INVALID_REQUEST,
        WSTrustException.DESC_TEXT_IN_COMPOSITE_ELEM,
        new Object[]{this.getToken().getNamespaceURI(),
        this.getToken().getLocalPart(),
        textNode.getNodeValue()});
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.sandbox.security.trust.WSTrustException

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.