Hi Ben,

I assume that this part of the server protocol is indeed outdated. I
have just checked out our Java client, which only sends the target
path to the server (which includes the name of the document) [1].

Could you check out if this solves the problem? If yes, I’ll be happy
to update our documentation.

Best,
Christian

[1] 
https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/org/basex/examples/api/BaseXClient.java#L118-L120



On Tue, Apr 24, 2018 at 12:25 PM, Ben Engbers <[email protected]> wrote:
> Hi Christian,
>
> Thanks for your answer. It helped.
>
> Now I have another question.
>
> According to the server protocol, I have coded the 'add'-command as follows:
> writeBin(as.raw(0x09), private$sock)
> writeBin(private$raw_terminated_string(name), private$sock)
> writeBin(private$raw_terminated_string(path), private$sock)
> writeBin(private$raw_terminated_string(input), private$sock)
> private$info <- self$str_receive()
> return(list(info = private$info, success = self$bool_test_sock()))
>
> When executing these lines:
> Name1 <- "Name1.xml"
> Path1 <- "path/test"
> Simple <- "<x>Hello World!</x>"
> test <- Session$add(name = "Name1.xml", path = "path/test", input = Simple)
> I would expect that a new reource was created with name, path and
> content as specified by the parameters.
>
> However I receive:
>> test
> $info
> [1] "\"Name1.xml.xml\" (Line 1): Content is not allowed in prolog."
> $success
> [1] FALSE
>
> Using Name1 <- "Name1" produces no error but still fails.
>
> Can you give any clue in which direction i should search (using the
> debugger didn't help)
>
> Ben
>
> Op 23-04-18 om 16:08 schreef Christian Grün:
>> Hi Ben,
>>
>> You are right, there is no DELETE entry in the client binding. The
>> reason is that you can simply send a DELETE command [1], as there is
>> no need to transfer additional binary data.
>>
>> Does this help?
>> Christian

Reply via email to