Hi
On 25/09/11 14:00, Rene Svetina 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.
Was it when you had @Path("/") on the resource class, that would explain
it, given that you also have a "/" uri mapping.
I've tried adding "services" in the test, where resource endpoint is
published at localhost:8080 and the resource class starting from
"/bookstore" and I did get 404 back.
Can you explain again, what happens when you have
@Path("iskanje") ?
GET /raziskovalec-service/iskanje
has to work. Which CXF version do you use ?
Cheers, Sergey
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