stanbol-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmür ...@farewellutopia.com>
Subject Re: FactStore, what media-type to submit facts?
Date Wed, 10 Aug 2011 09:53:31 GMT
Hi Fabian

Without content-type header I could submit the "fact". I couldn't
however retrieve the assertion back, neither by the json
query-protocol nor using sparql.

Cheers,
Reto

On Tue, Aug 9, 2011 at 9:29 PM, Fabian Christ
<christ.fabian@googlemail.com> wrote:
> Hi Reto,
>
> okay thank you. But I should improve this - this should also work with
> content-type header in the future.
>
> Thank you for testing :)
>
> Best,
>  - Fabian
>
> 2011/8/9 Reto Bachmann-Gmür <me@farewellutopia.com>:
>> Hi Fabian,
>>
>> Thanks, it works omitting the Content-Type header. Which can be done with curl:
>>
>>    curl -H "Content-Type: " -d @fact1.json
>> http://localhost:8080/factstore/facts
>>
>> Reto
>>
>> On Tue, Aug 9, 2011 at 8:09 PM, Fabian Christ
>> <christ.fabian@googlemail.com> wrote:
>>> Hi Reto,
>>>
>>> actually I can't. Sorry. I did my tests with jQuery to get the
>>> interactive documentation working. That worked. I have also written a
>>> bunch of integration tests that worked without problem. This
>>> media-type problem is something that I never really understood so far.
>>> On the one hand you have the content-type and on the other hand the
>>> accept header. In my tests I never specified the accept header. Maybe
>>> there is something missing in my implementation to get this right...
>>>
>>> Sorry - but at the moment I can't give you more advice than that.
>>>
>>> Best,
>>>  - Fabian
>>>
>>> 2011/8/9 Reto Bachmann-Gmür <me@farewellutopia.com>:
>>>> Hi Fabian
>>>>
>>>> I didn't realized I had to click on "/factstore/facts" to see the REST-API
doc.
>>>>
>>>> The documentation there is more comprehensive than on the wiki,
>>>> however it says nothing about the content-type and as you can see from
>>>> the transcript in my original mail application/json isn't working.
>>>> Could you post an example-transcript of how adding facts actually
>>>> works?
>>>>
>>>> Cheers,
>>>> Reto
>>>>
>>>> On Tue, Aug 9, 2011 at 6:02 PM, Fabian Christ
>>>> <christ.fabian@googlemail.com> wrote:
>>>>> Hi,
>>>>>
>>>>> I think the media type should be application/json but maybe this is a
bug.
>>>>>
>>>>> You can have a look at the documentation web-site that is presented
>>>>> when launching Stanbol at http://localhost:8080/factstore. See the
>>>>> REST API documentation and the examples there.
>>>>>
>>>>> Note, that the FactStore is still incomplete and not tested that much.
>>>>> That's why I didn't promote it yet in public to use. I will go on with
>>>>> the work on the FactStore after my holidays in about two weeks.
>>>>>
>>>>> Best,
>>>>>  - Fabian
>>>>>
>>>>> 2011/8/9 Reto Bachmann-Gmür <reto@apache.org>:
>>>>>> Hi
>>>>>>
>>>>>> I'm trying to lean more about stanbol and taking notes on my
>>>>>> expirience here: https://farewellutopia.com/blog
>>>>>>
>>>>>> Currently I'm stuck trying to use FactStore following the examples
on
>>>>>> http://wiki.iks-project.eu/index.php/FactStore_Specification
>>>>>>
>>>>>> I created a Fact Scheme but I fail adding facts. What media-type
does
>>>>>> faactstore expect? The following request doesn't work:
>>>>>>
>>>>>> POST /factstore/facts HTTP/1.1
>>>>>>
>>>>>> User-Agent: curl/7.21.3 (i686-pc-linux-gnu) libcurl/7.21.3
>>>>>> OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
>>>>>>
>>>>>> Host: localhost:8080
>>>>>>
>>>>>> Accept: */*
>>>>>>
>>>>>> Content-Type: application/json
>>>>>>
>>>>>> Content-Length: 229
>>>>>>
>>>>>>
>>>>>>
>>>>>> { "@context" : {   "iks" : "http://iks-project.eu/ont/",   "upb"
:
>>>>>> "http://upb.de/persons/" }, "@profile"     : "iks:employeeOf",
>>>>>> "person"       : { "@iri" : "upb:bnagel" }, "organization" : {
"@iri"
>>>>>> : "http://uni-paderborn.de"}}
>>>>>>
>>>>>>
>>>>>> HTTP/1.1 415 Unsupported Media Type
>>>>>>
>>>>>> Content-Type: text/html; charset=iso-8859-1
>>>>>>
>>>>>> Cache-Control: must-revalidate,no-cache,no-store
>>>>>>
>>>>>> Content-Length: 1406
>>>>>>
>>>>>> Server: Jetty(6.1.x)
>>>>>>
>>>>>> Cheers,
>>>>>> Reto
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Fabian
>>>>> http://twitter.com/fctwitt
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Fabian
>>> http://twitter.com/fctwitt
>>>
>>
>
>
>
> --
> Fabian
> http://twitter.com/fctwitt
>

Mime
View raw message