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/11 02:23:45 UTC

[jira] [Comment Edited] (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)

    [ https://issues.apache.org/jira/browse/SANTUARIO-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14739858#comment-14739858 ] 

sangeeta edited comment on SANTUARIO-427 at 9/11/15 12:23 AM:
--------------------------------------------------------------

Hi Colm,

The above code is from openamclientsdk.jar which I extracted through de compiler. 
At client end-
- I have written Handler.
- I have implemented SecuritySOAPManager interface and passing client certificates for signing the SOAP message but openamclientsdk.jar throwing exception.. Attached are the code files.

Note: Per your suggestion "setIdAttributeNS() will set the name space URI and attribute name but to set the value of Id attribute I need to call "setIdAttribute()" method.


was (Author: sangeetash):
Hi Colm,

The above code is from openamclientsdk.jar which I extracted through de compiler. 
At client end-
- I have written Handler.
- I have implemented SecuritySOAPManager interface and passing client certificates for signing the SOAP message but openamclientsdk.jar throwing exception.. Attached are the code files.

> 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
>         Attachments: CustomBinarySecurityToken.java, CustomSecureSOAPMessage.java, ICFMSWSSecurityManager.java, TLSClientHandler.java, TLSClientJAXWS.java
>
>
> 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)