Posts

Showing posts with the label service

Service builder exception : org.dom4j.DocumentException: www.liferay.com Nested exception: www.liferay.com

Today, while building an service i got the following exception. Solution:    Since i don't have the internet connection. while building the services i got the below exception.    So remove the DTD from the service.xml   If still you get this exception remove from the other xml files like liferay-display.xml and liferay-portlet.xml DTD will be at lineno:1 or 2 of the service.xml It will look as below <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd"> <service-builder package-path="com.test.sample"> ................ Hope this information helps. com.liferay.portal.kernel.xml.DocumentException: www.liferay.com Nested exception: www.liferay.com at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:429) at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:447) at com.liferay.portal.kernel.xml.SAXReaderUtil....

Accessing JSON through javascript in custom portlet

Image
Scenrio:           Accessing the other custom portlet JSON services in our custom portlet through the javascript. Step:1 Enable remote-servie = true in service.xml as shown and build service to generate the services <service-builder package-path="com.liferay.testjson"> <namespace>custom</namespace>          <entity name="jsontest" remote-service="true" local-service="true" uuid="true">                      <column name="id" type="int" primary="true" />                       <column name="name" type="String"></column>                     <column name="desc" type="String"></column>     </entity>   </service-builder> Step2:   Open the class XXXXServiceImpl.class ...