Hi,

have a look here please:
http://svn.apache.org/viewvc?rev=1225538&view=rev

(also merged to 2.4.x and 2.3.x branches)

In this test, we have a context set to 'webapp', jaxrs:address - to "/rest", and BookStoreSimple has JAX-RS annotations which make it identical, as far as the match is concerned, to your ServiceImpl.

Note the 3 new tests added, the match is OK without MatrixParams, with them being in the end of the URI or in the middle of it.

The URIs without the matrix params look like this:
http://localhost:8080/webapp/rest/simplebooks/1

which is identical in structure to your test ones.

Please create a test case if you continue seeing this issue

Cheers, Sergey

On 28/12/11 17:15, cxfuser wrote:
Hello Sergey


I tested the same with the latest CXF version and it still fails with
following error when I access the URL as follows:
*http://localhost:8080/cxftest/myService/customer/1;customerId=ssn/entitlement*

When I access this URL, it works:
*http://localhost:8080/cxftest/myService/customer/1;customerId=ssn*


*ERROR MESSAGE:*WARNING: No root resource matching request path
/cxftest/myService/customer/1;customerId=ssn/entitlement has been found.
Dec 28, 2011 11:07:59 AM
org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
WARNING: WebApplicationException has been caught : no cause is available


*My Code as follows. Ami I doing omething wrong? Thanks for the help:*
package services;

import java.io.IOException;

import javax.ws.rs.GET;
import javax.ws.rs.MatrixParam;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

import model.Customer;

import org.codehaus.jackson.map.ObjectMapper;

@Path("/customer/{id}")
@Produces("application/json")

public class ServiceImpl {

        
        @GET
        public String getCustomer( @PathParam("id") final String customerId,
@MatrixParam("") final Customer customerBean) throws IOException {
                return javaToJSON(customerBean);
        }
        
        private String javaToJSON(final Object object) throws IOException {
                ObjectMapper mapper = null;
                mapper = new ObjectMapper();
                return mapper.writeValueAsString(object);
        }       
        
        @GET
        @Path("/entitlement")
        public String getEntitlement( @PathParam("id") final String customerId,
@MatrixParam("") final Customer customerBean) throws IOException {
                return javaToJSON(customerBean);
        }
        
}

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Matrix-Parameter-added-to-the-path-in-the-middle-doesn-t-work-tp5087559p5105697.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to