You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "sangeeta (JIRA)" <ji...@apache.org> on 2015/09/09 01:25:45 UTC

[jira] [Created] (SANTUARIO-427) org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist. at com.sun.org.apache.xerces.internal.dom.ElementImpl.setIdAttribute(Unknown Source)

sangeeta created SANTUARIO-427:
----------------------------------

             Summary: org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist. 	at com.sun.org.apache.xerces.internal.dom.ElementImpl.setIdAttribute(Unknown Source)
                 Key: SANTUARIO-427
                 URL: https://issues.apache.org/jira/browse/SANTUARIO-427
             Project: Santuario
          Issue Type: Bug
          Components: Java
         Environment: JDK 1.8, xmlsec-2.x.jar
            Reporter: sangeeta
            Assignee: Colm O hEigeartaigh


Hi,

I am calling a Webservice security API using openssoclientsdk.jar. and facing below error. Code is not working even if "Id" attribute is set after checking namespace.

Error
-------------
org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist.
	at com.sun.org.apache.xerces.internal.dom.ElementImpl.setIdAttribute(Unknown Source)
-----------------

Code
-----------------

 if ((wsuNodes != null) && (wsuNodes.getLength() != 0)) {
        for (int i = 0; i < wsuNodes.getLength(); ++i) {
          Element elem = (Element)wsuNodes.item(i);
          String id = elem.getAttributeNS("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd", "Id");
          if ((id != null) && (id.length() != 0)) {

            elem.setIdAttribute(id, true);
          }
        }
      }


---------------------------------------------------------------



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)