We're updating the issue view to help you get more done. 

Parameters Not Bound in SERVICE Block

Description

If a variable is bound using the setBinding method of the Query object, it is ignored if the variable is used within a SERVICE block. However, if a BINDINGS clause is used, the variable is bound both in and out of the SERVICE block.

1 2 3 4 5 6 7 8 SELECT * { SERVICE <http://services.data.gov/sparql> { <http://www.openlinksw.com/virtrdf-data-formats#sinv> ?p ?o FILTER (?o = $b) } }
1 query.setBinding("b", con.getValueFactory().createLiteral("sinv"));

The above produces no results, when "b" is bound using the above method. However, the query below does produce a result. I would expect both results to be identical.

1 2 3 4 5 6 7 8 9 SELECT * { SERVICE <http://services.data.gov/sparql> { <http://www.openlinksw.com/virtrdf-data-formats#sinv> ?p ?o FILTER (?o = $b) } } BINDINGS $b { ("sinv") } p,o,b http://www.openlinksw.com/schemas/virtrdf#qmfName,sinv,sinv

Environment

None

Status

Assignee

JeenB

Reporter

James Leigh

Labels

None

Components

Fix versions

Affects versions

2.6.7

Priority

Major