2009-05-13 3 views
1
나는 문서를 다음있어

로 리디렉션 때문에 Google Analytics Data API - Java 에서 근무하고 구글 가있는 지역의 웹 사이트 (www.google.si)에 저를 리디렉션 때문에, RedirectRequiredException 예외를 얻고있다 없습니다 .의 GData 자바 클라이언트 구글은 현지화 된 사이트

코드 :

AnalyticsService as = new AnalyticsService("me-myapp-1.0"); 
as.setUserCredentials(username, password); 
AccountFeed accountFeed = as.getFeed( 
    new URL("https://www.google.com/analytics/accounts/default"), 
    AccountFeed.class); 

마지막 메서드 호출이 발생합니다 :

Exception in thread "main" com.google.gdata.util.RedirectRequiredException: Found 
<HTML><HEAD><meta http-equiv="content-type" content="text/ 
html;charset=utf-8"> 
<TITLE>302 Moved</TITLE></HEAD><BODY> 
<H1>302 Moved</H1> 
The document has moved 
<A HREF="http://www.google.si/">here</A>. 
</BODY></HTML> 
     at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse (GoogleGDataRequest.java:541) 
     at com.google.gdata.client.http.HttpGDataRequest.checkResponse (HttpGDataRequest.java:535) 
     at com.google.gdata.client.http.HttpGDataRequest.execute (HttpGDataRequest.java:514) 
     at com.google.gdata.client.http.GoogleGDataRequest.execute (GoogleGDataRequest.java:515) 
     at com.google.gdata.client.Service.getFeed(Service.java:1016) 
     at com.google.gdata.client.Service.getFeed(Service.java:879) 
     at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:638) 
     at com.google.gdata.client.Service.getFeed(Service.java:898) 
     at org.kubje.jaka.gapump.App.main(App.java:42) 

어떤 아이디어?

이 질문은 Analytics API의 Google 그룹 here에도 게시했습니다.

답변

1

URL이 잘못되었습니다. 나는 그것을 잘못된 것으로부터 복사했다.