Implementing the Web Service Methods
Next we have to provide the actual code for our Web Service methods. Edit the two web service methods as follows:
Class CInfo.WebService Extends %SOAP.WebService
{
Parameter NAMESPACE = "http://tempuri.org";
Parameter SERVICENAME = "CompanyInfo";
Parameter USECLASSNAMESPACES = 1;
Method GetCompanyInfo(id As %Integer) As CInfo.Company [ WebMethod ]
{
Quit ##class(CInfo.Company).%OpenId(id)
}
Method CreateCompanies(count As %Integer) As %Integer [ WebMethod ]
{
Quit ##class(CInfo.Company).Populate(count)
}
}
These changes are detailed in the following pages.