Skip to Content

Https-Connection in WCEM 3.0 with Proxy


We need to make a Https-Connection (REST-Service). We also need a Proxy to establish this connection.

But if we pass the proxy to the openConnection() we get an UnsuportedMethodException.

How can we make a Https-Connection with a Proxy?

Thanks very much for any help.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2014 at 10:35 AM

    Hi Francesco,

    We faced the same issue. We wanted to fetch some webpage content and show it in our view component. We used the content management module in WCEM 3.0 for this, with a few changes.

    InetSocketAddress socket = new InetSocketAddress(proxyAddr,proxyPort);

    Proxy httpProxy = new Proxy(Proxy.Type.HTTP,socket);

    URL target = new URL(httpsURL);

    HttpURLConnection connection = (HttpURLConnection) server.openConnection(httpProxy);

    Hope this helps.

    Best Regards

    Pranshu Agarwal

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Pranshu

      Thank you very much for your answer.

      We nearly do the same as you described. We do the openConnection(httpProxy) on the target-Object. The target then throws an UnsuportedMethodException.

      Where do you get the server Object?

      Did you also get the in the target-Object?

      Best Regards

      Francesco Membrino

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.