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

Reply via email to