try this code
DefaultHttpClient httpClient=new DefaultHttpClient();
String responseString = null;
try
{
HttpPost httppost = new HttpPost("http://services/?wsdl");
httppost.setHeader("SOAPAction", "urn:getSearch");
httppost.setHeader("Content-Type", "text/xml; charset=utf-8");
String strEnvelope = "SOAP BODY" ;
HttpEntity entity = new StringEntity(strEnvelope);
httppost.setEntity(entity);
ResponseHandler<String> strResponseHandler=new BasicResponseHandler();
responseString = httpClient.execute(httppost, strResponseHandler);
Log.d("Search", responseString);
}
catch (Exception objException)
{
throw objException ;
}
finally
{
httpClient.getConnectionManager().shutdown();
}
source
share