Java's popularity has grown tremendously in recent years. It is a frequent choice for web‑services implementations. Java contains a number of utility classes that are easily combined with Domino‑based design idioms. We will now look at how to implement the CompanyInfo
web service using Java. The following Java code approximates the LotusScript implementation of a simple web service.
import lotus.domino.*; import lotus.domino.types.*; public class CompanyInfo { Session session; public CompanyInfo() { session = WebServiceBase.getCurrentSession(); } public String getCompanyName(String strSymbol) { String strCompanyName = new String(); CompanyInfoimplementing, Java usedtry { web servicesCompanyInfo implementing, Java usedAgentContext agentContext = session.getAgentContext(); Database dbCurrent = agentContext.getCurrentDatabase(); View viewCompanyProfileLookup = dbCurrent.getView("CompanyProfileLookup"); Document docCompanyProfile = viewCompanyProfileLookup...