From: Rob V. <rv...@do...> - 2012-03-06 18:00:50
|
Hi Aida Your problem is that the endpoint you are providing is not actually an endpoint, SNORQL is simply a web interface which talks to an underlying SPARQL endpoint via AJAX. Trying to treat SNORQL as an endpoint will not work as you will simply get back the HTML SNORQL page which is what the error message is complaining about - a web page is not a result set. Notice at the top of the SNORQL page it says "SPARQL Explorer for http://data.linkedmdb.org/sparql" - this URL is the actual SPARQL endpoint you want to send the query to, so if you modify your code to use that as the endpoint URL it should work fine Hope this helps Rob Vesse On 3/6/12 7:16 AM, Aida Martinez wrote: > Hi, > > I'm trying to use your dotNetRDF library but I´m obtaining the > following exception: > {"The SPARQL Endpoint returned unexpected Content Type 'text/html', > this error may be due to the given URI not returning a SPARQL Result Set"} > > This is my code: > SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(new > Uri("http://data.linkedmdb.org/snorql")); > > //Make a SELECT query against the Endpoint > string query = @"PREFIX movie: > <http://data.linkedmdb.org/resource/movie/> > SELECT ?o > WHERE { > <http://data.linkedmdb.org/resource/director/187> movie:director_name ?o > }"; > try > { > SparqlResultSet result = > endpoint.QueryWithResultSet(query); > } > catch (Exception ex) > { string exe; } > > I don´t have any idea why isn´t working. Can you help? > > Regards. > -- > Aída Martínez > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > > > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |