1

ユーザーの Gmail アカウントから連絡先を取得しようとすると、現在問題が発生しています。

GWT 2.4 にアップグレードする前は、これは必要に応じて機能していましたが、2.4 に (2.3 から) アップグレードして以来、失敗の原因となっている非常にあいまいなエラーが発生しています。

    try
    {
        myService.setUserCredentials(username, password);
    }
    catch (final AuthenticationException e)
    {
        //log exception
    }

    URL feedURL;

    try
    {
        feedURL = new URL("https://www.google.com/m8/feeds/contacts/default/full?max-results=1000");
    }
    catch (final MalformedURLException e)
    {
        //log exception
    }

    ContactFeed resultFeed;

    try
    {
        resultFeed = myService.getFeed(feedURL, ContactFeed.class);
    }
    catch (final IOException e) //Exception is caught here, see below
    {
        //log exception
    }
    catch (ServiceException e)
    {
        //log exception
    }

キャッチされているもの:

cause = ProtocolException
detailedMessage= "Missing WWW-Authenticate header"

java.net.ProtocolException: Missing WWW-Authenticate header

GWT 2.4 へのアップグレードで、何か新しい認証を行う必要がありますか? 特に開発者ガイドでは、これが事実であると言うものは何も見つかりませんでした。

この時点で、アドバイスをいただければ幸いです。

4

1 に答える 1

1

この問題は、サード パーティのライブラリが原因でした。ライブラリは、gdata と互換性のない httpclient 1.0 を使用していました。

何らかの理由で、gdata は最新ではなく古い 1.0 を使用して通信しようとしています。

于 2012-01-03T14:07:55.777 に答える