我想在Android上創建蓮花筆記離開應用程序。爲此,我需要一些蓮花腳本文件,這些文件將爲我提供在我的應用程序中顯示的數據。但首先我需要的是獲得服務器登錄 但嘗試登錄後,我沒有得到正確的迴應。我需要建議如何繼續爲ibm lotus notes創建應用程序離開申請。想要爲android構建蓮花筆記離開應用程序
protected static void tryLogin()
{ ``
HttpURLConnection connection;
OutputStreamWriter request = null;
URL url = null;
String response = null;
String parameters = "username="+"ABCD"+"password="+"!!!!!!!!";
try
{
url = new URL("http://10.194.5.33/dvlp/wdcidmanage.nsf/hwlsp?wsdl");
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
// connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setRequestMethod("POST");
request = new OutputStreamWriter(connection.getOutputStream());
request.write(parameters);
request.flush();
request.close();
String line = "";
InputStreamReader isr = new InputStreamReader(connection.getInputStream());
BufferedReader reader = new BufferedReader(isr);
StringBuilder sb = new StringBuilder();
while ((line = reader.readLine()) != null)
{
sb.append(line + "\n");
}
// Response from server after login process will be stored in response variable.
response = sb.toString();
System.out.println("response--------------------------"+response);
// You can perform UI operations here
// Toast.makeText(this,"Message from Server: \n"+ response, 0).show();
isr.close();
reader.close();
}
catch(IOException e)
{
// Error
System.out.println("error"+"----------------error is there------------");
}
}
這是我的登錄代碼片段。在服務器端我需要做什麼登錄?
是的瞭解,但我們已經建立了http://10.194.5.33,通過它我必須先登錄然後我可以使用下面的Web服務http://10.194.5.33/dvlp/wdcidmanage.nsf/ hwlsp?wsdl。當我試圖建立與它的連接時,它返回一個html頁面,所以我的問題也是我需要在這個服務器的http://10.194.5.33內建立一個web服務器用於登錄,然後我明白我需要在肥皂中構建更多的Web服務。 –
在wdcidmanage.nsf的ACL中給予匿名我們需要首先與授權用戶一起登錄,請給出一個想法,我將如何才能夠使用10.194.5.33中的有效用戶名和密碼從android應用程序獲得正確的響應你的合作。 –
Domino的管理必須使用Lotus Notes Domino客戶端完成。打開http://xx.xxx.x.xx/dvlp/wdcidmanage.nsf/hwlsp?wsdl,您將看到EXISTING服務。你不必建立一個新的WS但是消耗它。 –