Client c = new Client(new URL("http://192.168.1.10:8080/XXX?wsdl"));
Object[] results = c.invoke("getAccountByCode", new Object[]{new Test().getToken(),"a"});
         DocumentImpl doc = (DocumentImpl) results[0];
org.apache.xerces.dom.ElementImpl el = (ElementImpl) doc.getDocumentElement();
System.out.println(el.getElementsByTagName("adminName").getLength());
NodeList nl = el.getChildNodes();
System.out.println(nl.getLength()+"AA");
for(int n=0;n<nl.getLength();n++){
Node node = nl.item(n);
System.out.println("大节点"+node.getNodeName());//+":"+node.getNodeValue());
if(node.hasChildNodes()){
NodeList nl2 = node.getChildNodes();
for(int j=0;j<nl2.getLength();j++){
Node node2 = nl2.item(j);
System.out.println("小节点"+node2.getNodeName()+"值:"+node2.getTextContent());
}
} }
返回的对象该怎么解析?
results[0] 它返回的只能是org.apache.xerces.dom.DocumentImpl 这个对象吗?
怎么不能转成jdom或是dom4j node.getNodeValue() 这个返回的怎么都是null哪位解析过,帮忙啊