I've been working with the CXF 2.2 snapshot and have encountered what I
believe to be anomalies in its behavior.  Below is my test code, then
below that the output/description of four test cases.  Any insight into
whether this is expected behavior or a defect would be appreciated.

 

 

 

package com.example.simpleJaxRsResources;

 

 

import javax.ws.rs.GET;

import javax.ws.rs.Produces;

import javax.ws.rs.Path;

import javax.ws.rs.MatrixParam;

import javax.ws.rs.PathParam;

import javax.ws.rs.core.Context;

import javax.ws.rs.core.UriInfo;

 

@Path("{base}/{tail}")

@Produces("text/plain")

public class FirstResource {

      

      @GET

      public String getFirstResource(@PathParam("base") String base, 

                  @PathParam("tail") String tail,

                  @MatrixParam("matrixParam") String matrixParm,

                  @Context UriInfo info) {

            

            return "Full Request URI: " + info.getRequestUri() + "\n" +

            "base: " + base + "\n" +

            "tail: " + tail + "\n" +            

            "matrixParm=" + matrixParm;

      }

 

}

 

 

//Test #1

//Full Request URI: //CXF22/base/beginTail

//base: base

//tail: beginTail

//matrixParm=null

 

//Test #2 - Seems like the ';matrixParam=ParamValue' should not appear
in 'tail:'

//Full Request URI: //CXF22/base/beginTail;matrixParam=ParamValue

//base: base

//tail: beginTail;matrixParam=ParamValue

//matrixParm=ParamValue

 

//Test #3 - Seems like ';matrixParam=ParamValue' should not appear in
'base', and should appear in 'matrixParm'

//Full Request URI: //CXF22/base;matrixParam=ParamValue/beginTail

//base: base;matrixParam=ParamValue

//tail: beginTail

//matrixParm=null

 

 

//Test #4 - change the @Path to be @Path("base/{tail}, then append
';matrixParam=ParamValue' to it.

// The following URL then does not match
".../base;matrixParam=ParamValue/beginTail"

 

 

Reply via email to