Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] accessing bioportal sparql endpoint from sesame

Hollink, L. l.hollink at vu.nl
Thu Sep 26 08:58:25 PDT 2013


Dear Manuel, Trish, others, 

I am trying to access the Bioportal SPARQL endpoint using the sesame library. However, I keep getting the following error message: 

----------------
Forbidden (403)

CSRF verification failed. Request aborted.

Help

Reason given for failure:

    No CSRF or session cookie.
    
In general, this can occur when there is a genuine Cross Site Request Forgery, or when Django's CSRF mechanism has not been used correctly. For POST forms, you need to ensure:

	• The view function uses RequestContext for the template, instead of Context.
	• In the template, there is a {% csrf_token %} template tag inside each POST form that targets an internal URL.
	• If you are not using CsrfViewMiddleware, then you must use csrf_protect on any views that use the csrf_token template tag, as well as those that accept the POST data.
You're seeing the help section of this page because you have DEBUG = True in your Django settings file. Change that to False, and only the initial error message will be displayed.

You can customize this page using the CSRF_FAILURE_VIEW setting.
----------------

Do you have any idea what this means, and what the reason could be? I've attached the simple test program in which I try to access the SPARQL endpoint. I've also tried the code in the library of examples at https://github.com/ncbo/sparql-code-examples/blob/master/java/src/org/ncbo/stanford/sparql/examples/OpenRDFAlibabaTest.java . However, this does not compile on my machine. I guess that is because it is done with an older version of sesame. I use the current version, 2.7.3, which does not have convenience methods for adding the api key to the endpoint connection. 

If you can help me with the above error, of if you can share your experience in accessing Bioportal from Sesame, that would be great. 

Best regards,
Laura

ps. thanks for your answers to previous questions, it's very helpful!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test2.java
Type: application/octet-stream
Size: 2489 bytes
Desc: Test2.java
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20130926/ad3db62d/attachment-0001.java>


More information about the bioontology-support mailing list