2011-12-28 77 views
1

我目前在尝试从用户Gmail帐户中提取联系人时遇到问题。无法在GWT 2.4升级后从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是有需要做任何新的认证?我没有发现任何可以说明的情况,具体在他们的developer guide上。

在这一点上,任何意见都非常感谢。

回答

1

此问题是由第三方库引起的。这个库使用的是httpclient 1.0,它与gdata不兼容。

由于某种原因,gdata正在尝试使用过时的1.0而不是最新的进行通信。