ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Skopp <>
Subject Re: Connections through a HTTP proxy
Date Wed, 13 Feb 2002 14:46:45 GMT
Thanks for the solution Olivier,

but on the other hand - shouldn't your "XmlRpcClientPlus" class somehow go 
into the release?

IMHO, XmlRpcClient should offer those proxy-settings via Constructor - if 
it's not on the "Commit" list for development already, it should urgently 
go there, 'cause I can imagine it's frequently needed...


At 14:05 13.02.2002 +0000, Olivier Sarrat wrote:
>>I'm trying to connect from RPC client to RPC server through a HTTP proxy
>>for 2 reasons:
>>         Properties properties = System.getProperties();
>>         properties.setProperty("proxyHost", "http://localhost");
>>         properties.setProperty("proxyPort", "8080");
>>         properties.setProperty("proxySet", "true");
>>         ...
>The problem is that you have to deal not only with system properties in 
>order to go through a firewall. You have to add the login/password to the 
>connection object itself... which means you have to go inside the 
>implementation of the client.
>The way I did it, is by adding so very few lines at the good place of the 
>XmlRpcClient.Worker :
>con.setRequestProperty ("Proxy-Authorization",proxyAuthorization);
>with proxyAuthorization being :
>proxyAuthorization = "Basic " + new sun.misc.BASE64Encoder
>().encode((user + ":" + password).getBytes());
>and con, the UrlConnection object.

Martin Skopp
Riege Software International GmbH  info:

View raw message