Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

HttpAuthenticator and Virtuoso

$
0
0
Hi,

I have been using jena 2.12.1 and sparql on a virtuoso 7.1 server with
success for various select queries. I'm now trying to perform sparql
updates using sparql-auth on the same server with:

ParameterizedSparqlString pss2 = new ParameterizedSparqlString("random
sparql update query");
UpdateRequest request = UpdateFactory.create(pss2.toString());
UpdateProcessor ue = UpdateExecutionFactory.createRemote(request,
Settings.SPARQLEndpoint, Settings.authenticator);
ue.execute();

where the authenticator is defined elsewhere as:
public final static HttpAuthenticator authenticator = new
SimpleAuthenticator("dba", "dba".toCharArray());

with a simple SPARQL as

insert data { graph <g1> {<s> <p> <o>}} (shorten URIs for brevity)

but, the above jena code fails.

Enabling debugging on Jena and HTTP recording on Virtuoso shows that
Virtuoso receives the query but doesn't insert the triple. However, the
same sparql command works via the sparql-auth html interface with the
same credentials.
In looking through the debug output, it looks like authentication
between jena and virtuoso is sorted out, but the differences between the
success via the sparql-auth html page and the failed jena attempt is
that the default sparql-auth web pages does a GET to the server while
Jena is doing a post. Any thoughts? -= Erich
Erich Bremer
http://www.ebremer.com

Viewing all articles
Browse latest Browse all 5648

Trending Articles