You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Karin Stadler <ka...@gmx.de> on 2002/05/21 20:32:27 UTC

Proxy: Why doesn't it work if I set CATALINA_OPTS

 Hello,

I'm behind a proxy so I get problems if a http-request is on the server
side. If I set the properties dynamically like it is described in:
http://xml.apache.org/soap/faq/faq_chawke.html#Q2_30
then it is working very well (for an example look below). But I would like
to set this as a system variable, because than I'm not required 
to change every java file. 

But it doesn't work! At first I thought it is only a typing mistake
and it should be <TOMCAT_OPTS="-DProxyHost=mucproxy 
-DProxyPort=8080">  or <TOMCAT_OPTS="Dhttp.proxyHost=mucproxy
Dhttp.proxyPort=8080"> but everything failed!

Now my questions: 
1.) Should I prepare the server class in an special way?
2.) Which part will decide if the system variable will be intepreted right
or not?
3.) If I have a http-request on my client side, is it then possible instead
of putting in the code:

  SOAPHTTPConnection connection = new SOAPHTTPConnection();
  connection.setProxyHost("proxy");
  connection.setProxyPort(8080);
  Call call = new Call(); // prepare the service invocation
  call.setSOAPTransport(conn); // use the proxy

in the client-class to call the client with the properties:

$ java -Dhttp.proxyHost=<proxyname> Dhttp.proxyPort=<Portnumber>
<Client-class>

Or did I understand something wrong?

Or is the reason, why it isn't working, because I have an "old" Java
version? Because I installed JSSE for https-requests and there it is working well,
with the properties:
-Dhttps.proxyHost=<proxyname> -Dhttps.proxyPort=<Portnumber>! 

 I'm using Apache SOAP 2.2 with Tomcat 4.0.3 and JDK1.3 on Windows 2000.

 // Dynamic (code in the Java-File)
     Properties prop=System.getProperties();
     prop.put( "http.proxyHost", "mucproxy" );
     prop.put("http.proxyPort", "8080"); 

 
Thanks Karin

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net