10.5. Service Endpoint Interface (SEI)A Service Endpoint Interface exposes business methods as Web Services that can be accessed by external clients. Example 10-1 shows the InventoryService interface. Example 10-1. InventoryEndpoint.javapackage com.jbossatwork.ws; /** * Service endpoint interface for InventoryFacade. */ public interface InventoryEndpoint extends java.rmi.Remote { public com.jbossatwork.ws.CarDTOArray findAvailableCars( ) throws java.rmi.RemoteException; } A Service Endpoint Interface acts as a server-side stub that shows your business methods to clients and serves the same purpose for a Web Service that an EJB Remote Interface does for an EJB. The InventoryEndpoint interface is a Remote interface, and the findAvailableCars( ) method throws a RemoteException. The CarDTOArray (that holds an array of CarDTO objects) returned by the findAvailableCars( ) method may look odd to yousee the "Web Services and Collections" section for more information. |