Serviços Java "Alô Mundo" | Lumis XP

Neste vídeo explicamos como criar um novo serviço com servicedefinition.xml e uma interface em Java a partir do Eclipse

Para isso, são executados os seguintes passos:

<?xml version="1.0" encoding="UTF-8"?>
<serviceDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.lumis.com.br/lumisportal/xsd/servicedefinition.xsd">
    <service name="Hello World" />
    <interfaces>
        <interface name="Hello" id="hello" className="br.com.treinamento.service.helloworld.HelloWorldInterface">
        </interface>
    </interfaces>
</serviceDefinition>

package br.com.treinamento.service.helloworld;

import java.io.IOException;
import lumis.portal.PortalException;
import lumis.portal.serviceinterface.GenericServiceInterface;
import lumis.portal.serviceinterface.IServiceInterfaceRenderRequest;
import lumis.portal.serviceinterface.IServiceInterfaceRenderResponse;
import lumis.portal.serviceinterface.ServiceInterfaceException;

public class HelloWorldInterface extends GenericServiceInterface
{
    @Override
    public void render(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response) throws ServiceInterfaceException, PortalException
    {
        try {
            response.getWriter().print("<div>Hello <b>world</b></div>");
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
}