title: Expose an EJB session bean as JAX-RS using Eclipse and Jboss EAP 6.2
body: <p>I have EJB project and try to reused session bean as Rest WebService by adding annotation.</p>
  
  <p>The following is what I am doing:</p>
  
  <p>1) extends application to</p>
  
  <pre><code>@ApplicationPath("resources")
  public class QMWSApplication extends Application
  {       
  }
  </code></pre>
  
  <p>2) add annotation to the bean</p>
  
  <pre><code>import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  
  @Path("/ws")  
  @Stateless  
  @LocalBean  
  public class TestWS {  
  @GET  
  @Path("/test")  
  @Produces("text/plain")  
  public String getTest()  
  { 
  </code></pre>
  
  <p>3) Then configure the EJB project as customized adding JAS-RS facet to the project.
  Then on project explore, I can see there is URI under JAX-RS web service.
  But after I add the the final EAR to JBoss server (EAP6.2), and test on the browser, I always get 404 error. I am sure URL is right since, on the project browser, I left click the rest full GET and the web service tester on eclipse has same URL and also get 404 ERROR. Anything wrong? </p>