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.  Tamino insert problems

    Posted Mon March 27, 2006 11:09 AM

    Hi,
    I am trying to insert an xml document into a collection with 2 doctypes,
    but I get an error.

    The error message is:

    com.softwareag.tamino.db.API.accessor.TInsertException( message: null, tag: JavaTaminoAPI_4_2_0_53, java: 1.4.2_08, os: Windows XP 5.1 ):

    at com.softwareag.tamino.db.api.accessor.TAccessFailureVerifier.verifyInsertResponse(Unknown Source)
    at com.softwareag.tamino.db.api.accessor.TXMLObjectAccessorImpl.insert(Unknown Source)
    at com.softwareag.tils.TestTamino.main(TestTamino.java:100)
    

    Caused by: com.softwareag.tamino.db.API.common.TAccessFailureException( message: Tamino access failure (7935, INOXDE7935, Schema not found), tag: JavaTaminoAPI_4_2_0_53, java: 1.4.2_08, os: Windows XP 5.1 ):

    at com.softwareag.tamino.db.api.accessor.TAccessFailureVerifier.newAccessFailureException(Unknown Source)
    at com.softwareag.tamino.db.api.accessor.TAccessFailureVerifier.verify(Unknown Source)
    ... 3 more
    

    while the source code is:

    String xmlString=“3descrizione”;

    	try{
    
    conn = TConnectionFactory.getInstance().newConnection(DATABASE_URL + "/" + COLLECTION,DOCTYPE,USERNAME,PASSWORD );
    
    
    }
    catch(TServerNotAvailableException e){
    e.printStackTrace();
    
    }
    transaction = conn.useLocalTransactionMode();
    
    
    //	Obtain a TXMLObjectAccessor with a DOM object model
    
    
    
    TXMLObjectAccessor xmlObjectAccessor = conn.newXMLObjectAccessor(
    TAccessLocation.newInstance(COLLECTION),
    TDOMObjectModel.getInstance() );
    
    
    
    Xml x = new Xml();
    
    
    Document mydoc = x.StringToDom(xmlString); // w3c Document
    TXMLObject tobj = TXMLObject.newInstance( mydoc);
    
    try{		
    
    
    xmlObjectAccessor.insert( tobj ); //eseguo la insert
    transaction.commit(); //faccio la commit
    
    }catch (TAccessorException accessorException)  {
    
    transaction.rollback();
    
    
    accessorException.printStackTrace();
    }finally{
    
    conn.useAutoCommitMode(); 									 
    try {
    conn.close();
    } catch (TConnectionCloseException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } //chiudo la connessione
    
    }
    
    
    
    }		
    

    Does anyone can help me?


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


  • 2.  RE: Tamino insert problems

    Posted Mon March 27, 2006 11:30 AM

    I suspect that “*” is an invalid XML element name.

    I would expect the document to have a top level element name corresponding to one of the doctypes in the collection.


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


  • 3.  RE: Tamino insert problems

    Posted Mon March 27, 2006 12:40 PM

    Hi Mark,
    I am sorry but there was an error on my cut/paste operation.
    The root of the element is “fagioli”.
    So, the doctype id “fagioli”.

    It seems the API cannot recognize the schema.

    I will send you the Java class as attach

    Thanks a lot
    TestTamino.java (2.76 KB)


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


  • 4.  RE: Tamino insert problems

    Posted Mon March 27, 2006 12:47 PM

    I’m afraid I can’t see the code/attachment.

    The error that you are observing is coming from Tamino - are you certain that the root element name corresponds to a doctype that has been defined within the collection?


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


  • 5.  RE: Tamino insert problems

    Posted Mon March 27, 2006 01:10 PM

    Hi Mark
    here is the .java file, in zip format.

    The root elements corresponds to a doctype defined into the collection.
    I cannot understand the problem I am having

    Regards
    TestTamino.zip (1.04 KB)


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


  • 6.  RE: Tamino insert problems

    Posted Mon March 27, 2006 01:20 PM

    I suspect there is a fault in the serialization of the XML.

    Check out the example code ProcessXMLGreeting in JavaTaminoAPIExamples.jar that ships with Tamino.


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