Okay, but this is the way its supposed to work. The Path annotations defines the location of the resource, so its behaving as expected.
On Sun, Sep 25, 2011 at 3:00 PM, Rene Svetina <[email protected]> wrote: > Nope still nothind but i found out that when i request on URL > http://localhost:8080/raziskovalec-service/services/iskanje it does work. > Don't know why. > > On Sun, Sep 25, 2011 at 2:57 PM, Kiren Pillay <[email protected]>wrote: > >> Maybe you missing the "/" in front of the path? >> >> @Path("/iskanje") >> >> >> >> On Sun, Sep 25, 2011 at 2:12 PM, Rene Svetina <[email protected]> >> wrote: >> > Hello, >> > >> > i have problems with getting JAX-RS services working. >> > >> > Spring configuration >> > <?xml version="1.0" encoding="UTF-8"?> >> > <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=" >> > http://www.w3.org/2001/XMLSchema-instance" >> > xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:context=" >> > http://www.springframework.org/schema/context" >> > xsi:schemaLocation=" >> > http://www.springframework.org/schema/beans >> > >> http://www.springframework.org/schema/beans/spring-beans-3.1.xsd >> > http://www.springframework.org/schema/context >> > >> > http://www.springframework.org/schema/context/spring-context-3.1.xsd >> > http://cxf.apache.org/jaxrs >> > http://cxf.apache.org/schemas/jaxrs.xsd" >> >> >> > >> > <jaxrs:server address="/"> >> > <jaxrs:serviceBeans> >> > <ref bean="iskanje" /> >> > </jaxrs:serviceBeans> >> > </jaxrs:server> >> > >> > <bean id="iskanje" class="org.raziskovalec.service.Iskanje"></bean> >> > >> > </beans> >> > >> > Service class: >> > package org.raziskovalec.service; >> > >> > import javax.ws.rs.GET; >> > import javax.ws.rs.Path; >> > import javax.ws.rs.Produces; >> > >> > import org.slf4j.Logger; >> > import org.slf4j.LoggerFactory; >> > >> > @Path("iskanje") >> > @Produces("text/plain") >> > public class Iskanje >> > { >> > private final Logger logger = LoggerFactory.getLogger(getClass()); >> > @GET >> > public String getTest() >> > { >> > logger.trace("called"); >> > return "lala"; >> > } >> > } >> > >> > The problem is if i chnge address to something else than / i always on >> any >> > url get service-list html and if it is / than i get 404. >> > If i change @Path to / than it works. >> > -- >> > Rene Svetina >> > >> > > > > -- > Rene Svetina >
