Need info on camel-jcifs

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Need info on camel-jcifs

sakchakravarthi
Hi
I am new to apache camel. Can any one help me in fetching file which is in windows shared path.

1) I tried with shared location which is in my local machine is working fine. as shown below
file:////server/testDst?noop=true
but when serve is remote machine it couldnt fetch the file.

If machine is remote machine is it necessary to use SMB component. If so could anyone please share me the example. I found that it would be like "smb://username@server.com/...?password=***" is password required.
and if I need fetch a specific file how I can configure that.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need info on camel-jcifs

cemmersb
Hi,

First of all, the SMB component is one way to access remote files. Another one would be using FTP. In both cases, either SMB or FTP, the protocol must be supported by the machine you want to access which means that a daemon has to be installed and up and running.

There are few resources that might support you setting up the proper endpoint configuration to access a remote file via SMB:

(a) You can find the component documentation when accessing [1]. There you’ll the URI configuration and the explanation of all parameters:
smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]]]][?options]

(b) You might want to take a look at the source code of JCIFS [2]. There are couple of test cases that simulate the remote access of a SMB file. 
A good example might be the configuration for the FromSmbMoveFileTest.

Hope that these hints help you configuring the JCIFS component correctly. 


On 17 Jun 2014, at 07:09, sakchakravarthi [via camel-extra] <[hidden email]> wrote:

Hi
I am new to apache camel. Can any one help me in fetching file which is in windows shared path.

1) I tried with shared location which is in my local machine is working fine. as shown below
file:////server/testDst?noop=true
but when serve is remote machine it couldnt fetch the file.

If machine is remote machine is it necessary to use SMB component. If so could anyone please share me the example. I found that it would be like "<a href="smb://username@server.com/...?password=***">smb://username@.../...?password=***" is password required.
and if I need fetch a specific file how I can configure that.


If you reply to this email, your message will be added to the discussion below:
http://camel-extra.1091541.n5.nabble.com/Need-info-on-camel-jcifs-tp334.html
To start a new topic under camel-extra, email [hidden email]
To unsubscribe from camel-extra, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need info on camel-jcifs

sakchakravarthi
Hi

Below I feel it would be help full to me but only one thing I want to know whether [[share/[dir/]]]] is a shared directory or any normal directory. If it is normal directory then whether I can create that directory.

smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]]]][?options]

Thanks
Ajit
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need info on camel-jcifs

cemmersb
Hi Ajit,

I still do not have enough information to provide you an appropriate answer. So what are the operating systems where you want to access the files.

Please have also a look at how to setup a smb server for your OS.

Examples:


Kind regards,

Christoph

On 17 Jun 2014, at 12:03, sakchakravarthi [via camel-extra] <[hidden email]> wrote:

Hi

Below I feel it would be help full to me but only one thing I want to know whether [[share/[dir/]]]] is a shared directory or any normal directory. If it is normal directory then whether I can create that directory.

<a href="smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]]]][?options]">smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]]]][?options]

Thanks
Ajit


If you reply to this email, your message will be added to the discussion below:
http://camel-extra.1091541.n5.nabble.com/Need-info-on-camel-jcifs-tp334p338.html
To start a new topic under camel-extra, email [hidden email]
To unsubscribe from camel-extra, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need info on camel-jcifs

Pontus Ullgren
In reply to this post by sakchakravarthi
Hello,

The "share" part of the template uri is the name of the shared directory. If you want to access a sub folder of this shared directory you can also provide the "dir" part of the uri. However this part is optional so if you want to consume or produce file directly in the shared diretory simply leave the dir part out.

So to answer your question the "dir" part is just normal directories within the shared directory. You can create them as needed.
The "share" part of the template URI is the named of the shared directory.

Hope this answers your question.

Best regards
Pontus
Loading...