axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raquel rdlg" <raquel_r...@hotmail.com>
Subject RE: [jira] Commented: (AXIS-2394) SOAPFaultBuilder throws DOMException WRONG_DOCUMENT_ERR
Date Wed, 13 Sep 2006 06:41:00 GMT

Unsubscribe me, please.

>From: "Dawid Weiss (JIRA)" <axis-dev@ws.apache.org>
>Reply-To: axis-dev@ws.apache.org
>To: axis-dev@ws.apache.org
>Subject: [jira] Commented: (AXIS-2394) SOAPFaultBuilder throws DOMException 
>WRONG_DOCUMENT_ERR
>Date: Tue, 12 Sep 2006 04:04:23 -0700 (PDT)
>
>     [ 
>http://issues.apache.org/jira/browse/AXIS-2394?page=comments#action_12434114 
>]
>
>Dawid Weiss commented on AXIS-2394:
>-----------------------------------
>
>The above snippet of code is _unpatched_ in Axis version 1.4 and it causes 
>the same problems as mentioned above.
>
>Specifically:
>AxisFault
>  faultCode: 
>{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used 
>in a different document than the one that created it.
>  faultActor:
>  faultNode:
>  faultDetail:
>	{http://xml.apache.org/axis/}stackTrace:org.w3c.dom.DOMException: 
>WRONG_DOCUMENT_ERR: A node is used in a different document than the one 
>that created it.
>	at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown Source)
>	at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
>	at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
>	at 
>org.apache.axis.message.SOAPFaultBuilder.onEndChild(SOAPFaultBuilder.java:305)
>	at 
>org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1090)
>	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
>	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
>Source)
>	at 
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

>Source)
>	at 
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
>Source)
>	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
>Source)
>	at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
>	at 
>org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
>	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
>	at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
>
>
> > SOAPFaultBuilder throws DOMException WRONG_DOCUMENT_ERR
> > -------------------------------------------------------
> >
> >                 Key: AXIS-2394
> >                 URL: http://issues.apache.org/jira/browse/AXIS-2394
> >             Project: Apache Axis
> >          Issue Type: Bug
> >    Affects Versions: 1.3
> >         Environment: Windows XP Professional, Java 5
> >            Reporter: Nikolaos Georgiou
> >
> > I had a problem dealing with fault responses and I got it fixed.
> > The problem was in SOAPFaultBuilder.java
> > the message node was added to a new DOM Document but it was NOT imported 
>first!
> > Importing the node first into the new DOM Document solved the problem.
> > The diff -u output is:
> > --- 
>ws-axis-java-original/src/org/apache/axis/message/SOAPFaultBuilder.java    
>2005-07-27 06:44:02.000000000 +0300
> > +++ 
>ws-axis-java-patched/src/org/apache/axis/message/SOAPFaultBuilder.java    
>2006-01-31 17:56:27.640439500 +0200
> > @@ -24,6 +24,7 @@
> > import org.apache.axis.soap.SOAPConstants;
> > import org.apache.axis.utils.Messages;
> > import org.apache.axis.utils.XMLUtils;
> > +import org.w3c.dom.Document;
> > import org.w3c.dom.Element;
> > import org.w3c.dom.Node;
> > import org.xml.sax.Attributes;
> > @@ -301,8 +302,9 @@
> >                         if (node instanceof MessageElement) {
> >                             elements[i] = ((MessageElement) 
>node).getAsDOM();
> >                         } else if(node instanceof Text){
> > -                            elements[i] = 
>XMLUtils.newDocument().createElement("text");
> > -                            elements[i].appendChild(node);
> > +                Document tempDoc = XMLUtils.newDocument();
> > +                            elements[i] = 
>tempDoc.createElement("text");
> > +                            
>elements[i].appendChild(tempDoc.importNode(node,true));
> >                         }
> >                     } catch (Exception e) {
> >                         throw new SAXException(e);
>
>--
>This message is automatically generated by JIRA.
>-
>If you think it was sent incorrectly contact one of the administrators: 
>http://issues.apache.org/jira/secure/Administrators.jspa
>-
>For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-dev-help@ws.apache.org
>



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


Mime
View raw message