Try with newer release as I think we have fixed something in this
component, I kinda recall something about this.

On Wed, Apr 5, 2017 at 12:43 PM, Meyfarth, Frank <[email protected]> wrote:
> Hi everyone,
>
> Maybe I’m just to dumb to get it, but I believe I have found a bug in
> camel-cmis.
>
> I use the following URI within a CMIS producer to send a query to the CMIS
> system.
>
> cmis:http://rabobank-air-dev01.test-server.ag:8080/alfresco/api/-default-/p
> ublic/cmis/versions/1.1/atom?username=admin&password=admin&repositoryId=-de
> fault-&queryMode=true
>
> As you can see, the server credentials are present as options within the
> URI.
>
> Unfortunately I always get HTTP code 401 Unauthorized. Although the
> credentials are correct and verified, off course.
>
> I already debugged into the component and found the following code in
> org.apache.camel.component.cmis.CMISComponent:
>
> ...
> 00 protected Endpoint createEndpoint(String uri, final String remaining,
> final Map<String, Object> parameters) throws Exception {
> 01     boolean queryMode = removeQueryMode(parameters);
> 02
> 03     CMISSessionFacade sessionFacade = new CMISSessionFacade(remaining);
> 04     setProperties(sessionFacade, parameters);
> 05
> 06     CMISEndpoint endpoint = new CMISEndpoint(uri, this, new
> CMISSessionFacadeFactory() {
> 07         @Override
> 08         public CMISSessionFacade create() throws Exception {
> 09             CMISSessionFacade sessionFacade = new
> CMISSessionFacade(remaining);
> 10             setProperties(sessionFacade, parameters);
> 11
> 12             return sessionFacade;
> 13         }
> 14     });
> 15
> 16     endpoint.setQueryMode(queryMode);
> 17
> 18     return endpoint;
> 19 }
>
> ...
>
> At the beginning of the method all options are still present in the
> „parameters“ map. After the session facade has been created in line 03 of
> the method its parameters get set by calling „setProperties“. This works
> fine for the created session facade. But „setProperties“ removes the
> properties which have been successfully set from the „parameters“ map.
> Therefore parameters „username“ and „password“ are no longer present after
> execution of line 04. Later, when the „create“ method of the anonymous
> CMISEndpoint created in line 06 gets called, these are still not present
> and therefore NULL. And this is what finally leads to the 401 return code.
>
> Either I use the Endpoint in a wrong way. In that case probably someone
> can explain to me how to use it.
> Or this is actually a bug. In this case I could offer fixing or someone
> else does it. Which would be appreciated.
>
> Best regards and thanks for your help
>
> Frank
>
>
>
>
> --
> Frank Meyfarth
> adesso AG                     T +49 231 7000-2380
> Stockholmer Allee 20          F +49 231 7000-1000
> 44269 Dortmund                E [email protected]
>                               www.adesso.de <http://www.adesso.de>
>                               blog.adesso.de <http://blog.adesso.de>
>
>
> -------------------------------------------------------
>      >>> business. people. technology. <<<
> -------------------------------------------------------
>
> adesso AG mit Sitz in Dortmund
> Vorstand: Michael Kenfenheuer (Vors.), Christoph Junge, Andreas Prenneis
> Vorsitzender des Aufsichtsrates: Prof. Dr. Volker Gruhn
> Amtsgericht Dortmund HRB 20663
>
> https://www.wirmachendasjetzt.de/de/?utm_source=Banner%20&utm_medium=E-Mail&utm_campaign=DGT



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to