簡體   English   中英

在Java上重新連接Intuit時出錯

[英]Error while reconnecting Intuit on java

我正在對應用程序進行intuit集成。 現在,我陷入了重新連接的過程。 在進行重新連接時,出現以下異常:

 Message: Token Refresh Window Out of Bounds Caused By: null

實際上,在測試時,我使用了未過期的密鑰。 這就是我得到此例外的原因嗎?

我正在使用Java,而我的Java代碼是:

public void renewQBOAccessToken(HttpServletRequest req, HttpServletResponse resp) {
        LOGGER.info("Inside renewQBOAccessToken method.");
        HttpSession session = req.getSession();
        Intuit intuit;
        try {
            intuit = IntuitLocalServiceUtil.getIntuit(PortalUtils.getCompanyId(req), PortalUtils.getOrganisationId(req));
            LOGGER.info("Values before ::::::::::::::::");
            IAPlatformClient client = new IAPlatformClient();
            client.reConnect(PropsUtil.get(CommonConstants.INTUIT_QB_OAUTH_CONSUMER_KEY),
                    PropsUtil.get(CommonConstants.INTUIT_QB_OAUTH_CONSUMER_SECRET), intuit.getOauthToken(), intuit.getOauthTokenSecret());
            getAccessToken(req, resp);

            LOGGER.info(">>>>>>>>>>>> values after reconnect: ");
            LOGGER.info("accesstoken: +" + session.getAttribute(CommonConstants.INTUIT_QB_OAUTH_ACCESS_TOKEN_KEY));
            LOGGER.info("access token secret:" + session.getAttribute(CommonConstants.INTUIT_QB_OAUTH_ACCESS_TOKEN_SECRET));
        } catch (PortalException | SystemException e1) {
            LOGGER.error(e1.getClass().getName() + " Exception while reconnecting  #renewQBOAccessToken Class: "
                    + e1.getClass().getSimpleName() + " Message: " + e1.getMessage() + " Caused By: " + e1.getCause());
        } catch (ConnectionException e) {
            LOGGER.error(e.getClass().getName() + " ConnectionException while reconnecting  #renewQBOAccessToken Class: "
                    + e.getClass().getSimpleName() + " Message: " + e.getMessage() + " Caused By: " + e.getCause());
        }
    }

謝謝。

是。 該令牌不在有效期30天之內。

請參閱https://developer.intuit.com/docs/0025_quickbooksapi/0053_auth_auth/oauth_management_api以獲取響應。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM