服务端方法:
public static Map<String, String> GETDATA(String xml)
{
Map<String, String> ret_map = new HashMap<String, String>();
ret_map.put("result", ""+result);
ret_map.put("restr", restr);
return ret_map;
}
客户端调用案例:
private static void axis2WebService() {
try {
String xml="";
try {
xml = "<root></root>";
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String soapBindingAddress = "http://localhost:8080/axis2/services/Service?wsdl";
ServiceClient sender = new ServiceClient();
EndpointReference endpointReference = new EndpointReference(soapBindingAddress);
Options