Defining your object model involves choosing whether to generate local and or remote service interfaces. Local services can only be invoked from the Liferay server on which they’re deployed. Remote services are accessible to clients outside of the Liferay server. Before implementing local or remote services, consider the best practices described here:
If you plan to have remote services, enable local services too.
Implement your business logic in
Create corresponding remote services methods in your
Use the remote service methods to call the local service, wrapping the calls in permission checks.
In your application, call only the remote services. This ensures that your service methods are secured and that you don’t have to duplicate permissions code.
If you are turning on local or remote services in your
service.xml file just
now, make sure to
run Service Builder
again to generate the service interfaces.