Consuming Soap from the Notes Client.

I found a fantastic tutorial on the IBM web site that outlines how to use ND7 as a web service provider. Easy, simple, etc, and very very well written. As a throwaway comment, he suggested using the MS Soap toolkit for consuming web applications.




So - is this easy ?





Well. Here's a web service consumer written in Lotusscript. It uses the MS Soap object as an object, so this should work right back to v4 of notes:





sub initialize

    'Create a new MSSOAP client object

    Dim client As Variant

    Set Client =CreateObject("MSSOAP.SoapClient")



    'Initialize connection to the WSDL file and get WSDL structure

    Call Client.mssoapinit ("http://localhost/testWebServices.nsf/Simple?wsdl")



     'Call our simple 'sendJoke1' function provided by Web service

    Dim result As String

    result = Client.sendJoke1()



    'output result to message box

    Messagebox result, 48, "Get Joke"



end sub





I mean. HOW SIMPLE IS THAT?



So. Web service created in ND7, taking all of five minutes. Consumer code, runnable on any version of notes (on windows) and off you go.