Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 10502 invoked from network); 6 Feb 2008 17:15:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2008 17:15:32 -0000 Received: (qmail 76194 invoked by uid 500); 6 Feb 2008 17:15:24 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 76101 invoked by uid 500); 6 Feb 2008 17:15:24 -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 76092 invoked by uid 99); 6 Feb 2008 17:15:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2008 09:15:24 -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; Wed, 06 Feb 2008 17:15:16 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B2263714086 for ; Wed, 6 Feb 2008 09:15:08 -0800 (PST) Message-ID: <10716853.1202318108727.JavaMail.jira@brutus> Date: Wed, 6 Feb 2008 09:15:08 -0800 (PST) From: "James M Snell (JIRA)" To: abdera-dev@incubator.apache.org Subject: [jira] Commented: (ABDERA-101) Issue with collection resolved href? In-Reply-To: <4548797.1202242389764.JavaMail.jira@brutus> 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 [ https://issues.apache.org/jira/browse/ABDERA-101?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1256= 6209#action_12566209 ]=20 James M Snell commented on ABDERA-101: -------------------------------------- I'm not certain, but the change I just checked it might solve this. Please= update and run your tests again. If the problem is not solved, can you pl= ease post a test case that I can use to resolve the issue. > 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 de= velopment team.... > I initialize my provider with a base of "/", which is the default value a= nyway. > My adapters are given a relative href (setHref()) when initialized in the= provider. (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 f= or the actors collection it is now an absolute path ("/actors"). > When IRI.resolve(IRI b, IRI c) is called, c is absolute. My collection th= us returns an href of http://localhost:9002/actors instead of http://localh= ost: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().toStr= ing(), 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= _FEED)) { > assertEquals(getTestBaseURI() + "/" + ImdbConstants.A= CTORS_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.