[Tamino access problem] java class VS servlet!!!

Hallo!
I’ve a big (for me) problem!!1
i’ve this function:

  

public Vector SearchCitationByEE(String ee) throws DAOException{
        if(dataSource.chkConnection()) {
            dataSource=new DataSource();
        }
        Vector res = new Vector();
        Vector Vapp = new Vector();
        String q = "for $q in input()/EnvironmentEffect where $q/EnvironmentEffectName = '"+ee+"' return $q";
        TXQuery query = TXQuery.newInstance(q);
		TXMLObjectAccessor xmlObjectAccessor = dataSource.getTXMLObjectAccessor();
		try {
    		TResponse response = xmlObjectAccessor.xquery( query );
       		TDOMElementIterator iterator = new TDOMElementIterator(response.getXMLObjectIterator());
			TXMLObject xmlObject = TXMLObject.newInstance(TDOMObjectModel.getInstance());
			org.w3c.dom.Node app;
			org.w3c.dom.Element Eapp;
			org.w3c.dom.NodeList appList;
			if (!iterator.hasNext()) {
				System.out.println( "no documents!" );
			} else {
              while (iterator.hasNext()) {
                  while (iterator.hasNext()) {
			  	    Eapp = iterator.next();   //Prendo l'elemento
				    appList = Eapp.getElementsByTagName("AuthorName");
				    for(int k=0;k<appList.getLength();k++) {
                        app = appList.item(k);
                        app = app.getFirstChild();
                        Vapp.add(app.getNodeValue());  //AuthorName
                    }
                    appList = Eapp.getElementsByTagName("BookTitle");
                    for(int k=0;k<appList.getLength();k++) {
                        app = appList.item(k);
                        app = app.getFirstChild();
                        Vapp.add(app.getNodeValue());  //BookTitle
                    }
                    appList = Eapp.getElementsByTagName("Volume");
                    for(int k=0;k<appList.getLength();k++) {
                        app = appList.item(k);
                        app = app.getFirstChild();
                        Vapp.add(app.getNodeValue());  //Volume
                    }
                    appList = Eapp.getElementsByTagName("Chapter_Verse_Line");
                    for(int k=0;k<appList.getLength();k++) {
                        app = appList.item(k);
                        app = app.getFirstChild();
                        Vapp.add(app.getNodeValue());  //CVL
                    }
                    res.add(Vapp);
                    Vapp = new Vector();
                  }
   			  }
            }
        }
		catch (TException insertException) {
		    System.out.println( "XQuery failed!" );
		    System.out.println( insertException );
		}
		return res;
    }
 



If i try to call it from a servlet it give me no document!!!
From a normal java class i’ve no problem!!!
I’ve inserted a “System.out” call to see the value of the param…and it’s correct in both cases!!
To change it’s only the result!!! empty only with the servlet!
This function it’a in a class called “Search”.
pls help me! :slight_smile:
tnx
Luca

hi tobia,

your problem seems to be quite an unusual one indeed. I would request you to kindly help us solve this one for you, by sending us the http communication logs for the underlying tamino communication. You could use any HTTP packet sniffer utility for extracting the logs. The following one might just be useful -

http://www.effetech.com/

Thought, thats not the only option there might be better one available freely. Else coding one yourself wouldn’t be a big deal. :wink:

Hope to hear from you soon…

Rahul Roy

Tamino API for Java
Software AG (INDIA)