"DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist." when KeyInfo has an Id attribute

Solution Verified - Updated -

Issue

When invoking a WS-Security-enabled endpoint running in JBossWS Native, I receive the following 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 org.apache.xerces.dom.ElementImpl.setIdAttributeNode(Unknown Source)
    at org.jboss.ws.core.soap.SOAPElementImpl.setIdAttributeNode(SOAPElementImpl.java:841)
    at org.apache.xml.security.keys.KeyInfo.(KeyInfo.java:141)
    at org.apache.xml.security.signature.XMLSignature.(XMLSignature.java:379)
    at org.apache.xml.security.signature.XMLSignature.(XMLSignature.java:326)
    at org.jboss.ws.extensions.security.element.Signature.(Signature.java:57)
    at org.jboss.ws.extensions.security.element.SecurityHeader.(SecurityHeader.java:85)
    at org.jboss.ws.extensions.security.SecurityDecoder.decode(SecurityDecoder.java:192)
    at org.jboss.ws.extensions.security.WSSecurityDispatcher.decodeHeader(WSSecurityDispatcher.java:131)
    at org.jboss.ws.extensions.security.WSSecurityDispatcher.decodeMessage(WSSecurityDispatcher.java:100)
    at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:90)
    at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer.handleInbound(WSSecurityHandlerServer.java:41)
    at org.jboss.wsf.common.handler.GenericHandler.handleMessage(GenericHandler.java:53)
    at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:305)
    at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:142)
    at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:97)
    at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:129)
    at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:176)
    at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:470)
    at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:294)
    at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:203)
    at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:129)
    at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        ...

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 5.x
  • JBossWS Native

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content