During my work I encountered below scenario, On which : getText1,
getText2,getText3,getText4,getText5,getText6 are without @Path annotations,

But when I call the API (http://localhost:8080/.../testqa/ )it always show
: {"name":"Sumit1 Arora","age":21,"address":"Lakshay1 Arora"}


@Service("qaservice")
@Path("/testqa")
public class SimpleQAImpl {

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/simpleqa")
    public Person getText() {
        return new Person("Sumit Arora",21,"Lakshay Arora");
    }

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Person getText1() {
        return new Person("Sumit1 Arora",21,"Lakshay1 Arora");
    }



    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Person getText3() {
        return new Person("Sumit3 Arora",21,"Lakshay3 Arora");
    }

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Person getText4() {
        return new Person("Sumit4 Arora",21,"Lakshay4 Arora");
    }

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Person getText5() {
        return new Person("Sumit5 Arora",21,"Lakshay5 Arora");
    }

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Person getText6() {
        return new Person("Sumit6 Arora",21,"Lakshay6 Arora");
    }
}


May you please tell me how Apache CXF works, if @Path not given like the
case above or on other scenarios as well ?

'Sumit

Reply via email to