I am trying to access a portfolio feed for my account, which has a
larger portfolio (about 375 names) and am receiving a Service
Unavailable message from a thrown ServiceException. The code works
fine on an account with a smaller portfolio. Is the interface really
that unstable? The code is simple and follows:
...
FinanceService myService = new FinanceService("test123-exampleApp-1");
myService.setUserCredentials("myus...@a.com", "password");
String requestUrl = "http://finance.google.com/finance/feeds/default/
portfolios";
PortfolioFeed portfolioFeed = myService.getFeed(new URL(requestUrl),
PortfolioFeed.class);
...
The relevant exception error information that I receive follows:
- ServiceException.getHttpErrorCodeOverride()
HTTP Error Code Override: 503
- ServiceException.getResponseBody()
Server Error, Retry
- ServiceException.toXmlErrorMessage() returns:
<errors xmlns='http://schemas.google.com/g/2005'>
<error>
<domain>GData</domain>
<code>ServiceException</code>
<internalReason>Service Unavailable</internalReason>
</error>
</errors>
---
- The ServiceException.printStackTrace() returns:
com.google.gdata.util.ServiceException: Service Unavailable
Server Error, Retry
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse
(HttpGDataRequest.java:587)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse
(GoogleGDataRequest.java:543)
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:1017)
at com.google.gdata.client.Service.getFeed(Service.java:880)
at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:
631)
at com.google.gdata.client.Service.getFeed(Service.java:899)
at com.ahc.Main.main(Main.java:71)
Any help with this is greatly appreciated!!!
Thanks.