From: <tr...@do...> - 2012-03-30 20:12:07
|
The following issue has been updated by Rob Vesse: Title: Sesame returns application/xml Content Type for SELECT query and dotNetRDF fails to parse response Project: Core Library (dotNetRDF.dll) - Description changed from " Reported via direct email to myself: # HTTP DEBUGGING # HTTP Request to http://cubist.hallam.shu.ac.uk:8080/openrdf-workbench/repositori es/CUBISTHWU?query=PREFIX%20rdfs%3A%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf- schema%23%3E%20PREFIX%20rdf%3A%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-sy ntax-ns%23%3E%20PREFIX%20hwu%3A%3Chttp%3A%2F%2Fwww.cubist_project.eu%2FHWU%23%3E %20PREFIX%20%3A%3Chttp%3A%2F%2Fwww.cubist_project.eu%2FHWU%23%3E%20PREFIX%20owl% 3A%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%20PREFIX%20xsd%3A%3Chttp%3A %2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%20SELECT%20DISTINCT%20%3Fo1%20%3Fa1%20 WHERE%20%7B%20%3Fx1%20rdf%3Atype%20%3ATissue%20%3B%20rdfs%3Alabel%20%3Fo1%20.%20 %3Fx1%20hwu%3Ahas_theiler_stage%20hwu%3Atheiler_stage_07%20.%20OPTIONAL%20%7B%20 %3Fx3%20rdf%3Atype%20%3AGene%20%3B%20rdfs%3Alabel%20%3Fa1%20.%20%20%20%3Fx2%20rd f%3Atype%20%20Textual_Annotation%20.%20%20%20%3Fx2%20hwu%3Ain_tissue%20%3Fx1%20. %20%20%20%3Fx2%20hwu%3Ahas_involved_gene%20%3Fx3%20.%20%20%20%3Fx2%20hwu%3Ahas_s trength%20hwu%3Alevel_detected%20.%7D%20%7D%20ORDER%20BY%20%3Fo1%20%3Fa1 GET Accept:application/rdf+xml,text/xml,application/xml,text/plain,text/ntriples,tex t/ntriples+turtle,application/rdf-triples,application/x-ntriples,text/turtle,app lication/x-turtle,application/turtle,text/n3,text/rdf+n3,application/sparql-resu lts+xml,application/sparql-results+json,text/boolean,application/json,text/json, text/csv,text/comma-separated-values,text/tab-separated-values,text/html,applica tion/xhtml+xml,*/*;q=0.5 HTTP Response from http://cubist.hallam.shu.ac.uk:8080/openrdf-workbench/reposit ories/CUBISTHWU/summary HTTP/1.1 200 OK Content-Length:969 Content-Type:application/xml;charset=UTF-8 Date:Fri, 30 Mar 2012 17:30:53 GMT Last-Modified:Thu, 29 Mar 2012 21:41:05 GMT Server:Apache-Coyote/1.1 <?xml version=1.0 encoding=utf-8?> <?xml-stylesheet type=text/xsl href=/openrdf-workbench/transformations/summar y.xsl?> <sparql xmlns=http://www.w3.org/2005/sparql-results# xmlns:q=http://www.openr df.org/schema/qname#> <head> <variable name=id/> <variable name=description/> <variable name=location/> <variable name=server/> <link href=info/> </head> <results ordered=false distinct=false> <result> <binding name=id> <literal>CUBISTHWU</literal> </binding> <binding name=description> <literal>CUBIST HWU Data</literal> </binding> <binding name=location> <literal>http://cubist.hallam.shu.ac.uk:8080/openrdf-sesame/repositories /CUBISTHWU</literal> </binding> <binding name=server> <literal>http://cubist.hallam.shu.ac.uk:8080/openrdf-sesame</literal> </binding> </result> </results> </sparql> # END HTTP DEBUGGING # Unable to Parse this RDF/XML since System.Xml was unable to parse the document, see Inner Exception for details The bug is caused by Sesame returning application/xml as the content type for the RDF response which dotNetRDF maps to RDF/XML and not to SPARQL XML results so the wrong parser gets used and" to " Reported via direct email to myself by Constantinos Orphanides Original stack trace: [Line 5 Column 15] Expected an ElementEvent but encountered a VDS.RDF.Parsing.Events.RdfXml.EndElementEvent Occurred in Grammar Production PropertyElement . See server logs for more details. The exception stack trace is: at VDS.RDF.Parsing.RdfXmlParser.GrammarProductionPropertyElement(RdfXmlParserContext context, IEventQueue`1 eventlist, IRdfXmlEvent parent) at VDS.RDF.Parsing.RdfXmlParser.GrammarProductionPropertyElementList(RdfXmlParserContext context, IEventQueue`1 eventlist, IRdfXmlEvent parent) at VDS.RDF.Parsing.RdfXmlParser.GrammarProductionNodeElement(RdfXmlParserContext context, IEventQueue`1 eventlist) at VDS.RDF.Parsing.RdfXmlParser.GrammarProductionResourcePropertyElement(RdfXmlParserContext context, IEventQueue`1 eventlist, IRdfXmlEvent parent) at VDS.RDF.Parsing.RdfXmlParser.GrammarProductionPropertyElement(RdfXmlParserContext context, IEventQueue`1 eventlist, IRdfXmlEvent parent) at VDS.RDF.Parsing.RdfXmlParser.GrammarProductionPropertyElementList(RdfXmlParserContext context, IEventQueue`1 eventlist, IRdfXmlEvent parent) at VDS.RDF.Parsing.RdfXmlParser.GrammarProductionNodeElement(RdfXmlParserContext context, IEventQueue`1 eventlist) at VDS.RDF.Parsing.RdfXmlParser.GrammarProductionNodeElementList(RdfXmlParserContext context, IEventQueue`1 eventlist) at VDS.RDF.Parsing.RdfXmlParser.GrammarProductionDoc(RdfXmlParserContext context, RootEvent root) at VDS.RDF.Parsing.RdfXmlParser.ProcessEventQueue(RdfXmlParserContext context) at VDS.RDF.Parsing.RdfXmlParser.Parse(RdfXmlParserContext context) at VDS.RDF.Parsing.RdfXmlParser.Load(IRdfHandler handler, TextReader input) at VDS.RDF.Parsing.RdfXmlParser.Load(IRdfHandler handler, StreamReader input) at VDS.RDF.Storage.BaseSesameHttpProtocolConnector.Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, String sparqlQuery) at VDS.RDF.Storage.BaseSesameHttpProtocolConnector.Query(String sparqlQuery) at ContextCreator.FcaBedrock.ContextCreator.IFcaBedrock.PostFormalContextJson(String sparqlQuery, String repositoryId, String repositoryConnection, String minSuppObjs, String minSuppAtts) in C:\Users\acesco1\Desktop\ContextCreator\ContextCreator\ContextCreator\FcaBedrock.svc.cs:line 109 at SyncInvokePostFormalContextJson(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[] outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) Requested he turn on HTTP debugging and got the following dump: # HTTP DEBUGGING # HTTP Request to http://cubist.hallam.shu.ac.uk:8080/openrdf-workbench/repositori es/CUBISTHWU?query=PREFIX%20rdfs%3A%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf- schema%23%3E%20PREFIX%20rdf%3A%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-sy ntax-ns%23%3E%20PREFIX%20hwu%3A%3Chttp%3A%2F%2Fwww.cubist_project.eu%2FHWU%23%3E %20PREFIX%20%3A%3Chttp%3A%2F%2Fwww.cubist_project.eu%2FHWU%23%3E%20PREFIX%20owl% 3A%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%20PREFIX%20xsd%3A%3Chttp%3A %2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%20SELECT%20DISTINCT%20%3Fo1%20%3Fa1%20 WHERE%20%7B%20%3Fx1%20rdf%3Atype%20%3ATissue%20%3B%20rdfs%3Alabel%20%3Fo1%20.%20 %3Fx1%20hwu%3Ahas_theiler_stage%20hwu%3Atheiler_stage_07%20.%20OPTIONAL%20%7B%20 %3Fx3%20rdf%3Atype%20%3AGene%20%3B%20rdfs%3Alabel%20%3Fa1%20.%20%20%20%3Fx2%20rd f%3Atype%20%20Textual_Annotation%20.%20%20%20%3Fx2%20hwu%3Ain_tissue%20%3Fx1%20. %20%20%20%3Fx2%20hwu%3Ahas_involved_gene%20%3Fx3%20.%20%20%20%3Fx2%20hwu%3Ahas_s trength%20hwu%3Alevel_detected%20.%7D%20%7D%20ORDER%20BY%20%3Fo1%20%3Fa1 GET Accept:application/rdf+xml,text/xml,application/xml,text/plain,text/ntriples,tex t/ntriples+turtle,application/rdf-triples,application/x-ntriples,text/turtle,app lication/x-turtle,application/turtle,text/n3,text/rdf+n3,application/sparql-resu lts+xml,application/sparql-results+json,text/boolean,application/json,text/json, text/csv,text/comma-separated-values,text/tab-separated-values,text/html,applica tion/xhtml+xml,*/*;q=0.5 HTTP Response from http://cubist.hallam.shu.ac.uk:8080/openrdf-workbench/reposit ories/CUBISTHWU/summary HTTP/1.1 200 OK Content-Length:969 Content-Type:application/xml;charset=UTF-8 Date:Fri, 30 Mar 2012 17:30:53 GMT Last-Modified:Thu, 29 Mar 2012 21:41:05 GMT Server:Apache-Coyote/1.1 <?xml version=1.0 encoding=utf-8?> <?xml-stylesheet type=text/xsl href=/openrdf-workbench/transformations/summar y.xsl?> <sparql xmlns=http://www.w3.org/2005/sparql-results# xmlns:q=http://www.openr df.org/schema/qname#> <head> <variable name=id/> <variable name=description/> <variable name=location/> <variable name=server/> <link href=info/> </head> <results ordered=false distinct=false> <result> <binding name=id> <literal>CUBISTHWU</literal> </binding> <binding name=description> <literal>CUBIST HWU Data</literal> </binding> <binding name=location> <literal>http://cubist.hallam.shu.ac.uk:8080/openrdf-sesame/repositories /CUBISTHWU</literal> </binding> <binding name=server> <literal>http://cubist.hallam.shu.ac.uk:8080/openrdf-sesame</literal> </binding> </result> </results> </sparql> # END HTTP DEBUGGING # Unable to Parse this RDF/XML since System.Xml was unable to parse the document, see Inner Exception for details The bug is caused by Sesame returning application/xml as the content type for the RDF response which dotNetRDF maps to RDF/XML and not to SPARQL XML results so the wrong parser gets used and an eror is thrown" More information on this issue can be found at http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=219 If you no longer wish to receive notifications, please visit http://www.dotnetrdf.org/tracker/UserProfile.aspx and change your notifications options. |