Vitaly
Vitaly

Reputation:

Restlet-1.1 example\book\rest\ch2\Example2_5 no client connectors for HTTPS

Example2_5 creates a client for HTTPS to handle request

final Response response = new Client(Protocol.HTTPS).handle(request);

The only related jar in Restlet-1.1 is org.mortbay.jetty.https.jar, which I added to my runtime classpath.

Nevertheless, I am getting at runtime

[java] WARNING: No available client connector supports the required protoco
ls: 'HTTPS' . Please add the JAR of a matching connector to your classpath.

Although it's a warning, it leads to null as a return on

final DomRepresentation document = response.getEntityAsDom();

Was anyone able to run any of Examples in Restlet-1.1 that are restlets equivalents of Ruby's example from "RESTful Web Services" book?

Vitaly

Upvotes: 2

Views: 1416

Answers (1)

Simon Nickerson
Simon Nickerson

Reputation: 43177

Looking at the Restlet connectors web page, there is no Jetty client connector for HTTPS.

I was able to get better results with the "Net" connector (based on the java.net classes), which required me to add the com.noelios.restlet.ext.net.jar file to my classpath.

Apparently the Apache Commons HTTP Client is also supported for HTTPS.

Upvotes: 1

Related Questions