You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Jason Harrop <jh...@gmail.com> on 2015/11/09 01:55:14 UTC

v1.3.9 - http state of play?

Hi guys,

I have a standalone server running:

    java -jar oak-run-1.3.9.jar server

What's the current state of play for talking to it via http?

My objective is to add a binary file via http.  Various things I tried:

1. oak-http: the examples in the README largely work, but there's no
example showing how to add binary content

2.  HttpOperations wiki page GET /revisions/last gives a 404; POST
/binaries seems to expect Json

>http -v -a admin:admin POST http://localhost:8080/binaries  "Content-Type:
application/binary"  < foo.bar
POST /binaries HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Authorization: Basic YWRtaW46YWRtaW4=
Connection: keep-alive
Content-Length: 142893
Content-Type:  application/binary
Host: localhost:8080
User-Agent: HTTPie/0.9.2

:
HTTP/1.1 500 Unexpected character ('P' (code 80)): expected a valid value
(number, String, array, object, 'true', 'false' or 'null')  at [Source:
org.eclipse.jetty.server.HttpInput@7e46122a; line: 1, column: 2]

3. webdav put:  creates node structure, but binary content seems to be awol

4. sling: i'd prefer to avoid adding extra dependencies...

5. cmis: not supported, right?

thanks for

Re: v1.3.9 - http state of play?

Posted by Michael Marth <mm...@adobe.com>.
Hi Francesco,

How does the API mentioned below relate to the work you did in OAK-2502 ?

Michael




On 09/11/15 10:28, "Lukas Kahwe Smith" <sm...@pooteeweet.org> wrote:

>
>> On 09 Nov 2015, at 10:14, Davide Giannella <da...@apache.org> wrote:
>> 
>>> On 09/11/2015 00:55, Jason Harrop wrote:
>>> Hi guys,
>>> 
>>> I have a standalone server running:
>>> 
>>>    java -jar oak-run-1.3.9.jar server
>>> 
>>> What's the current state of play for talking to it via http?
>> 
>> oak-run provides a very primitive http interface that is not really
>> maintained. If you want a fully functional HTTP interface I would
>> suggest to use the latest Sling.
>> 
>> Team, shall we deprecate/remove the server runmode from oak-run? I don't
>> recall we use it anywhere.
>
>I think this question is really a key question that the Oak community needs to answer:
>Does the Oak community care for use cases outside of the Java world?
>
>The http interface and standalone server option are key there to allow interaction with Oak and to make at least the initial setup easy for non Java experts.
>
>Obviously as one of the maintainers of PHPCR I would love to hear that Oak is fully committed to providing a content repository for the general world and not just the Java community.
>
>regards,
>Lukas
>

Re: v1.3.9 - http state of play?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Tue, Nov 10, 2015 at 2:54 PM, Lukas Kahwe Smith <sm...@pooteeweet.org> wrote:
> ...its not so easy to find a PHP dev willing and capable to contribute on the
> code level of a Java project. for now we can just do our part in
> giving feedback and testing....

Understood. Feedback + tests are great already.

-Bertrand

Re: v1.3.9 - http state of play?

Posted by Lukas Kahwe Smith <sm...@pooteeweet.org>.
> On 09 Nov 2015, at 11:37, Bertrand Delacretaz <bd...@apache.org> wrote:
> 
> On Mon, Nov 9, 2015 at 10:28 AM, Lukas Kahwe Smith <sm...@pooteeweet.org> wrote:
>> ...Obviously as one of the maintainers of PHPCR I would love to hear that Oak
>> is fully committed to providing a content repository for the general world and not
>> just the Java community....
> 
> Is that something that the PHPCR community could contribute to?
> 
> That http stuff is probably not rocket science, and having people who
> actually use it contribute might be the best way to get something
> solid and useful.

yeah well .. I trying to find someone like this .. but its not so easy to find a PHP dev willing and capable to contribute on the code level of a Java project. for now we can just do our part in giving feedback and testing.

regards,
Lukas Kahwe Smith
smith@pooteeweet.org




Re: v1.3.9 - http state of play?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Mon, Nov 9, 2015 at 10:28 AM, Lukas Kahwe Smith <sm...@pooteeweet.org> wrote:
> ...Obviously as one of the maintainers of PHPCR I would love to hear that Oak
> is fully committed to providing a content repository for the general world and not
> just the Java community....

Is that something that the PHPCR community could contribute to?

That http stuff is probably not rocket science, and having people who
actually use it contribute might be the best way to get something
solid and useful.

-Bertrand

Re: v1.3.9 - http state of play?

Posted by Lukas Kahwe Smith <sm...@pooteeweet.org>.
> On 09 Nov 2015, at 10:14, Davide Giannella <da...@apache.org> wrote:
> 
>> On 09/11/2015 00:55, Jason Harrop wrote:
>> Hi guys,
>> 
>> I have a standalone server running:
>> 
>>    java -jar oak-run-1.3.9.jar server
>> 
>> What's the current state of play for talking to it via http?
> 
> oak-run provides a very primitive http interface that is not really
> maintained. If you want a fully functional HTTP interface I would
> suggest to use the latest Sling.
> 
> Team, shall we deprecate/remove the server runmode from oak-run? I don't
> recall we use it anywhere.

I think this question is really a key question that the Oak community needs to answer:
Does the Oak community care for use cases outside of the Java world?

The http interface and standalone server option are key there to allow interaction with Oak and to make at least the initial setup easy for non Java experts.

Obviously as one of the maintainers of PHPCR I would love to hear that Oak is fully committed to providing a content repository for the general world and not just the Java community.

regards,
Lukas


Re: v1.3.9 - http state of play?

Posted by Davide Giannella <da...@apache.org>.
On 09/11/2015 00:55, Jason Harrop wrote:
> Hi guys,
>
> I have a standalone server running:
>
>     java -jar oak-run-1.3.9.jar server
>
> What's the current state of play for talking to it via http?

oak-run provides a very primitive http interface that is not really
maintained. If you want a fully functional HTTP interface I would
suggest to use the latest Sling.

Team, shall we deprecate/remove the server runmode from oak-run? I don't
recall we use it anywhere.

Davide



Re: v1.3.9 - http state of play?

Posted by Francesco Mari <ma...@gmail.com>.
The work I did for the Remote API is on hold at the moment. There are some
issues, especially regarding the security of the upload of binary content,
that are not solved yet. I can't find a reference of it in the issue
tracker, but would be happy to give further details here if needed.

2015-11-09 10:59 GMT+01:00 Chetan Mehrotra <ch...@gmail.com>:

> On Mon, Nov 9, 2015 at 6:25 AM, Jason Harrop <jh...@gmail.com> wrote:
> > My objective is to add a binary file via http.  Various things I tried:
> ...
> > 3. webdav put:  creates node structure, but binary content seems to be
> awol
>
> Can you elaborate on this? For adding binary files webdav should work fine.
>
> Chetan Mehrotra
>

Re: v1.3.9 - http state of play?

Posted by Chetan Mehrotra <ch...@gmail.com>.
On Mon, Nov 9, 2015 at 6:25 AM, Jason Harrop <jh...@gmail.com> wrote:
> My objective is to add a binary file via http.  Various things I tried:
...
> 3. webdav put:  creates node structure, but binary content seems to be awol

Can you elaborate on this? For adding binary files webdav should work fine.

Chetan Mehrotra

Re: v1.3.9 - http state of play?

Posted by Jason Harrop <jh...@gmail.com>.
"awol" = away without leave.  Maybe "mia" = missing in action would have
been more appropriate!

After pointing my WebDAV client (BitKinex) at
http://localhost:8080/webdav/default I copy a file fw9.docx (see log below
- looks ok?)

Then in my browser, I see the file.  I click on it, and see jcr:content. I
click on that, and see ".." (ie only a link to the parent dir).

cheers .. Jason


05:52:45.065 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
o.a.j.w.simple.ResourceFactoryImpl - Creating resource for non-existing
repository node.
05:52:45.068 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.eclipse.jetty.http.HttpParser - filled 16384/16384
05:52:45.068 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.eclipse.jetty.http.HttpParser - filled 16384/16384
05:52:45.068 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.eclipse.jetty.http.HttpParser - filled 16384/16384
05:52:45.069 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.eclipse.jetty.http.HttpParser - filled 16384/16384
05:52:45.074 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.eclipse.jetty.http.HttpParser - filled 10589/10589
05:52:45.077 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
o.a.j.webdav.simple.DavResourceImpl - Starting IOHandler
(org.apache.jackrabbit.server.io.DefaultHandler)
05:52:45.079 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.apache.jackrabbit.oak.audit - [admin] [session-26] Adding node
[//fw9.docx]
05:52:45.080 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.apache.jackrabbit.oak.audit - [admin] [session-26] Adding node
[/fw9.docx/jcr:content]
05:52:45.114 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.apache.jackrabbit.oak.audit - [admin] [session-26] Setting property
[/fw9.docx/jcr:content/jcr:data]
05:52:45.115 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.apache.jackrabbit.oak.audit - [admin] [session-26] Setting property
[/fw9.docx/jcr:content/jcr:mimeType]
05:52:45.115 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.apache.jackrabbit.oak.audit - [admin] [session-26] Removing property
[jcr:encoding]
05:52:45.116 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.apache.jackrabbit.oak.audit - [admin] [session-26] Setting property
[/fw9.docx/jcr:content/jcr:lastModified]
05:52:45.116 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
o.a.j.webdav.simple.DavResourceImpl - Result for IOHandler
(org.apache.jackrabbit.server.io.DefaultHandler): OK
05:52:45.132 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
o.a.j.oak.plugins.index.IndexUpdate - Indexing report
    - /oak:index/nodetype(2)

05:52:45.135 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
o.a.j.w.s.DavSessionProviderImpl - Releasing session
'org.apache.jackrabbit.webdav.simple.DavSessionImpl@12c20a30' from request
'org.apache.jackrabbit.webdav.WebdavRequestImpl@7c64deef'
05:52:45.135 [qtp717176949-20 - /webdav/default/fw9.docx] DEBUG
org.eclipse.jetty.server.Server - RESPONSE /webdav/default/fw9.docx  201
handled=true


On Mon, Nov 9, 2015 at 11:51 PM, Julian Reschke <ju...@gmx.de>
wrote:

> On 2015-11-09 01:55, Jason Harrop wrote:
>
>>
>>
>> 3. webdav put:  creates node structure, but binary content seems to be
>> awol
>>
>
> "awol"?
>
>
> Best regards, Julian
>

Re: v1.3.9 - http state of play?

Posted by Julian Reschke <ju...@gmx.de>.
On 2015-11-09 01:55, Jason Harrop wrote:
> Hi guys,
>
> I have a standalone server running:
>
>      java -jar oak-run-1.3.9.jar server
>
> What's the current state of play for talking to it via http?
>
> My objective is to add a binary file via http.  Various things I tried:
>
> 1. oak-http: the examples in the README largely work, but there's no
> example showing how to add binary content
>
> 2.  HttpOperations wiki page GET /revisions/last gives a 404; POST
> /binaries seems to expect Json
>
>> http -v -a admin:admin POST http://localhost:8080/binaries  "Content-Type:
> application/binary"  < foo.bar
> POST /binaries HTTP/1.1
> Accept: application/json
> Accept-Encoding: gzip, deflate
> Authorization: Basic YWRtaW46YWRtaW4=
> Connection: keep-alive
> Content-Length: 142893
> Content-Type:  application/binary
> Host: localhost:8080
> User-Agent: HTTPie/0.9.2
>
> :
> HTTP/1.1 500 Unexpected character ('P' (code 80)): expected a valid value
> (number, String, array, object, 'true', 'false' or 'null')  at [Source:
> org.eclipse.jetty.server.HttpInput@7e46122a; line: 1, column: 2]
>
> 3. webdav put:  creates node structure, but binary content seems to be awol

"awol"?


Best regards, Julian