Hello Fernando, 

I'm glad you made it.

This small adjustment to the doc and example would be very interesting, it 
would be an excellent contribution to what is coming :)

On 2024/10/01 19:55:21 Fernando wrote:
> Hi all!,
> well I finally found that I need add path  defined in ApplicationPath to
> the uri.
> I had no clear this detail.
> Thanks to all!
> 
> 
> 
> 
> El mar, 1 oct 2024 a la(s) 3:51 a.m., Markus Jung (ju...@apache.org)
> escribió:
> 
> > Hi Fernando,
> >
> > as Kean already pointed out, the spaces in @Path(" articuloservice ") do
> > look odd. The Application class Benedict mentioned is not necessary as
> > far as I'm aware.
> >
> > What do the logs look like when you deploy the application in TomEE?
> > Normally you'd see the active REST endpoints like this
> > (https://github.com/apache/tomee/tree/main/examples/rest-example):
> >
> > INFO - REST Application: http://localhost:40169/rest-example/ ->
> > org.apache.openejb.server.rest.InternalApplication@184e5c44
> > INFO -      Service URI: http://localhost:40169/rest-example/api/comment
> > -> Pojo org.superbiz.rest.service.CommentService
> > INFO -            DELETE
> > http://localhost:40169/rest-example/api/comment/delete/{id} ->      void
> > delete(long)
> > ...
> >
> >
> > On 30.09.24 22:28, Fernando wrote:
> > > Hi all!,
> > > I am trying to implement a very simple rest web service following the
> > guide:
> > > https://tomee.apache.org/tomee-8.0/examples/simple-rest.html
> > >
> > > and this is my code:
> > >
> > > @Path(" articuloservice ")
> > > public class ArticulosService {
> > >
> > >      @Inject
> > >      private ArticuloDao articuloDao;
> > >
> > >      @GET
> > >      @Path("/saludar")
> > >      @Produces(MediaType.TEXT_PLAIN)
> > >      public String Saludo() {
> > >          return "Helloooo!";
> > >      }
> > > }
> > >
> > > I am trying to test the code using postman  (GET) :
> > > *http://localhost:8080/Hiper/articuloservice/saludar
> > > <http://localhost:8080/Hiper/articuloservice/saludar>*
> > >
> > > getting the following response: "*The required resource is not
> > available*"
> > >
> > > Maybe I am missing something?...any idea?
> > > Thanks in advance!
> > > Fernando
> > >
> >
> 

Reply via email to