Tuesday, August 15, 2006

Lotus Domino agent uses Apache Axis to consume a web service

Joachim Dagerot published an article on IBM developerWorks about how to use Apache Axis in a Domino Java agent to call a web service: Consuming Web services from a Lotus Domino Java agent. The article provides description and examples of how to call Web Services from your own Domino databases.

Last month I posted about another Java library to consume Web Services: WSIF (Web Services Invocation Framework). I had it as a stand-alone Java program in the Web Services tutorial published on DeveloperWorks, and last month I created a Domino Java agent re-using the same source code as in the stand-alone program. The problem with WSIF framework is that it is 3 years old, but it looks like there are plans for a new release.

What I liked with WSIF the most is the dynamic invocation of Web Services. That means that you do not need to create a stub or proxy or anything, you simply specify the location of the WSDL file, the function name and the parameters to the function:
java DynamicInvoker http://www.server.com/simplesoap/StockquoteSOAP.wsdl getQuote IBM
AXIS also has a DynamicInvoker example which gives absolutely the same result as DynamicInvoker WSIF example, but using different coding. So I guess that in most cases WSIF can be replaced by the newer AXIS. That would be interesting to compare the speed of initialization and processing between these two libraries. Considering that WSIF uses same Java libraries as AXIS, I would guess that they have the same speed... but you never know. So far the fastest (and smallest in size) library I tested was kSOAP, which was initially designed for mobile devices. And of course the good old deprecated MSSOAP (for VB/LotusScript), which is hard(impossible?) to compete with when it comes to dynamic invocation :)

1.3 3. What are the differences between WSIF and Axis?
Axis is an implementation of SOAP. It includes on the server-side infrastructure for
deploying web service implementations and then routing SOAP messages between
clients and those implementations. It also implements the JAX-RPC specification for
invoking SOAP services. WSIF is similar to the client piece of Axis, in that it is used
for invoking services. However, WSIF's API is WSDL-driven and protocol
independent; it allows protocol-specific code ("providers") to be plugged in. For
invoking SOAP services, WSIF is in fact packaged with an Axis provider, that uses
Axis APIs (i.e. JAX-RPC) to do the invocation. So WSIF operates at a more abstract
level than Axis.

1 comment:

Anonymous said...

Today,we are proud to announce the launch of the new wedding support service sell ffxi gil,packed with features sure to sell ffxi gils delight adventurers across Vana'diel looking to exchange eternal vows with their beloved!Responding to player demands for greater customization,the new service will grant brides and grooms freedom in choosing location,timing,dialogue,and sell Final Fantasy XI Gil more for their ceremony,allowing them to create a truly memorable event all their own.Information on all the features,including in-game sell ffxi gil item vendors and wedding certificates,can be found on the new wedding support site,so head on over sell ffxi gils and get started planning the wedding of your dreams sell Final Fantasy XIGil!