RESTリクエストを使用してすべてのZimbraカレンダーの名前を取得します。 どうすればいいですか? のthnxREST APIを使用してZimbraのカレンダーの名前を取得する方法
0
A
答えて
1
これはRESTでさえないZimbraのSOAP APIを、それはソリューションですされていません。
URL url = new URL(SOAPUrl);
URLConnection connection = url.openConnection();
HttpURLConnection httpConn = (HttpURLConnection) connection;
String postContent = "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\">"+
"<soap:Header>" +
"<context xmlns=\"urn:zimbra\">" +
"<format type=\"js\"/>" +
"<authToken>" + authToken + "</authToken>" +
"</context>" +
"</soap:Header>" +
"<soap:Body>" +
"<GetFolderRequest xmlns=\"urn:zimbraMail\" />" +
"</soap:Body>" +
"</soap:Envelope>";
// insert your SOAP XML!!!
byte[] b = postContent.getBytes();
// Set the appropriate HTTP parameters.
httpConn.setRequestProperty("Content-Length", String.valueOf(b.length));
httpConn.setRequestProperty("Content-Type","application/soap+xml; charset=utf-8");
httpConn.setRequestMethod("POST");
httpConn.setDoOutput(true);
httpConn.setDoInput(true);
// Everything's set up; send the XML that was read in to b.
OutputStream out = httpConn.getOutputStream();
out.write(b);
out.close();
// Read the response and write it to standard out.
InputStreamReader isr = new InputStreamReader(httpConn.getInputStream());
BufferedReader in = new BufferedReader(isr);
// read & do something with input stream...
String s = null;
String soapResponse = "";
while((s=in.readLine()) != null){
soapResponse += s;
}
System.out.println(soapResponse);
そして、あなたはその結果を解析し、あなたは(予定望むものに対応したフォルダを取ります... )
0
私はあなたがRESTでこれを行うことはできないと思います。しかし、あなたはSOAPを使ってそれを行うことができます。次のURLを確認してください。
http://mmrblogger.blogspot.in/2013/04/how-to-get-all-calendar-names-for.html
関連する問題
- 1. Facebook APIを使用して友人の名前を取得する方法
- 2. Outlook REST APIを使用してフォルダの種類を取得する方法
- 3. 古いREST APIを使用してユーザー情報を取得する方法
- 4. angularJSカスタムサービスを使用してREST APIからデータを取得する方法
- 5. REST API v3.14を使用してPlace IDでメンバーを取得する方法は?
- 6. REST APIを使用してテーブルからデータを取得する方法
- 7. Javascriptを使用してディレクトリ内の曲の名前を取得する方法
- 8. REST APIを使用してテーブルからデータを取得する
- 9. APIを使用して言語固有の名前を取得する
- 10. コマンドを使用して壁紙の名前を取得する方法は?
- 11. PHPを使用して前のURLを取得する方法
- 12. Facebookのメールメッセージ - APIを使用して取得する方法
- 13. Reflectionを使用して親クラスの名前を取得する
- 14. Docusign Rest APIを使用してPowerformsリストを取得
- 15. 文書 - タグの名前を名前で取得する方法
- 16. Power BIのREST APIを使用してコンテンツパックダッシュボードのIDを取得する
- 17. アンドロイドを使用してカレンダーAPIを使用してGoogleカレンダーに予定を追加する方法は?
- 18. Facebook Graph APIを使用してニュースフィードを取得する方法。
- 19. グラフAPIを使用してFacebookアルバムを取得する方法
- 20. Blogger APIを使用してタグ/カテゴリリストを取得する方法
- 21. google APIを使用してドメインメールリストを取得する方法
- 22. Falcon RESTful APIを使用してURIを取得する方法
- 23. TFS Git Rest APIを使用してツリーを取得するときの問題
- 24. wcf RESTサービスを使用してカスタムオブジェクトのjsonレスポンスを取得する方法は?
- 25. Azure Storageの承認ヘッダを取得する方法コンテナプロパティREST API
- 26. WP rest api:コメントの数を取得する方法
- 27. AppceleratorのRest APIからデータを取得する方法
- 28. JAXBを使用してXML署名を取得する最良の方法
- 29. リフレクションを使用して引数名を取得する方法
- 30. Sharekitを使用してTwitterユーザー名を取得する方法
こんにちは、私はまた、「authTokenの」変数とは何ですか...カレンダー名を取得する必要がありますか? – startupsmith