خرید بک لینک

Vote count: 0

I am consuming a web service using RestTemplate and my POST request is as follows.

RestTemplate requestTemplate = new RestTemplate();

MappingJackson2HttpMessageConverter jsonHttpMessageConverter = new MappingJackson2HttpMessageConverter();
        jsonHttpMessageConverter.getObjectMapper().configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);

        requestTemplate.getMessageConverters().add(jsonHttpMessageConverter);
String uuidResult = requestTemplate.postForObject(url, requestBodyJsonObject ,
                String.class);

I tried printing my requestBodyJsonObject and put it in a rest client, it works fine so no issue with request body. But here I am not getting the expected result and just getting the result when I send a post request without a request body from rest client.

So I am clueless here. Your help would be highly appreciated.

asked 45 secs ago

برچسب: spring resttemplate post,spring resttemplate post json,spring resttemplate postforentity,spring resttemplate postforobject,spring resttemplate post with headers example,spring resttemplate post xml,spring resttemplate postforentity example,spring resttemplate post parameters,spring resttemplate post with headers,spring resttemplate post multipart file, نویسنده: استخدام کار تاريخ: دوشنبه 29 شهريور 1395 ساعت: 5:32

صفحه بندی