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

Difficulty with Append Child

  • 1.  Difficulty with Append Child

    Posted Thu January 15, 2004 04:44 PM

    I am attemping to use AppendChild to add another iteration of an element instead of appending data to an existing element.
    So if I have

    In Java I want to Append another payment.

    9876
    ccccc>
    pppp
    bbbb

    So conceptionally it will reult in this:


    9876
    ccccc>
    pppp
    sssss
    bbbb


    This is my Java Code:
    String data = rec1;
    TLocalTransaction localTransaction = tcon.useLocalTransactionMode();

    // In update

    TXMLObject objAuthor = ti.next();

    Element elemAuthor = (Element) objAuthor.getElement();

    Document doc = elemAuthor.getOwnerDocument();

    Element elemTitle = doc.createElement(fieldName);
    Text textTitle = doc.createTextNode(data);

    elemTitle.appendChild( textTitle);
    elemAuthor.appendChild(elemTitle);
    tacc.update(objAuthor);
    // End of Update
    System.out.println(" Update in completed");


    localTransaction.commit();

    When I run this I get :

    Nested Exception ( com.softwareag.tamino.db.API.common.TAccessFailureException, tag: JavaTaminoAPI_4_1_4_42_1_1, java: 1.3.1, os: Windows XP 5.1 ) stacktrace:

    Tamino access failure (INOXDE7731, (cvc-model-group.1):invalid sequence, Line 1, Column 1086: Line 1, Column 1086: [element “Paydtl_line” in element “Tax”])
    at com.softwareag.tamino.db.API.accessor.TAccessFailureVerifier.newAccessFailureException(Unknown Source)
    at com.softwareag.tamino.db.API.accessor.TAccessFailureVerifier.verify(Unknown Source)
    at com.softwareag.tamino.db.API.accessor.TAccessFailureVerifier.verifyUpdateResponse(Unknown Source)
    at com.softwareag.tamino.db.API.accessor.TXMLObjectAccessorImpl.update(Unknown Source)
    at com.softwareag.tamino.db.API.examples.greeting.AppendChild.main(AppendChild.java:161)
    Exception in thread “main”


    HELP…


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: Difficulty with Append Child

    Posted Thu January 22, 2004 04:15 PM

    Please see my reply > here <

    Thanks.


    #Tamino
    #webMethods
    #API-Management