This work-around may help:

SELECT ?s ?p ?o
WHERE {
    {
BIND (IRI(CONCAT(str(?sparqlEndpoint), "?default-graph-uri=", encode_for_uri(str(?dataset)))) AS ?url) .
    }
    SERVICE ?url {
        ?s ?p ?o
    }
}

The trick here is to avoid passing the default query graph into the query, and instead put it into the URL using the SPARQL 1.1 protocol. Note that this approach may not help if you have other pre-bound variables to pass into the SERVICE request.

Holger


On 27/04/2016 16:38, [email protected] wrote:

Hi,


I am trying to query sparql endpoint with sparql motion module of type sml:ApplyConstruct, where sml:ApplyConstruct is set to:


CONSTRUCT {

    ?s ?p ?o .

}

WHERE {

    SERVICE ?sparqlEndpoint {

        GRAPH ?dataset {

            ?s ?p ?o .

        } .

    } .

}


?sparqlEndpoint and ?dataset are pointing to correct urls. Unfortunately when i run script i get exception :

 *

    Operation failed. On: Apr 22, 2016 5:52:53 PM Reason:
    java.lang.UnsupportedOperationException: Initial bindings not
    supported for remote queries, consider using a
    ParameterizedSparqlString to prepare a query for remote execution
    at
    
com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.setInitialBinding(QueryEngineHTTP.java:236)at
    
org.topbraid.sparql.LockOptimizedQueryExecution.setInitialBinding(LockOptimizedQueryExecution.java:94)
    at
    
org.topbraid.spin.sparqlmotion.modules.SMModuleUtil.applyVarBindings(SMModuleUtil.java:92)at
    
org.topbraid.spin.sparqlmotion.modules.SMModuleUtil.createQueryExecution(SMModuleUtil.java:192)
    at
    
org.topbraid.spin.sparqlmotion.lib.internal.ApplyConstructModule.applyConstruct(ApplyConstructModule.java:51)at
    
org.topbraid.spin.sparqlmotion.lib.internal.ApplyConstructModule.createGraph(ApplyConstructModule.java:41)
    at
    
org.topbraid.spin.sparqlmotion.modules.AbstractSMModule.getRDFOutput(AbstractSMModule.java:907)at
    
org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.executeModule(ExecutionEngineImpl.java:176)
    at
    
org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:118)at
    
org.topbraidcomposer.sparqlmotion.views.console.SPARQLMotionConsole.execute(SPARQLMotionConsole.java:79)
    at
    
org.topbraidcomposer.sparqlmotion.actions.AbstractExecuteSPARQLMotionAction$1.run(AbstractExecuteSPARQLMotionAction.java:142)at
    org.topbraidcomposer.core.util.ThreadUtil$1$1.run(ThreadUtil.java:64)
    at java.lang.Thread.run(Thread.java:745)


Am I doing something wrong ? Or is there any other module that i can use to query concrete dataset of sparql endpoint ?

Thanks,
Peter G.
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Group "TopBraid 
Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), 
Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, 
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
--- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to