Hi

You can maybe also store the bytes in the registry and refer to them
via #myBeanId in the endpoint uri.

On Thu, Aug 29, 2019 at 10:43 PM Shultz, Dmitry
<[email protected]> wrote:
>
> Hi All,
>
> I have an SftpEndpoint, which is configured to use the private key bytes 
> (using SftpConfiguration.setPrivateKey(byte[]),  and the poolEnrich() that is 
> using this endpoint to fetch some file.
>
> The problem I'm facing is that poolEnrich() doesn't accept Endpoint as a 
> parameter (accepts only String), so I have to use  
> SftpEndpoint.getEndpointUri() to pass the url string of configured endpoint. 
> It creates 'safe' URI  with  filename that looks like this:   
> fileName=%24%7Bheader.CamelFileName%7D
> And it seems like poolEnrich().simple(sftpEndpoint.getEndpointUri()) ignores 
> the  filename expression (the wrong file is picked up from sftp), probably 
> because there is  '%24%7' instead of '${'  and '%7D' instead of '}', but I'm 
> not sure.
>
> What would be the good way to make sure the Uri String generated by 
> SftpEndpoint.getEndpointUri() is properly parsed? Or may be there is some way 
> to pass configured Endpoint to poolEnrich?
>
> Cheers,
> Dmitry
>
>
>
>


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

Reply via email to