阿里大鱼 BizResult

阿里大鱼 BizResult为什么会为空????但是rsp.getBody()又是有的

/ 发送短信验证码 /

public static BizResult sendSmsVerifyCode(String agentphone, int code) {
    TaobaoClient client = new DefaultTaobaoClient(HTTP, API_KEY, APP_SECRET);
    AlibabaAliqinFcSmsNumSendRequest req = new AlibabaAliqinFcSmsNumSendRequest();
    req.setSmsType("normal");
    req.setSmsFreeSignName("登录验证");
    // 验证码${code},您正在登录${product},若非本人操作,请勿泄露。
    String content = "{\"code\":\"" + code + "\",\"product\":\"xxx\"}";
    req.setSmsParamString(content);
    req.setRecNum(agentphone);
    req.setSmsTemplateCode("SMS_1535006");
    AlibabaAliqinFcSmsNumSendResponse rsp;
    try {
        rsp = client.execute(req);
        System.out.println("xxx==" + rsp.toString());
        String body = rsp.getBody();
        BizResult bizResult = rsp.getResult();
        System.out.println("xxxx==" + body.toString());
        // System.out.println(bizResult.getSuccess());
        return bizResult;
    } catch (ApiException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        return null;
    }
}
阅读 5.6k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏