XMachine, POST, and transactions - HELP required.


Having a bit of difficulty with transactions, particularly rolling back.

We need to use POST since our XML can get large and exceed GET’s limitations.

Now, reading through the docs, it says to provide the sessionKey in the _process request, and to use the last sessionKey returned from the command to feed into the next command. However, when doing POST I do not find a session key in the HEADERs of the response nor in the HTTP body (XMachine docs say no body returned using POST)… so where/how do I get the updated sessionKey, since that’s what I need to provide to the _rollback request?

Thank you for your time,


I’m not sure if this question is related to Alissandra’s similar post, but in both cases you might want to consider using the Tamino HTTP Client API for JScript. This uses HTTP POST internally.

Alternatively if you need to write your own code using the MS XMLHTTP control directly, you can see how the JScript API handles sessions by looking at the source code for TaminoLib.js.

He first tries to get the session data from the Response Headers, and if that fails he gets the data from attributes of the ino:response…

var tid = REQ.getResponseHeader(XINOSESSIONID);
var key =  REQ.getResponseHeader(XINOSESSIONKEY);
var version = REQ.getResponseHeader(XINOVERSION);
if	(!tid || !key)
var root=result.DOM.getElementsByTagName("ino:response").item(0);
if	(root)
tid = root.getAttribute("ino:sessionid");
key = root.getAttribute("ino:sessionkey");


[This message was edited by Bill Leeney on 21 Nov 2002 at 10:23.]

Thanks for your help, Bill.

I’ll follow your suggestions and try to update my documents.

Best regards,

Thanks for the help. I’ll sift through the javascript API and compare what is done there to what we’ve been doing.

We’re using C# and .NET and have constructed a Tamino transaction class, so we’re using HttpWebRequest from .NET

The thing I notice from the X-Machine documentation is that the response from _process does not contain session id or session key info in the result body. So it must be in the headers then?

Documentation leaves quite a bit to be desired. :rolleyes: