当前位置: 代码迷 >> Web前端 >> 相干axis调用webservice无参数传入可是有返回参数的方式
  详细解决方案

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

热度:175   发布时间:2012-09-10 11:02:32.0
有关axis调用webservice无参数传入可是有返回参数的方式
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行,入参是一个空对象。

  相关解决方案