webMethods

webMethods

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
  • 1.  Return new ino:id after insert

    Posted Tue May 17, 2005 12:27 PM

    Hello!

    I need to retrieve the ino:id that has been newly assigned to a document that has just been inserted.

    There are possibly several identical documents under one doctype. So there is no way to perform a query on the id based on the content of the document. (the structure may be unknown to the application anyway.)

    I’m using this id for performing a query immediately after insertion.
    Is it possible to do this with the C-API?
    i tried to use tac_get_messagetext after tac_process, but it return nothing interesting.

    Thanks,
    Henning


    #API-Management
    #webMethods
    #Tamino


  • 2.  RE: Return new ino:id after insert

    Posted Tue May 17, 2005 12:43 PM

    Another way that just came into my mind is to add a unique name to the document when inserting, like tac_load allows.
    Is it possible to add xml documents with tac_load?
    The API documentation tells “If required, use tac_process() instead for XML documents.”
    When is this required?
    Which mime_type value is necessary for xml?

    Greets,
    Henning


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: Return new ino:id after insert

    Posted Tue May 17, 2005 12:59 PM

    These posts would probably have been better under the “Tamino API for C” forum.

    After a _process request to Tamino the ino:id normally appears in the response document and as a HTTP header (X-INO-id).

    You might be able to see this trying a test like the following:

    http://localhost/tamino/mydb/ino:etc?_process=


    #webMethods
    #Tamino
    #API-Management


  • 4.  RE: Return new ino:id after insert

    Posted Tue May 17, 2005 01:30 PM

    Thanks markk!

    But, the result of http://localhost/tamino/mydb/ino:etc?_process=
    is different from what i get by calling tac_get_messagetext after calling _process(), which is just like this:

    <?xml version="1.0" encoding="iso-8859-1"?> 200 document processing started

    (not that interesting for me :wink:

    Is there a way to get the result, the webserver returns after calling _process()?

    Greets,
    Henning


    #webMethods
    #Tamino
    #API-Management


  • 5.  RE: Return new ino:id after insert

    Posted Tue May 17, 2005 01:50 PM

    I had a quick look in TaminoAPI4C.h and the following functions look appropriate. The documentation seems to support this.

    
    int tac_get_inoID(TAC_HANDLE handle, long int *ino_id);
    int tac_last_xml_response(TAC_HANDLE handle, const char **response);

    #webMethods
    #API-Management
    #Tamino


  • 6.  RE: Return new ino:id after insert

    Posted Tue May 17, 2005 04:17 PM

    Thanks!

    tac_last_xml_response is exactly what i was looking for.
    :lol:


    #Tamino
    #webMethods
    #API-Management