Missing grammar in JBoss Resteasy generated WADL

تعرفه تبلیغات در سایت
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    I managed to get a WADL by using the org.jboss.resteasy.wadl.ResteasyWadlServlet (http://stackoverflow.com/a/41471710/2528609), but the WADL does not contain the Grammar. The representation nodes also do not contain an element attribute defining the response type.

    Given the following rest endpoint class

    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    
    @Path("user")
    public class UserEndpoint {
    
        @GET
        @Path("")
        @Produces(MediaType.APPLICATION_JSON)
        public UserResponse getUser() {
           UserResponse response = new UserResponse();
           response.name = "Michiel";
           response.age = 43;
           return response;
        }   
    }
    

    And

    public class UserResponse {
        public String name;
        public int age;
    }
    

    I do get the correct JSON when navigating to the endpoint, but when navigating to the application.xml URL I get

    The WADL does not describe the UserResponse class, nor does it indicate it as the element type of the getUser method.

    I would have expected something like:

    
                   ...
                

    How do I get the generated WADL to include the grammar part?

    This is my web.xml:

    Archetype Created Web ApplicationRESTEasy WADLorg.jboss.resteasy.wadl.ResteasyWadlServletRESTEasy WADL/application.xml

    These are the dependencies in my pom.xml:

    org.jboss.resteasyresteasy-wadl3.0.19.Finalorg.jboss.resteasyresteasy-jaxrs

    I use JBoss Wildfly 10.1.0.

    asked 37 secs ago

  • مطالب مرتبط
  • How are generated the big chunks of javascript code in big websites?
  • Missing controls using Angular2 Reactive Forms
  • Alamofire Xcode 8 GM, Missing Mashape application key
  • onelogin authnrequest is not generated
  • Shippo: Using generated transaction's label_url variable in other functions
  • AWS Cognito IntitiateAuth: Missing required parameter UserName
  • نویسنده : استخدام کار بازدید : 88 تاريخ : دوشنبه 1 خرداد 1396 ساعت: 19:11
    برچسب‌ها :