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

Natural Event Extension not being executed

  • 1.  Natural Event Extension not being executed

    Posted Tue August 27, 2002 01:48 PM

    I have changed the event program in SYSEXSXS to create a work file. I have a program which does a _connect, _process, _commit, _disconnect. No work files are being created, neither are there any trace records other than sxsstoretofile. I would have expected a record to be created for the _connect, _commit and _disconnect. Is this a bug or am I missing something?

    My program looks like this:
    define data
    parameter using sxsev-a
    object using sxsnat-o
    local
    1 #filename(a100)
    end-define

    added by pjf
    * Open/create this file and write the document into it.
    compress ‘G:\TEMP\tamino\event’ sxsev-a.state Time ‘.txt’ into #filename
    leaving no
    define work file 3 #filename type “unformatted”
    write work file 3 variable sxsev-a.state
    close work file 3
    end of pjf additions
    sxsev-a.rc := 0
    *
    end


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Natural Event Extension not being executed

    Posted Tue August 27, 2002 04:38 PM

    Hi Priscilla

    There is some information I’d like to have to help you.

    First of all: Server Extension event functions are only called when another function of the same Server Extension Object has been called before. Same object means: same Server Extension and same session.

    So you can never get any _connect event. And _commit/_disconnect are only raised when the event function is part of the same Server Extension Package.

    Regards

    Julius Geppert


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: Natural Event Extension not being executed

    Posted Tue September 03, 2002 10:03 AM

    Here are the relevant snippets from my program:
    DEFINE WORK FILE 1 “G:\TaminoSXS\employee10000000.xml”
    READ WORK FILE 1 RECORD WORK-IN
    COMPRESS work-xml-in WORK-IN INTO work-XML-IN LEAVING NO
    END-WORK
    * --------------------------------------------------- GET WEATHER DATA
    #commandverb := ‘_connect’
    perform request-doc
    #data := work-xml-in
    #commandverb := ‘_process’
    perform request-doc
    #data := ‘'
    #commandverb := ‘_commit’
    perform request-doc
    #data := '

    #commandverb := ‘_disconnect’
    perform request-doc

    * --------------------------------------
    define subroutine request-doc
    * --------------------------------------
    if #commandverb ne ‘_connect’
    compress #DATA ‘&_sessionid=’ #sessionid ‘&_sessionkey=’ #sessionkey
    into #data_plus_session leaving no
    else
    #data_plus_session := ''
    end-if

    REQUEST DOCUMENT FROM URL
    WITH DATA NAME #commandverb VALUE #data_plus_session
    RETURN
    HEADER NAME ‘HTTP-Statustext’ VALUE HTTP-STATUS-TEXT
    PAGE XML-IN
    RESPONSE HTTP-STATUS

    IF HTTP-STATUS = 200 THEN
    … use the XML toolkit parser
    END-SUBROUTINE
    * ----------------------- CALLBACK HANDLER
    DEFINE SUBROUTINE CALLBACK
    *

    if XML_PARSER_XPATH = ‘ino:response/@ino:sessionid’
    #sessionid := XML_Parser_content
    write ‘=’ #sessionid
    else
    if XML_PARSER_XPATH = ‘ino:response/@ino:sessionkey’
    #sessionkey := XML_Parser_content
    write ‘=’ #sessionkey

    end-if
    end-if



    The _process is using the SXS extension, so I would have assumed there should be an event triggered.

    Another question - if one just does a straight _process, which implies ending the session should the event be triggered then, or is it only when there is a _connect, _process, _commit?

    Thanks… Priscilla


    #Tamino
    #API-Management
    #webMethods