Monday, June 27, 2011

[android-developers] no suitable HttpMessageConverter found for request type

Hi All,

Am using Spring-android-rest-template-1.0.0.M2.jar reference in my
android application.

When i invoke the postForObject () method i got exception in my
android application.

My code is:

String url = "http://ipaddress:8080/rest/login";

Sample sam = new Sample ();
sam.setUserID("User1");
sam.setPassword("password");

RestTemplate restTemplate = new RestTemplate(new
CommonsClientHttpRequestFactory());

ResponseType ms = new ResponseType ();

ms = restTemplate.postForObject(url, mp, MySession.class); ---> when
the control comes here i got below exception..


Caused by: org.springframework.web.client.RestClientException : Could
not write request: no suitable HttpMessageConverter found for request
type [Sample ]


Please help me to solve the above problem.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment