Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress("http://localhost:8080/axis/services/CrSupportWebService");
call.setOperationName("getAttInfo");
call.addParameter("text", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
CrSupportTest test = new CrSupportTest();
JSONArray jsonArray = new JSONArray();
test.setResult("1");
test.setModel("0");
test.setClientName("test_client");
jsonArray.add(test);
System.out.println(call.invoke(new Object[] { jsonArray.toString()}));
接口
@WebService
public interface CrSupportWebService {
String getAttInfo(@WebParam(name="text")String inputJson);
String upload(DataHandler handler, String fileName, String no);
}
Call call = (Call) service.createCall();
call.setTargetEndpointAddress("http://localhost:8080/axis/services/CrSupportWebService");
call.setOperationName("getAttInfo");
call.addParameter("text", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
CrSupportTest test = new CrSupportTest();
JSONArray jsonArray = new JSONArray();
test.setResult("1");
test.setModel("0");
test.setClientName("test_client");
jsonArray.add(test);
System.out.println(call.invoke(new Object[] { jsonArray.toString()}));
接口
@WebService
public interface CrSupportWebService {
String getAttInfo(@WebParam(name="text")String inputJson);
String upload(DataHandler handler, String fileName, String no);
}