IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

XMachine, POST, and transactions - HELP required.

  • 1.  XMachine, POST, and transactions - HELP required.

    Posted Wed November 20, 2002 09:52 PM

    Hello

    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,

    Mark


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: XMachine, POST, and transactions - HELP required.

    Posted Thu November 21, 2002 10:42 AM

    Hi,
    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");



    HTH

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


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: XMachine, POST, and transactions - HELP required.

    Posted Thu November 21, 2002 04:06 PM

    Thanks for your help, Bill.

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

    Best regards,
    Alissandra.


    #Tamino
    #webMethods
    #API-Management


  • 4.  RE: XMachine, POST, and transactions - HELP required.

    Posted Thu November 21, 2002 05:46 PM

    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:


    #Tamino
    #webMethods
    #API-Management