Friday, July 07, 2006

Lotus Notes Java agent for consuming a Web Service

Here comes a little addition to the tutorial I wrote for IBM developerWorks. Tutorial has several example of using MSSOAP from LotusScript, but no examples of service consumer as Java agent. So here comes a Java consumer created from code in the WSIF stand-alone example.
There are several other frameworks to call Web Services from Java, some of them are loading much faster than WSIF and Apache SOAP, but WSIF is very easy to use. Take a look at kSOAP if you want a faster initial loading.

Here is the database with the example agent: http://www.botstation.com/download/WebservicesR7.zip

How to setup the example:
1) Download WSIF framework and unzip it
2) Copy all JAR files from the WSIF's \lib directory into Notes's \jvm\lib\ext directory.
3) Copy the example database into data\ws\ catalog.
4) Open the database, do "Preview in web browser" . Then choose Actions menu and run "javaconsumer" agent.
You will see the output of the agent in the Java debug console window.

1 comment:

Anonymous said...

Hi, I'm Gustaf. I am supposed to make a java agent in Notes that can communicate over SSL to a webservice. It's so hard because I need an IBM 1.3 SDK to make it.. I am just developing it in Notes and I just see my output i n the java console, but ... argh. There are some security problems. Would you know anything about coding SSL web services from Notes?