Google cloud messaging GCM through proxy
===

I am having trouble sending a message to a device through the company proxy.  
I have done the GCM tutorial on the google site and have successfully registered a device on the google servers with the android emulator,
and also on the server at my end.  
For this I had to go through the company proxy, setting it in the access point of the emulator.
Now the problem I have is sending a message from my server to the device through the same proxy.
I am using the servlet code from the demo which uses the    

    com.google.android.gcm.server.Sender

helper class to send the message.  

I am running the servlets on tomcat 7.

I have tried setting the proxy up in the catalina.properties file like so. 

    http.proxyHost=proxy.company.com  
    http.proxyPort=8080

And I have tried setting properties inside the servlet itself like below.  

    System.setProperty("http.proxyHost", "proxy.company.com");  
    System.setProperty("http.proxyPort", "8080"); 

But still I get the timeout.
I know its the company proxy because I got the messaging working at home where I have no proxy.

I have seen a proxy object created in the java code and then a connection created with it, but I dont think that is usable here since I am using Sender helper class to send the message. 

This is the line that fails in a timeout.

    Result result = sender.send(message, registrationId, 5);

Any help would be appreciated.

Regards

Bill








