• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Jackson mapper, Spring Android and https not marshalling

I m actually trying to developp a little application which has to receive data from a REST secured API. I m using Spring Android (Spring for Android) to make it in an easy way.

I have used this framework before on standard HTTP REST API and it worked great. But now, it seems that I have a problem with:

this.mRestTemplate = new RestTemplate();
this.mRestTemplate.getMessageConverters().add(new StringHttpMessageConverter());
this.mRestTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());

Explanations :

If I add the StringHTTPMessagerConverter I can get the full JSON result on a String format on HTTP & HTTPS
If I add the MappingJackson2HttpMessageConverter, I can get the json and a full object marshalled corresponding(on HTTP), but on HTTPS, it seems that the code is blocking on :

ResponseEntity responseEntity = mRestTemplate.exchange(BASE_URL + ws, HttpMethod.GET, getRequestEntity(), ContainerAnomalie.class);

NB : ContainerAnomalie extends ArrayList NB2 : My API Key is okay, I can get the full JSON in a String object, and I can display it on a browser using the request URL

There are no errors displayed in the logcat...

Do you have an idea ?

Thanks for advance,
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones