あなたはその例でそれを得ました。
で SOAP Web サービスを作成しました:
Google App Engine で SOAP サーバーを構築する
そして、サーブレットからそれを消費するクライアントを作成しました:
JAX-WS を使用して Google App Engine で SOAP クライアントを構築する
ここで必要なのは、params に正しい値を指定して、Android アプリケーションからその URL への HTTP クライアント呼び出しを行うことです。
http://developer.android.com/reference/java/net/HttpURLConnection.htmlで入手可能な例とサンプルを提供する URLを使用する
URL url = new URL(" http://greeter-client.appspot.com/hellosoapclient?name=SOAP&arriving=true");
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
try {
InputStream in = new BufferedInputStream(urlConnection.getInputStream());
readStream(in);
finally {
urlConnection.disconnect();
}
readStreamは、GAE でホストされているサービスからの応答を読み取る場所です。
readStream は次のようになります。
private static String readStream(InputStream is) {
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line = null;
try {
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return sb.toString();
}