Web Service 调用和返回值问题 没试过这东东WebLogic上的客户端可以把用到的类都生成出来,包括参数和返回值印象中是这样 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 axis14里反正是没法返回List这种collection对象,只能用Object[]的方式。例子见我们教程:http://www.family168.com/tutorial/axis14/html/axis14-ch-03.html public class TestRain { private static EndpointReference targetEPR = new EndpointReference( "http://localhost:8080/axis2/services/dd"); public static OMElement getQueryOMElement() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace("http://xut.edu.cn/", "test"); OMElement method = fac.createOMElement("query", omNs); method.setText("41100900"); return method; } public static void main(String[] args) { try { // Make the request message Options options = new Options(); options.setTo(targetEPR); ServiceClient sender = new ServiceClient(); sender.setOptions(options); options.setAction("query"); // test query method OMElement query = TestRain.getQueryOMElement(); OMElement result = sender.sendReceive(query); System.out.println(result); } catch (Exception axisFault) { axisFault.printStackTrace(); } }}//-----------------------------------------供参考本例使用的是AXIS2.1.3版本 关于targetEntity和泛型的疑问 传智播客 7天3G-Android实战班 团报 structs 一个页面两个表,上边显示表A一条记录,下边显示表B全部记录 struts 中图片显示问题 关于STRUTS的问题 有谁能提供linux下的MySQL 3.23.49 的jdbc驱动? hibernate中session的管理问题? 用jdom包解析XML文件的问题 急!急!急!大虾们来帮忙啊!JBoss如何快启动...... jakarta-ant具体是做什么的? JTble刷新问题 hibernate查询问题
http://www.family168.com/tutorial/axis14/html/axis14-ch-03.html
private static EndpointReference targetEPR = new EndpointReference(
"http://localhost:8080/axis2/services/dd"); public static OMElement getQueryOMElement() {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace("http://xut.edu.cn/",
"test");
OMElement method = fac.createOMElement("query", omNs);
method.setText("41100900");
return method;
} public static void main(String[] args) {
try {
// Make the request message
Options options = new Options();
options.setTo(targetEPR);
ServiceClient sender = new ServiceClient();
sender.setOptions(options);
options.setAction("query");
// test query method
OMElement query = TestRain.getQueryOMElement();
OMElement result = sender.sendReceive(query);
System.out.println(result);
} catch (Exception axisFault) {
axisFault.printStackTrace();
}
}
}
//-----------------------------------------
供参考
本例使用的是AXIS2.1.3版本