Search code examples
javaweb-servicesrestrestlet

HTTPS requests in Restlet Java framework


I'm very new to the restlet framework and pretty much webservices in general. I'm managing fine to send requests to 'HTTP' resources but as soon as I try and hit 'HTTPS' resources with my code I get the following error:

No available client connector supports the required protocols: 'HTTPS' . Please add the JAR of a matching connector to your classpath.

So this could simply be solved by adding a certain .jar to my project but I don't know which one. Or.. it could be a bit more complicated than that. Any help would greatly be appreciated!

PS - Using Restlet 2.1.2


Solution

  • Try this:

    In addition to the standard Restlet jar files, you also need to reference jar files for HTTPS. The 'Simple' HTTPS connector uses these jar files:

    lib/com.noelios.restlet.ext.simple_3.1.jar

    lib/org.simpleframework_3.1/org.simpleframework.jar

    lib/com.noelios.restlet.ext.ssl.jar

    lib/org.jsslutils_0.5/org.jsslutils.jar

    found here:http://restlet.org/learn/guide/2.2/core/security/https