Package com.sun.org.apache.xml.internal.security.exceptions

Examples of com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException


           throws XMLSecurityException {

      this();

      if (element == null) {
         throw new XMLSecurityException("ElementProxy.nullElement");
      }

      if (true) {
        if (log.isLoggable(java.util.logging.Level.FINE))                                     log.log(java.util.logging.Level.FINE, "setElement(\"" + element.getTagName() + "\", \"" + BaseURI
                + "\")");
View Full Code Here


      String namespaceIS = this._constructionElement.getNamespaceURI();
      if ( !localnameSHOULDBE.equals(localnameIS) ||
        !namespaceSHOULDBE.equals(namespaceIS)) {
         Object exArgs[] = { namespaceIS +":"+ localnameIS,
           namespaceSHOULDBE +":"+ localnameSHOULDBE};
         throw new XMLSecurityException("xml.WrongElement", exArgs);
      }
   }
View Full Code Here

           throws XMLSecurityException {

      String ns;

      if ((prefix == null) || (prefix.length() == 0)) {
       throw new XMLSecurityException("defaultNamespaceCannotBeSetHere");
      } else if (prefix.equals("xmlns")) {
        throw new XMLSecurityException("defaultNamespaceCannotBeSetHere");
      } else if (prefix.startsWith("xmlns:")) {
         ns = prefix;//"xmlns:" + prefix.substring("xmlns:".length());
      } else {
         ns = "xmlns:" + prefix;
      }



      Attr a = this._constructionElement.getAttributeNodeNS(Constants.NamespaceSpecNS, ns);

      if (a != null) {
       if (!a.getNodeValue().equals(uri)) {
         Object exArgs[] = { ns,
                             this._constructionElement.getAttributeNS(null,
                                                                      ns) };

         throw new XMLSecurityException("namespacePrefixAlreadyUsedByOtherURI",
                                        exArgs);
       }
       return;
      }
View Full Code Here

                Object storedNamespace=ElementProxy._prefixMappings.get(namespace);
         if (!storedNamespace.equals(prefix)) {
                Object exArgs[] = { prefix, namespace, storedNamespace };

                throw new XMLSecurityException("prefix.AlreadyAssigned", exArgs);
         }
    }
      ElementProxy._prefixMappings.put(namespace, prefix);
   }
View Full Code Here

TOP

Related Classes of com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException

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.