You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Bryant Luk (JIRA)" <ji...@apache.org> on 2010/02/11 16:40:28 UTC
[jira] Resolved: (WINK-245) Annotations on interfaces - should they
work?
[ https://issues.apache.org/jira/browse/WINK-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryant Luk resolved WINK-245.
-----------------------------
Resolution: Fixed
Fix Version/s: 1.1
I committed a change ( http://svn.apache.org/viewcvs?view=rev&rev=908763 ). Seems Hudson broke down (couldn't update the SVN repository tree) so I don't know if it'll make a comment about integrating the change. Please re-open if you find an issue. Thanks.
> Annotations on interfaces - should they work?
> ---------------------------------------------
>
> Key: WINK-245
> URL: https://issues.apache.org/jira/browse/WINK-245
> Project: Wink
> Issue Type: Improvement
> Reporter: Davanum Srinivas
> Assignee: Bryant Luk
> Fix For: 1.1
>
>
> Here's an example.
> =======================================
> package org.apache.wink;
> import javax.ws.rs.GET;
> import javax.ws.rs.Path;
> import javax.ws.rs.Produces;
> @Path("/helloworld")
> public interface IHello {
> @GET
> @Produces("text/plain")
> public String getString();
> }
> =======================================
> package org.apache.wink;
> public class Hello implements IHello {
> public String getString() {
> return "Hello Stage 1";
> }
> }
> =======================================
> gives me a 404 with the following logs
> 704 [http-8080-1] WARN org.apache.wink.common.internal.application.ApplicationFileLoader - class org.apache.wink.Hello is neither a resource nor a provider. Ignoring.
> 797 [http-8080-1] INFO org.apache.wink.server.internal.RequestProcessor - WebApplicationException (404 - Not Found) occured during the handlers chain invocation
> 799 [http-8080-1] INFO org.apache.wink.server.internal.handlers.PopulateResponseMediaTypeHandler - Content-Type not specified via Response object or via @Produces annotation so automatically setting via generic-type compatible MessageBodyWriter providers
> I believe the same code works fine in other implementations. For example see CustomerResourceService on Page 35/36 in Restful Java with Jax-RS
> By Bill Burke
> http://books.google.com/books?q=CustomerResourceService
> thanks,
> dims
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.