|
From: Rob V. <rv...@do...> - 2015-01-19 11:35:17
|
Tomasz
This looks like a simple typo on our part since the MIME type should be
"application/n-triples" - note the missing hyphen in your error message.
This will be fixed in default shortly and will be incorporated in our next
release
Thanks for reporting this,
Rob
From: <Tom...@bt...>
Reply-To: dotNetRDF User Help and Support
<dot...@li...>
Date: Thursday, 8 January 2015 16:02
To: <dot...@li...>
Subject: [dotNetRDF-Support] dotNetRDF and Sesame REST service. Mime type
exception
> Hello,
>
> I have a question regarding the usage of dotNetRDF to communicate with Sesame
> server.
> I am receiving the following exception when trying to save a graph into a
> Sesame server’s storage:
>
> “A HTTP error (HTTP 415 Unsupported Media Type) occured while save a Graph to
> the Store.
> Store returned the following error message: Unsupported MIME type:
> application/ntriples
> See aforementioned status line or inner exception for further details“
>
> This is the code which I am using:
>
> SesameServer sesameServer = new
> SesameServer("http://localhost:8080/openrdf-sesame");
> IStorageProvider storage_tsm1 = sesameServer.GetStore("tsm1");
> IStorageProvider storage_tsm2 = sesameServer.GetStore("tsm2");
> Graph loadedGraph = new Graph();
> storage_tsm1.LoadGraph(loadedGraph, "file://archive.ttl");
> storage_tsm2.SaveGraph(loadedGraph);
>
> The exception occurs at the last statement.
>
> I have also noticed, that by changing the line 542 in
> SesameHttpProtocolConnector class in this way:
> From: request.ContentType = MimeTypesHelper.NTriples[0];
> To: request.ContentType = MimeTypesHelper.NTriples[1];
> The exception does not occur and the graph is being saved correctly.
>
> Please tell me if there is a better solution for this exception?
>
> Sesame version: 2.7.14
> dotNetRDF version: 1.0.8.0
>
> Best regards
>
> Tomasz Firlej
> Junior programmer
> BTC Business Technology Consulting Sp. z o.o.
> ul. Małe Garbary 9
> 61-756 Poznań
> Tel. +48 (0) 61 85 60 936
> Fax. +48 (0) 61 85 01 870
> E-mail: tom...@bt... <mailto:tom...@bt...>
> www.btc-ag.com <www.btc-ag.com>
> www.bonapart.pl <http://www.bonapart.pl/>
>
> Sąd Rejonowy Poznań - Nowe Miasto i Wilda w Poznaniu
> VIII Wydział Gospodarczy Krajowego Rejestru Sądowego: KRS 0000081161
> NIP 778-13-34-313 Kapitał zakładowy: 200.000 PLN
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET
> is offering a free month of service with a new server in Ashburn. Choose from
> 2 high performing configs, both with 100TB of bandwidth. Higher
> redundancy.Lower latency.Increased capacity.Completely compliant. vanity:
> www.gigenet.com_______________________________________________
> dotNetRDF-Support mailing list dot...@li...
> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support
|