RESTful call to HTTPS server from java client
NickName:divyanshm Ask DateTime:2013-02-14T15:53:50

RESTful call to HTTPS server from java client

I have configured a Bobcat server on my local machine that listens to HTTP and HTTPS requests on ports 8000 and 8001 respectively.

While I can call a RESTful service using HTTP from a Java client -

URL url = new URL("http://localhost:8000/helloworld");
HttpURLConnection connection = (HttpURLConnection)url.openConnection();

I am not able to call the same service on port 8001, using HttpsURLConnection objects. Do I need to configure SSL or get security certificates or something?

My main motive is to work on the RESTful service, I'm using a web client (JSP) to simply test the service. Can someone help me call the service endpoint using HTTPS?

Thanks.

Copyright Notice:Content Author:「divyanshm」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/14870163/restful-call-to-https-server-from-java-client

More about “RESTful call to HTTPS server from java client” related questions

RESTful call to HTTPS server from java client

I have configured a Bobcat server on my local machine that listens to HTTP and HTTPS requests on ports 8000 and 8001 respectively. While I can call a RESTful service using HTTP from a Java client ...

Show Detail

Start the RESTful server from java code

I have created a RESTful web service (using jersey in Eclipse) with Postgres database access. Both are running on my local machine. I have tested the service via the Postman client application send...

Show Detail

RESTFul WS over HTTPS and Java Client

I have to develop a RESTful client in Java 1.4 (Constraint). This client should call the WS over SSL (Https). I was able to call the WS successfully over http but https is going over my head. Please

Show Detail

Client server architecture in RESTful web applications

I will like some clarification about how client server architecture should work for a modern web app with a RESTful back-end. In a web application, the client is the browser, the server is the web

Show Detail

Consuming Java RESTFul web service with PHP client

I am having some problems developing a PHP client that will consume Java RESTful services, created in NetBeans 7.1.1. For those who don't know: When you create a Java RESTful web-service based on ...

Show Detail

Java Jersey RESTful web service using https

I am new to Java EE and I am developing a RESTful API in which every API call the user sends encoded credentials. My problem is how to implement https protocol over default http and make my connect...

Show Detail

How to pass JSON object to server from RESTful client in java

I'm creating a web application. I want to do the admin operations using Java SE application. To do that I created a RESTful ShoppingAdminClient in my SE project. I need to pass an JSON object to the

Show Detail

How to add Headers on RESTful call using Jersey Client API

Here is the Format for RESTful call: HEADERS: Content-Type: application/json;charset=UTF-8 Authorization: Bearer Rc7JE8P7XUgSCPogjhdsVLMfITqQQrjg REQUEST: GET https://api.example.c...

Show Detail

create client side java classes from a RESTful service in CXF

I want to create client-side java from a restful web service, so that I can call the service. Do somebody know if CXF provide such this tools? Best,

Show Detail

calling Restful Service from Java

Here I am not creating a RESTful service indeed I have to call an external Restful service from my java code. Currently I am implementing this using Apache HttpClient. The response that I get from ...

Show Detail