webservice调用是发布----axis



import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

public class ClientAxis {

public static void main(String[] args) {

try {
// 指出service所在URL
String endpoint = "http://192.168.2.108:8090/airforce/services/CarRecordWebService?wsdl";

// 创建一个服务(service)调用(call)
Service service = new Service();

//Call call = (Call) service.createCall();// 通过service创建call对象
Call call =(Call)service.createCall();

// 设置service所在URL
call.setTargetEndpointAddress(new java.net.URL(endpoint));

// 方法名(processService)与WebService中方法名保持一致
call.setOperationName("setShowMsg");

// Object 数组封装了参数,参数为"This is Test!",调用processService(String arg)
// String rMsg = (String) call.invoke(new Object[] {
// "devId-0001","cardId-70125","carNo-NY09007" });

String rMsg = (String) call.invoke(new Object[] { "00000379","2015-12-08 12:15:19", "0512440120001", "60000", "1", "0" });
System.out.println(rMsg);
} catch (Exception e) {
e.printStackTrace();
}
}
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值