" />

字幕网av,日本成人乱码在线,精品人妻无码图文,国产在av

HTTP_JAVA短信接口示例

一、下載源碼

JAVA DEMO下載

備注: httpclient 方式引用1、httpclient.jar,2、httpcore.jar,3、commons-logging.jar,4、commons-codec.jar; jodd方式引用1、jodd-core.jar,2、jodd-http.jar,3、jodd-upload.jar。 具體版本號(hào)以下載示例源碼包中jar包的版本為準(zhǔn),如需要其他版本請(qǐng)自主下載。

二、使用幫助

2.1 DEMO結(jié)構(gòu)

說明:
1、ApiDemo4HttpClient.java:江蘇美圣短信接口
2、開發(fā)環(huán)境引用第三方j(luò)ar方式 maven方式:復(fù)制以下配置片段放在pom.xml中dependencies節(jié)點(diǎn)內(nèi)
  

            org.apache.httpcomponents
            httpclient
            4.3.5

      
手工方式:點(diǎn)擊下載"引用jar包.rar"手工添加至項(xiàng)目工程中。

2.2 初始參數(shù)

	//賬號(hào)
	static String account = "JSM*****";
	//密碼
	static String password = "********";
	//通訊Key/校驗(yàn)碼
	static String veryCode = "************";

2.3 接口使用

2.3.1 普通短信

public static String sendSms(String mobile,String content){
	String sendSmsUrl = http_url + "/service/httpService/httpInterface.do?method=sendUtf8Msg";
	Map<String,String> params = new HashMap<String,String>();
	params.put("username", account);
	params.put("password", password);
	params.put("veryCode", veryCode);
	params.put("mobile", mobile);
	params.put("content", content);
	params.put("msgtype", "1");
	params.put("code", "utf-8");
	String result = sendHttpPost(sendSmsUrl, params);
	return result;
}
如果賬號(hào)開了免審,或者是做模板短信,將會(huì)按照規(guī)則正常發(fā)送,而不會(huì)進(jìn)人工審核平臺(tái),返回值是:



0
48783a095b7e4c11a9f1a86b5f9b0357,bb3a1075aca34f588defde55d0b3d57c
	

2.3.2 模板短信

public static String sendTplSms(String mobile,String tplId,String content){
	String sendTplSmsUrl = http_url + "/service/httpService/httpInterface.do?method=sendUtf8Msg";
	Map<String,String> params = new HashMap<String,String>();
	params.put("username", account);
	params.put("password", password);
	params.put("veryCode", veryCode);
	params.put("mobile", mobile);
	params.put("content", content);	//變量值,以英文逗號(hào)隔開
	params.put("msgtype", "2");		//2-模板短信
	params.put("tempid", tplId);	//模板編號(hào)
	params.put("code", "utf-8");
	String result = sendHttpPost(sendTplSmsUrl, params);
	return result;
}



0
743ed1cf5c1a48059e46b5bddced4f4a
	

2.3.3 獲得狀態(tài)報(bào)告

public static String queryReport(){
	String reportUrl = http_url + "/service/httpService/httpInterface.do?method=queryReport";
	Map<String,String> params = new HashMap<String,String>();
	params.put("username", account);
	params.put("password", password);
	params.put("veryCode", veryCode);
	String result = sendHttpPost(reportUrl, params);
	return result;
}
只能查詢當(dāng)天的,已獲取的狀態(tài)報(bào)告后續(xù)不會(huì)再獲取,返回值是:



159********
c9d6cdca60734906b35f846a1feb0622
DELIVRD


	

159********
74b8a704de1f498a8762dc66e02fd660
DELIVRD


	

2.3.4 獲得上行短信

public static String queryMo(){
	String moUrl = http_url + "/service/httpService/httpInterface.do?method=queryMo";
	Map<String,String> params = new HashMap<String,String>();
	params.put("username", account);
	params.put("password", password);
	params.put("veryCode", veryCode);
	String result = sendHttpPost(moUrl, params);
	return result;
}
只能查詢當(dāng)天的,已獲取的上行短信后續(xù)不會(huì)再獲取,返回值:



159********
106905994540001
謝謝

	

159********
106905994540001
江蘇美圣信息技術(shù)有限公司

	

    

2.3.5 獲得余額

public static String getBalance(){
	String balanceUrl = http_url + "/service/httpService/httpInterface.do?method=getAmount";
	Map<String,String> params = new HashMap<String,String>();
	params.put("username",account);
	params.put("password",password);
	params.put("veryCode",veryCode);
	String result = sendHttpPost(balanceUrl, params);
	return result;
}
返回值是:



0
0
	

    
wWw,欧美黄片| 少妇国产日韩| 亚洲日本国产不卡一区| 久久亚洲精品一二区| 日韩中文字幕卡一区| 欧美姊妹久久综合| 亚洲国厂小视频| 美女扒开尿道让人插黄片| 后入欧美高清少妇| 亚洲操逼逼逼日韩欧美| 九九re在线视频| 国产精品美女一区二区| 日韩Porn在线| 超碰在线观看亚洲| 极品熟妇丰满人妻系列人妻99| 欧美日韩综合精品| 特片网一区| 国产欧美一区激情好日子| 天天日天天干天天搞av| 欧美色图亚洲图片视频三区色悠悠| 咪咪亚洲AV成人网| 日本不卡123AV| 人人妻人人澡精品人妻视频| 中文字幕在线无码人妻精品| 久久久久蜜臀精品| 亚洲黄色AV软件| 欧美老熟妇在线视频| 国产你懂得| 欧美黄片直接看| 国产精品高潮第2| 内射网91| 黄色的片片久久久| 日本丰满少妇| 色婷婷综合中文字幕| 夜夜操天天舔爱| 精品久久无码中文字幕| 中文字幕 一区 精品| a 欧美一区| 在线观看日韩一道本一区三区| 欧美在线中文一区| 美女吃鸡巴操逼的视频|