AXIS 调用 webservice服务时传递 服务器验证需要的用户名密码

System.setProperty("javax.net.ssl.trustStore", T.class.getResource(".").getPath()+"keystore/wanhua.truststore");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
String address = "地址";
String username = "username";
String password = "password ";
SI_381_GPS_OnlinetrackFrequency_OutServiceLocator lso = new SI_381_GPS_OnlinetrackFrequency_OutServiceLocator();
L3_LMS_IF12_WS_01Response lliw = lso.getHTTPS_Port(address,username,password).SI_381_GPS_OnlinetrackFrequency(new L3_LMS_IF12_WS_01());
System.out.println(lliw.getL3_LMS_IF12_WS_01Return().getValue());

原文地址:https://www.cnblogs.com/zhaoyan001/p/6075671.html