Examples of WeixinMessage


Examples of org.mvnsearch.wx.WeixinMessage

    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //validate signature
        boolean valid = checkSignature(request.getQueryString(), getToken());
        if (valid) {
            try {
                WeixinMessage wxMsg = WeixinUtils.parseXML(request.getInputStream());
                doMessage(wxMsg, request, response);
            } catch (Exception e) {
                response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            } finally {
                WeixinMessageContext.clear();
View Full Code Here

Examples of org.mvnsearch.wx.WeixinMessage

     * 显示微信消息
     *
     * @return weixing response
     */
    public String weixin() {
        WeixinMessage wxMsg = (WeixinMessage) request.getAttribute("wxMsg");
        if (wxMsg == null) {
            wxMsg = new WeixinMessage();
            wxMsg.setSender("jacky");
            wxMsg.setReceiver("leijuan");
            wxMsg.setContent("txt");
            wxMsg.setCreatedTime(new Date());
            request.setAttribute("wxMsg", wxMsg);
        }
        request.setAttribute("content", "echo:" + wxMsg.getContent());
        return "weixin";
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.