`
leifeng2
  • 浏览: 139161 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

有关axis调用webservice无参数传入可是有返回参数的方式

    博客分类:
  • java
阅读更多
public void getRscMsg(){
	try {			
		final String endpoint = "http://localhost:8080/CrmHttpServiceWeb/services/RscMsgService";
		final Service service =new Service(); 
		final Call call = (Call) service.createCall(); 
		
		call.setTargetEndpointAddress( new java.net.URL(endpoint) ); 
		call.setOperationName("getRscMsg");
		String result = (String) call.invoke(new Object[]{}); 
		System.out.println("return value is " + result);
	} catch (Exception e) {
		e.printStackTrace();
	}
}

    

    关键是第9行,入参是一个空对象。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics