Questions tagged [spring-resttemplate]
204 questions
0
votes
2 answers
I am getting a java.util.MissingFormatArgumentException: Format specifier '%s' error in java
I am getting a java.lang.RuntimeException:
java.util.MissingFormatArgumentException: Format specifier '%s' error in Java below is my stacktrace:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name…

san
- 263
- 2
- 7
- 14
0
votes
0 answers
Java HTTP API Call - Stream in and stream out data
I have a file transfer service written in Java and Spring boot where it streams files from source to destination without any local storage.
It gets handles of InputStream from source and OutputStream for destination and effectively does following to…

adesai
- 370
- 3
- 22
0
votes
0 answers
Problems with WebClient returning empty response
I am working on a project which until now has been using the org.springframework.web.client.RestTemplate
I have recently understood that this class is to be deprecated in favour of the Asynch…

Bill Naylor
- 482
- 1
- 9
- 14
0
votes
1 answer
RestTemplate try catch
I'm reading a ResponseEntity from a webService using the Java (Spring 2.0) code below:
public ResponseEntity> getTemplate() {
RestTemplate restTemplate = new RestTemplate();
ResponseEntity> myResponse= restTemplate.postForEntity(
…

DS.
- 604
- 2
- 6
- 24
0
votes
1 answer
How to encode url, containing special characters in query parameters using resttemplate
I am getting error when I hit a URL which contains special characters in query parameters using RestTemplate.
My URL is something like this
…

Aamir Sheraz
- 1
- 1
0
votes
1 answer
RestTemplate GET call gives 422
I am in the process of integrating with a third party app and this issue comes while integrating with one of their GET APIs. The API has some headers and params and it's working perfectly fine in Postman. However, the same request when formed in…

redHalo
- 123
- 2
- 7
0
votes
0 answers
RestTemplate GET call gives incomplete response
I am integrating my app with a third party app and there is a requirement where I have to call their APIs. So, there is this GET call which when supplied with proper headers and params and subsequently called, returns some JSON data. Now obviously I…

redHalo
- 123
- 2
- 7
0
votes
1 answer
Sending an object containing a Date field as JSON to an API the time zone seems to be changed and the time "change"
I am working on 2 Spring Boot projects that comunicate between them (the first project call a POST API defined on the second project and send to it a DTO object in JSON format. Both the projects at the moment runs on the same machine so they should…

AndreaNobili
- 40,955
- 107
- 324
- 596
0
votes
0 answers
Spring Boot with AWS IoT api's connection getting error 403 forbidden
I am creating signature using AWS doc sample:
static byte[] HmacSHA256(String data, byte[] key) throws Exception {
String algorithm="HmacSHA256";
Mac mac = Mac.getInstance(algorithm);
mac.init(new SecretKeySpec(key,…

Chintamani
- 1,076
- 7
- 23
- 47
0
votes
0 answers
The GET Request is successful through PostMan but is giving a 308 Permanent Redirect through Spring RestTemplate Exchange Method Call
The GET Request contains a JSON Payload similar to below :
{
"customeId" : "A123",
"Status" : "Assigned",
"StartDate" : "2020-07-18",
"EndDate" : "2020-07-20",
"FetchLimit" : "10"
}
Am using multi-value map to add these inputs along with Headers…

Hattkrish
- 1
- 1
0
votes
2 answers
Can HTTPS response status code made available in other classes in Spring integration
I have a requirement to make response.statusCode() received from ClientHttpResponse in Interceptor, should be available in testSubmitPaymentResponseVO object that I created so that error handling can be done accordingly . However I dont know where…

Geek
- 15
- 7
0
votes
1 answer
HttpHeaders got changed in spring5 changes causing API to fail 400
right now im migratingour spring application from 4 to 5.
I'm facing issue with particular on spring web module
spring-web-4.3.21.RELEASE.jar to spring-web-5.1.13.RELEASE.jar
I noticed the changes in HttpHeaders class. In…

joe
- 11
- 2
0
votes
1 answer
Spring - how to pass automatically http header between microservices
I'm having multiple microservices
1. MangerApp
2. ProcessApp
3. DoingStuffApp
4. .....
the "MangerApp Microservices" get an Http-Request
I'm looking for a way to transfer automatically some of the HTTP headers
in the call, while I don't want to…

Hard Worker
- 995
- 11
- 33
0
votes
1 answer
Openshift - calling another API within same namespace
I have an two container in same namespace. Service-A & Service-B.
And in my case, i want to talk to Service-B from Service-A. Through RestTemplate, i am making post call for communication like below.
public Response fetchData(Request request) {
…

Mohan
- 699
- 1
- 11
- 27
0
votes
1 answer
Error message always "null" from RestTemplate response
I'm losing my mind over here.
I have 2 servers, one is micro-service behind the scenes and one is the main server that calls it.
In the micro service, I throw an exception that is defined like this:…

Gibor
- 1,695
- 6
- 20