Hi again,
In my other topic i had some problems with the speed of the desktop version of the application i'm working on. This time i need some help with porting the standalone java application to a blackberry application.
I'm finished with the gui and all the other stuff, the only problem i still have is connecting the blackberry with the database. I thought it should work the same as with the desktop version so i added NSCO.jar too the application. But when I try to compile (i'm using BlackBerry JDE) i get the error message:
C:\BBWorkspace\PLS\Domino_Connect.java:27: cannot access org.omg.CORBA.ORB
class file for org.omg.CORBA.ORB not found
Session s = NotesFactory.createSession(host, username, pwd);
I've done a lot of searching, and i've looked into the samples but i can't find a way to fix this.
So i hope that some of you can push me into the right direction, cause i'm totally lost now.
Connecting directly back to the Domino server over the wireless network would seem like a very problematic approach. Have you considered exposing the Domino data as a web service service, and then consuming this from your application? It's pretty quick and simple to create the web service on the domino side (it does require a little lotus script) as everything in terms of parsing and the WSDL is done for you.
On the device side, this will let you keep the heavy-lifting portion of the your application back in Domino.
If you need help with either creating the domino web service or consuming from BB, post a comment here.
I agree with dhoff4. Web services are probably a better approach. I would be surprised if NSCO.jar worked in any J2ME situation. It's likely to contain references to classes that just aren't in J2ME.
In many situations, a full blown web service is not necessary with Domino. I have done applications that just passed parameters to agents and then parsed the result. Also, if you need to put data in the application, you can programatically create an http post using a form specifically designed for the BlackBerry app that calls it.
A real web service might be a more appropriate long term architecture as it can be re-used for future needs, but there's nothing wrong with keeping it simple.
I think a real web service isn't necessary, but i can't find how i can call the agent with some parameters. I found out how i can push information from domino to the blackberry, so when i could call this "function" from my blackberry it would be great.
I'm sorry for the late response, due to my vacantion i couldn't react for a few weeks. I understand that i can't get a connection with the blackberry using NCSO.jar so i searched for some other ways. And after some searching i found a sample that uses pushes to send the data to the blackberry. This is working well, but i have to push a button in Notes to get the data to the blackberry. As you can gues, this isn't the way i would like to have the application work, so i was wondering if there is a way i can send a request to domino for the push.
If i understand it well, then you suggest to do this with a webservice. I never did something like this before so i hope you can point me in the right direction.
Tnx in advance!