Am 09.07.2012 16:34, schrieb Rupert Westenthaler:
Hi Melanie,

now I am a little bit confused. I do no longer fully understand what
you are trying to do.

Are those assumptions true?

http://developer.yahoo.com/javascript/howto-proxy-falseaddress.html
     ... does not exist on the Entityhub
correct
http://developer.yahoo.com/javascript/howto-proxy.html
     ... does exist on the Entityhub
correct
About the uploaded RDF data

http://developer.yahoo.com/javascript/howto-proxy-falseaddress.html
     ... is the subject of at least one triple in the uploaded RDF data? YES/NO 
?
NO
(its about http://developer.yahoo.com/javascript/howto-proxy.html, or about http://baa.org/foo.html)
http://developer.yahoo.com/javascript/howto-proxy.html
     ... is the subject of at least one triple in the uploaded RDF data? YES/NO 
?
YES.
What do you expect happening when calling

"http://<stanbol>/entityhub/entity?id=http://developer.yahoo.com/javascript/howto-proxy-falseaddress.html&create=false";
update the Entity "howto-proxy-falseaddress.html"?
update the Entity "howto-proxy.html"?
something else?

hm, I expected something like: since the "howto-proxy-falseaddress.html" does not exist, I should get some error because I'm referencig my to-be-updated entity by a wrong ID. The content of the rdf file should be of secondary relevance here (because if my ID is not addressing any existing entity, the update should fail anyway). In fact, I expected that nothing would be updated in this case. (wouldn't it be strange to update entity "howto-proxy.html" when I pass some non-existing ID ?)

Can you also attach the file with the RDF data to the answer of this questions

They are just some toy files for testing, one of them containing e.g.:

<?xml version="1.0" encoding="UTF-8"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";><rdf:Description rdf:about="http://developer.yahoo.com/javascript/howto-proxy.html";><rdfs:label>Modified Label of Howto-Proxy</rdfs:label></rdf:Description></rdf:RDF>



Thanks in advance
best
Rupert

On Mon, Jul 9, 2012 at 4:15 PM, Melanie Reiplinger
<[email protected]> wrote:
Am 07.07.2012 08:03, schrieb Rupert Westenthaler:

Hi

On Fri, Jul 6, 2012 at 9:51 AM, Melanie Reiplinger
<[email protected]>  wrote:
curl -i -X PUT -H "Content-Type:application/rdf+xml" -T someEntity

"http://<stanbol>/entityhub/entity?id=http://developer.yahoo.com/javascript/howto-proxy-falseaddress.html&create=false";

HTTP/1.1 100 Continue

HTTP/1.1 304 Not Modified
Server: Jetty(6.1.x)

One question: does the RDF data "someEntity" contain triples for the
URL"http://developer.yahoo.com/javascript/howto-proxy-falseaddress.html";?
If not, than you should get the exact same response as I do.

No, it contains triples about
"http://developer.yahoo.com/javascript/howto-proxy.html"; (of which the
falseaddress.html is a non-existing variant). The entity itself (described
in the file) exists on my entityhub; I'm principally trying to update it
under a wrong id here.
However, if I put into the rdf file some other, non-existing entity (about
some completely different URL), and state:

curl -i -X PUT -H "Content-Type:application/rdf+xml" -T anotherEntity.rdf
"http://<stanbol>/entityhub/entity?id=http://developer.yahoo.com/javascript/howto-proxy-falseaddress.html&create=false";

HTTP/1.1 100 Continue

HTTP/1.1 304 Not Modified
Server: Jetty(6.1.x)

So I am unable to reproduce this. If you can give me access to the
Stanbol Server you test against I could try to further look into this.

sorry, I am not allowed to do so. Is there a version online on a demo server
with your updates already integrated? Then I could simply try on that
'public' version and see whether it works there.

(where I try to update a non-existing entity).

Best

melanie

Am 03.07.2012 17:48, schrieb Rupert Westenthaler:
On Tue, Jul 3, 2012 at 5:18 PM, Rupert Westenthaler

<[email protected]>   wrote:
Hi Melanie,

I think this is because the parsed RDF data do not contain any
information (rdf triples) about the parsed id


http://developer.yahoo.com/javascript/howto-proxy-falseaddress.htm

I will add a check that ensures that a BAD_REQUEST is thrown in those
cases.

fixed withhttp://svn.apache.org/viewvc?rev=1356788&view=rev


best
Rupert


On Tue, Jul 3, 2012 at 3:02 PM, Melanie Reiplinger
<[email protected]>   wrote:
Hi Alessandro and all.

Today we found a strange behaviour in one of my tests that uses update
functionality of the entityhub/entity. When trying to update a
non-existing
entity ( = erroneous or non-existing id), an error code 304 (Not
Modified)
is returned.
This makes my test notify me of a success, although intuitively, one
would
think of this as a fail (since I tried to update something that does
not
exist).

curl -i -X PUT -H "Content-Type:application/rdf+xml" -T someEntity.rdf


"http://lnv-89012.dfki.uni-sb.de:9001/entityhub/entity?id=http://developer.yahoo.com/javascript/howto-proxy-falseaddress.html&create=false";
HTTP/1.1 100 Continue

HTTP/1.1 304 Not Modified
Server: Jetty(6.1.x)

Best,
melanie


Am 28.06.2012 08:13, schrieb Fabian Christ:

2012/6/27 Alessandro Adamou<[email protected]>:
So far I've made these methods return 303 See Other with the created
resource, basically because I wanted browsers to automatically
redirect
to
that URL when the ontology is added using the HTML form. But I've
been
thinking that perhaps returning a 201 CREATED would be more
appropriate
on
the REST side.
I think 201 is the right way to go. The response of a POST just tells
you that the resource was created and optionally where it was created
using the Location header.

You can also use 303 and hope that the client interprets it
correctly.
But this response may not be the right one for all clients. Another
client than a browser may not need the redirect and will perhaps be
confused.

Therefore, the 201 is IMO the best solution and instead implement the
redirect separately.

Best,
     - Fabian
--
| Rupert [email protected]
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen






Reply via email to