Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0BB0218BEF for ; Mon, 11 Jan 2016 17:51:08 +0000 (UTC) Received: (qmail 24431 invoked by uid 500); 11 Jan 2016 17:51:07 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 24372 invoked by uid 500); 11 Jan 2016 17:51:07 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 24355 invoked by uid 99); 11 Jan 2016 17:51:07 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jan 2016 17:51:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6B565C0A6D for ; Mon, 11 Jan 2016 17:51:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.981 X-Spam-Level: X-Spam-Status: No, score=0.981 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id jtJNPQ-Ow0xS for ; Mon, 11 Jan 2016 17:51:00 +0000 (UTC) Received: from plasma6.jpberlin.de (plasma6.jpberlin.de [80.241.56.68]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id EB6C1231DA for ; Mon, 11 Jan 2016 17:50:59 +0000 (UTC) Received: from hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) by plasma.jpberlin.de (Postfix) with ESMTP id A7DA5AEC7C; Mon, 11 Jan 2016 18:50:52 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from plasma.jpberlin.de ([91.198.250.140]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10024) with ESMTP id D5jOHgCE2byM; Mon, 11 Jan 2016 18:50:51 +0100 (CET) Received: from webmail.jpberlin.de (sinatra6.heinlein-hosting.de [91.198.250.42]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fmueller@jpberlin.de) by plasma.jpberlin.de (Postfix) with ESMTPSA id B156AAE360; Mon, 11 Jan 2016 18:50:51 +0100 (CET) Received: from qTh9jJsTdubPX26U9srBT+fxMthzYqvKpKqGQnrQTN4= (edy5VqH+AniyntdOliy+vOHGYx2PHqhL) by webmail.jpberlin.de with HTTP (HTTP/1.1 POST); Mon, 11 Jan 2016 18:50:51 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 11 Jan 2016 18:50:51 +0100 From: =?UTF-8?Q?Florian_M=C3=BCller?= To: "Lu, Wentao" Cc: dev@chemistry.apache.org Subject: RE: Filter to change org.apache.chemistry.opencmis.baseurl does not work on opencmis =?UTF-8?Q?bridge=3F?= In-Reply-To: <095375566B6DA042AF27048A5083FFA639420ED0@KDCBCHMBX1.bchydro.adroot.bchydro.bc.ca> References: <095375566B6DA042AF27048A5083FFA639420D8C@KDCBCHMBX1.bchydro.adroot.bchydro.bc.ca> <56913D7D.7030000@apache.org> <095375566B6DA042AF27048A5083FFA639420ED0@KDCBCHMBX1.bchydro.adroot.bchydro.bc.ca> Message-ID: <03f8478be658c0cd5dcd697f8e8f816f@jpberlin.de> X-Sender: fmui@apache.org User-Agent: RoundCube Webmail Hi Wentao, Yes, that should do it. - Florian > Hi Florian, > > So you mean the base URL string should be > "http://esbserver:1234/cmis/atom/{repositoryId}"? > > > Thanks > Wentao > > -----Original Message----- > From: Florian Müller [mailto:fmui@apache.org] > Sent: 2016, January 09 9:04 AM > To: dev@chemistry.apache.org > Cc: Lu, Wentao > Subject: Re: Filter to change org.apache.chemistry.opencmis.baseurl > does not work on opencmis bridge? > > Hi Wentao, > > Use the placeholder "{repositoryId}" in the base URL for the repository > ID. > > > - Florian > > On 09.01.2016 01:22, Lu, Wentao wrote: >> Hi, >> >> We are currently using opencmis-bridge 0.10. Based on corporate >> policy, all request to CMIS need to go through ESB servers. The high >> level data flow is: client->ESB->OpenCMIS-Bridge->CMIS Server >> >> I am trying to add a filter for atompub to update the >> "org.apache.chemistry.opencmis.baseurl" with ESB base url, the code >> snip as below: >> >> public void doFilter(ServletRequest request, ServletResponse >> response, final FilterChain chain) throws IOException, >> ServletException { >> >> // check for request header >> if (request instanceof HttpServletRequest) { >> HttpServletRequest httpRequest = >> (HttpServletRequest)request; >> String esbURL = httpRequest.getHeader("ESBURL"); >> if (esbURL != null) { >> >> request.setAttribute("org.apache.chemistry.opencmis.baseurl", esbURL); >> } >> } >> >> // call next >> chain.doFilter(request, response); } >> >> Web.xml as below >> >> ESB >> mytest.ESBFilter >> >> >> ESB >> cmisatom >> >> >> However, when I tested it with "ESBURL" header value >> "http://esbserver:1234/cmis/atom", the returned url missed the >> repositoryid part. >> i.e. I send a request http://localhost:7001/cmis/atom and the result >> supposed to return all repositories href as below: >> >> >> DevOS1 >> > href="http://localhost:7001/cmis/atom/DevOS1/children?id=idf_0F1E2D3C- >> 4B5A-6978-8796-A5B4C3D2E1F0"> >> ........................... >> ........................... >> >> DevOS2 >> > href="http://localhost:7001/cmis/atom/DevOS2/children?id=idf_0F1E2D3C- >> 4B5A-6978-8796-A5B4C3D2E1F0"> >> ................... >> >> But in fact, it returns >> >> >> DevOS1 >> > href="http://localhost:7001/cmis/atom/children?id=idf_0F1E2D3C-4B5A-69 >> 78-8796-A5B4C3D2E1F0"> >> ........................... >> ........................... >> >> DevOS2 >> > href="http://localhost:7001/cmis/atom/children?id=idf_0F1E2D3C-4B5A-69 >> 78-8796-A5B4C3D2E1F0"> >> ................... >> >> >> Did I missed something? >> >> Thanks >> Wentao >> >> >> >> ________________________________ >> This email and its attachments are intended solely for the personal >> use of the individual or entity named above. Any use of this >> communication by an unintended recipient is strictly prohibited. If >> you have received this email in error, any publication, use, >> reproduction, disclosure or dissemination of its contents is strictly >> prohibited. Please immediately delete this message and its attachments >> from your computer and servers. We would also appreciate if you would >> contact us by a collect call or return email to notify us of this >> error. Thank you for your cooperation. >> -BCHydroDisclaimerID5.2.8.1541 >>