有关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行,入参是一个空对象。

你可能感兴趣的:(webservice)