You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Matej Kafadar <ma...@setcce.org> on 2004/11/12 11:16:04 UTC
URI reference
Hello,
which URI reference is correct?
example:
I have file in absolute path "c:\work\test.txt"
XMLsec couldn't find the file, if URI looks like
URI="file:///work/test.txt".
The exception is "Original Exception was java.io.FileNotFoundException:
\\work\test.txt (The network path was not found)"
It can find it, if looks like URI="file:///c:/work/test.txt" or
URI="file:/work/test.txt" or URI="file:/c:/work/test.txt".
In my test program, URI resolver can find all references.
public class TestURI {
public static void main(String[] args) {
//URI uri = URI.create("file:///work/test.txt");
//URI uri = URI.create("file:///c:/work/test.txt");
//URI uri = URI.create("file:/c:/work/test.txt");
URI uri = URI.create("file:/work/test.txt");
File f = new File(uri);
System.out.println("exist="+f.exists());
}
}
Why for URI="file:///work/test.txt" XMLsec tries to find file on network
and class TestURI finds it on disk?
Or am I doing something wrong?
Best regards
matej
Re: URI reference
Posted by Matej Kafadar <ma...@setcce.org>.
Hello,
I tested xml signature with URI="file:///work/test.txt" with C++ XMLsec
library and works fine. With Java XMLsec library doesn't work.
What is wrong, or I am doing something wrong?
regards
Matej
Matej Kafadar wrote:
> Hello,
>
> which URI reference is correct?
>
> example:
>
> I have file in absolute path "c:\work\test.txt"
>
> XMLsec couldn't find the file, if URI looks like
> URI="file:///work/test.txt".
> The exception is "Original Exception was java.io.FileNotFoundException:
> \\work\test.txt (The network path was not found)"
>
> It can find it, if looks like URI="file:///c:/work/test.txt" or
> URI="file:/work/test.txt" or URI="file:/c:/work/test.txt".
>
>
> In my test program, URI resolver can find all references.
>
> public class TestURI {
> public static void main(String[] args) {
> //URI uri = URI.create("file:///work/test.txt");
> //URI uri = URI.create("file:///c:/work/test.txt");
> //URI uri = URI.create("file:/c:/work/test.txt");
> URI uri = URI.create("file:/work/test.txt");
> File f = new File(uri);
> System.out.println("exist="+f.exists());
> }
> }
>
>
> Why for URI="file:///work/test.txt" XMLsec tries to find file on network
> and class TestURI finds it on disk?
> Or am I doing something wrong?
>
>
> Best regards
>
> matej
>
>
>
>
>