From: Rob V. <rv...@do...> - 2012-06-21 19:26:46
|
Hey Martin I haven't looked the code yet but my first blink assessment is that you are using Virtuoso because that update is the old style SPARUL syntax rather than standard SPARQL 1.1 If you are using code to try to make a standard SPARQL 1.1 Update call to Virtuoso it will likely fail because Virtuoso will be expecting the old SPARUL syntax. In the standard syntax it would be the following, putting this into your endpoint results in an error response: prefix ns: <http://morsepedia.org/ontology/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix schema: <http://www.w3.org/2000/01/rdf-schema#> INSERT DATA { GRAPH <http://morsepedia.org/ontology/> { <http://morsepedia.org/ontology/4e30ce7a-f4a4-46b0-a13a-d64cda0234e8> <http://www.w3.org/2000/01/rdf-schema#label> "ITERATE THIS LABEL NUMBER 1" } } If that isn't the problem let me know and I'll take a proper look at the code. Regards, Rob From: Martin Bradford Gago <m.b...@me...> Date: Thursday, June 21, 2012 11:05 AM To: Cray Employee <rv...@do...> Subject: Problem updating via endpoint > Hi Rob, > I¹m trying to use the SparqlRemoteUpdateEndpoint in some code but I¹m getting > a problem. I have a sparql endpoint available at (it¹s public facing so you > should be able to see it in your browser): > > http://kirk.abcomputing.co.uk:8890/sparql > > If I go to the endpoint in a web browser, I can successfully run the following > update query: > > prefix ns: <http://morsepedia.org/ontology/> prefix xsd: > <http://www.w3.org/2001/XMLSchema#> prefix schema: > <http://www.w3.org/2000/01/rdf-schema#> INSERT DATA into > <http://morsepedia.org/ontology/> { > <http://morsepedia.org/ontology/4e30ce7a-f4a4-46b0-a13a-d64cda0234e8> > <http://www.w3.org/2000/01/rdf-schema#label> "ITERATE THIS LABEL NUMBER 1" } > > However, when I try running the same query through my harness that uses the > SparqlRemoteUpdateEndpoint class, I am getting a 400 Bad Request error back > (test harness attached). Can you think of any reasons that I can do this > through the endpoint web page but not through the SparqlRemoteUpdateEndpoint > class? > > Thanks! > Martin Bradford Gago |