Android Spring Rest template

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.

Answers


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 ;)


Need Your Help

What are the benefits & drawbacks of installing things into the @global gemset in RVM?

ruby-on-rails ruby rubygems rvm

What are the benefits & drawbacks of installing things into the @global gemset in RVM?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.