Hmm still no luck. Instead of using Localhost, I followed your advice
and instead had it connect to the deployed version of my GAE app. I
also followed the pattern of your blog post in setting the request
properties. I think it must be a problem with the ClientLogin procedure
I'm using-- I'm not sure where I'm going wrong.


p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;
color: #4d9072} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px
Monaco; color: #3834ff} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font:
11.0px Monaco; color: #931a68} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px;
font: 11.0px Monaco} p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font:
11.0px Monaco; min-height: 15.0px} span.s1 {color: #000000} span.s2
{color: #931a68} span.s3 {color: #0027cc}
//AUTHENTICATE WITH GOOGLE

CalendarService client = new
CalendarService("https://www.google.com/accounts/ClientLogin";);

try {

client.setUserCredentials(userField.getText(), passField.getText());

} catch (AuthenticationException e1) {

e1.printStackTrace();

}







//STORE TOKEN LOCALLY

String token;

UserToken auth_token = (UserToken)
client.getAuthTokenFactory().getAuthToken();

token = auth_token.getValue();







p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco;
color: #3834ff} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px
Monaco} span.s1 {color: #000000} span.s2 {color: #931a68} span.s3
{color: #3834ff}

URL url = new
URL("http://battleship-command.appspot.com/playerConnect/";);

HttpURLConnection conn = (HttpURLConnection)url.openConnection();

conn.setRequestMethod("POST");


p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} span.s1
{color: #3834ff}

conn.setRequestProperty("Cookie", "auth=" + token);

conn.setRequestProperty("TokenAuth","auth="+token);

conn.setRequestProperty("Authorization", "auth=" + token);




I've been trying a bunch of different ways to set the request property.
It's unfortunate that auth_token doesn't have a getName() class like
the GoogleAuthentication thing in your example.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to