Hi Andrew, I've checked out the article you mention, the most applicable part I found was the following: "Listing the files in the current directory is handled by the listFiles() method. Note in this example that again we check to make sure that we have the correct type of path.
public String[] listFiles () throws Exception { if(!wdr.isCollection()) throw new Exception ("Path is currently a file"); return wdr.list(); }" ... but no folders :( As for output, my test code just prints out the values of the three arrays I fetch, which contain correct file listings for the path I specify in the setPath() method, as long as I specify a valid path. What other output would help you? To reiterate, I am succesfully connecting to the WebDAV server, but cannot get a list of folders. Is a folder considered a "resource"? - Xavier >>> [EMAIL PROTECTED] 29/06/2005 11:05 am >>> On Wed, Jun 29, 2005 at 10:45:28AM +1000, Xavier Shay wrote: > I am trying to connect to Novell Netstorage, and can get file > listings for an arbitrary folder. > > How can I get a folder listing? I've tried the following code to no > avail: > > // --- START CODE --- > new HttpsURL("https://netstorage/oneNet/netstorage/"); > hrl.setUserinfo("user","pwd"); You haven't included any output from your application to help debug it, so I'll assume you're including the appropriate context NDS context for the user "user". > wdr = new WebdavResource(hrl); > > wdr.setPath("/oneNet/NetStorage/Folder1/"); // I know this folder exists and > has child folders > > // The following 3 methods fetch only subfiles of the current path, not > folders > WebdavResource[] children = wdr.listWebdavResources(); > Vector v = wdr.listBasic(); > String [] folders = wdr.list(); > // --- END CODE --- > > I know I'm just missing something in the API because DAV Explorer > and the novell web interface (which I presume uses WebDAV...) both > get folder listings correctly. I found the ONJava.com artcile "Sliding into WebDAV" to be a particularly useful resource when I was first fiddling about. See http://www.onjava.com/pub/a/onjava/2003/12/23/slide.html for a few pointers. - andrew -- | Andrew Reid [mailto:[EMAIL PROTECTED] | Overworked and Underpaid Network Monkey | C: +61-401-946-813 F: +61-8-8338-2518 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Swinburne University of Technology CRICOS Provider Code: 00111D NOTICE This e-mail and any attachments are confidential and intended only for the use of the addressee. They may contain information that is privileged or protected by copyright. If you are not the intended recipient, any dissemination, distribution, printing, copying or use is strictly prohibited. The University does not warrant that this e-mail and any attachments are secure and there is also a risk that it may be corrupted in transmission. It is your responsibility to check any attachments for viruses or defects before opening them. If you have received this transmission in error, please contact us on +61 3 9214 8000 and delete it immediately from your system. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]