Have developed a Java application for the Blackberry that connects/retrieves information from a Domino Application through Web Services. Lotus Domino is setup as the Provider.
The issue I have is how to authenticate from the Blackberry to the Domino application through Web services. Anonymous access is not allowed.
Is there a specific method process do authenticate via Web services? Is there a server side configurations that need to be enabled?
For the authentication function, I have tried to use HttpConnections class (code refers below) in my Custom Java Blackberry application.
//======================
HttpConnection c = null;
try{ c = (HttpConnection) Connector.open(“http://testServer/test.nsf/TestWebService?OpenWebService”);
c.setRequestMethod(“POST”);
c.setRequestProperty(“username”, “John Smith”);
c.setRequestProperty(“password”, “password1”);
if (http.getResponseCode() == HttpConnection.HTTP_OK) {
System.out.println(“OK”);
}
else
{
System.out.println(“Unauthorised”);
}
catch(IOException e)
{System.out.println(e.getMessage());
}
//===============
I always get the “401 Unauthorised” access response from the HttpConnection code above.
Also, to have a pop-up login box so end user can type their credentials and login, we can use this URL (http://testServer/test.nsf?Opendatabase&login) from the browser. My question is: Is there a way to login from the browser without actually typing in the username and password in the pop-up login box? I am thinking to pass the username and password details through the parameters in the URL link. e.g.: http://testServer/test.nsf?Opendatabase&login&username=John Smith&password=password1
The application needs to work on v7 and v8 Domino Server.
Any help pointers in a direction is appreciated
Regards,
Melissa