cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-3454) CXFRS doesn't work when there are multiple optional parameters in a @Path annotation
Date Mon, 18 Apr 2011 14:26:05 GMT

    [ https://issues.apache.org/jira/browse/CXF-3454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021042#comment-13021042
] 

Sergey Beryozkin commented on CXF-3454:
---------------------------------------

I've tried a similar test.

So you have

URITemplate("/foo/{bar}" + "{resource1:(/format/[^/]+?)?}" + "{resource2:(/encoding/[^/]+)?}"
+ "{resource3:(/baz/[^/]+?)?}"); 

and suppose you have

"/foo/1/format/1/encoding/en"

I can see that a 'resource' will capture 'format/1', however, when a group corresponding to
'encoding' is checked, it also returns 'format/1', i.e, the value of the previous variable.
Can you confirm please the same is happening in your case ?

I'm not sure we can fix it, unless some more involved regex is used; can you also consider
using query parameters ?

Sergey



> CXFRS doesn't work when there are multiple optional parameters in a @Path annotation
> ------------------------------------------------------------------------------------
>
>                 Key: CXF-3454
>                 URL: https://issues.apache.org/jira/browse/CXF-3454
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.4
>            Reporter: Guillermo Castro
>              Labels: jaxrs
>         Attachments: URITemplateTest.java
>
>
> In JAX-RS you can define custom patterns for path variables, which allows you to define
optional parameters that can be present or not. Currently, CXF only works if you only have
1 optional parameter in the @Path (see test "URITemplateTest.testExpressionWithNestedGroupAndTwoVars2()",
but fails for paths with 2 or more optional parameters.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message