Hi

Thanks for posting your test results

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

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

S.B. I need to confirm it on the jaxrs user list - technically MatrixParam is 
part of a single path segment

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

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

S.B. Need to check this one too, as I'm not sure if all the matching path 
segments but the last one need to be checked

//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"

S.B I think it might be correct as there're is only 'base' in the 'base' path 
segment @Path("base/{tail}


I'll confirm it all and get back to you

Cheers, Sergey


----- Original Message ----- From: "Maxfield, Bruce D. (LNG-DAY)" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, November 21, 2008 5:11 PM
Subject: @MatrixParam anomoly - four test cases w/ code example


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