- From: Lee Feigenbaum <feigenbl@us.ibm.com>
- Date: Tue, 27 Sep 2005 02:26:43 -0400
- To: public-rdf-dawg@w3.org
- Message-ID: <OFE90F5519.CC55CA8D-ON85257089.001B501D-85257089.002367D5@us.ibm.com>
Hi Everyone,
The latest version of a proposed Working Group Note presenting a WSDL 1.1
document for the SPARQL protocol can be found at:
http://thefigtrees.net/DAWG/sparql-wsdl-1.1-note.html
As far as I'm concerned, this version is finished modulo the unresolved
issues presented below that have been discovered as we've worked on the
WSDL 1.1 and various sample code generated from the WSDL 1.1. Note that
the WSDL references the sparql-protocol-types.xsd from the WD rather than
the LC as there have been two significant changes between
http://www.w3.org/2001/sw/DataAccess/proto-wd/sparql-protocol-types.xsd
and
http://www.w3.org/2001/sw/DataAccess/proto-wd/sparql-protocol-types.xsd
(Removal of a stray '/>' and the addition of an import of result2.xsd)
The Java version of this generated sample code (generated using Axis's
wsdl2java) can be found at:
http://thefigtrees.net/DAWG/SPARQLClient-20050927.zip
It's a complete sample which will be explained and linked to on the ESW
Wiki ( http://esw.w3.org/topic/SparqlProtocolWsdl11Examples - no content
yet ).
Elias is working on a python sample though he's been having a heck of a
time convincing it not to use SOAP-encoding. I'm also nearly finished with
a C# sample using Microsoft's wsdl.exe.
Now, a summary of the issues raised by these explorations:
1. xs:all in sparql-protocol-types.xsd
Running Microsoft's wsdl.exe on the SPARQL Protocol XML Schema from:
http://www.w3.org/2001/sw/DataAccess/proto-wd/sparql-protocol-types.xsd
gives the error:
C:\Documents and Settings\Lee\My Documents\Visual Studio
Projects\SPARQLSharpClient\SPARQLSharpClient\Web
References\SPARQLExampleService\Reference.map(1): Custom tool error:
Unable to import WebService/Schema. Unable to import binding
'QuerySoapBinding' from namespace
'http://www.w3.org/2005/08/sparql-protocol-query/#'. Unable to import
operation 'query'. Schema with
targetNamespace='http://www.w3.org/2005/09/sparql-protocol-types/#' has
invalid syntax. The {max occurs} of all the particles in the {particles}
of an all group must be 0 or 1. An error occurred at , (17, 10).
This refers to the 'default-graph-uri' and 'named-graph-uri' elements that
are inside an xs:all group and are children of 'query-request'. The
relevant part of the XML Schema Part 0: Primer can be found at:
http://www.w3.org/TR/xmlschema-0/#ref18
"""
There exists a third option for constraining elements in a group: All the
elements in the group may appear once or not at all, and they may appear
in any order. The all group (which provides a simplified version of the
SGML &-Connector) is limited to the top-level of any content model.
Moreover, the group's children must all be individual elements (no
groups), and no element in the content model may appear more than once,
i.e. the permissible values of minOccurs and maxOccurs are 0 and 1.
"""
So, we can't legally both allow for multiple (default or named) graphs,
and also allow for the elements to be in an arbitrary order. So I suspect
that we should change this from an xs:all to an xs:sequence.
2. Importing XML Schema
We've noticed two different behaviors with respect to code-generation
tools that read in a WSDL 1.1 file and its referenced schemas. Some tools
(eg, Axis), seem to maintain a global cache of namespace --> schema
mappings. These tools add to this mapping whether via <wsdl:import ...>
elements in the WSDL document or via <xs:import ...> elements in any
imported schema documents. Other tools require that a particular schema
document that references elements defined in another schema document
import the second schema themselves (eg, Elias' python tool (name?) and
C#'s wsdl.exe). If anyone knows of a way to make these tools work
otherwise, please let me know.
So, what does this mean? sparql-protocol-types.xsd references both
vbr:sparql (root element of the XML results format) and rdf:RDF (root
element of an RDF/XML document) but only imports
http://www.w3.org/2005/sparql-results# (result2.xsd) because we do not
have a schema document for RDF/XML. In Andy's initial WSDL 1.1 document,
he solved this by creating a placeholder rdf.xsd (
http://thefigtrees.net/DAWG/rdf.xsd ) and importing this from the WSDL 1.1
document, which makes Axis (wsdl2java) happy.
But this hack doesn't cut it for tools that are require the referring
schema document to directly import the referred schema document. For these
tools to be happy, sparql-protocol-types.xsd would have to import rdf.xsd,
which I don't think anyone is happy with, since this would be putting a
rather inelegant hack into a normative document.
So, I don't have a good solution here, and I don't think Kendall does
either. The best solution may be to explain the hack and instructions for
implementing it on the ESW Wiki page -- these instructions are rather
tedious though, as they would require a C# or python user to download the
normative sparql-protocol-types.xsd, edit it to add an import of the
placeholder rdf.xsd, and then edit the WSDL 1.1 document to point to this
locally edited copy of sparql-protocol-types.xsd instead of the normative
version. (The alternative would be to have the Note reference a WSDL 1.1
document which imports a sparql-protocol-types.xsd which imports the
placeholder rdf.xsd. I don't like this alternative since it requires
maintaining a copy of sparql-protocol-types.xsd just for this (ugly)
purpose.)
3. soap:operation
.Net's wsdl.exe pointed out that the WSDL 1.1 needed a soap:operation
element to be legal. I added the following:
<soap:operation style="document"
soapAction="http://www.w3.org/2005/08/sparql-protocol-query/#query-action"
/>
I only bring this up since I invented that soapAction so that I could have
a legal WSDL 1.1 document.
thanks,
Lee
Received on Tuesday, 27 September 2005 06:26:57 UTC