No properties on REPORT response?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

No properties on REPORT response?

Mario Danic
Sorry, but it looks like I’ll have many questions over the coming days…

curl -u username:pass -X REPORT http://xyz/nextcloud/remote.php/dav/files/mario/ --data '<?xml version="1.0" encoding="UTF-8"?><oc:filter-files xmlns:oc="http://owncloud.org/ns"><oc:filter-rules><oc:favorite>1</oc:favorite></oc:filter-rules><D:prop xmlns:D="DAV:"><D:resourcetype/><favorite xmlns="http://owncloud.org/ns"/><D:getlastmodified/><size xmlns="http://owncloud.org/ns"/><D:creationdate/><id xmlns="http://owncloud.org/ns"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns="http://owncloud.org/ns"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></oc:filter-files>’

This returns all properties properly. This query was extracted from what I’ve written in Java using Jackrabbit Webdav.

Unfortunately when using Jackrabbit Webdav, I get only HREF, and all properties are missing.

Any ideas?

Cheers,
Mario


Reply | Threaded
Open this post in threaded view
|

Re: No properties on REPORT response?

Clay Ferguson
Mario,
That looks a bit too scary for the command line:

try this:
http://stackoverflow.com/questions/6408904/send-post-request-with-data-specified-in-file-via-curl

Best regards,
Clay Ferguson
[hidden email]


On Mon, Mar 6, 2017 at 3:04 PM, Mario Danic <[hidden email]> wrote:

> Sorry, but it looks like I’ll have many questions over the coming days…
>
> curl -u username:pass -X REPORT http://xyz/nextcloud/remote.
> php/dav/files/mario/ --data '<?xml version="1.0"
> encoding="UTF-8"?><oc:filter-files xmlns:oc="http://owncloud.org/ns
> "><oc:filter-rules><oc:favorite>1</oc:favorite></oc:filter-rules><D:prop
> xmlns:D="DAV:"><D:resourcetype/><favorite xmlns="http://owncloud.org/ns"/><D:getlastmodified/><size
> xmlns="http://owncloud.org/ns"/><D:creationdate/><id xmlns="
> http://owncloud.org/ns"/><D:getcontentlength/><D:displayname/><D:quota-
> available-bytes/><D:getetag/><permissions xmlns="http://owncloud.org/ns"
> /><D:quota-used-bytes/><D:getcontenttype/></D:prop></oc:filter-files>’
>
> This returns all properties properly. This query was extracted from what
> I’ve written in Java using Jackrabbit Webdav.
>
> Unfortunately when using Jackrabbit Webdav, I get only HREF, and all
> properties are missing.
>
> Any ideas?
>
> Cheers,
> Mario
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: No properties on REPORT response?

Julian Reschke
In reply to this post by Mario Danic
On 2017-03-06 22:04, Mario Danic wrote:

> Sorry, but it looks like I’ll have many questions over the coming days…
>
> curl -u username:pass -X REPORT http://xyz/nextcloud/remote.php/dav/files/mario/ --data '<?xml version="1.0" encoding="UTF-8"?><oc:filter-files xmlns:oc="http://owncloud.org/ns"><oc:filter-rules><oc:favorite>1</oc:favorite></oc:filter-rules><D:prop xmlns:D="DAV:"><D:resourcetype/><favorite xmlns="http://owncloud.org/ns"/><D:getlastmodified/><size xmlns="http://owncloud.org/ns"/><D:creationdate/><id xmlns="http://owncloud.org/ns"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns="http://owncloud.org/ns"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></oc:filter-files>’
>
> This returns all properties properly. This query was extracted from what I’ve written in Java using Jackrabbit Webdav.
>
> Unfortunately when using Jackrabbit Webdav, I get only HREF, and all properties are missing.
>
> Any ideas?
>
> Cheers,
> Mario

Unless I'm missing something, you're using a REPORT specific to owncloud
(oc:filter-rules). It's not implemented in Jackrabbit by default, so in
theory it should fail with a 4xx response.

Best regards, Julian

Reply | Threaded
Open this post in threaded view
|

Re: No properties on REPORT response?

Mario Danic
I’m building my own document so it does not fail (I now do same for search, which works absolutely brilliant).

The issue is that I only get HREF back when using REPORT, and the statusMap seems empty...

On 7 March 2017 at 07:46:18, Julian Reschke ([hidden email]) wrote:

On 2017-03-06 22:04, Mario Danic wrote:  

> Sorry, but it looks like I’ll have many questions over the coming days…  
>  
> curl -u username:pass -X REPORT http://xyz/nextcloud/remote.php/dav/files/mario/ --data '<?xml version="1.0" encoding="UTF-8"?><oc:filter-files xmlns:oc="http://owncloud.org/ns"><oc:filter-rules><oc:favorite>1</oc:favorite></oc:filter-rules><D:prop xmlns:D="DAV:"><D:resourcetype/><favorite xmlns="http://owncloud.org/ns"/><D:getlastmodified/><size xmlns="http://owncloud.org/ns"/><D:creationdate/><id xmlns="http://owncloud.org/ns"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns="http://owncloud.org/ns"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></oc:filter-files>’  
>  
> This returns all properties properly. This query was extracted from what I’ve written in Java using Jackrabbit Webdav.  
>  
> Unfortunately when using Jackrabbit Webdav, I get only HREF, and all properties are missing.  
>  
> Any ideas?  
>  
> Cheers,  
> Mario  

Unless I'm missing something, you're using a REPORT specific to owncloud  
(oc:filter-rules). It's not implemented in Jackrabbit by default, so in  
theory it should fail with a 4xx response.  

Best regards, Julian  

Reply | Threaded
Open this post in threaded view
|

Re: No properties on REPORT response?

Julian Reschke
On 2017-03-07 10:31, Mario Danic wrote:
> I’m building my own document so it does not fail (I now do same for search, which works absolutely brilliant).
> ...

What do you mean by "I'm building my own document"?

The key question is: where's the implementation of the report
"oc:filter-files"? It's certainly not in Jackrabbit...

Best regards, Julian
Reply | Threaded
Open this post in threaded view
|

Re: No properties on REPORT response?

Mario Danic
This is the query I generate via Jackrabbit, and this works via curl.

<?xml version="1.0" encoding="UTF-8"?><oc:filter-files xmlns:oc="http://owncloud.org/ns"><oc:filter-rules><oc:favorite>1</oc:favorite></oc:filter-rules><D:prop xmlns:D="DAV:"><D:resourcetype/><favorite xmlns="http://owncloud.org/ns"/><D:getlastmodified/><size xmlns="http://owncloud.org/ns"/><D:creationdate/><id xmlns="http://owncloud.org/ns"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns="http://owncloud.org/ns"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></oc:filter-files>

This is the way I do this:

ReportInfo reportInfo = new ReportInfo(FilesMultiGetReport.FILES_MULTI_GET, DavConstants.DEPTH_INFINITY, WebdavUtils.getAllPropSet());
/// assemble an Element, and do a setContentElement on reportInfo
query = new ReportMethod(WebdavEntry.NAMESPACE_OC, reportInfo);
Run the query.


I get the responses back, but unfortunately statusMap is empty (and it shouldn’t be, because the server reports all properly, as evidenced by Curl).

Appreciate the help btw.

On 7 March 2017 at 11:16:13, Julian Reschke ([hidden email]) wrote:

On 2017-03-07 10:31, Mario Danic wrote:
> I’m building my own document so it does not fail (I now do same for search, which works absolutely brilliant).
> ...

What do you mean by "I'm building my own document"?

The key question is: where's the implementation of the report
"oc:filter-files"? It's certainly not in Jackrabbit...

Best regards, Julian
Reply | Threaded
Open this post in threaded view
|

Re: No properties on REPORT response?

Julian Reschke
Thanks for the details.

I still don't understand however why you expect Jackrabbit to know about
a REPORT that seems to be specific to Owncloud.

What server are you testing with?

Best regards, Julian

On 2017-03-07 12:10, Mario Danic wrote:

> This is the query I generate via Jackrabbit, and this works via curl.
>
> <?xml version="1.0" encoding="UTF-8"?><oc:filter-files
> xmlns:oc="http://owncloud.org/ns"><oc:filter-rules><oc:favorite>1</oc:favorite></oc:filter-rules><D:prop
> xmlns:D="DAV:"><D:resourcetype/><favorite
> xmlns="http://owncloud.org/ns"/><D:getlastmodified/><size
> xmlns="http://owncloud.org/ns"/><D:creationdate/><id
> xmlns="http://owncloud.org/ns"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions
> xmlns="http://owncloud.org/ns"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></oc:filter-files>
>
> This is the way I do this:
>
> ReportInfo reportInfo = new ReportInfo(FilesMultiGetReport.FILES_MULTI_GET, DavConstants.DEPTH_INFINITY, WebdavUtils.getAllPropSet());
>
> /// assemble an Element, and do a setContentElement on reportInfo
>
> query = new ReportMethod(WebdavEntry.NAMESPACE_OC, reportInfo);
>
> Run the query.
>
>
>
> I get the responses back, but unfortunately statusMap is empty (and it
> shouldn’t be, because the server reports all properly, as evidenced by
> Curl).
>
> Appreciate the help btw.
>
> On 7 March 2017 at 11:16:13, Julian Reschke ([hidden email]
> <mailto:[hidden email]>) wrote:
>
>> On 2017-03-07 10:31, Mario Danic wrote:
>> > I’m building my own document so it does not fail (I now do same for search, which works absolutely brilliant).
>> > ...
>>
>> What do you mean by "I'm building my own document"?
>>
>> The key question is: where's the implementation of the report
>> "oc:filter-files"? It's certainly not in Jackrabbit...
>>
>> Best regards, Julian

Reply | Threaded
Open this post in threaded view
|

Re: No properties on REPORT response?

Mario Danic
In reply to this post by Mario Danic
Well, since the response is pretty basic and seems to be what MultiStatus should map to 

 <!ELEMENT propstat (prop, status, responsedescription?) >
I would have assumed it’d map things properly?

Any idea where to look for extending Jackrabbit webdav to work?

(Server is public, so would rather not post here about it)

On 7 March 2017 at 12:29:57, Julian Reschke ([hidden email]) wrote:

Thanks for the details.  

I still don't understand however why you expect Jackrabbit to know about  
a REPORT that seems to be specific to Owncloud.  

What server are you testing with?  

Best regards, Julian  

On 2017-03-07 12:10, Mario Danic wrote:  

> This is the query I generate via Jackrabbit, and this works via curl.  
>  
> <?xml version="1.0" encoding="UTF-8"?><oc:filter-files  
> xmlns:oc="http://owncloud.org/ns"><oc:filter-rules><oc:favorite>1</oc:favorite></oc:filter-rules><D:prop  
> xmlns:D="DAV:"><D:resourcetype/><favorite  
> xmlns="http://owncloud.org/ns"/><D:getlastmodified/><size  
> xmlns="http://owncloud.org/ns"/><D:creationdate/><id  
> xmlns="http://owncloud.org/ns"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions  
> xmlns="http://owncloud.org/ns"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></oc:filter-files>  
>  
> This is the way I do this:  
>  
> ReportInfo reportInfo = new ReportInfo(FilesMultiGetReport.FILES_MULTI_GET, DavConstants.DEPTH_INFINITY, WebdavUtils.getAllPropSet());  
>  
> /// assemble an Element, and do a setContentElement on reportInfo  
>  
> query = new ReportMethod(WebdavEntry.NAMESPACE_OC, reportInfo);  
>  
> Run the query.  
>  
>  
>  
> I get the responses back, but unfortunately statusMap is empty (and it  
> shouldn’t be, because the server reports all properly, as evidenced by  
> Curl).  
>  
> Appreciate the help btw.  
>  
> On 7 March 2017 at 11:16:13, Julian Reschke ([hidden email]  
> <mailto:[hidden email]>) wrote:  
>  
>> On 2017-03-07 10:31, Mario Danic wrote:  
>> > I’m building my own document so it does not fail (I now do same for search, which works absolutely brilliant).  
>> > ...  
>>  
>> What do you mean by "I'm building my own document"?  
>>  
>> The key question is: where's the implementation of the report  
>> "oc:filter-files"? It's certainly not in Jackrabbit...  
>>  
>> Best regards, Julian  

Reply | Threaded
Open this post in threaded view
|

Re: No properties on REPORT response?

Julian Reschke
On 2017-03-07 15:14, Mario Danic wrote:
> Well, since the response is pretty basic and seems to be what
> MultiStatus should map to
>
>  <!ELEMENT propstat (prop, status, responsedescription?) >
>
> I would have assumed it’d map things properly?

I still do not understand what you're trying to do. AFAIU, Jackrabbit
has no clue what the "oc:filter-rules" REPORT is, so what do you
*expect* it to do?

Again: what kind of server are you trying to talk with?

> Any idea where to look for extending Jackrabbit webdav to work?
>
> (Server is public, so would rather not post here about it)

Is your question: how you I add support for custom REPORTs to Jackrabbit?

In which case: I don't think there's an extension mechanism available.
You can try do add the code to jackrabbit-jcr-server.

Best regards, Julian

Reply | Threaded
Open this post in threaded view
|

Re: No properties on REPORT response?

Mario Danic
In reply to this post by Mario Danic
It’s a Nextcloud server - sorry, misread the previous question.


On 7 March 2017 at 15:19:53, Julian Reschke ([hidden email]) wrote:

On 2017-03-07 15:14, Mario Danic wrote:  
> Well, since the response is pretty basic and seems to be what  
> MultiStatus should map to  
>  
> <!ELEMENT propstat (prop, status, responsedescription?) >  
>  
> I would have assumed it’d map things properly?  

I still do not understand what you're trying to do. AFAIU, Jackrabbit  
has no clue what the "oc:filter-rules" REPORT is, so what do you  
*expect* it to do?  

Again: what kind of server are you trying to talk with?  

> Any idea where to look for extending Jackrabbit webdav to work?  
>  
> (Server is public, so would rather not post here about it)  

Is your question: how you I add support for custom REPORTs to Jackrabbit?  

In which case: I don't think there's an extension mechanism available.  
You can try do add the code to jackrabbit-jcr-server.  

Best regards, Julian