xfire是辣么过时,由于用到了,不能不研究一下。
其中重要参考的文档:http://blog.csdn.net/heipacker/article/details/8525429 --关于复杂类型返回值的解析
复杂类型返回值类型为 org.w3c.dom.Document 类型对象
/* 解析第一个参数开始 */
Document doc = (Document) os[0];
Element root = doc.getDocumentElement();
List<UnfiInfoReturnBean> ulist = new ArrayList<UnfiInfoReturnBean>();
NodeList nl = root.getElementsByTagName("ns2:UnfiInfoReturnBean");
for (int i = 0; i < nl.getLength(); i++) {
UnfiInfoReturnBean u = new UnfiInfoReturnBean();
u.setRtProjectId(Long.parseLong(nl.item(i).getFirstChild().getTextContent()));
u.setUnfinishedInfo( nl.item(i).getLastChild().getTextContent() );
ulist.add(u);
}
原来不过使用w3c.dom.Document对象,用这个对象封装的api解析即可。
sosoeasy