2014-04-13 4 views
-2

나는 안드로이드에서 프로젝트를하고 있는데, 안드로이드 응용 프로그램에 웹 사이트 데이터를 가져 오려고합니다. JSON을 시도했지만 프로젝트를 성취하는 데 도움이되지 않습니다.웹 서버에서 안드로이드 응용 프로그램으로 웹 콘텐츠를 가져 오는 방법

+0

사용 Ksoap이 코드를 사용했습니다 ... 제발 도와주세요. – Manwal

+0

친구 감사합니다 ...하지만 wsdl formate 만받습니다. – user2355554

+0

입력 데이터 샘플을 제공하십시오. 어프로치를 조언 할 수 있습니다. –

답변

0

난 내 프로젝트를 웹 서비스로

 HttpClient client = new DefaultHttpClient(); 
     String getURL = "http://yourservername/wifi.ashx?cmd=get;1;"; 
     HttpGet get = new HttpGet(getURL); 
     HttpResponse responseGet = client.execute(get); 
     HttpEntity resEntityGet = responseGet.getEntity(); 
     String str; 

     if (resEntityGet != null) { 
      str = EntityUtils.toString(resEntityGet).substring(2, 4); // determined the maximumum id in server 
      str.lastIndexOf(str); 

     } 
    } catch (Exception e) { 
     e.printStackTrace(); 
//  link.setText("errorororo"); 
    } 
관련 문제