データをサーバーに投稿し、投稿データを応答の形式で取得しています...このコードを使用します
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();
Commons Apache 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>
しかし、私は文字列で応答を取得する必要があります....単一の文字列で応答を取得することはできません...それはチャンクで来ます...誰かがこれで私を助けてくれますか?