Analytics


Google

Wednesday, October 22, 2008

Consuming WebService in Lotus NOTES

I found it difficult to find reference on how to consume webservice in Lotus NOTES. That is why I have this as a bookmark to help me get back to those locations:

Consuming webservice in LN 6


Another good one that shows a simple client side method is found here (snippet as follows):
Dim Client As Variant
Set Client = CreateObject("MSSOAP.SoapClient")
'Initialize connection to the Web Service
Call Client.mssoapinit
("http://localhost/testWS.nsf/Simple?wsdl")
'Call our simple GetEmailAddress
function provided by Web service
Dim result As String
result = Client.getJoke()
'output result to message box
Messagebox result, 48, "Get Joke"


There is also an open source project which produces a java stub to consume the webservice called stubby, however, still not sure whether is meets my counterparts requirements.

In LN 8, it is much simpler to consume the webservice, just have to create a new script - either JavaScript, LotusScript or Java Library and there is a button at the bottom labeled WSDL, just click it and import WSDL to create the required reference to consume the webservice.

There is also another reference on how to write do some of the coding in java - found here. Another reference talking about webservice in LN 8.5 is found here.

No comments: