دوستان کمممممممممممممممممممممک
من تو یه برنامه با ایکلیپس از کد زیر برای بررسی دسترسی به وب سرویس استفاده کرده بودم
boolean ret = false;
try
{
URL url = new URL(PreferenceManager.getDefaultSharedPreferences( ZDisApp.getContext()).getString("wsAddress", ""));
HttpURLCoection urlc = (HttpURLCoection)url.openCoection();
urlc.setCoectTimeout(CurrentValue.CoectionTime out);
urlc.coect();
if(urlc.getResponseCode() == 200)
ret = true;
}
catch (Exception e)
{
ret = false;
}
- - , .
برچسب:
نویسنده: محمد رضا جوادیان