I'm using HttpGet method for retrieving data from a web service in my Android app. Following is the code I'm using right now.
String url = URLEditor.encode("http://"+Constants.strURL+"Orders.asm开发者_开发知识库x/CheckWebConnection? TechCode="+username+"&TechPIN="+password);
HttpClient httpClient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(url);
response = httpClient.execute(httpGet);
HttpEntity entity = response.getEntity();
if(entity == null) return false;
is = entity.getContent();
But, HttpGet method doesn't respond properly now and I'm asked to change the method. Web service doesn't support HttpPost. How can I do the same operation using Soap? Do I need to download any library and attach to Eclipse? Please help me
Download ksoap2. You will find lots of help with it including in stackoverflow, starting with :
How to call a .NET Webservice from Android using KSOAP2?
精彩评论