TResponse:getFirstXMLObject:getDocument not org.w3c.dom.Doc

Hello everybody!

I make a query and the result is returned in a TResponse object. From there, I take the firstXMLObject and then I make a getDocument to returned (as specified) a org.w3c.dom.Document.
The problem is that the return of the “getDocument()” method is NOT a org.w3c.dom.Document but a DeferredDocumentImpl…

Can someone help me to get this Document in the right “format”???

I use :

  • tamino v 4.4.1
  • sunOne 6.1
  • jre 1.5

Here is the code I use:


		try{
		TConnectionFactory connectionFactory = TConnectionFactory.getInstance();
		TConnection connection = connectionFactory.newConnection("http://myserver/tamino/mydb/");
		
		TAccessLocation accessLocation = TAccessLocation.newInstance("forms");
    TXMLObjectModel objectModel = TDOMObjectModel.getInstance();
    TXMLObjectAccessor accessor = connection.newXMLObjectAccessor(accessLocation, objectModel);
		TResponse response = accessor.query(new TQuery("form[(@owner='admin')]"));
		connection.close();
		 DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
		 DocumentBuilder db = dbf.newDocumentBuilder();
		 Document document = db.newDocument();
		if(response.hasFirstXMLObject()){
			document = (Document)response.getFirstXMLObject().getDocument();
		}
		}catch(Exception e){
			e.printStackTrace();
		}