We can make Webservice call in android app by creating HttpURLConnection and POST request. Something like the following
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setRequestProperty("Connection", "keep-alive");
httpURLConnection.setRequestProperty("Content-Type", "text/xml");
httpURLConnection.setRequestProperty("SendChunked", "True");
....
httpURLConnection.connect();
OutputStream out = httpURLConnection.getOutputStream();
out.write("request data in soap format");// send request
InputStream response = httpURLConnection.getInputStream(); //receive response
Here I have to create SOAP like xml to send data and also receive data in that format. Is there any better approach to call webservice?
What is the best alternative to calling web services with an Android App