Hi,

Thanks for the reply.

I am using that exact url, and I still see the Invalid Token error.

When I use the base URL of https://www.google.com/health/feeds/ the
client works.

When I use the base URL of https://www.google.com/h9/feeds/ I get an
invalid token error.

Here is the logging and error message.

Dec 4, 2008 2:30:51 PM com.google.gdata.client.http.HttpGDataRequest
setPrivateHeader
FINER: Authorization: <Not Logged>
Dec 4, 2008 2:30:51 PM com.google.gdata.client.http.HttpGDataRequest
setHeader
FINER: User-Agent: Sample Health Client GHealth-Java/2.0.0 GData-Java/
null(gzip)
Dec 4, 2008 2:30:51 PM com.google.gdata.client.http.HttpGDataRequest
setHeader
FINER: Accept-Encoding: gzip
Dec 4, 2008 2:30:51 PM com.google.gdata.client.http.HttpGDataRequest
setHeader
FINER: GData-Version: 2.0
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINE: 401 Token invalid
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: Content-Encoding: gzip
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: Content-Length: 122
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: Expires: Thu, 04 Dec 2008 20:30:52 GMT
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: Set-Cookie: S=weaver=n-6N560PiHzRYVa6jnMv9Q;
Domain=.google.com; Path=/; HttpOnly
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: null: HTTP/1.1 401 Token invalid
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: Date: Thu, 04 Dec 2008 20:30:52 GMT
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: Content-Type: text/html; charset=UTF-8
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: Server: GFE/1.3
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: X-Content-Type-Options: nosniff
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: Cache-Control: private, max-age=0
Dec 4, 2008 2:30:52 PM com.google.gdata.client.http.HttpGDataRequest
execute
FINER: WWW-Authenticate: GoogleLogin realm="http://www.google.com/
accounts/ClientLogin", service="weaver"
com.google.gdata.util.AuthenticationException: Token invalid
<HTML>
<HEAD>
<TITLE>Token invalid</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Token invalid</H1>
<H2>Error 401</H2>
</BODY>
</HTML>

        at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse
(HttpGDataRequest.java:508)
        at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse
(GoogleGDataRequest.java:555)
        at com.google.gdata.client.http.HttpGDataRequest.checkResponse
(HttpGDataRequest.java:480)
        at com.google.gdata.client.http.HttpGDataRequest.execute
(HttpGDataRequest.java:459)
        at com.google.gdata.client.http.GoogleGDataRequest.execute
(GoogleGDataRequest.java:527)
        at com.google.gdata.client.Service.getFeed(Service.java:962)
        at com.google.gdata.client.Service.getFeed(Service.java:819)
        at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:
592)
        at com.google.gdata.client.Service.getFeed(Service.java:838)
        at vanderbilt.myhealth.googledemo.HealthDemo.getAllProfileIds
(HealthDemo.java:99)
        at vanderbilt.myhealth.googledemo.HealthDemo.selectProfile
(HealthDemo.java:157)
        at vanderbilt.myhealth.googledemo.HealthDemo.executeCommand
(HealthDemo.java:187)
        at vanderbilt.myhealth.googledemo.HealthDemo.run(HealthDemo.java:220)
        at vanderbilt.myhealth.googledemo.HealthDemo.main(HealthDemo.java:
241)

On Dec 4, 1:30 pm, "Eric (Google)" <[EMAIL PROTECTED]> wrote:
> For ClientLogn, the two should be more or less interchangeable.
>
> You should be using httpS://www.google.com/h9/feeds/profile/list
>
> Eric
>
> On Dec 3, 9:29 am, JCN <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I started off using HealthDemo.java as found at the following URL:
>
> >http://gdata-java-client.googlecode.com/svn/trunk/java/sample/health/...
>
> > That works fine, but I would like to switch it over to using the h9
> > sandbox, so I can work out posting without having to worry about the
> > security issues.
>
> > When I change the FEED_BASE_PATH tohttp://www.google.com/h9/feeds/, I
> > get the following error:
>
> > <HTML>
> > <HEAD>
> > <TITLE>Token invalid</TITLE>
> > </HEAD>
> > <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> > <H1>Token invalid</H1>
> > <H2>Error 401</H2>
> > </BODY>
> > </HTML>
>
> >         at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse
> > (HttpGDataRequest.java:508)
> >         at 
> > com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse
> > (GoogleGDataRequest.java:555)
> >         at com.google.gdata.client.http.HttpGDataRequest.checkResponse
> > (HttpGDataRequest.java:480)
> >         at com.google.gdata.client.http.HttpGDataRequest.execute
> > (HttpGDataRequest.java:459)
> >         at com.google.gdata.client.http.GoogleGDataRequest.execute
> > (GoogleGDataRequest.java:527)
> >         at com.google.gdata.client.Service.getFeed(Service.java:962)
> >         at com.google.gdata.client.Service.getFeed(Service.java:819)
> >         at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:
> > 599)
> >         at com.google.gdata.client.Service.getFeed(Service.java:838)
> >         at vanderbilt.myhealth.googledemo.HealthDemo.getAllProfileIds
> > (HealthDemo.java:99)
> >         at vanderbilt.myhealth.googledemo.HealthDemo.selectProfile
> > (HealthDemo.java:157)
> >         at vanderbilt.myhealth.googledemo.HealthDemo.executeCommand
> > (HealthDemo.java:185)
> >         at 
> > vanderbilt.myhealth.googledemo.HealthDemo.run(HealthDemo.java:220)
> >         at vanderbilt.myhealth.googledemo.HealthDemo.main(HealthDemo.java:
> > 241)
>
> > I was under the impression that /health and /h9 are interchangeable,
> > so I'm confused.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Health Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/googlehealthdevelopers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to