0
내가 서버에 데이터를 게시하고 그리고 난 나는에포스트 방법의 응답
PostMethod post = new PostMethod(this._serverUrl);
InputStream is=null;
is = new ByteArrayInputStream(postData.getBytes("UTF-8"));
post.setRequestEntity(new InputStreamRequestEntity(is));
post.setRequestHeader("Content-type", "text/xml; charset=ISO-8859-1");
HttpClient httpclient = new HttpClient();
int result = httpclient.executeMethod(post);
String response="";
response = post.getResponseBodyAsString();
내가 사용하고 공유지는 아파치이 코드 HttpClient를를 사용 ... 응답의 형태로 다시 포스트 데이터를 얻을 구문 분석 어떻게 게시 .... 여기에 내가
03-31 17:53:49.192: INFO/Response(2237): <?xml version="1.0" encoding="UTF-8"?>
03-31 17:53:49.192: INFO/Response(2237): <AndroidGame>
03-31 17:53:49.192: INFO/Response(2237): <Result>0</Result>
03-31 17:53:49.192: INFO/Response(2237): <ErrorCode>509</ErrorCode>
03-31 17:53:49.192: INFO/Response(2237): <ErrorMsg>You are using wrong Super Password</ErrorMsg>
03-31 17:53:49.192: INFO/Response(2237): </AndroidGame>
같은 응답을 얻을하지만 문자열의 응답을 얻을 필요가 .... 나는 온다 ... 단일 문자열에서 응답을 얻을 수 아니다 덩어리 ... 아무도이 날 도와 줄 수
안녕 맥심 ... : u는이 HttpResponse에 응답에 사용되는 어떤 클라이언트 D ... = client.execute (request); 당신은 지정할 수 있습니까? ... –
HttpClient client = new DefaultHttpClient(); – Maxim