📄 calltuxdointer.java
字号:
package com.doone.fj1w.fjmgr.order;
import java.io.IOException;
import java.io.Serializable;
import java.util.Hashtable;
import java.util.Vector;
import org.apache.soap.rpc.Parameter;
import com.doone.fj1w.common.WSClientThird;
/**
* <strong>
* 审核单模块所有送接口的call方法的统一调用。
* </strong>
* @author predan
* @see IOException,Serializable,Hashtable
* @see Vector,Parameter,WSClientThird
* @version 1.0
*/
public class CallTuxdoInter implements Serializable {
private static final long serialVersionUID = -6244802960675972297L;
public static final String BSS_SERVICENAME = "ServiceCall_APP";
//默认接口超时
private static final int timeOut = 10000;
public String toString(){
return "审核单模块所有送接口的call方法的统一调用";
}
public static String callTuxdo(String methodname,
String citycode,
String pServiceName)throws IOException{
return callTuxdo(null,
methodname,
citycode,
pServiceName,
timeOut);
}
/**
*
* @param hashTable
* @param methodname
* @return
* @throws IOException
*/
public static String callTuxdo(
Hashtable hashTable,
String methodname)
throws IOException{
return callTuxdo(hashTable,
methodname,
"",
"",
timeOut);
}
/**
*
* @param hashTable
* @param methodname
* @param timeOut
* @return
* @throws IOException
*/
public static String callTuxdo(
Hashtable hashTable,
String methodname,
int timeOut)
throws IOException{
return callTuxdo(hashTable,
methodname,
"",
"",
timeOut);
}
/**
*
* @param hashTable
* @param methodname
* @param citycode
* @return
* @throws IOException
*/
public static String callTuxdo(Hashtable hashTable,
String methodname,
String citycode)
throws IOException{
return callTuxdo(hashTable,
methodname,
citycode,
"",
timeOut);
}
/**
*
* @param hashTable
* @param methodname
* @param citycode
* @param timeOut
* @return
* @throws IOException
*/
public static String callTuxdo(Hashtable hashTable,
String methodname,
String citycode,
int timeOut)
throws IOException{
return callTuxdo(hashTable,
methodname,
citycode,
"",
timeOut);
}
/**
*
* @param hashTable
* @param methodname
* @param citycode
* @param pServiceName
* @return
* @throws IOException
*/
public static String callTuxdo(Hashtable hashTable,
String methodname,
String citycode,
String pServiceName)
throws IOException{
return callTuxdo(hashTable,
methodname,
citycode,
pServiceName,
timeOut);
}
/**
* @param hashTable :传入的形参值(必选)
* @param methodname:服务名(必选)
* @param citycode:地市(可选)
* @param pServiceName:交易编码(可选)
* @return result : String XML
* @throws IOException
*/
public static String callTuxdo(Hashtable hashTable,
String methodname,
String citycode,
String pServiceName,
int timeOut
)throws IOException{
Vector params = new Vector();
if(citycode != null && !citycode.equals("")){
params.addElement(new Parameter("CityCode",
String.class,
citycode, null));
}
if(pServiceName != null && !pServiceName.equals("")){
params.addElement(new Parameter("pServiceName",
String.class,
pServiceName, null));
}
if(hashTable != null){
params.addElement(new Parameter("pInPara",
Hashtable.class,
hashTable, null));
}
WSClientThird wt = new WSClientThird();
String result = wt.QueryThird(methodname,params);
if(result == null
|| result.equals("")
|| result.equals("F")
|| result.equals("QueryThird Result Error!"))
throw new IOException("获取接口信息网络异常:"+result
+" 服务名:"+methodname
+" 交易编码:"+pServiceName);
return result;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -