开发者社区> 问答> 正文

钉钉新建套件回调Url问题

使用的是官方Java ISV demo    回调地址为url为:工程地址/isvreceive


调试过程能进去,但是Url参数(如下)都是null,请问这是什么问题?
** url中的签名 **/
            String msgSignature = request.getParameter("signature");
            /** url中的时间戳 **/
            String timeStamp = request.getParameter("timestamp");
            /** url中的随机字符串 **/
            String nonce = request.getParameter("nonce");

展开
收起
基姆 2016-08-29 14:50:02 6444 0
6 条回答
写回答
取消 提交回答
  • Re钉钉新建套件回调Url问题
    已经fix了。原来会有两次调用,一次带参数一次不带。不带参数那次是因为安全问题故意做的保护性尝试。现在已经去掉不带参数的访问了。
    2016-10-20 18:33:38
    赞同 展开评论 打赏
  • 我也是没有接受到值
    java.lang.NullPointerException
        at com.sun.servlet.TestDingDing.doGet(TestDingDing.java:75)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)

    -------------------------

    回 6楼肥龙的帖子
    就是因为多试了还是null,所以才来求助的啊

    -------------------------

    帮忙看下
    https://bbs.aliyun.com/read/297270.html?spm=5176.bbsl276.0.0.4YGwhZ 帮忙看下
    2016-10-20 10:49:27
    赞同 展开评论 打赏
  • Re钉钉新建套件回调Url问题
    引用第1楼肥龙于2016-08-29 23:23发表的  :
    请参考我们的demo,调试看看。


    就是demo,获得的请求参数都是null
    2016-09-22 20:04:46
    赞同 展开评论 打赏
  • Re钉钉新建套件回调Url问题
    解决了吗?我的也是这样
    java.lang.NullPointerException
        at com.alibaba.dingtalk.openapi.servlet.IsvReceiveServlet.doGet(IsvReceiveServlet.java:80)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)
    com.alibaba.dingtalk.openapi.demo.utils.aes.DingTalkEncryptException: 签名计算失败
        at com.alibaba.dingtalk.openapi.demo.utils.aes.DingTalkEncryptor.getSignature(DingTalkEncryptor.java:206)
        at com.alibaba.dingtalk.openapi.demo.utils.aes.DingTalkEncryptor.getDecryptMsg(DingTalkEncryptor.java:89)
        at com.alibaba.dingtalk.openapi.servlet.IsvReceiveServlet.doGet(IsvReceiveServlet.java:104)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)
    2016-09-11 18:43:43
    赞同 展开评论 打赏
  • Re钉钉新建套件回调Url问题
    我的也是空

    com.alibaba.dingtalk.openapi.demo.utils.aes.DingTalkEncryptException: 签名计算失败
    at com.alibaba.dingtalk.openapi.demo.utils.aes.DingTalkEncryptor.getSignature(DingTalkEncryptor.java:207)
    at com.alibaba.dingtalk.openapi.demo.utils.aes.DingTalkEncryptor.getDecryptMsg(DingTalkEncryptor.java:90)
    at com.alibaba.dingtalk.openapi.servlet.IsvReceiveServlet.doGet(IsvReceiveServlet.java:104)
    at com.alibaba.dingtalk.openapi.servlet.IsvReceiveServlet.doPost(IsvReceiveServlet.java:289)

    -------------------------

    回 2楼itas109的帖子
    我的找到原因了
    因为某些原因导致第一次调用失败之后,
    再次创建的时候没有修改Env.java的ENCODING_AES_KEY从而失败的
    2016-08-31 14:42:05
    赞同 展开评论 打赏
  • 请参考我们的demo,调试看看。

    -------------------------

    如果参数是null,可以重试一次试试。

    2016-08-29 23:23:42
    赞同 展开评论 打赏
滑动查看更多
问答排行榜
最热
最新

相关电子书

更多
钉钉小程序——为工作方式插上翅膀 立即下载
钉钉客户端自动化的应用 立即下载
使命必达 —— 钉钉企业级 消息服务的机遇与挑战 立即下载