If you are connecting Internet via a Proxy server, here is what you need to read; otherwise if you are connecting to Internet directly, just ignore the following.
OK, let's assume you are connecting to Internet via a Proxy server(Damn it! but this is life, live with it.....)
(1) Installation issue while using "Find and Install" in Eclipse to install the Tuscany plugin
Have tried thousands of times to install Tuscany plugin, did not work......want to kill yourself......then you wonder if the tuscany update site is down....well, nope......the update site is up......Now you realize you are using a proxy....yes, damned proxy.
OK, here it goes....Window->Preference->Search for "Proxy", then you got the network connections, configure your Proxy server...then you go.....Life is good, eventually.
(2) Connection issue while coding GData client programs
Ok, you have download all the jar files for GData client APIs, now you are ready to write some sample code using these APIs...Let's start with the "Code search API" sample code...Well, did not work....You got this "Connection refused: connect" exception......Why?......Oh, yeah, I know, the proxy, damned proxy again....Google a second...OK, easy....let's set up the proxy server "System.getProperties" in the proxy, four lines of code.....Yeah, it is working............
All right, the "Code search API" works, let's try the "Blogger API"....it is a little bit more complicated, requires username/pwd authentication......Ok, let's add the code for the proxy settings in "System.getProperties"......Wait a second........No longer working......."AuthenticationException: Error connecting with login URI"........What the heck......My username/pwd is absolutely correct, you know after I check and recheck this for another 200 times.....Why??????......
OK, let me tell you......Only specify the proxy server information in the client seems not good enough.......The client is calling other classes in the GData client API.....And these classes might also need to connect to the server via the internet connection......What can I do.....I do not wanna modify these classes in the API......
Here is what you do........If you are using eclipse.....go to "Run As"->"Open Run Dialog"->"Arguments"->"VM Arguments".... Put these there
-Dhttp.proxyHost=yourProxyServerAddress -Dhttp.proxyPort=youProxyPortNumber -Dhttps.proxyHost=yourProxyServerAddress -Dhttps.proxyPort=youProxyPortNumber
If you are not using Eclipse, you know where you specify VM arguments...
That is it for tips today....Good luck
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment