Hi,
I am having some trouble trying to use Proxy Authentication for my XFire
client...
I read : (docs.codehaus)

// Create your client
Client client = ....;

// Or get it from your proxy
Client client = Client.getInstance(myClientProxy);
client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_HOST, "host");
client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_PORT, "8080");
client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_USER, "proxyuser");
client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_PASS, "proxypassword");


but I don't understand very well :
if I have first to create my client before setting these properties, how
could it work?

           Client client = new Client(new
URL("http://www.webservicex.net/CurrencyConvertor.asmx?wsdl";));
//needs authentication to pass the proxy

           client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_HOST,
"host");
           client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_PORT,
"port");
           client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_USER,
"myName");
           client.setProperty (CommonsHttpMessageSender.HTTP_PROXY_PASS,
"myPwd");

I get an error with this ( the same as if I did'nt give any information
about my proxy settings : "java.net.ConnectException: Connection timed out"
). could someone tell me what I do wrong?

Thanks,

Audry

Reply via email to