方式1:java请求
public static void main(String[] args) throws ServiceException, MalformedURLException, RemoteException {
//地址ip:端口/项目名/axis配置的servlet拦截路径(也可用后缀)/wsdd文件中配置的服务name
String endpoint = "http://localhost:8081/zdtis/services/ZdtisService";
//创建一个服务(service)调用(call)
Service service = new Service();
Call call = (Call) service.createCall();
// call.setOperationName(new QName("http://service.cm.com", "sayHello"));
//设置service所在的url
call.setTargetEndpointAddress(new java.net.URL(endpoint));
//方法名
call.setOperation("alQuery6");
//参数
String ret = (String)call.invoke(new Object[]{"{\"type\":\"queryDh\"}"});
System.out.println(ret);
}
网友评论