I am developing an android application... and I want to pass the data to asmx webservice via json object and I want the response of web service
Instead of using kSOAP library, you can do it with built-in apache classes like HttpClient, HttpGet, HttpPost, etc.
For example: You want to send below JSON object:
{
"email":"test@test.com",
"password":"test"
}
then you can set your request object by using setEntity()
:
final String body = String.format("{\"email\":\"%s\",\"password\":\"%s\"}", s1, s2);
HttpClient client = new DefaultHttpClient();
HttpPost postMethod = new HttpPost(webServiceUrl);
postMethod.setEntity(new StringEntity(body, "utf-8"));