title: Liferay - Creating custom remote jsonwebservice
body: <p>I was trying to create my custom json webservice in the a spring maven portlet in the remote portal.</p>
  
  <p>I came across the service.xml and Service Builder but I could only find tutorials for these relating to ant instead of maven. 
  Can someone please explain here, the steps to create a basic JSON web service in a portlet, and the way I can access it from outside.</p>
  
  <p>Something like</p>
  
  <pre><code>@JSONWebService
  public class RemotePortletServiceImpl {
      public boolean fileExists(Long id) {
          return false;
      }
  }
  </code></pre>
  
  <p>which will return me false when I give the url in the browser (<a href="http://localhost:8081/api/jsonws/something/something" rel="nofollow">http://localhost:8081/api/jsonws/something/something</a>)</p>
  
  <p>I have been stuck with this remote service for some time now. I think there will be many out there who would find help from this.</p>