xmlhttprequest 応答を介して送信された xml ドキュメントで (javascript を使用して) Web サーバーからブラウザー ウィンドウを開こうとしています。アプリケーションは JavaScript を使用するため、ここでは Java 1.5 は使用できません。xmlhttp 投稿のコードは次のとおりです。
String strSoap = "<?xml version='1.0' encoding='utf-8'?>" +
"<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" +
"<soap:Body>" +
xml_body
"</soap:Body>" +
"</soap:Envelope>";
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
connection.setRequestProperty("SoapAction", some_action);
connection.setRequestProperty("Man", "POST url HTTP/1.1");
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setAllowUserInteraction(true);
connection.setFollowRedirects(true);
java.io.DataOutputStream printout = new java.io.DataOutputStream (connection.getOutputStream());
printout.writeBytes(strSoap);
printout.flush();
printout.close();
java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(connection.getInputStream()));
別の可能性として、クライアント側から xmlhttprequest を作成する可能性がありますが、どちらがより良いオプションでしょうか?