lookfirst / sardine

an easy to use webdav client for java
Other
579 stars 185 forks source link

List() for a single file on sharepoint server not working #191

Closed on-delete closed 9 years ago

on-delete commented 9 years ago

Hello,

i tried to receive a single DavRessource for a file on a sharepoint server. But this is not working, i always get the error message 404 file not found. But if i perform a list() on the directory of the file, the file is found correctly.

So i don't exactly know, if this is a sharepoint problem, or the sardine api looks for an directory instead of a single file. Because in the response from the sharepoint server it says, that the directory is not found.

I also performed an exists() on the file and it returned true.

lookfirst commented 9 years ago

I'd love to see some debugging output and code examples demonstrating the failure. =)

on-delete commented 9 years ago

Thanks for your answer!

public class Main {

public static void main(String[] args){

    String username = args[0];
    String password = args[1];
    String sharepointUrl = args[2];

    try {
        Sardine sardine = SardineFactory.begin(username, password);

        List<DavResource> ressource = sardine.list(sharepointUrl + "/projects/aquarium/ISODokumentenablage/03%20Mitarbeiterübersicht/");

        for(DavResource res: ressource){
            System.out.println("Filename: " + res.getDisplayName());
        }

        if(sardine.exists(sharepointUrl + "/projects/aquarium/ISODokumentenablage/03%20Mitarbeiterübersicht/Mitarbeiter.xlsx")){
            System.out.println("File found!");

            InputStream is = null;

            is = sardine.get(sharepointUrl + "/projects/aquarium/ISODokumentenablage/03%20Mitarbeiterübersicht/Mitarbeiter.xlsx");
            if (is!= null)
                System.out.println("File has content!");

            List<DavResource> ressourceNew = sardine.list(sharepointUrl + "/projects/aquarium/ISODokumentenablage/03%20Mitarbeiterübersicht/Mitarbeiter.xlsx");

            for(DavResource res : ressourceNew){
                System.out.println("Filename New: " + res.getDisplayName());
            }
        }
    } catch (IOException e) {
        e.printStackTrace();
    }
}   
}

So this is my testcode. As you can see, i want to get an Item called "Mitarbeiterübersicht.xlsx". If i make the list() call on the root folder of this file, it is found correctly. With exists() and get() the same. Except with list() on the file directly. This is the console output:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Dez 22, 2014 7:14:03 PM org.apache.http.impl.auth.HttpAuthenticator generateAuthResponse WARNUNG: NEGOTIATE authentication error: Invalid name provided (Mechanism level: KrbException: Cannot locate default realm) INFO: Filename: 03 Mitarbeiterübersicht INFO: Filename: Mitarbeiter.xlsx INFO: File found! INFO: File has content! Dez 22, 2014 7:14:03 PM org.apache.http.impl.auth.HttpAuthenticator generateAuthResponse WARNUNG: NEGOTIATE authentication error: Invalid name provided (Mechanism level: KrbException: Cannot locate default realm) com.github.sardine.impl.SardineException: Unexpected response (404 NOT FOUND) at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48) at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:40) at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:35) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:218) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160) at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:904) at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:393) at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:360) at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:351) at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:345) at testsardine.Main.main(Main.java:46)

And this is the logging output (i only give you the passage for the list() call on the file)

2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << Last-Modified: Thu, 07 Feb 2013 09:33:02 GMT 2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << ETag: "{3256B546-B3A6-4342-890F-50763809EF77},22" 2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << Server: Microsoft-IIS/7.5 2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << SPRequestGuid: 3b83313b-ff04-451c-b60c-3c42aab1947c 2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << X-SharePointHealthScore: 0 2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << ResourceTag: rt:3256B546-B3A6-4342-890F-50763809EF77@00000000022 2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << Public-Extension: http://schemas.microsoft.com/repl-2 2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << X-Powered-By: ASP.NET 2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << MicrosoftSharePointTeamServices: 14.0.0.6129 2014/12/22 19:15:01:925 MEZ [DEBUG] headers - http-outgoing-0 << X-MS-InvokeApp: 1; RequireReadOnly 2014/12/22 19:15:01:926 MEZ [DEBUG] headers - http-outgoing-0 << Date: Mon, 22 Dec 2014 18:15:02 GMT 2014/12/22 19:15:01:926 MEZ [DEBUG] MainClientExec - Connection can be kept alive indefinitely 2014/12/22 19:15:01:927 MEZ [DEBUG] RequestAddCookies - CookieSpec selected: best-match 2014/12/22 19:15:01:927 MEZ [DEBUG] RequestAddCookies - Cookie [version: 0][name: WSS_KeepSessionAuthenticated][value: {ee6f36c5-06e0-4b83-990e-5cde666ab628}][domain: sharepointurl][path: /][expiry: null] match [(secure)sharepointurl/projects/aquarium/ISODokumentenablage/03 Mitarbeiterübersicht/Mitarbeiter.xlsx] 2014/12/22 19:15:01:927 MEZ [DEBUG] RequestAuthCache - Auth cache not set in the context 2014/12/22 19:15:01:927 MEZ [DEBUG] PoolingHttpClientConnectionManager - Connection request: [route: {s}->sharepointurl][state: username][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20] 2014/12/22 19:15:01:928 MEZ [DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 1][route: {s}->sharepointurl][total kept alive: 0; route allocated: 2 of 2; total allocated: 2 of 20] 2014/12/22 19:15:01:928 MEZ [DEBUG] MainClientExec - Opening connection {s}->sharepointurl 2014/12/22 19:15:01:928 MEZ [DEBUG] HttpClientConnectionOperator - Connecting to sharepointurl 2014/12/22 19:15:01:963 MEZ [DEBUG] HttpClientConnectionOperator - Connection established 141.46.247.121:49646<->194.180.239.23:443 2014/12/22 19:15:01:963 MEZ [DEBUG] MainClientExec - Executing request PROPFIND /projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx HTTP/1.1 2014/12/22 19:15:01:963 MEZ [DEBUG] MainClientExec - Target auth state: SUCCESS 2014/12/22 19:15:01:963 MEZ [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> PROPFIND /projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx HTTP/1.1 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> Depth: 1 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> Content-Type: text/xml; charset=utf-8 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> Content-Length: 99 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> Host: sharepointurl 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> Connection: Keep-Alive 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> User-Agent: Sardine/5.4 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> Cookie: WSS_KeepSessionAuthenticated={ee6f36c5-06e0-4b83-990e-5cde666ab628} 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> Cookie2: $Version=1 2014/12/22 19:15:01:964 MEZ [DEBUG] headers - http-outgoing-1 >> Accept-Encoding: gzip,deflate 2014/12/22 19:15:01:964 MEZ [DEBUG] wire - http-outgoing-1 >> "PROPFIND /projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx HTTP/1.1[\r][\n]" 2014/12/22 19:15:01:964 MEZ [DEBUG] wire - http-outgoing-1 >> "Depth: 1[\r][\n]" 2014/12/22 19:15:01:964 MEZ [DEBUG] wire - http-outgoing-1 >> "Content-Type: text/xml; charset=utf-8[\r][\n]" 2014/12/22 19:15:01:964 MEZ [DEBUG] wire - http-outgoing-1 >> "Content-Length: 99[\r][\n]" 2014/12/22 19:15:01:964 MEZ [DEBUG] wire - http-outgoing-1 >> "Host: sharepointurl[\r][\n]" 2014/12/22 19:15:01:964 MEZ [DEBUG] wire - http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]" 2014/12/22 19:15:01:964 MEZ [DEBUG] wire - http-outgoing-1 >> "User-Agent: Sardine/5.4[\r][\n]" 2014/12/22 19:15:01:964 MEZ [DEBUG] wire - http-outgoing-1 >> "Cookie: WSS_KeepSessionAuthenticated={ee6f36c5-06e0-4b83-990e-5cde666ab628}[\r][\n]" 2014/12/22 19:15:01:964 MEZ [DEBUG] wire - http-outgoing-1 >> "Cookie2: $Version=1[\r][\n]" 2014/12/22 19:15:01:965 MEZ [DEBUG] wire - http-outgoing-1 >> "Accept-Encoding: gzip,deflate[\r][\n]" 2014/12/22 19:15:01:965 MEZ [DEBUG] wire - http-outgoing-1 >> "[\r][\n]" 2014/12/22 19:15:01:965 MEZ [DEBUG] wire - http-outgoing-1 >> "<?xml version="1.0" encoding="UTF-8" standalone="yes"?>" 2014/12/22 19:15:01:981 MEZ [DEBUG] wire - http-outgoing-1 << "HTTP/1.1 401 Unauthorized[\r][\n]" 2014/12/22 19:15:01:981 MEZ [DEBUG] wire - http-outgoing-1 << "Server: Microsoft-IIS/7.5[\r][\n]" 2014/12/22 19:15:01:981 MEZ [DEBUG] wire - http-outgoing-1 << "SPRequestGuid: dae6600e-f71a-4bf2-ade1-5717d34c8fe8[\r][\n]" 2014/12/22 19:15:01:981 MEZ [DEBUG] wire - http-outgoing-1 << "WWW-Authenticate: Negotiate[\r][\n]" 2014/12/22 19:15:01:981 MEZ [DEBUG] wire - http-outgoing-1 << "WWW-Authenticate: NTLM[\r][\n]" 2014/12/22 19:15:01:981 MEZ [DEBUG] wire - http-outgoing-1 << "X-Powered-By: ASP.NET[\r][\n]" 2014/12/22 19:15:01:982 MEZ [DEBUG] wire - http-outgoing-1 << "MicrosoftSharePointTeamServices: 14.0.0.6129[\r][\n]" 2014/12/22 19:15:01:982 MEZ [DEBUG] wire - http-outgoing-1 << "X-MS-InvokeApp: 1; RequireReadOnly[\r][\n]" 2014/12/22 19:15:01:982 MEZ [DEBUG] wire - http-outgoing-1 << "Date: Mon, 22 Dec 2014 18:15:02 GMT[\r][\n]" 2014/12/22 19:15:01:982 MEZ [DEBUG] wire - http-outgoing-1 << "Content-Length: 0[\r][\n]" 2014/12/22 19:15:01:982 MEZ [DEBUG] wire - http-outgoing-1 << "[\r][\n]" 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << HTTP/1.1 401 Unauthorized 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << Server: Microsoft-IIS/7.5 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << SPRequestGuid: dae6600e-f71a-4bf2-ade1-5717d34c8fe8 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << WWW-Authenticate: Negotiate 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << WWW-Authenticate: NTLM 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << X-Powered-By: ASP.NET 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << MicrosoftSharePointTeamServices: 14.0.0.6129 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << X-MS-InvokeApp: 1; RequireReadOnly 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << Date: Mon, 22 Dec 2014 18:15:02 GMT 2014/12/22 19:15:01:982 MEZ [DEBUG] headers - http-outgoing-1 << Content-Length: 0 2014/12/22 19:15:01:982 MEZ [DEBUG] MainClientExec - Connection can be kept alive indefinitely 2014/12/22 19:15:01:983 MEZ [DEBUG] HttpAuthenticator - Authentication required 2014/12/22 19:15:01:983 MEZ [DEBUG] HttpAuthenticator - sharepointurl requested authentication 2014/12/22 19:15:01:983 MEZ [DEBUG] TargetAuthenticationStrategy - Authentication schemes in the order of preference: [negotiate, Kerberos, NTLM, Digest, Basic] 2014/12/22 19:15:01:983 MEZ [DEBUG] SPNegoScheme - Received challenge '' from the auth server 2014/12/22 19:15:01:983 MEZ [DEBUG] TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available 2014/12/22 19:15:01:983 MEZ [DEBUG] TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available 2014/12/22 19:15:01:983 MEZ [DEBUG] TargetAuthenticationStrategy - Challenge for Basic authentication scheme not available 2014/12/22 19:15:01:983 MEZ [DEBUG] HttpAuthenticator - Selected authentication options: [NEGOTIATE, NTLM] 2014/12/22 19:15:01:983 MEZ [DEBUG] MainClientExec - Executing request PROPFIND /projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx HTTP/1.1 2014/12/22 19:15:01:983 MEZ [DEBUG] MainClientExec - Target auth state: CHALLENGED 2014/12/22 19:15:01:983 MEZ [DEBUG] HttpAuthenticator - Generating response to an authentication challenge using Negotiate scheme 2014/12/22 19:15:01:983 MEZ [DEBUG] SPNegoScheme - init sharepointurl 2014/12/22 19:15:02:018 MEZ [WARN] HttpAuthenticator - NEGOTIATE authentication error: Invalid name provided (Mechanism level: KrbException: Cannot locate default realm) 2014/12/22 19:15:02:018 MEZ [DEBUG] HttpAuthenticator - Generating response to an authentication challenge using ntlm scheme 2014/12/22 19:15:02:019 MEZ [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> PROPFIND /projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx HTTP/1.1 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> Depth: 1 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> Content-Type: text/xml; charset=utf-8 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> Content-Length: 99 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> Host: sharepointurl 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> Connection: Keep-Alive 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> User-Agent: Sardine/5.4 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> Cookie: WSS_KeepSessionAuthenticated={ee6f36c5-06e0-4b83-990e-5cde666ab628} 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> Cookie2: $Version=1 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> Accept-Encoding: gzip,deflate 2014/12/22 19:15:02:019 MEZ [DEBUG] headers - http-outgoing-1 >> Authorization: NTLM TlRMTVNTUAABAAAAAYIIogAAAAAoAAAAAAAAACgAAAAFASgKAAAADw== 2014/12/22 19:15:02:019 MEZ [DEBUG] wire - http-outgoing-1 >> "PROPFIND /projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx HTTP/1.1[\r][\n]" 2014/12/22 19:15:02:019 MEZ [DEBUG] wire - http-outgoing-1 >> "Depth: 1[\r][\n]" 2014/12/22 19:15:02:019 MEZ [DEBUG] wire - http-outgoing-1 >> "Content-Type: text/xml; charset=utf-8[\r][\n]" 2014/12/22 19:15:02:019 MEZ [DEBUG] wire - http-outgoing-1 >> "Content-Length: 99[\r][\n]" 2014/12/22 19:15:02:020 MEZ [DEBUG] wire - http-outgoing-1 >> "Host: sharepointurl[\r][\n]" 2014/12/22 19:15:02:020 MEZ [DEBUG] wire - http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]" 2014/12/22 19:15:02:020 MEZ [DEBUG] wire - http-outgoing-1 >> "User-Agent: Sardine/5.4[\r][\n]" 2014/12/22 19:15:02:020 MEZ [DEBUG] wire - http-outgoing-1 >> "Cookie: WSS_KeepSessionAuthenticated={ee6f36c5-06e0-4b83-990e-5cde666ab628}[\r][\n]" 2014/12/22 19:15:02:020 MEZ [DEBUG] wire - http-outgoing-1 >> "Cookie2: $Version=1[\r][\n]" 2014/12/22 19:15:02:020 MEZ [DEBUG] wire - http-outgoing-1 >> "Accept-Encoding: gzip,deflate[\r][\n]" 2014/12/22 19:15:02:020 MEZ [DEBUG] wire - http-outgoing-1 >> "Authorization: NTLM TlRMTVNTUAABAAAAAYIIogAAAAAoAAAAAAAAACgAAAAFASgKAAAADw==[\r][\n]" 2014/12/22 19:15:02:020 MEZ [DEBUG] wire - http-outgoing-1 >> "[\r][\n]" 2014/12/22 19:15:02:020 MEZ [DEBUG] wire - http-outgoing-1 >> "<?xml version="1.0" encoding="UTF-8" standalone="yes"?>" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "HTTP/1.1 401 Unauthorized[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "Server: Microsoft-IIS/7.5[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "SPRequestGuid: 76036890-ae64-4790-ae8e-596b1b6edd6c[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "WWW-Authenticate: NTLM TlRMTVNTUAACAAAADAAMADgAAAAFgomiNr6RgopQLoAAAAAAAAAAAIAAgABEAAAABgGxHQAAAA9TAEEAWABTAFkAUwACAAwAUwBBAFgAUwBZAFMAAQAMAFYATQBNAFMAUwAxAAQAEgBzAGEAeABzAHkAcwAuAGQAZQADACAAdgBtAG0AcwBzADEALgBzAGEAeABzAHkAcwAuAGQAZQAFABIAcwBhAHgAcwB5AHMALgBkAGUABwAIAFmzfzQTHtABAAAAAA==[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "WWW-Authenticate: Negotiate[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "X-Powered-By: ASP.NET[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "MicrosoftSharePointTeamServices: 14.0.0.6129[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "X-MS-InvokeApp: 1; RequireReadOnly[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "Date: Mon, 22 Dec 2014 18:15:02 GMT[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "Content-Length: 0[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] wire - http-outgoing-1 << "[\r][\n]" 2014/12/22 19:15:02:039 MEZ [DEBUG] headers - http-outgoing-1 << HTTP/1.1 401 Unauthorized 2014/12/22 19:15:02:040 MEZ [DEBUG] headers - http-outgoing-1 << Server: Microsoft-IIS/7.5 2014/12/22 19:15:02:040 MEZ [DEBUG] headers - http-outgoing-1 << SPRequestGuid: 76036890-ae64-4790-ae8e-596b1b6edd6c 2014/12/22 19:15:02:040 MEZ [DEBUG] headers - http-outgoing-1 << WWW-Authenticate: NTLM TlRMTVNTUAACAAAADAAMADgAAAAFgomiNr6RgopQLoAAAAAAAAAAAIAAgABEAAAABgGxHQAAAA9TAEEAWABTAFkAUwACAAwAUwBBAFgAUwBZAFMAAQAMAFYATQBNAFMAUwAxAAQAEgBzAGEAeABzAHkAcwAuAGQAZQADACAAdgBtAG0AcwBzADEALgBzAGEAeABzAHkAcwAuAGQAZQAFABIAcwBhAHgAcwB5AHMALgBkAGUABwAIAFmzfzQTHtABAAAAAA== 2014/12/22 19:15:02:040 MEZ [DEBUG] headers - http-outgoing-1 << WWW-Authenticate: Negotiate 2014/12/22 19:15:02:040 MEZ [DEBUG] headers - http-outgoing-1 << X-Powered-By: ASP.NET 2014/12/22 19:15:02:040 MEZ [DEBUG] headers - http-outgoing-1 << MicrosoftSharePointTeamServices: 14.0.0.6129 2014/12/22 19:15:02:040 MEZ [DEBUG] headers - http-outgoing-1 << X-MS-InvokeApp: 1; RequireReadOnly 2014/12/22 19:15:02:040 MEZ [DEBUG] headers - http-outgoing-1 << Date: Mon, 22 Dec 2014 18:15:02 GMT 2014/12/22 19:15:02:040 MEZ [DEBUG] headers - http-outgoing-1 << Content-Length: 0 2014/12/22 19:15:02:040 MEZ [DEBUG] MainClientExec - Connection can be kept alive indefinitely 2014/12/22 19:15:02:040 MEZ [DEBUG] HttpAuthenticator - Authentication required 2014/12/22 19:15:02:040 MEZ [DEBUG] HttpAuthenticator - sharepointurl requested authentication 2014/12/22 19:15:02:040 MEZ [DEBUG] HttpAuthenticator - Authorization challenge processed 2014/12/22 19:15:02:040 MEZ [DEBUG] MainClientExec - Executing request PROPFIND /projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx HTTP/1.1 2014/12/22 19:15:02:040 MEZ [DEBUG] MainClientExec - Target auth state: HANDSHAKE 2014/12/22 19:15:02:041 MEZ [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> PROPFIND /projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx HTTP/1.1 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> Depth: 1 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> Content-Type: text/xml; charset=utf-8 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> Content-Length: 99 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> Host: sharepointurl 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> Connection: Keep-Alive 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> User-Agent: Sardine/5.4 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> Cookie: WSS_KeepSessionAuthenticated={ee6f36c5-06e0-4b83-990e-5cde666ab628} 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> Cookie2: $Version=1 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> Accept-Encoding: gzip,deflate 2014/12/22 19:15:02:041 MEZ [DEBUG] headers - http-outgoing-1 >> Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEgAAACwALAAYAAAAAAAAAAQAQAAGAAYABABAAAAAAAAKAEAAAAAAAAoAQAABYKIogUBKAoAAAAPbDPEaJnBzrniq9PDYnv+LYzNTTUPepaXARENpgsBJOgJSW5wfjS0SwEBAAAAAAAAkNgPNBMe0AGBNgrZ+k4zhwAAAAACAAwAUwBBAFgAUwBZAFMAAQAMAFYATQBNAFMAUwAxAAQAEgBzAGEAeABzAHkAcwAuAGQAZQADACAAdgBtAG0AcwBzADEALgBzAGEAeABzAHkAcwAuAGQAZQAFABIAcwBhAHgAcwB5AHMALgBkAGUABwAIAFmzfzQTHtABAAAAAAAAAABhAG4AZAByAGUALgBrAHIAYQB1AHMAZQA= 2014/12/22 19:15:02:041 MEZ [DEBUG] wire - http-outgoing-1 >> "PROPFIND /projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx HTTP/1.1[\r][\n]" 2014/12/22 19:15:02:041 MEZ [DEBUG] wire - http-outgoing-1 >> "Depth: 1[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "Content-Type: text/xml; charset=utf-8[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "Content-Length: 99[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "Host: sharepointurl[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "User-Agent: Sardine/5.4[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "Cookie: WSS_KeepSessionAuthenticated={ee6f36c5-06e0-4b83-990e-5cde666ab628}[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "Cookie2: $Version=1[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "Accept-Encoding: gzip,deflate[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEgAAACwALAAYAAAAAAAAAAQAQAAGAAYABABAAAAAAAAKAEAAAAAAAAoAQAABYKIogUBKAoAAAAPbDPEaJnBzrniq9PDYnv+LYzNTTUPepaXARENpgsBJOgJSW5wfjS0SwEBAAAAAAAAkNgPNBMe0AGBNgrZ+k4zhwAAAAACAAwAUwBBAFgAUwBZAFMAAQAMAFYATQBNAFMAUwAxAAQAEgBzAGEAeABzAHkAcwAuAGQAZQADACAAdgBtAG0AcwBzADEALgBzAGEAeABzAHkAcwAuAGQAZQAFABIAcwBhAHgAcwB5AHMALgBkAGUABwAIAFmzfzQTHtABAAAAAAAAAABhAG4AZAByAGUALgBrAHIAYQB1AHMAZQA=[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "[\r][\n]" 2014/12/22 19:15:02:042 MEZ [DEBUG] wire - http-outgoing-1 >> "<?xml version="1.0" encoding="UTF-8" standalone="yes"?>" 2014/12/22 19:15:02:074 MEZ [DEBUG] wire - http-outgoing-1 << "HTTP/1.1 404 NOT FOUND[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "Cache-Control: private,max-age=0[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "Content-Length: 0[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "Expires: Sun, 07 Dec 2014 18:15:02 GMT[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "Server: Microsoft-IIS/7.5[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "SPRequestGuid: a7b368f2-74c1-445a-8ff4-9dfc00348660[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "X-SharePointHealthScore: 0[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "Public-Extension: http://schemas.microsoft.com/repl-2[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "X-MSDAVEXT_Error: 589831; Der%20Ordner%2c%20der%20der%20URL%20%22ISODokumentenablage%2f03%20Mitarbeiter%c3%bcbersicht%2fMitarbeiter%2exlsx%22%20entsprechen%20w%c3%bcrde%2c%20ist%20auf%20diesem%20Server%20nicht%20vorhanden%2e[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "Persistent-Auth: true[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "X-Powered-By: ASP.NET[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "MicrosoftSharePointTeamServices: 14.0.0.6129[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "X-MS-InvokeApp: 1; RequireReadOnly[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "Date: Mon, 22 Dec 2014 18:15:02 GMT[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] wire - http-outgoing-1 << "[\r][\n]" 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << HTTP/1.1 404 NOT FOUND 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << Cache-Control: private,max-age=0 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << Content-Length: 0 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << Expires: Sun, 07 Dec 2014 18:15:02 GMT 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << Server: Microsoft-IIS/7.5 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << SPRequestGuid: a7b368f2-74c1-445a-8ff4-9dfc00348660 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << X-SharePointHealthScore: 0 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << Public-Extension: http://schemas.microsoft.com/repl-2 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << X-MSDAVEXT_Error: 589831; Der%20Ordner%2c%20der%20der%20URL%20%22ISODokumentenablage%2f03%20Mitarbeiter%c3%bcbersicht%2fMitarbeiter%2exlsx%22%20entsprechen%20w%c3%bcrde%2c%20ist%20auf%20diesem%20Server%20nicht%20vorhanden%2e 2014/12/22 19:15:02:075 MEZ [DEBUG] headers - http-outgoing-1 << Persistent-Auth: true 2014/12/22 19:15:02:076 MEZ [DEBUG] headers - http-outgoing-1 << X-Powered-By: ASP.NET 2014/12/22 19:15:02:076 MEZ [DEBUG] headers - http-outgoing-1 << MicrosoftSharePointTeamServices: 14.0.0.6129 2014/12/22 19:15:02:076 MEZ [DEBUG] headers - http-outgoing-1 << X-MS-InvokeApp: 1; RequireReadOnly 2014/12/22 19:15:02:076 MEZ [DEBUG] headers - http-outgoing-1 << Date: Mon, 22 Dec 2014 18:15:02 GMT 2014/12/22 19:15:02:076 MEZ [DEBUG] MainClientExec - Connection can be kept alive indefinitely 2014/12/22 19:15:02:076 MEZ [DEBUG] HttpAuthenticator - Authentication succeeded 2014/12/22 19:15:02:076 MEZ [DEBUG] PoolingHttpClientConnectionManager - Connection [id: 1][route: {s}->sharepointurl][state: username] can be kept alive indefinitely 2014/12/22 19:15:02:076 MEZ [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 1][route: {s}->sharepointurl][state: username][total kept alive: 1; route allocated: 2 of 2; total allocated: 2 of 20] 2014/12/22 19:15:02:076 MEZ [DEBUG] MainClientExec - Cancelling request execution

lookfirst commented 9 years ago

Try encoding the ü?

on-delete commented 9 years ago

Just tried it with %FC in the link for the ü, bot it throws the same error. In this case, it would also throw the error at the exists() method, so this can not be the problem.

lookfirst commented 9 years ago

I see in the log output above, that the ü is being encoded to this: 03%20Mitarbeiter%C3%BCbersicht

%BC, not %FC

lookfirst commented 9 years ago

I don't think this is a sardine issue. It is something with the way that you're sending the request to the server.

lookfirst commented 9 years ago

Try with a filename that doesn't have any spaces or non basic ascii characters. Get the simplest case working first. =)

on-delete commented 9 years ago

Cannot avoid the use of the space character (%20) because the folder structure in our sharepoint is like that.

I dont think that a not well formated url string is a problem in this case, because then the exists() method would also cause this 404 error.

lookfirst commented 9 years ago

The ü actually encodes to this: %C3%BC

on-delete commented 9 years ago

Just tried it with this:

List<DavResource> ressourceNew = sardine.list(sharepointUrl + "/projects/aquarium/ISODokumentenablage/03%20Mitarbeiter%C3%BCbersicht/Mitarbeiter.xlsx");

Same problem.

on-delete commented 9 years ago

any new idea for my problem? :)

lookfirst commented 9 years ago

As I said above, try to get the easiest case working first. Then start adding edges.

on-delete commented 9 years ago

I already tried it with simple links. If this would be the problem, then the get() would also not work.

lookfirst commented 9 years ago

The only log and code output that I've seen is what you've shown above. I can't read your mind and I'm not sitting there next to you to help you. So, until you give full details for things, I'm sorry, there isn't much I can do to help you.

Since this is now turning into a discussion and less of a bug report, I'm going to close this issue and if you'd like to try to bring this up on the sardine google group (or stack overflow) to get outside help, you are welcome to do so.