To begin this example, we will construct a web service with a single operation. It will receive a ticker symbol and perform a view lookup to locate a matching company name. The following code implements this functionality:
Dim session As NotesSession Class CompanyInfo Sub NEW Set session = New NotesSession End Sub Function GetCompanyName(strSymbol As String) As String Dim dbCurrent As NotesDatabase Dim viewCompanyProfileLookup As NotesView Dim docCompanyProfile As NotesDocument Set dbCurrent = session.CurrentDatabase Set viewCompanyProfileLookup = dbCurrent.GetView("CompanyProfileLookup") Set docCompanyProfile = viewCompanyProfileLookup.GetDocumentByKey(strSymbol) If (docCompanyProfile Is Nothing) Then ‘ *** no match found GetCompanyName = "No match found for " & strSymbol Else GetCompanyName = docCompanyProfile.GetItemValue("Company")(0) End If End Function End Class
After saving the web service, Domino Designer 7 populates the Advance tab of the web...