Ted; TopBraid is fully compliant with REST-style architectures where the non-query string portion of the URL points to a servlet and the query string provides parameters that are passed to the servlet. In this case, the servlet is 'sparqlmotion' and the id refers to the name of the Web service defined in a SPARQLMotion script. This level of indirection is necessary so one can define custom scripts that are exposed as Web services. These are easily passed as hidden input tags in HTML forms or otherwise added to the query string.
BTW, what part of the documentation do you refer to? It needs to be updated to point directly to the sparqlmotion servlet, not 'action'. Hence your example can be invoked as: https://services.contoso.com:8443/prd/tbl/tbl/sparqlmotion?id=RetrieveProjectInfo&itemType=project&itemID=5 In terms of the output, that is entirely up to SPARQLMotion script processing. There are a number of modules that will define text in the format you are looking for, including ReturnText, ReturnXML, and ReturnUISPINDocument (SPARQL Web Pages). In a RESTFul approach, the output is a Web page, be it rendered in HTML, JSON, etc. The blog you point to has a particular style of REST with specific interpretations of the single parameter that can be passed to it. So you will need to use the style you refer to as "querying without an identity", i.e. using a query string when using TopBraid to define custom Web services. Again, the fact that the servlet is always 'sparqlmotion' and and id is required is necessary to provide a tool by which one can define custom services using the sparqlmotion servlet. -- Scott On Oct 19, 2:29 pm, Ted Phelps <[email protected]> wrote: > TopBraid documentation speaks of REST web service using SparqlMotion. > The format I am seeing does not seem to conform to normal REST > practices. The URL I am given is: > > https://services.contoso.com:8443/prd/tbl/tbl/actions?action=sparqlmo... > > Notice how some parameters of the URL do not actually have anything to > do with the data but are used by the underlying process. > > And I would expect the return data to be something like: > > <Projects> > <Project> > <Id>5</Id> > <Name>P5</Name> > </Project> > </Projects> > > This is the kind of URL I am used to seeing for REST: > > https://services.contoso.com:8443/prd/Projects/5 > > Or when querying without an Identity: > > https://services.contoso.com:8443/prd/Projects?name=P5 > > My question is this, are you able to configure TopBraid to conform to > best practices used in REST architectures? > The following link describes what I am expecting from a REST web > service:http://www.xfront.com/REST-Web-Services.html > > Thanks, > Ted -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en
