title: Problem using a proxy with Java under Lotus Notes
body: <p><br>
  I've been searching the whole web for a problem that I have with a lotus notes agent. Here is my resquest.<br>
  I need to retreive a Webservice (in Java) from an agent in Java too. The problem is that the agent must run on the server because the Jar file cannot be installed on every computer. Now, on the client's network, people must go thru a Proxy to access the web, which needs an authentication. I know that we can set the Domino server to use a proxy, but it's already set to LDAP. So, the only option I found is to use Java system properties to connect to the proxy and then get the webservice. So, I set http.proxyHost and http.proxyPort and I use the Authenticator for the login and password. When I connected via HTTP to retreive the webservice, everything is fine, or seems fine, since I get a valid Java object. Now once I get that instance, I need to initialize a session. When I launch the method, I get this:<br></p>
  
  <pre><code>2011-06-28 13:46:50   Agent  error: WebServiceEngineFault
  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
  faultSubcode: 
  faultString: java.net.SocketException: Operation timed out: connect:could be due to invalid address
  faultActor: 
  faultNode: 
  faultDetail: 
  2011-06-28 13:46:50   Agent  error: java.net.SocketException: Operation timed out: connect:could be due to invalid address
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.AxisFault.makeFault(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.transport.http.HTTPSender.invoke(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.strategies.InvocationStrategy.visit(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.SimpleChain.doVisiting(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.SimpleChain.invoke(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.client.AxisClient.invoke(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.client.Call.invokeEngine(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.client.Call.invoke(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.client.Call.invoke(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.client.Call.invoke(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.axis.client.Call.invoke(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at com.casebank.spotlight.webservice.TroubleShootSoap11BindingStub.initiateSession(TroubleShootSoap11BindingStub.java:334)
  2011-06-28 13:46:50   Agent  error:     at JProxyManager.getResultFromAddress(JProxyManager.java:118)
  2011-06-28 13:46:50   Agent  error:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  2011-06-28 13:46:50   Agent  error:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
  2011-06-28 13:46:50   Agent  error:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
  2011-06-28 13:46:50   Agent  error:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
  2011-06-28 13:46:50   Agent  error:     at java.lang.reflect.Method.invoke(Method.java:391)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.JavaConnectInvoker.invoke(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
  2011-06-28 13:46:50   Agent  error:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62)
  2011-06-28 13:46:50   Agent  error:     at java.lang.reflect.Method.invoke(Method.java:391)
  2011-06-28 13:46:50   Agent  error:     at lotus.domino.JavaConnectLoader.invoke(Unknown Source)
  </code></pre>
  
  <p>That tells me that Java is trying to connect using Sockets, which aren't HTTP protocol. So, I tryied setting the socksProxyHost and socksProxyPort to the same Proxy using the port 1080 instead of HTTP 8080, but I keep getting the same error. My searches made me realize that maybe Java doesn't use the SOCKS proxy at all, even if those properties are set. What I don't get, is that I can do it with the HTTP proxy (didn't work at first, but after setting the properties, it had) but not the SOCKS Proxy. It just doesn't want. One interesting thing that might help me but I couldn't find anything about that, is that at first, I didn't have the proxy address, so I typed a dummy one just to start doing the code while the client was answering my email. When I clear the properties socksProxyHost and socksProxyPort, the exception I get from Java is UnknowHostException which points to my dummy address. NOWHERE (and I searched!) is written that address anymore. Even when I print the properties usign this:</p>
  
  <pre><code>System.getProperties().list(System.out);
  </code></pre>
  
  <p>I don't see it. I don't think that the client might have set the dummy proxy address exactly like I did and since it's running on server, it has nothing to do with my config. The Java version on notes is 1.4 and the class java.net.Proxy is not on the server. I was just wondering it brings somthing to your mind. I even tryied setting all possible properties that are related to Proxies (http, https, ftp, socks) and I'm getting crazy! There must be a way and I feel I'm close, but I'm realy tired of testing bunch of things that doesn't work!
  <br><br>You help is realy appreciated.</p>