Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 17207 invoked from network); 5 Feb 2008 20:13:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Feb 2008 20:13:33 -0000 Received: (qmail 38836 invoked by uid 500); 5 Feb 2008 20:13:23 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 38756 invoked by uid 500); 5 Feb 2008 20:13:23 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 38726 invoked by uid 99); 5 Feb 2008 20:13:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2008 12:13:23 -0800 X-ASF-Spam-Status: No, hits=-98.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2008 20:13:02 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BB53671406F for ; Tue, 5 Feb 2008 12:13:09 -0800 (PST) Message-ID: <4548797.1202242389764.JavaMail.jira@brutus> Date: Tue, 5 Feb 2008 12:13:09 -0800 (PST) From: "Remy Gendron (JIRA)" To: abdera-dev@incubator.apache.org Subject: [jira] Created: (ABDERA-101) Issue with collection resolved href? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Issue with collection resolved href? ------------------------------------ Key: ABDERA-101 URL: https://issues.apache.org/jira/browse/ABDERA-101 Project: Abdera Issue Type: Bug Affects Versions: 0.3.0 Reporter: Remy Gendron Hi all, Am I missing something here? I'm setting up an example project for the deve= lopment team.... I initialize my provider with a base of "/", which is the default value any= way. My adapters are given a relative href (setHref()) when initialized in the p= rovider. (eg "actors") I start Jetty in my unit tests with an application context of "/imdb". The following unit test fails because when I retrieve the HREF property for= the actors collection it is now an absolute path ("/actors"). When IRI.resolve(IRI b, IRI c) is called, c is absolute. My collection thus= returns an href of http://localhost:9002/actors instead of http://localhos= t:9002/imdb/actors.=20 Here's the thread stack: Thread [main] (Suspended)=09 =09IRI.resolve(IRI, IRI) line: 442=09 =09IRI.resolve(IRI) line: 555=09 =09FOMCollection(FOMElement)._resolve(IRI, IRI) line: 337=09 =09FOMCollection.getResolvedHref() line: 138=09 =09ImdbRestTest.testGetService() line: 43=09 And the unit test: public class ImdbRestTest extends AbstractRestTest { @Test public void testGetService() throws IOException { ClientResponse resp =3D client.get(getTestBaseURI()); assertNotNull(resp); try { assertEquals(200, resp.getStatus()); assertEquals(ResponseType.SUCCESS, resp.getType()); assertTrue(MimeTypeHelper.isMatch(resp.getContentType().toStrin= g(), Constants.APP_MEDIA_TYPE)); Document doc =3D resp.getDocument(); try { // prettyPrint(doc); } catch (Exception e) { } Service service =3D doc.getRoot(); // prettyPrint(service); assertEquals(1, service.getWorkspaces().size()); Workspace workspace =3D service.getWorkspaces().get(0); assertEquals(3, workspace.getCollections().size()); for (Collection collection : workspace.getCollections()) { if (collection.getTitle().startsWith(ImdbConstants.ACTORS_F= EED)) { assertEquals(getTestBaseURI() + "/" + ImdbConstants.ACT= ORS_FEED, collection.getResolvedHref().toString()); } } } finally { resp.release(); } } } R=C3=A9my --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.