No suitable HttpMessageConverter found when trying to execute restclient request
<p>I'm trying to use <code>Spring for Android rest client</code> to send data with an <code>http post</code> , to avoid creating and parsing the json data.</p>

<p>From their <a href="http://static.springsource.org/spring-android/docs/1.0.x/reference/htmlsingle/#d4e426" rel="nofollow">manual</a> they have the following method:</p>

<pre><code>restTemplate.postForObject(url, m, String.class)
</code></pre>

<p>After the method is called I get the following exception:</p>

<pre><code>No suitable HttpMessageConverter found when trying to execute restclient request
</code></pre>

<p>My activity code snippet is :</p>

<pre><code>    RestTemplate restTemplate = new RestTemplate();
    restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());
    restTemplate.getMessageConverters().add(new StringHttpMessageConverter());
    Message m = new Message();
    m.setLibrary("1");
    m.setPassword("1395");
    m.setUserName("1395");
    String result = restTemplate.postForObject(url, m, String.class);
</code></pre>

<p>And the Message object is :</p>

<pre><code>public class Message {
private String UserName, Password, Library;

public String getUserName() {
    return UserName;
}

public void setUserName(String userName) {
    UserName = userName;
}

public String getPassword() {
    return Password;
}

public void setPassword(String password) {
    Password = password;
}

public String getLibrary() {
    return Library;
}

public void setLibrary(String library) {
    Library = library;
}
}
</code></pre>

<p>Why can't it <code>convert the Message object to JSON</code> ?</p>
