Examples of WSTrustException


Examples of com.sun.xml.ws.api.security.trust.WSTrustException

           
            encDataEle = cipher.martial(encData);
         } catch (XMLEncryptionException ex) {
            log.log(Level.SEVERE,
                            LogStringsMessages.WST_0044_ERROR_ENCRYPT_ISSUED_TOKEN(appliesTo), ex);
            throw new WSTrustException( LogStringsMessages.WST_0040_ERROR_ENCRYPT_PROOFKEY(appliesTo), ex);
        } catch (Exception ex) {
            log.log(Level.SEVERE,
                            LogStringsMessages.WST_0044_ERROR_ENCRYPT_ISSUED_TOKEN(appliesTo), ex);
            throw new WSTrustException( LogStringsMessages.WST_0040_ERROR_ENCRYPT_PROOFKEY(appliesTo), ex);
        }
       
        return encDataEle;
    }
View Full Code Here

Examples of com.sun.xml.ws.api.security.trust.WSTrustException

                WSTrustElementFactory.getContext(WSTrustVersion.WS_TRUST_13);
            final javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller();
           
            return unmarshaller.unmarshal(element, RequestedSecurityTokenType.class).getValue();
        } catch ( Exception ex) {
            throw new WSTrustException(ex.getMessage(), ex);
        }
    }
View Full Code Here

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

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

   */
  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

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

        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

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

    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

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

    } 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

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

   * @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

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

    } 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

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

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