Questions tagged [spring-resttemplate]

204 questions
0
votes
0 answers

How to overcome ConcurrentModificationException : null received in Spring Rest Template's exchange() method

I am attaching the stack trace of exception that I am getting in my code. java.util.ConcurrentModificationException: null at java.base/java.util.ArrayList.forEach(ArrayList.java:1543) at…
0
votes
0 answers

How to consume an API secured with Digest Authentication via Rest Template

I want to consume an API secured with Digest Auth using REST Template. I am able to do so using ClosableHttpClient. ClosableHttpClient client = HttpClients.createDefault(); HttpResponse response = client.execute(new HttpGet(uri)); here I get…
0
votes
0 answers

How do i do a restTemplate content-type application/x-www-form-urlencoded

How do I make a post call in restTemplate so that the body is like this: xmlquery:
Caspar
  • 1
  • 2
0
votes
1 answer

How to change jax-ws to jax-rs without client sens of changes

There is an application that was configured and has developed by JAX-WS; the piece of code like this: @WebService(targetNamespace = "http://webservice.bulk.test.net/", serviceName = "BulkService") @BindingType(value =…
reza ramezani matin
  • 1,384
  • 2
  • 18
  • 41
0
votes
0 answers

Need help to Bypass SSL certificate validation with rest template

I have one requirement i.e. to bypass SSL verification while connecting to webservice using rest template. Currently I am implementing proxy to rest template via below code. SimpleClientHttpRequestFactory clientHttpRequestFactory = new …
0
votes
0 answers

Clickatell SMS content doesn't print + sign it become empty space , how can I solve this issue

public void sendMessageToRXCustomer(InviteCustomerSMSDto inviteCustomerSMSDto) { RestTemplate restTemplateService = new RestTemplate(); String smsServiceApiEndPoint = env.getProperty("SmsServiceApiEndPoint"); String…
0
votes
1 answer

Error in getting image from Graph API in spring-boot with resttemplate

I am using the graph api: GET /users/{id | userPrincipalName}/photo/$value to get the particular user's profile photo with my access token. In postman I am able to see the image using the above get call. In my spring-boot application I am using…
0
votes
1 answer

MultiValueMap casuing issue application/x-www-form-urlencoded;charset=UTF-8 not supported

I need to do a request to a server. I'm using Spring Boot 2.5 and restTemplate. The endpoint consumes the MediaType application/x-www-form-urlencoded, but when request is send returns a error "endpoint only accepts application/x-www-form-urlencoded…
0
votes
0 answers

Not able to call API from SpringBoot which returns Application/javaScript

I am trying to call below API from my SpringBoot Application: "https://api.coindesk.com/v1/bpi/currentprice.json" Since this API is returning javaScript instead of Json is am getting error as : no suitable HttpMessageConverter found for response…
0
votes
0 answers

restTemplate response is not coming after 15 min due to IPVS TCP 15 min timeout

restTemplate response is not coming after 15 min of request due to IPVS TCP 15 min timeout but with feign client response is coming even if response is coming after 15 min. what should we configure to work restTemplate call also. Below configuration…
0
votes
0 answers

Spring RestTemplate exchange returns 204 while trying to download text/csv from GET endpoint

I am trying to download text/csv file from one of the Salesforce GET endpoint using Spring RestTemplate. I am getting 204 no-content when trying from code. While I am trying to hit the same endpoint with from Postman (Send and download) its working…
souvikc
  • 991
  • 1
  • 10
  • 25
0
votes
1 answer

Spring RestTemplate Response string is shorter than expected

I am trying to get an access token via RestTemplate.postForEntity(). myRestTemplate.postForEntity(authBaseUrl, request, Object.class); I have a specific class for it, but let's use now a simple Object as type. It contains an access_token field. It…
0
votes
1 answer

Stub Rest Client method calling RestTemplate with ParameterizedTypeReference for Testing Service

I have problem testing a service with Spock and Groovy. For this, I try to Stub a method of my client, that calls RestTemplate with ParameterizedTypeReference. NOTE: Sorry for my bulky code!!! Here my Configuration…
user1410223
0
votes
0 answers

Mocking Extended RestTemplate using parent's methods

I have this class that extends from RestTemplate import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import…
joseluisbz
  • 1,491
  • 1
  • 36
  • 58
0
votes
0 answers

Getting errors related to java security-manager + ExpiringCache.java

We are using wildfly-9.01. I am getting error/caused while executing action: Caused by: java.lang.ArrayIndexOutOfBoundsException: 200 at java.io.ExpiringCache.cleanup(ExpiringCache.java:120) at…