Home >

resttemplate

Advertisement
  • How Upload image to Server() via RestTemplate Client and ServerFebruary 15

    I am using RestTemplate Client Code and Want to access Image on Server side. I want to upload image on custom Directory of Tomcat, i am getting error: Caused by: org.springframework.web.client.RestClientException: Could not write request: no suitable

  • How to generate and manage token after spring security authenticationFebruary 15

    I have an android application where i am using spring security for authentication and authorization purpose at the server end.At first user enters the user name and password and send it via request using Rest Template to the server controller for aut

  • Where should Entity and DTO conversion happen for external calls?February 14

    I have a Spring REST interface and the controller is making the conversion from DTO to Business Entity objects. The Service layer operates on Business Entity objects. However, If my Business Layer wants to call external REST interfaces, where should

  • What application layer is resonsible for providing external service integration capabilities?February 13

    I have a Spring Boot web application with presentation, business logic, data access logical tiers. Is it conceptually correct to describe external interface calls (REST, WS) to be in the Data Access Layer? I.e. also where database access resides. Con

  • Handle multipart/mixed response with Spring RestTemplateFebruary 12

    I'm making a rest call to an endpoint that returns a multipart/mixed payload. Here's the call using Spring's RestTemplate: ResponseEntity<String> res = template.exchange(queryStr, HttpMethod.GET, entity, String.class); I know I can get the entire bo

  • Jackson Json deserialization of an object to a listFebruary 11

    I'm consuming a web service using Spring's RestTemplate and deserializing with Jackson. In my JSON response from the server, one of the fields can be either an object or a list. meaning it can be either "result": [{}] or "result": {}.

  • Could not extract response: no suitable HttpMessageConverter found for response type, works for one request onlyFebruary 10

    I looked over many questions with same error, but couldn't find mine. I'm using RestTemplate, Spring 4.2.4, Jackson 2.6.4. Sending 2 requests, one after another, both post requests to same server, both of ParameterizedTypeReference as response type.

  • Spring AsyncRestTemplate delayFebruary 10

    We are using the Spring Boot and the AsyncRestTemplate to make asynchronous requests to another server. Looking at the logs, I can see the request is executed straight away however there is the odd occasion where there is a delay in executing the req

  • RestTemplate getForObject special characters into URL parametersFebruary 9

    I am having problems when I try to call an endpoint using GET and passing a parameter into URL with special character like 'ñ': Example: parameters.add("name", "Añisc"); Person person = rest.getForObject(url.toUri(), Person.class, para

  • RestTemplate messageConvertersFebruary 9

    Is there a way to force RestTemplate to use a certain HttpMessageConverter for a specific message ? For some reason, I send an object as payload, and even though the annotation are Json's (@JsonCreator, @JsonProperty...) it uses MappingJackson2XmlHtt

  • To wrap back-end system clients or not in SpringFebruary 9

    I have an application with Spring, and I need to call many different types of back-end systems (legacy mainframe, ESB, RESTful...). If we take e.g. REST, I can implement a RESTful client with e.g. RestTemplate. I can A) have developers use RestTempla

  • Mapping JSONArray in RestTemplate SpringFebruary 9

    I am trying to map this JSONArray using Spring RestTemplate: [{ "Command": "/usr/sbin/sshd -D", "Created": 1454501297, "Id": "e00ca61f134090da461a3f39d47fc0cbeda77fbbc0610439d3c16a932686b612", "Image&

  • Spring Boot AsyncRestTemplate SSLSocketFactoryFebruary 8

    Deploying a Spring Boot application in WebSphere. Due to their SSL configuration, we need to explicitly specify the SSLSocketFactory to ensure the application uses the WebSphere certificates and not the default Java key/trust stores. Doing this via t

  • RestTemplate don't return value with Snake Case in Spring RESTFebruary 7

    I have REST API with property in application.properties as below: spring.jackson.property-naming-strategy: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES Everything is OK! But when I use RestTemplate to do as below, but I found all key in Snake Case is nu

  • How to use AsyncRestTemplate to make multiple calls simultaneously?February 5

    I don't understand how to use AsyncRestTemplate effectively for making external service calls. For the code below: class Foo { public void doStuff() { Future<ResponseEntity<String>> future1 = asyncRestTemplate.getForEntity( url1, String.class)

  • How to mimic curl REST call with Spring's RestTemplate?February 4

    Have an external Restful Web Service which takes in JSON payloads if its is more than one input but if its a single input it just needs the value. For example, for multiple inputs, this works: curl -H "Content-Type: application/json" -X POST -d

  • Spring RestTemplate: Read chuncked responseFebruary 2

    I'm using Spring RestTemplate to write a RESTful client. I need to intantiate the HTTP Chunk mode on client side, so I can read chuncked data sent by the server I'm calling. Can anyone help me how to do that? I've already searched on the internet for

  • HttpMessageConverterExtractor extracts chunked data length from response entity leading to invalid JSON parse exceptionFebruary 1

    Spring HttpMessageConverterExtractor extracts the chunked data length from the response entity and when it is parsed by Jackson results in an invalid JSON parse exception. Quick background, the chunk length is always written before the chunked payloa

  • Security works correctly in unit test but not when deployed in application server (weblogic)January 29

    Can anyone tell why this didn't work? The code works great when I run it from my unit tests. Security gets setup perfectly and our service works great just like I expect. However, when I deployed it to our application server (weblogic), my service fa

  • How to trust ssl certificate programatically while using Spring Rest ClientJanuary 28

    I am using resttemplate from spring for consuming the Rest Json Webservice MultiValueMap<String, String> headers = new LinkedMultiValueMap<String, String>(); headers.add("Content-Type", MediaType.APPLICATION_JSON_VALUE); HttpEntity&l

Copyright (C) 2018 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.818 s.