Need help to pick up a file in developing a service.

Posted by Admin on 22-Apr-2010 16:20

Hello All,

I have to pickup a file in the service. If I give the path sonicfs:///pat/to/the/file.txt sonic refuse to recognise the path and look in C:\Sonic\MQ7.6\dev_ESBTest\sonicfs:\pat\to\the\file.txt and giving a file not found error. Please let me know how to invoke a file in a service.

Regards,

Swaroop Kunduru.

All Replies

Posted by tsteinbo on 10-May-2010 06:40

File pickup services just work against the local file system.

If you want to read something from the sonic file system then just use the URL classes, e.g. new Url("sonicfs://...."). url.openConnection(..)..

Thomas

Posted by aparnmu on 12-Jul-2010 00:56

Hi Thomas,

Could you please explain the usage of Url class feature in detail. I mean, how and where to write this piece of code and how to invoke it.

Thanks in advance,

Posted by tsteinbo on 12-Jul-2010 04:26

Take for example http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/networking/urls/readingURL.html but use the sonicfs instead of the http url.

Thomas

This thread is closed