?? 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 + -