title: Using REST root resource class as interface, getting "no operation matching request"
body: <p><strong>Problem:</strong> Root resource class defined as interface with all annotations. CXFServlet is not able to see the POST operation on the impl class, though it's defined on the interface. <strong>When all the annotations are copied into the impl class, it works fine.</strong></p>
  
  <p><strong>Note:</strong> The GET works fine when only defined on the interface, only the POST is causing the problem.</p>
  
  <pre><code>@Path("foo/")
  public interface TestService {
      @Path("foo/{id}")
      @GET
      @Produces("text/plain")
      public String getIt(String id);
  
  @Path("foo")
  @POST
  @Consumes(MediaType.APPLICATION_JSON)
  @Produces(MediaType.APPLICATION_JSON)
  @ElementClass(response = Bar.class)
  public Response createStuff(@Context MessageContext context,
          Bar bar);
  </code></pre>
  
  <p>}</p>
  
  <pre><code>@Features(features = "org.apache.cxf.feature.LoggingFeature")  
  public class TestServiceImpl implements TestService {
      @Override
      public String getIt(String id) {
          return "Hi there!";
      }
  @Override
  public Response createStuff(@Context MessageContext context,
          Bar bar) {
      bar.set...
      bar.set...
      return Response.ok(bar).build();
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Beans.xml</strong> 
  {</p>
  
  <pre><code>&lt;jaxrs:server id="testService" address="/test"&gt;
          &lt;jaxrs:serviceBeans&gt;
              &lt;ref bean="testservice1"/&gt;
          &lt;/jaxrs:serviceBeans&gt;
      &lt;/jaxrs:server&gt;
      &lt;bean id="testservice1" class="foo.bar.TestServiceImpl"/&gt;
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Web.xml</strong></p>
  
  <pre><code>    &lt;listener&gt;
          &lt;listener-class&gt;
              org.springframework.web.context.ContextLoaderListener
          &lt;/listener-class&gt;
      ……..
      &lt;/listener&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p><strong>Reuest printed from Tomcat7.0 server:</strong>
  Using Chrome Postman</p>
  
  <h2>INFO: Inbound Message</h2>
  
  <p>ID: 1</p>
  
  <pre><code>Address: http://localhost:8080/&lt;war-name&gt;/test/foo/foo
  Encoding: ISO-8859-1
  Http-Method: POST
  Content-Type: application/json
  Headers: {Accept=[*/*], accept-encoding=[gzip,deflate,sdch], accept-language=[en-US,en;q=0.8], cache-control=[no-cache], connection=[keep-alive], Content-Length=[144], content-type=[application/json], host=[localhost:8080], origin=[chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm], user-agent=[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36]}
  Payload: {
      "bar": {
          "create_time": "Fri Sep 20 17:51:40 PDT 2013",
          "update_time": "e0739141-1e8c-48ad-b8ad-410331b3dba3",
      }
  }
  </code></pre>
  
  <p><strong>Error:</strong>
  Sep 21, 2013 12:13:05 PM org.apache.cxf.jaxrs.utils.JAXRSUtils findTargetMethod
  WARNING: <strong>No operation matching request path "//test/foo/foo" is found,</strong> Relative Path: /foo, HTTP Method: POST, ContentType: application/json, Accept: <em>/</em>,. Please enable FINE/TRACE log level for more details.
  Sep 21, 2013 12:13:05 PM org.apache.cxf.interceptor.LoggingOutInterceptor</p>
  
  <pre><code>INFO: Outbound Message
  ---------------------------
  ID: 1
  Response-Code: 404
  Content-Type: text/xml
  Headers: {Allow=[GET, OPTIONS, HEAD], Date=[Sat, 21 Sep 2013 19:13:05 GMT], Content-Length=[0]}
  </code></pre>
  
  <hr>