怎么调用webservice接口里的方法
2个回答
展开全部
String webservice = https://api.ums86.com:9600/sms_hb/services/Sms
Service s = new Service();
Call call= (Call) s.createCall();
call.setTimeout(new Integer(5000));
call.setOperation( "getSecurityToken" );
call.setTargetEndpointAddress(new URL(webservice));
call.setOperationName("webservice的方法");
Object[] fn01 = {参数};
try {
String val = (String)call.invoke(fn01);
logger.debug( "getSecurityToken(correct):" + val);
} catch (RemoteException e) {
logger.error(e.getMessage());
}
请采纳,谢谢
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询