Hello,
I am new to rest and i try to learn it. I am struggling with a run time error related to the @get count of my model.
I tried to approach it two different ways but still got the same error.
I would like to seek your help if you happen to know what was wrong with my code.
My program is as follow :
I have a simple rest application and it consists of three packages called Order, OrderDAO , and OrderServices.
and I have my Rest simple client project which consists of a simple
java program calling my rest service.
Every thing in the simple client program worked fine, except the @Get path("orders").path("count").accept(MediaType.TEXT_PLAIN).get(String.class)) to the rest service. It gave me a run time error saying that GET
http://localhost:8080/RestSimpleApp/rest/orders/count returned a response status of 405.
I searched for the error 405 and it basically said that a HTTP Status code of 405 refers to Method Not Allowed. I wonder if my syntax @Get path("orders").path("count").accept(MediaType.TEXT_PLAIN).get(String.class)) is correct? I tried to use MediaType.APPLICATION.XML but it gave me the same error.
I 'd like to get your help if you can shed some light into what I did wrong.
Thank you very much in advance.
Mark