Question

I'm trying to use spring rest template to do a post request. And i need to return the status code. This is my approach.

RestTemplate restTemplate = new RestTemplate();
MultiValueMap mvm = new LinkedMultiValueMap();
mvm.add("login", "100"); // and some more paramters
String result = restTemplate.postForObject("http://localhost:8080/security_check", mvm, String.class);

But this approach doesn't work for me. It generates an error saying no suitable message converter found. And i need to know can i use the resttemplate to manage my sessions. I need to manage the session from the android client side.

If any one come across android resttemplate post method and session management please help me. Any help would be greatly appreciated.
Thanks in advance.

Was it helpful?

Solution

See http://forum.springsource.org/showthread.php?t=99064 Pls mark this question as answered or delete it since u asked it on the link I just posted.

And by the way I can take a look at my question regarding a similiar issue... http://forum.springsource.org/showthread.php?t=99690 ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top