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 javax.xml.parsers.SAXParser.parse(Unknown Source) 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) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at fe.crm.Test.test2(Test.java:63) at fe.crm.Test.main(Test.java:41)
{http://xml.apache.org/axis/}hostname:jackieKang-PC
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it. at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at fe.crm.Test.test2(Test.java:63) at fe.crm.Test.main(Test.java:41) Caused by: 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 javax.xml.parsers.SAXParser.parse(Unknown Source) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) ... 10 more
public static void test2() {
try {
String queryXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<Interface type=\"query\" model=\"object\" value=\"Account\">\n"
+ "<Condition>\n"
+ "<Express field=\"Account.ID\" operator=\"LIKE\" value=\"\"/>\n"
+ "</Condition>\n</Interface>";
String u8SerRrl = "http://localhost:8087/webservice/service.php?orgcode=crm&class=WS_EAI";
String nameSpace = "http://localhost:8087/";
String method = "process";
Service servObj = new Service();
Call callObj = (Call) servObj.createCall();
callObj.setTargetEndpointAddress(new java.net.URL(u8SerRrl));
callObj.setOperationName(new QName(nameSpace, method));
callObj.addParameter(new QName(nameSpace, "queryXml"),
org.apache.axis.Constants.XSD_STRING, ParameterMode.IN);
callObj.setReturnType(org.apache.axis.Constants.XSD_STRING);
callObj.setUseSOAPAction(true);
callObj.setSOAPActionURI(nameSpace + method);
callObj.invoke(new Object[] { queryXML });
} catch (Exception e) {
e.printStackTrace();
}
}
A node is used in a different document than the one that created it
http://netbeans.org/bugzilla/show_bug.cgi?id=151430
看代码也没看出啥问题,不太懂java。
参考以下文章,看看能否找到答案;
http://www.w3.org/TR/2004/WD-SVG12-20040510/svgudom.html
http://hi.baidu.com/lb8585/blog/item/40fa2a22cdcc264493580735.html
自己解决.