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
  • 1.  Insert documents into tamino

    Posted Thu November 27, 2003 02:09 PM

    Hi,
    I have an application that loops thru Employee document and prints them depending on whether they meet several conditions and renames the Employee element to SubmissionEmployee in the application.
    Now I want to insert all the SubmissionEmployee document back into tamino.

     
    outputter.output(employee, System.out);
    
    // Insert the new Object to Tamino
    TXMLObject submissionEmployee = TXMLObject.newInstance(employee);
    response = accessor.insert(submissionEmployee); 


    I now get an error Tamino access failure (, (cvc-particle.2.1): element content missing, minOccurs constraint violation in element declaration, Line 1, Column 38: Line 1, Column 38: [element “EmployeeDetails” in element “SubmissionEmployee”])
    What can be the problem and how best can I solve it.
    Thanks


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


  • 2.  RE: Insert documents into tamino

    Posted Thu November 27, 2003 02:22 PM

    The error arises simply because the the modified document does not conform to the schema. The error says that there is no EmployeeDetails element in SubmissionEmployee. This can be solved by modifying the schema to add/change the minOccurs facette on the EmployeeDetails element with the value “0” to make it optional.

    Hope this helps.

    Stuart Fyffe-Collins
    Software AG (UK) Ltd.


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


  • 3.  RE: Insert documents into tamino

    Posted Wed December 03, 2003 08:49 AM

    Thanks for the reply Stuart,
    I’ve checked… the modified document conforms to the SubmissionEmployee Schema. The EmployeeDetails element is there as well. I’ve also modified the schema but I still get the same error
    Nested Exception ( com.softwareag.tamino.db.API.common.TAccessFailureException, tag: JavaTaminoAPI_4_1_4_42_1_1, java: 1.4.1_02, os: Windows XP 5.1 ) stacktrace:
    Attached please find the result document that I get out of my java program and the SubmissionEmployee schema.
    Thanks
    SubmissionEmployee.tsd (9.01 KB)


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


  • 4.  RE: Insert documents into tamino

    Posted Wed December 03, 2003 08:54 AM

    Here is the result document from the java application attached.
    Thanks
    ResultDoc.rtf (4.16 KB)


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


  • 5.  RE: Insert documents into tamino

    Posted Wed December 03, 2003 09:37 AM

    Hello, the xml document can be stored againest the schema. So I am guessing now there is a different problem and the error now is different to the original one? If not is the database and collection that the java program is updating correct - does it have the correct schema?

    Bye for now.

    Stuart Fyffe-Collins
    Software AG (UK) Ltd.


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


  • 6.  RE: Insert documents into tamino

    Posted Wed December 03, 2003 12:34 PM

    Yes the database has the correct schema. I think the problem is that when I add an element it get inserted anywhere and not in a specific position as the schema is. Hence my other post http://forums.tamino.com/3/OpenTopic?a=tpc&s=153292895&f=1762910353&m=2032955647
    Please advice.
    Thank again.


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