1

I am creating a simple SOAP client but my company has policy not to send SOAP request directly to the public server hence our company has a proxy server which runs on the some IP and port Now i have to send my SOAP request to this proxy server and than that server will forward it further. I am new to SOAP.

My question is: how can I connect to that proxy server and can send the SOAP request to it?? I am using CXF lib. for SOAP.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
swapnil
  • 21
  • 1
  • 2
  • I am using CXF lib for SOAP – swapnil Sep 26 '15 at 07:51
  • Looks like duplicate of [How do I set the proxy to be used by the JVM](http://stackoverflow.com/questions/120797/how-do-i-set-the-proxy-to-be-used-by-the-jvm) – Sanj Sep 26 '15 at 08:19

1 Answers1

0

Try this

   HTTPClientPolicy policy = new HTTPClientPolicy();
    policy.setProxyServer(System.getProperty("http.proxyHost"));
    policy.setProxyServerPort(Integer.valueOf(System.getProperty("http.proxyPort")).intValue());

    httpConduit.setClient(policy);
SANN3
  • 9,459
  • 6
  • 61
  • 97
  • 1
    Thanks for your reply.Its giving Connection Refused error.When i am sending the SOAP request through java client.But when I am sending SOAP request through SOAP ui its getting successful. – swapnil Sep 28 '15 at 13:01