The Tamino API 4J has some inbuilt object model support, e.g. DOM, JDOM. For SAX based handling you need to define the classes for SAX based handling, create a TSAXObjectModel object and register it. This is only registered for the runtime life of your class(es), i.e. the information is not persisted anywhere.
When you obtain an TXMLObjectAccessor you need to specify which object model to use. So for example if you wish to get individual documents as DOM instances you can ask for it when you obtain a TXMLObjectAccessor, e.g.:
TXMLObjectAccessor tacc = tcon.newXMLObjectAccessor (
TAccessLocation.newInstance(COLLECTION),
TDOMObjectModel.getInstance() ) ;
</pre><BR><BR>For SAX based handling you could do the following:<BR><BR><pre class="ip-ubbcode-code-pre">
TSAXObjectModel mysaxmodel = new TSAXObjectModel (....
TXMLObjectModel.register (mysaxmodel);
TXMLObjectAccessor tacc = tcon.newXMLObjectAccessor (
TAccessLocation.newInstance(COLLECTION), mysaxmodel) ;
By asking for a TXMLObjectAccessor and specifying the registered object model your handlers will be used.
I recommend that you have a look at this sample for a complete example of using SAX based handling with the Tamino API for Java.
Hope this helps.
#webMethods-Tamino-XML-Server-APIs#webMethods#API-Management