Communicate to Tamino via HTTP?

Is it possible to communicatie to Tamino via HTTP? How do I set this up?

Ummm … unless I?m misunderstanding your question, HTTP is the default method for accessing Tamino. Just follow the standard installation and it?s all set up. I?ve never accessed Tamino any other way.

I’m not the one having to setup Tamino. I just need to access it via HTTP. Can you give me some more info about what I need to post/get and what the inputs should be? What would a typical response look like?

Thanks.

Michel

There are a number of APIs provided that do this for you (Java/C# are the major ones). To some degree the APIs insulate the user from interface changes when dealing with Tamino.

There is a section of documentation entitled “X-Machine Programming” that details the lower level interface to Tamino if you you wish to go HTTP.

So are you saying it’s not wise to HTTP to access Tamino (or X-machine programming?). Is access via HTTP a standard feature of Tamino. I need to talk to Tamino 4.2.1. Would I be able to do that without:
A. Having to install/enable extra product features?
B. Risking it won’t work after a product upgrade that might forbid this way of communication?

Michel

No, I’m saying that the APIs do most of the communications work for you. All you need to do is use the APIs to perform the Tamino level operations that you are interested in doing (e.g. define schemas, read/write documents, process queries).

Talking to Tamino via HTTP is the usual way of access.

The Java API (officially called “Tamino API for Java”) is the most mature API. To use it you would only need 1 jar + possible support jars.

I’m going to have to query an XML structure that maps a document in chapters, paragrapgh, images-refs, footnotes and more. Is it possible to setup a query to get me all documents/chapters that contain a specific word somewhere in the xml-graph that it’s made up out of.

Michel

Hi


So are you saying it’s not wise to HTTP to access Tamino (or X-machine programming?).

There is no reason not to use it except the missing comfort form other APIs which
give you direct access to the DOM or manage session context for you.
But all APIs map to this HTTP interface internally.


Is access via HTTP a standard feature of Tamino. I need to talk to Tamino 4.2.1. Would I be able to do that without:
A. Having to install/enable extra product features?
B. Risking it won’t work after a product upgrade that might forbid this way of communication?


Yes, it is a standard feature and will remain compliant with all upcoming versions.
As soon as you start a database, it will be addressable via a web server.
The standard Tamino installation configures web servers for Tamino access. Of
course, a local machine administrator can turn off or somehow restrict access via
web server. Should this be the case in your scenario, you can set up a web server of your own.
Caution: a responsible Tamino admin can restrict the web servers that are allowed
to access a particular Tamino database. In this case, you might be locked out.
And this is exactly the intention of the admin.

I think you do want to read the manual “X-Machine Programming” mentioned above. But just as an example, if I put an XQuery expression in a file named, say, q.xquery, then I can send it to Tamino using curl:

$ curl -F _xquery=@q.xquery http://hostname/tamino/dbname/collection

The result is an XML document with root ino:response. Its children are an xq:query element containing the text of your query expression, an ino:message element describing the query parsing (if your query contains an error, it would be described here), then an xq:result element containing the actually result of evaluating the query expression, and finally a second ino:message element describing the evaluation. In Tamino 4.2 there?s a way to avoid getting the additional information beyond the result, but I don?t have the documentation handy and don?t remember it off the top of my head.