Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 658F311D04 for ; Thu, 7 Aug 2014 11:02:34 +0000 (UTC) Received: (qmail 15676 invoked by uid 500); 7 Aug 2014 11:02:12 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 15638 invoked by uid 500); 7 Aug 2014 11:02:12 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 15625 invoked by uid 99); 7 Aug 2014 11:02:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Aug 2014 11:02:12 +0000 Date: Thu, 7 Aug 2014 11:02:12 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CXF-5920) JAX-RS Link implementation (LinkBuilder) looses context path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Beryozkin resolved CXF-5920. ----------------------------------- Resolution: Fixed Fix Version/s: 3.1.0 3.0.2 > JAX-RS Link implementation (LinkBuilder) looses context path > -------------------------------------------------------------- > > Key: CXF-5920 > URL: https://issues.apache.org/jira/browse/CXF-5920 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 3.0.1 > Reporter: Ioan Eugen Stan > Assignee: Sergey Beryozkin > Fix For: 3.0.2, 3.1.0 > > > I think I've discovered a bug in CXF, but I'm not sure. Link class > messes links up, and doesn't include servlet and @ApplicationPath > paths from BaseUri: > Description: > - I have CdiServlet deployed at '/rest', > - I have Jax rs @ApplicationPath '/api' > - Account resource at /account > I expect the following code to return links to my resources: > ~~~ > log.info(" -- <<>> {}", uri.getBaseUri()); > return Response.ok().links( > Link.fromResource(AccountResource.class).baseUri(uri.getBaseUri()).rel("account").build(), > Link.fromResource(PlatformResource.class).baseUri(uri.getBaseUri()).rel("self").build() > ).build(); > ~~~ > However, I get this on the client side: > ~~~ > Link=[;rel="self", > ;rel="account"], > ~~~ > And I expected links with full path. like ttp://localhost:9001/rest/api/account > UriInfo returns the correct uri. Link messes it up. > ~~~ > INFO PlatformResource - -- <<>> http://localhost:9001/rest/api > ~~~ -- This message was sent by Atlassian JIRA (v6.2#6252)