private String invokeWebService(SysUser authUser,
String passWd) throws Exception{
// WebService URL
String serviceUrl = transAuthURL;
String subsysID = subsysID
try{
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceUrl));
call.setOperationName(new QName(serviceUrl,"checkUser"));
call.addParameter("subSysId",
org.apache.axis.encoding.XMLType.XSD_STRING,
javax.xml.rpc.ParameterMode.IN);
call.addParameter("subUserOrg",
org.apache.axis.encoding.XMLType.XSD_STRING,
javax.xml.rpc.ParameterMode.IN);
call.addParameter("subuserName",
org.apache.axis.encoding.XMLType.XSD_STRING,
javax.xml.rpc.ParameterMode.IN);
call.addParameter("passWd",
org.apache.axis.encoding.XMLType.XSD_STRING,
javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
call.setUseSOAPAction(true);
call.setSOAPActionURI(serviceUrl + "/checkUser");
String res = (String) call.invoke(new Object[] {subsysID,authUser.getBranchCode(),
authUser.getUserId(),passWd });
return res;
}catch (Exception e) {
throw new Exception("第三方平台调用失败");
}
}
String res = invokeWebService(authUser, warrantPass);
if(!"00000".equals(res)){
throw new Exception("调用第三方平台失败。:");
}