Stardog endpoint and R

Original post from mailing list:

Hi Stardog support,

So far I really like Stardog. Although I've had to resort to using Fusiki as I can't access the local endpoint (http://localhost:5820/relDB#!/query) from R studio.

Here is my R Studio code incase you know of the reason why this isn't working: The error I get is "XML content does not seem to be XML:"

library(SPARQL) 
endpoint <- 'http://localhost:5820/relDB#!/query/' 
query <- 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX rel: <http://purl.org/vocab/relationship/> 
PREFIX foaf: <http://xmlns.com/foaf/0.1/> 
SELECT * 
WHERE { 
?s ?p ?o 
}' 
res <- SPARQL(endpoint, query) 
head(res) 

Thanks
Benn

Hi,

A couple things I would try:

  1. The #! is usually put there by the web console, and is not the proper query endpoint. Try querying http://localhost:5820/relDB/query
  2. If that doesn’t fix the issue, check to see what Accept header that SPARQL library is sending, as perhaps it’s getting back a different encoding than it expects.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.