Hello out there,
I have some questions about, how to inserting JDOM-Objects from servlets into the database. First I created a JDOM-Object:
import org.jdom.*;
Document mydoc = new Document ( new Element ("Anwender") );
Element root = mydoc.getRootElement();
Element erstesElement = new Element ("vorname").setText(vorname);
root.addContent( erstesElement );
Element zweitesElement = new Element ("nachname").setText(nachname);
root.addContent( zweitesElement );
Element drittesElement = new Element ("wohnort").setText(wohnort);
root.addContent( drittesElement );
Then I buildet a connection to a database ( this works, no need to dump here ) and a accessor-Object.
TXMLObjectAccessor xmlObjectAccessor = connection.newXMLObjectAccessor(
TAccessLocation.newInstance( "ino:etc" ),
TJDOMObjectModel.getInstance() );
But when I try to fill this accessor with my JDOM-Object…
xmlObjectAccessor.insert( mydoc );
…
it doesn’t work.
Do I have to build a TXML-Object first and commit it to the accessor?
How to do this?
Gruss Christian
#webMethods-Tamino-XML-Server-APIs#API-Management#webMethods