You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "geek.shrek" <mi...@yahoo.com> on 2009/09/22 01:22:09 UTC

SMB uri

Hi,

I'm trying to use the apache VFS to get some files with SMB
But I'm having error with the Uri, said "Badly formed URI"


Here's my smb 
sourceFile = fsManager.resolveFile("smb://myshare.mydom.com/mysharefolder/Test/hello.xml",authenticate());

private FileSystemOptions authenticate()
    {
        StaticUserAuthenticator auth = new StaticUserAuthenticator(this.username, this.password, "myDomain"); 
        FileSystemOptions opts = new FileSystemOptions(); 
        try
        {
            DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);
        } 
        catch (FileSystemException e1)
        {
            e1.printStackTrace();
        } 
        return opts;
    }
     

Can someone tell me how to use smb address correctly?

Thanks,

Send instant messages to your online friends http://au.messenger.yahoo.com