第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

該公眾號(hào)暫時(shí)無法提供服務(wù)請(qǐng)稍后再試。怎么回事。

public class WeiXinServlet extends HttpServlet {

private static final long serialVersionUID = 1L;

? ? ? ?

? ? /**

? ? ?* @see HttpServlet#HttpServlet()

? ? ?*/

? ? public WeiXinServlet() {

? ? ? ? super();

? ? ? ? // TODO Auto-generated constructor stub

? ? }


/**

* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)

*/

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

String signature = request.getParameter("signature");

String timestamp = request.getParameter("timestamp");

String nonce = request.getParameter("nonce");

String echostr = request.getParameter("echostr");

PrintWriter out=response.getWriter();

if(CheckUtil.checkSignature(signature, timestamp, nonce, echostr)){

out.print(echostr);

}

}


/**

* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)

*/

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

request.setCharacterEncoding("UTF-8");

response.setCharacterEncoding("UTF-8");

PrintWriter out=response.getWriter();

try {

Map<String, String> map = MessageUtil.xmlToMap(request);

String fromUserName = map.get("FromUserName");

String toUserName = map.get("ToUserName");

String msgType = map.get("MsgType");

String content = map.get("Content");

String message =null;

if("text".equals(msgType)){

TextMessage text=new TextMessage();

text.setFromUserName(toUserName);

text.setToUserName(fromUserName);

text.setMsgType("text");

text.setCreateTime(new Date().getTime());

text.setContent("您響應(yīng)的消息是:"+content);

message = MessageUtil.textMessageToXML(text);

}

out.print(message);

System.out.println("-------------------------");

System.out.println(message);

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

}finally {

out.close();

}

}


}


正在回答

5 回答

請(qǐng)問解決了嗎


0 回復(fù) 有任何疑惑可以回復(fù)我~

我也是這個(gè)問題?

http://img1.sycdn.imooc.com//5a0099cc0001462905000377.jpg

http://img1.sycdn.imooc.com//5a0099cc00015e6d06240158.jpg


0 回復(fù) 有任何疑惑可以回復(fù)我~

有解決了的不

0 回復(fù) 有任何疑惑可以回復(fù)我~

這四個(gè)參數(shù)為空

http://img1.sycdn.imooc.com//5950dd5800010eb012000711.jpg

0 回復(fù) 有任何疑惑可以回復(fù)我~

沒有轉(zhuǎn)換成xml

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

該公眾號(hào)暫時(shí)無法提供服務(wù)請(qǐng)稍后再試。怎么回事。

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)