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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

updating a stored document by using its ino:id

  • 1.  updating a stored document by using its ino:id

    Posted Sun November 24, 2002 01:48 AM

    hi out there,
    i’d like to update docs by using a web-frontend. everything works fine with storing an reading to and from tamino, but updating a document via JS is producing some INOXME8554 (No Message) fault. i’m using the same “process” procedure which is used to save the native doc for the first time. also my edited doc works fine, i receive the “ino:id” from the document to edit, and insert it into my document to update. the process method via Jscript doesn’t work, but updating tamino via “interactive interface” works fine.

     
    function XmlToDB ()
    {
    var dbname="http://host/tamino/db";
    var dbuser="user";
    var dbpass="pass";
    var ProcessObj=new TaminoClient(dbname,dbuser,dbpass);
    var ProcessResult;
    var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
    xmlDoc.async = false;
    xmlDoc.load("tmp/sI.xml");
    ProcessResult = ProcessObj.process(xmlDoc);
    if (ProcessResult.errorNo == "0")
    { 
    ProcessObj.commit();
    alert("No Fault");
    }
    else
    {
    alert(ProcessResult.errorText);
    };	
    };
    



    any ideas?
    thanks for any help.
    ak


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 2.  RE: updating a stored document by using its ino:id

    Posted Mon November 25, 2002 10:01 AM

    The INOXME8554 No message received error is occuring (I think) because the xmlDoc does not contain an XML document and therefore it is empty. The possible reason for that is that the line:
    xmlDoc.load(“tmp/sI.xml”);
    has failed for some reason, e.g. a parse error. Could you add some code after this line to check to see if there are any (parse) errors from MSXML ?


    Stuart Fyffe-Collins
    Software AG (UK) Ltd.


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 3.  RE: updating a stored document by using its ino:id

    Posted Mon November 25, 2002 02:30 PM

    i put some DOM-Error-strings into the code:

    // snip
    xmlDoc.load("tmp/sceneInput.xml");
    ProcessResult = ProcessObj.process(xmlDoc);
    alertxmlDoc.parseError.errorCode+"\n"+xmlDoc.parseError.reason+"\n"+xmlDoc.parseError.srcText);
    if (ProcessResult.errorNo == "0")
    // snip
    </pre><BR><BR>an got the following error listing:<BR><pre class="ip-ubbcode-code-pre">
    -1072898019
    Reference to undeclared namespace prefix: 'ino'. 
    </pre> <BR><BR>maybe i understood something wrong while reading the documentation. i've forgotten where i found the example, that explaines how an existing document could be updated by "process"ing it with its actual "ino:id" in the root-tag. thats why my EDITED document looks like this:<BR><pre class="ip-ubbcode-code-pre">
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <scene ino:id="1">
    <ident>1</ident>
    <scenenumber>s04</scenenumber>
    <scenetitle></scenetitle>
    <bookpage>asdf</bookpage>
    <numberOfShots></numberOfShots>
    <info_plate>no info</info_plate>
    <author>
    <p_name>
    <familyname></familyname>
    <firstname></firstname>
    </p_name>
    </author>
    <category></category>
    </scene>



    as explained before, the inactive interface is still updatin my database at the same ino:id as quoted in the document. JSCRIPT produces the error above. how can include the ino-attribute, so that jscript works and the database wil be updated at the correct position?

    regards
    ak


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 4.  RE: updating a stored document by using its ino:id

    Posted Mon November 25, 2002 03:38 PM

    You need to include the namespace for the ino:id attribute, therefore your document becomes:

      
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <scene xmlns:ino="http://namespaces.softwareag.com/tamino/response2" ino:id="1">
    <ident>1</ident>
    <scenenumber>s04</scenenumber>
    <scenetitle></scenetitle>
    <bookpage>asdf</bookpage>
    <numberOfShots></numberOfShots>
    <info_plate>no info</info_plate>
    <author>
    <p_name>
    <familyname></familyname>
    <firstname></firstname>
    </p_name>
    </author>
    <category></category>
    </scene>



    Hope this helps.


    Stuart Fyffe-Collins
    Software AG (UK) Ltd.


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 5.  RE: updating a stored document by using its ino:id

    Posted Mon November 25, 2002 04:03 PM

    thanks stuart,

    now it work excellently! ;D

    kind regards
    ak


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs