RE: REST ServiceBuild not working

Robert Paul Meissner, modified 5 Years ago. New Member Posts: 12 Join Date: 2/7/20 Recent Posts
Hi,
 
i am stuck at this tutorial. I have updated the Guestbook service by adding the following method and hitting buildService!
@Override
&nbsp; &nbsp; public List<guestbook> getGuestbooks(long groupId) {&nbsp; &nbsp; &nbsp; &nbsp; return guestbookLocalService.getGuestbooks(groupId);
&nbsp; &nbsp; }
</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?
thumbnail
David H Nebinger, modified 5 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
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.
Robert Paul Meissner, modified 5 Years ago. New Member Posts: 12 Join Date: 2/7/20 Recent Posts
true dat. so easy