To define a service for your portlet project, you must create a
file. The DTD (Document Type Declaration) file
specifies the format and requirements of the XML to use.
service.xml was created for you when you
created your Service Builder project.
It’s in your
*-service module’s root folder with an
entity element named
Foo. This is (obviously) an example entity, but you can use it as a pattern
for creating your own.
Liferay Dev Studio DXP
provides a Diagram mode and a Source mode to give you different
perspectives of the service information in your
- Diagram mode facilitates creating and visualizing relationships between service entities.
- Source mode brings up the
service.xmlfile’s raw XML content in the editor.
If you use Liferay Dev Studio DXP, you can switch between these modes. Of course, you don’t have to use Liferay Dev Studio DXP to work on Liferay projects.
Next, you’ll specify your service’s global information.