Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Scout/Tutorial/3.8/webservices/CompanyWebService implementation
Scout |
Wiki Home |
Website |
Download • Git |
Community |
Forums • Blog • Twitter • G+ |
Bugzilla |
Bugzilla |
@ScoutWebService @WebService(endpointInterface = "org.eclipse.scout.tutorial.jaxws.services.ws.companywebservice.CompanyWebServicePortType") public class CompanyWebService implements CompanyWebServicePortType { @Override public List<Company> getCompanies() { // holder to create a company bean for each company record in database BeanArrayHolder<Company> companyBeanHolder = new BeanArrayHolder<Company>(Company.class); try { // run SQL SQL.selectInto("" + "SELECT NAME, " + " SYMBOL " + "FROM COMPANY " + "INTO :{name}, " + " :{symbol}" , companyBeanHolder ); } catch (ProcessingException e) { ScoutLogManager.getLogger(CompanyWebService.class).error("failed to load company data", e); } return Arrays.asList(companyBeanHolder.getBeans()); } }