Fwd: Re: Virtuoso Sparql Endpoint - does not work

215 views
Skip to first unread message

Robbet

unread,
May 30, 2011, 7:39:23 AM5/30/11
to rdf-...@googlegroups.com
P.S:

Tried to figure out where the object ($.each(values, function(property, object)) is created
because i need to format it for better out put.

Actually it's look like:




I need to format the output for "Verweis" and "Link" independant and without commata.
Any ideas? :)

Best regards,

Robert


-------- Original-Nachricht --------
Betreff: Re: Virtuoso Sparql Endpoint - does not work
Datum: Sun, 29 May 2011 15:11:10 +0200
Von: Robbet <rob...@gmx.de>
An: rdf-...@googlegroups.com, johanne...@googlemail.com


Hi,

it's fixed (thanks to Virtuoso mailinglist). CORS has to be enabled within the Virtuoso server configuration.

[1] http://ods.openlinksw.com/wiki/main/Main/VirtTipsAndTricksGuideCORSSetup
[2] http://enable-cors.org/


But ... another question.


I'm new to RDF-spark and want to present my sparql results on a html page.
Unfortunately i don't get into the configuration using the jquers.spark.simpletable.js.
The table has to be more extended (clickable links etc.).

What up with this element.html? Where i'm able to change the visual aspects of the table?
Maybe someone could give me some initial hints :)

Thanks!

Best regards,

Robert



Am 26.05.2011 11:44, schrieb Robbet:
Hi Johannes,

thanks for your reply.

No results means no response. (on Firebug too).
If i run the curl command on my local server i get the proper response with entries.

C:\Users\Robbie\Desktop\virtuoso-opensource\bin>curl -H "Accept:application/json
" "http://localhost:8890/sparql?query=select+*+where+%7B+%3Fs+%3Fp+%3Fo+%0D%0A%7
D+LIMIT+5" -v
* About to connect() to localhost port 8890 (#0)
* Connection refused
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8890 (#0)
> GET /sparql?query=select+*+where+%7B+%3Fs+%3Fp+%3Fo+%0D%0A%7D+LIMIT+5 HTTP/1.1

> User-Agent: curl/7.21.0 (amd64-pc-win32) libcurl/7.21.0
> Host: localhost:8890
> Accept:application/json
>
< HTTP/1.1 200 OK
< Server: Virtuoso/06.01.3127 (Win64) x86_64-generic-win-64
< Connection: Keep-Alive
< Date: Thu, 26 May 2011 09:40:30 GMT
< Accept-Ranges: bytes
< Content-Type: application/json; charset=UTF-8
< Content-Length: 1553
<

{ "head": { "link": [], "vars": ["s", "p", "o"] },
  "results": { "distinct": false, "ordered": true, "bindings": [
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default-iid" }     , "p": { "type": "uri", "value": "http://www.w3.org/1999
/02/22-rdf-syntax-ns#type" }    , "o": { "type": "uri", "value": "http://www.ope
nlinksw.com/schemas/virtrdf#QuadMapFormat" }},
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default-iid-nullable" }    , "p": { "type": "uri", "value": "http://www.w3.
org/1999/02/22-rdf-syntax-ns#type" }    , "o": { "type": "uri", "value": "http:/
/www.openlinksw.com/schemas/virtrdf#QuadMapFormat" }},
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default-iid-nonblank" }    , "p": { "type": "uri", "value": "http://www.w3.
org/1999/02/22-rdf-syntax-ns#type" }    , "o": { "type": "uri", "value": "http:/
/www.openlinksw.com/schemas/virtrdf#QuadMapFormat" }},
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default-iid-nonblank-nullable" }   , "p": { "type": "uri", "value": "http:/
/www.w3.org/1999/02/22-rdf-syntax-ns#type" }    , "o": { "type": "uri", "value":
 "http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat" }},
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default" } , "p": { "type": "uri", "value": "http://www.w3.org/1999/02/22-r
df-syntax-ns#type" }    , "o": { "type": "uri", "value": "http://www.openlinksw.
com/schemas/virtrdf#QuadMapFormat" }} ] } }* Connection #0 to host localhost lef
t intact
* Closing connection #0


I noticed that it works on the one hand on some Virtuoso sparql endpoints (like dbpedia.org, lod.openlinksw.com) and on the other hand on some not (like semantic.data.gov/sparql, nevisian.dyndns.org/sparql).
Here is the Firebug error i receive when i query my local virtuoso server.


Best regards,

Robert


On 26.05.2011 10:57, Johannes Trame wrote:
Hi Robert,
what do you mean by you receive no results? Is the response empty or the request not successful? Did you already tried to debug the request (e.g. with Firebug)? Maybe you can post the request and response headers?
You should also test if your local sparql endpoint accepts the json accept header. For example, send a simple request with curl -H "Accept: application/json" " http://my-domain.dyndns.org/sparql?query=SELECT+*+WHERE%7B%0A%3Fx+%3Fy+%3Fz.%0A%7D+LIMIT+10" -v
If this does not work you should try different accept headers.... like "Accept: application/sparql-results+json.  

Kind regards, Johannes

2011/5/25 Robbet <rob...@gmx.de>
Hi,

i run a Virtuoso sparql endpoint locally on my notebook (http://my-domain.dyndns.org/sparql) and receive no results when using it within the rdf-spark code.
When i replace it by http://dbpedia.org/sparql on the same query it runs fine. Any ideas?

Same query works on the sparql frontend so the server is functional.

Thanks and best regards,

Robert


P.S: Great project .... go on!



Chris Davis

unread,
Sep 20, 2012, 4:03:01 AM9/20/12
to rdf-...@googlegroups.com, rob...@gmx.de
I've also had an issue where I couldn't get spark to work with a virtuoso endpoint.  Using the code at http://km.aifb.kit.edu/sites/spark/src/jquery.spark.js, I was able to get things working by setting request.output, and changing the dataType from json to jsonp:

73a74
> request.output = 'json';
98c99
< dataType : 'json',
---
> dataType : 'jsonp',
250a252

Chris

On Monday, May 30, 2011 1:39:23 PM UTC+2, Robbet wrote:
P.S:

Tried to figure out where the object ($.each(values, function(property, object)) is created
because i need to format it for better out put.

Actually it's look like:




I need to format the output for "Verweis" and "Link" independant and without commata.
Any ideas? :)

Best regards,

Robert


-------- Original-Nachricht --------
Betreff: Re: Virtuoso Sparql Endpoint - does not work
Datum: Sun, 29 May 2011 15:11:10 +0200
Reply all
Reply to author
Forward
0 new messages