Configure REST service in CMS

Hi there,

I am trying to declare a POST service under the cms … I am following the following tutorial:

https://documentation.bloomreach.com/14/library/concepts/hippo-services/repository-jaxrs-service.html

but when I call the service in the logs I get the following:

[INFO] [talledLocalContainer] 12.05.2021 17:28:37 WARN  http-nio-8080-exec-3 [ServletController.invoke:182] Can't find the request for http://localhost:8080/cms/ws/hello's Observer

Hello, Did you find the solution for this? I have the same problem, I’m following the same tutorial, Thanks for the help

Hello, yes, I opened another thread on another site and they answered me. I haven’t tried it yet but let’s see if it works for you

Following the example in the tutorial i had the same issue and i was able to solve it like this:

@Path("/")
    public static class HelloResource {
        @GET
        public String sayHello(@QueryParam("name") String name) {
            return "Hello " + name +"!";
        }
    }

@Path(“/”) must be on the inner class HelloResource. You could of cource also add an extra @Path on the method sayHello

Those calls needs to be authenticated:

By default, REST endpoints registered at the RepositoryJaxrsService are secured with basic authentication via the Hippo Repository and require a valid repository (CMS) username and password.

Are you using valid user/password when calling those endpoints?