Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: REST ServiceBuild not working
Hi,
i am stuck at this tutorial. I have updated the Guestbook service by adding the following method and hitting buildService!
The method gets created in GuestebookService.java
But it doesn't get listed under http://localhost:8080/api/jsonws What am I doing wrong?
i am stuck at this tutorial. I have updated the Guestbook service by adding the following method and hitting buildService!
@Override
public List<guestbook> getGuestbooks(long groupId) { return guestbookLocalService.getGuestbooks(groupId);
}
</guestbook>
The method gets created in GuestebookService.java
@AccessControlled
@JSONWebService
@ProviderType
@Transactional(
isolation = Isolation.PORTAL,
rollbackFor = {PortalException.class, SystemException.class}
)
public interface GuestbookService extends BaseService {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this interface directly. Always use {@link GuestbookServiceUtil} to access the guestbook remote service. Add custom service methods to <code>com.liferay.docs.guestbook.service.impl.GuestbookServiceImpl</code> and rerun ServiceBuilder to automatically copy the method declarations to this interface.
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List<guestbook> getGuestbooks(long groupId);
/**
* Returns the OSGi service identifier.
*
* @return the OSGi service identifier
*/
public String getOSGiServiceIdentifier();
}
</guestbook>
But it doesn't get listed under http://localhost:8080/api/jsonws What am I doing wrong?
There's a "context" dropdown on the /api/jsonws page in the upper left. Change the context to the guestbook one and you should see your service.
true dat. so easy
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™