axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <axis-...@ws.apache.org>
Subject [jira] [Updated] (AXIS-2125) DOMException (NAMESPACE_ERR) if we run a XPath Query using Sun JDK1.5 on a SOAPPart DOM
Date Tue, 02 Oct 2012 21:25:08 GMT

     [ https://issues.apache.org/jira/browse/AXIS-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen updated AXIS-2125:
----------------------------------

    Labels: dom-compatibility  (was: )
    
> DOMException (NAMESPACE_ERR) if we run a XPath Query using Sun JDK1.5 on a SOAPPart DOM
> ---------------------------------------------------------------------------------------
>
>                 Key: AXIS-2125
>                 URL: https://issues.apache.org/jira/browse/AXIS-2125
>             Project: Axis
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Sun JDK 1.5, Tomcat 5.5.7
>            Reporter: Prasad A. Chodavarapu
>            Assignee: Jayachandra Sekhara Rao Sunkara
>            Priority: Critical
>              Labels: dom-compatibility
>         Attachments: AxisDOMBug.java, NamespaceCatalog.java, namespacecatalog.properties,
soapenv.xml
>
>
> The following problems show up I use the XPath interpreter
> shipped with Sun JDK 1.5 to locate nodes in a Axis created
> SOAPPart DOM. 
> 1) After creating a message and adding a header, if I run a
>    XPath query, one of two things happen depending on
>    whether or not I call toString() on the envelope before
>    the XPath query.
>      a) If I call soapEnvelope.toString() before I run a
>         XPath query on the DOM, I see a DOMException
>         saying: "NAMESPACE_ERR: An attempt is made to create
>         or change an object in a way which is incorrect with
>         regard to namespaces." The stack trace is attached
>         below.
>      b) If I do not call soapEnvelope.toString() before I run a
>         xapth query on the DOM, I see that the namespace
>         prefixes have disappeared for actor and
>         mustUnderstand attributes of the WS-Security header.
> 2) The method, getNamespaceURI, is not implemented in
>    SOAPPart! Seems like too basic a method to not
>    implement. See the stack trace below.
> Thanks
> prasad
> Stack Trace for Bug 1a
> ======================
> org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object
in a way which is incorrect with regard to namespaces.
> 	at org.apache.xerces.dom.CoreDocumentImpl.checkNamespaceWF(Unknown Source)
> 	at org.apache.xerces.dom.AttrNSImpl.setName(Unknown Source)
> 	at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
> 	at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
> 	at org.apache.axis.message.NodeImpl.convertAttrSAXtoDOM(NodeImpl.java:745)
> 	at org.apache.axis.message.NodeImpl.getAttributes(NodeImpl.java:323)
> 	at org.apache.axis.message.SOAPHeaderElement.getAttributes(SOAPHeaderElement.java:274)
> 	at com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.nextNode(DOM2DTM.java:530)
> 	at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase._firstch(DTMDefaultBase.java:533)
> 	at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase.getFirstChild(DTMDefaultBase.java:973)
> 	at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBaseTraversers$ChildTraverser.first(DTMDefaultBaseTraversers.java:411)
> 	at com.sun.org.apache.xpath.internal.axes.AxesWalker.getNextNode(AxesWalker.java:324)
> 	at com.sun.org.apache.xpath.internal.axes.AxesWalker.nextNode(AxesWalker.java:360)
> 	at com.sun.org.apache.xpath.internal.axes.WalkingIterator.nextNode(WalkingIterator.java:191)
> 	at com.sun.org.apache.xpath.internal.axes.NodeSequence.nextNode(NodeSequence.java:280)
> 	at com.sun.org.apache.xpath.internal.axes.NodeSequence.runTo(NodeSequence.java:434)
> 	at com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList.<init>(DTMNodeList.java:79)
> 	at com.sun.org.apache.xpath.internal.objects.XNodeSet.nodelist(XNodeSet.java:338)
> 	at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.getResultAsType(XPathExpressionImpl.java:351)
> 	at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:98)
> 	at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:178)
> 	at AxisDOMBug.bug1a(AxisDOMBug.java:81)
> 	at AxisDOMBug.main(AxisDOMBug.java:30)
> Stack Trace for Bug 2
> =====================
> Exception in thread "main" org.w3c.dom.DOMException: 
> 	at org.apache.axis.message.SOAPDocumentImpl.getNamespaceURI(SOAPDocumentImpl.java:670)
> 	at org.apache.axis.SOAPPart.getNamespaceURI(SOAPPart.java:1255)
> 	at com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.addNode(DOM2DTM.java:259)
> 	at com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.<init>(DOM2DTM.java:128)
> 	at com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:246)
> 	at com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault.getDTMHandleFromNode(DTMManagerDefault.java:539)
> 	at com.sun.org.apache.xpath.internal.XPathContext.getDTMHandleFromNode(XPathContext.java:154)
> 	at com.sun.org.apache.xpath.internal.XPath.execute(XPath.java:234)
> 	at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:123)
> 	at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:97)
> 	at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:178)
> 	at AxisDOMBug.bug2(AxisDOMBug.java:143)
> 	at AxisDOMBug.main(AxisDOMBug.java:32)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message