You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andrzej Michalec (JIRA)" <ji...@apache.org> on 2009/01/19 02:35:59 UTC
[jira] Created: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Incomplete implementations of UriInfo and UriBuilder
----------------------------------------------------
Key: CXF-1991
URL: https://issues.apache.org/jira/browse/CXF-1991
Project: CXF
Issue Type: Bug
Components: REST
Affects Versions: 2.1.3, 2.2
Reporter: Andrzej Michalec
Priority: Minor
Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
cheers,
andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (CXF-1991) Incomplete implementations of
UriInfo and UriBuilder
Posted by amichalec <an...@gmail.com>.
VM for (J)VM? E = VM^2 :)
Seriously, I thought Java portability is also a case for builds/tests. I can
get JAX-RS builds and test on Windows and I can live with w/o linux
emulation :)
cheers,andy
Benson Margulies-4 wrote:
>
> VMware and a copy of linux?
>
--
View this message in context: http://www.nabble.com/Re%3A--jira--Commented%3A-%28CXF-1991%29-Incomplete-implementations-of-UriInfo-and-UriBuilder-tp21555502p21611600.html
Sent from the cxf-dev mailing list archive at Nabble.com.
Re: [jira] Commented: (CXF-1991) Incomplete implementations of UriInfo and UriBuilder
Posted by Benson Margulies <bi...@gmail.com>.
VMware and a copy of linux?
On Mon, Jan 19, 2009 at 7:39 PM, Andrzej Michalec (JIRA) <ji...@apache.org>wrote:
>
> [
> https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665294#action_12665294]
>
> Andrzej Michalec commented on CXF-1991:
> ---------------------------------------
>
> While I can run unit tests from Eclipse, I see problems with systests
> (CreateProcess fails due to too long command line, yeah Windows box). If I
> have to run it maven for it, is there any magic spell to run tests only on
> JAXRS part?
>
> cheers,
> andy
>
> > Incomplete implementations of UriInfo and UriBuilder
> > ----------------------------------------------------
> >
> > Key: CXF-1991
> > URL: https://issues.apache.org/jira/browse/CXF-1991
> > Project: CXF
> > Issue Type: Bug
> > Components: REST
> > Affects Versions: 2.1.3, 2.2
> > Reporter: Andrzej Michalec
> > Priority: Minor
> >
> > Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method)
> or UriInfo.getMatchedResources() are not implemented so far.
> > Since I am have my locally tuned versions of these classes I am going to
> provide patch soon :)
> > cheers,
> > andy.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668625#action_12668625 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
thanks Andy ... I'll get it fixed
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrzej Michalec updated CXF-1991:
----------------------------------
Attachment: cxf-1991_20090128.patch
Here goes next patch 'cxf-1991_20090128.patch' ready to apply on today's head svn revision:
* set of UriBuilder.build*() methods now fully respect current JAX-RS 1.0 spec
* URITemplate was extended with template substitution
Some methods are still TBD - matrix and query parameters; hope I can get there with 3rd and last patch as soon as I got some more clarification from jsr311 users group:)
Sergey, BTW I've found also that URITemplate does not hold when playing with complex regexp for variables matching: simple ones like "{var:\d\d}" are ok but with "{var:.*}" it regexp compilation fails.
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668615#action_12668615 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
Done - see CXF-2014
BTW example with {var:.*} works fine, my bad. The only problem are curly braces ;)
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrzej Michalec updated CXF-1991:
----------------------------------
Attachment: cxf-1991_20090201.patch
And here goes final patch:
* all *query*() methods were fixed due to lack of respect for valid "single param name with multiple values" case (supporting junits added too).
* all *matrix*() methods for matrix params manipulation with same rules as for query URI part (note ability to have "single param with multiple values" due to discussion on jsr311 users group).
Sergey, if you do not find any problems with patch, feel free to close this thread.
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665635#action_12665635 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
OK, I am very close to get stable state (source + unit test + system tests) however I found some weird behavior of current UriBuilderImpl code that impacts new code behavior:
I am not sure what is expected behavior when one of interior path elements has trailing slash (here: "baz/"). It leads to failure of this new test case:
public class UriBuilderImplTest {
@Test
public void testAddPathSlashes() throws Exception {
URI uri = new URI("http://foo/");
URI newUri = new UriBuilderImpl().uri(uri).path("/bar").path("baz/").path("/blah/").build();
assertEquals("URI is not built correctly", new URI("http://foo/bar/baz/blah"), newUri);
}
}
UriBuilderImpl produces here double slash after "baz". It is because internally JAXRSUtils.getPathSegments(String) distinguishes trailing slash and generates empty path segment -- and I am not sure why, since JAX-RS spec says leading/trailing slashes are meaningless, only correct path segments separation is important. Any ideas?
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666198#action_12666198 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
I am working to complete UriBuilderImpl so please keep this issue opened for a while. I will update my svn copy and commit second final patch for this thread.
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666168#action_12666168 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
Hi Andy,
I applied the patch with FixMe tests fixed, thanks again.
Would you like me to close this JIRA or are you thinking of submitting another patch for UriBuilderImpl ? UriInfo implementation is now complete
Cheers, Sergey
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669551#action_12669551 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
Hi Andy - it's a great effort. I'll apply a patch.
I'll keep the issue open for a bit longer though. First, I reckon we actually should not strip matrix params as the spec supports them being located at any path segment - so I can get the code updated , unless you get a chance to revisit this issue at some time - let me know please. I'll also need to fix the issue I've talked about on the cxf-dev list, for UriInfo.getMatchedURI()
Many Thanks
Sergey
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665772#action_12665772 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
Hi Andy
Many thanks for this effort. I'll try to apply the patch asap.
As far as your test is concerned :
URI newUri = new UriBuilderImpl().uri(uri).path("/bar").path("baz/").path("/blah/").build();
assertEquals("URI is not built correctly", new URI("http://foo/bar/baz/blah"), newUri);
java.lang.AssertionError: URI is not built correctly expected:<http://foo/bar/baz/blah> but was:<http://foo/bar/baz//blah/>
I think the last trailing slash in "http://foo/bar/baz//blah/" is actually correct., but there's a bug for 'baz//'.
The last trailing slash can make a difference in matching, for ex
@Path("/bar") void bar() {}
@Path("/bar/") void bar2() {}
/bar/ will match both methods, but bar2() will be chosen as the @Path value has more literal characters (candidates are sorted in descending order for this criteria)
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
> Attachments: cxf-1991_20090121.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665251#action_12665251 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
Hi Andy,
Ok, thanks, it sounds good. So you might want to add a unit test to UriInfoImplTest, and some system test - you might want to update the existing one...
JAXRSInvoker is probably the best place indeed - but as you said - lets get the first implementation and then we'll see where things can be improved
thanks, Sergey
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669667#action_12669667 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
I can try, point me out where should I start and grant me access rights (I cannot start edit this page: http://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+(JSR-311)).
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.1.4, 2.2
>
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CXF-1991) Incomplete implementations
of UriInfo and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669481#action_12669481 ]
amichalec edited comment on CXF-1991 at 2/2/09 12:46 AM:
----------------------------------------------------------------
And here goes final patch:
* all *query*() methods were fixed due to lack of respect for valid "single param name with multiple values" case (supporting junits added too).
* all *matrix*() methods for matrix params manipulation with same rules as for query URI part (note ability to have "single param with multiple values" due to discussion on jsr311 users group).
Note: I've not changed default behavior of many methods that strip matrix params from path segments keeping matrix management separated. Examples:
* building URI from "http://foo;p1=v1/bar" results with "http://foo/bar" -- this is ok for me since matrix params should appear only in final path segment
* adding path "/bar;p1=v1" to "http://foo" causes build() to return "http://foo/bar" - user must explicitly add matrix param in next step(s).
Sergey, if you do not find any problems with patch, feel free to close this thread.
cheers,
andy.
was (Author: amichalec):
And here goes final patch:
* all *query*() methods were fixed due to lack of respect for valid "single param name with multiple values" case (supporting junits added too).
* all *matrix*() methods for matrix params manipulation with same rules as for query URI part (note ability to have "single param with multiple values" due to discussion on jsr311 users group).
Sergey, if you do not find any problems with patch, feel free to close this thread.
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669704#action_12669704 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
Ah, right. It's done now: signed, scanned and sent back via email.
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.1.4, 2.2
>
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669668#action_12669668 ]
Daniel Kulp commented on CXF-1991:
----------------------------------
Andy,
We need an ICLA on file from you to be able to edit the wiki. See the section "Contributor License Agreements" at:
http://www.apache.org/licenses/
(BTW: that is also the first step if voted in as a committer so if you are heading that way, it's a good thing to get done anyway..... ;-)
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.1.4, 2.2
>
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665159#action_12665159 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
I have working set of UriInfo.getMatched*() methods that cooperate with JAXRSInvoker to access to runtime stack of ORIs. I want to also build unit tests for them to solidify code. From short review however I found only unit tests statically using Book/BookStore/etc samples. Is there any good approach to bootstrap JAXRSserver for such cases? Maybe I;ve just overlooked already existing unit tests. Code snippets, or advice appreciated :) (use priv email if preferred)
cheers,
andy
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CXF-1991) Incomplete implementations
of UriInfo and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669667#action_12669667 ]
amichalec edited comment on CXF-1991 at 2/2/09 9:47 AM:
---------------------------------------------------------------
I can try, point me out where should I start and grant me access rights (I cannot start edit this page: http://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+(JSR-311) ).
cheers,
andy.
was (Author: amichalec):
I can try, point me out where should I start and grant me access rights (I cannot start edit this page: http://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+(JSR-311)).
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.1.4, 2.2
>
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665294#action_12665294 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
While I can run unit tests from Eclipse, I see problems with systests (CreateProcess fails due to too long command line, yeah Windows box). If I have to run it maven for it, is there any magic spell to run tests only on JAXRS part?
cheers,
andy
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669559#action_12669559 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
Hi Sergey,
I was following spec's javadoc pointing to this note: http://www.w3.org/DesignIssues/MatrixURIs.html.
JAX-RS spec seems to explicitly point to doc that discusses only subset of implicitly required functionality.
I agree matrix param could be located at any segment; UriBuilder could modify only *current* path segment like this:
new UriBuilderImpl("http://foo").matrixParam("p1","v1").path("bar").matrixParam("p2","v2");
// leads to: http://foo;p1=v1/bar;p2=v2
I will try to find time to look at it, I need more time though ;)
cheers,
andy
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669606#action_12669606 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
Hi Andy - no problems at all - thanks for doing all the hard work
It's the use of @MatrixParam which is problematic in JAXRS. Specifically, it picks up the first matching parameter, irrespectively of what segment it belongs to, last one or some ancestor one. I believe the JAXRS maintenance spec will limit it to the last segment only. PathSegment can be used to analyze matrix params at any given segment...
I agree that the pattern you suggest makes sense, we just need to do one last minor tweak...
Cheers, Sergey
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668486#action_12668486 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
This is awesome. Will take care of applying the send patch now.
> Sergey, BTW I've found also that URITemplate does not hold when playing with complex regexp for variables matching:
> simple ones like "{var:\d\d}" are ok but with "{var:.*}" it regexp compilation fails.
I have a test for expressions like "/{base:base.+}/{tail}", "/books/{bookId:[^/]+?}", "/books/{bookId:...\\.}" plus few others;
I do know that one can't do expressions with '{' and '}', like {var:\d{9}}, one needs to do \d 9 times, I didn't have time to make it rock solid, so looks like a '*' gets into that category.
Can you open a JIRA please if you get a chance ?
Thanks, Sergey
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin reassigned CXF-1991:
-------------------------------------
Assignee: Sergey Beryozkin
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Attachments: cxf-1991_20090121.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665380#action_12665380 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
You can do
mvn test -Dtest=JAXRS*
two tests won't not picked up - AtomClientBookTest and JaxRsJaxWsBookTest - I'll need to rename them so that they start from JAXRS* too. Also, JAXRSContinuations test fails when running with this pattern at init time, for some reasons a private static JAXRSContinuations.BookWorker class is deemed to be a test class...
I've seen CreateProcess failures too on Windows. When it happens I just rerun 'mvn -Peclipse.setup' and then refresh the workspace - and I reckon it actually helps...
Cheers, Sergey
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665091#action_12665091 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
The patch will be welcomed :-) - take your time please.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrzej Michalec updated CXF-1991:
----------------------------------
Attachment: cxf-1991_20090121.patch
Here goes my first patch in this thread (see 'cxf-1991_20090121.patch' attachment) with following notes:
* Formatting led to more content in patch (removal of trailing blanks etc)
* Please double check, could not run full tests on my Windows box (see this discussion: http://www.nabble.com/Failures-of-unit-tests-on-2.2-snapshot-td21506655.html)
* UriBuilderImpl has now complete set of path() methods, some are still not implemented (comming soon I hope); problem with trailing- and double-slashes described earlier is marked as "fixme".
* UriInfoImpl serves now runtime stack informatin -- see getMatched*() methods
cheers,
andy
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
> Attachments: cxf-1991_20090121.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665638#action_12665638 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
Forgot show message:
java.lang.AssertionError: URI is not built correctly expected:<http://foo/bar/baz/blah> but was:<http://foo/bar/baz//blah/>
there is also trailing slash for "blah/" I guess reason is the same. One could normalize URI but it's not the case here (or it is?).
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-1991.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.2
2.1.4
Hi Andy - I got the matrix issue fixed - hopefully you haven't started coding yet :-)
I updated buldPath() to get matrix parameters for all but the last segment added too, while 'matrix' map is still used as the last segment's matrix. When path(String) is called, the last existing segment, if any, gets updated with 'matrix', then matrix is cleared and gets updated from the newly added last segment
If you see any weakness in this solution then please let me know or submit a patch.
By the way - would you be interested in adding a short section to User Guide on how UriBuilder and UriInfo.getMatched* methods can be used ?
I'll update the TODO list on the wiki - very happy to see "UriInfo & UriBuilder" issue done.
Cheers, Sergey
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.1.4, 2.2
>
> Attachments: cxf-1991_20090121.patch, cxf-1991_20090128.patch, cxf-1991_20090201.patch
>
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Andrzej Michalec (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665236#action_12665236 ]
Andrzej Michalec commented on CXF-1991:
---------------------------------------
Hi Sergey,
I was aware of decoupling them and indeed they are already done similar way: JAXRSInvoker recursivelly put on stack ORIs and the stack itself is register insinde inbound Message (uder key being stack's class object; same as other objects, it's mimics of surrounding code doing things this way). From UriInfoImpl side it can extracts stack from Message already passed through constructor -- from this perspective no other changes are introduces on the way from JAXRSInvoker to UriInfoImpl.
I could not find better point of stack generation that invoker itself, since invoker is responsible for lookup for resources -- what's your suggestion? Where is other control point to put ORI on stack?
Or maybe let me finish this unit of work and once patch is submitted you can help me improving it :)
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1991) Incomplete implementations of UriInfo
and UriBuilder
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665171#action_12665171 ]
Sergey Beryozkin commented on CXF-1991:
---------------------------------------
Hi Andy
Can you please update your code to interact with a Message instance instead ? I'd prefer to have JAXRS impl classes be unaware of things like JAXRSInvoker...For ex, we might let people to provide custom invoker implementations, similarly to JAXWS runtime. Rather than having UriInfo be aware of JAXRSInvoker, it would check a message instead, this is a typical pattern in CXF.
For example, in JAXRSInvoker, before an invocation/injection is done, do something like :
message.put("MATCHED_OPERATIONS", oris);
and then in UriInfo you'll do message.get();
At the moment there's no central place for keeping key definitions like MATCHED_OPERATIONS, some of them are kept in JAXRSInInterceptor which is really a wrong place for then. Perhaps it's time to inroduce some JAXRSConstants class.
This way, you can just add some test into JAXRSUtilsTest, or create a new test suite altogether and work with a Message(Impl) only.
In system tests once cam also bootstrap a server, either programmatically or from Spring. See systests/.../jaxrs/JAXRSClientServerBookTest for an example of the former approach and other tests for the example of the latter one
Cheers, Sergey
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.1.3, 2.2
> Reporter: Andrzej Michalec
> Priority: Minor
>
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources() are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch soon :)
> cheers,
> andy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.