File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes POST request via RestTemplate in JSON Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "POST request via RestTemplate in JSON" Watch "POST request via RestTemplate in JSON" New topic
Author

POST request via RestTemplate in JSON

Johnny Bee
Greenhorn

Joined: Nov 02, 2010
Posts: 1
Hello guys,

I didn't find any example how to solve my problem, so I want to ask you for help. I can't simply send POST request using RestTemplate object in JSON

Every time I get org.springframework.web.client.HttpClientErrorException: 415 Unsupported Media Type

I use RestTemplate in this way:



My controller is:



What is my fault?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: POST request via RestTemplate in JSON
 
Similar Threads
spring mvc xmlbean object JSON mapping error
Spring Consume xml ?
Send/receive request from jsp to a Spring portlet.
org.springframework.web.HttpSessionRequiredException: Session attribute 'user' required - not found
Spring MVC problem