Hello Rahul Roy and thanks for the answer,
Here is how my app is built:
1. I have a Service Locator method as follows:
/**
* Method obtaining and returning a TXMLObjectAccessor
* @param uri String e.g. "http://localhost/tamino/estela"
* @param collection String e.g. "ibermarcreferencec"
* @return TXMLObjectAccessor
*/
public TXMLObjectAccessor getTXMLObjectAccessor(String uri, String collection) {
TXMLObjectAccessor xmlObjectAccessor = null;
try {
TConnection connection = TConnectionFactory.getInstance().newConnection(uri);
connection.usesLocalTransactionMode();
xmlObjectAccessor =
connection.newXMLObjectAccessor(
TAccessLocation.newInstance(collection),
TJDOMObjectModel.getInstance());
} catch (TServerNotAvailableException e) {
e.printStackTrace();
}
return xmlObjectAccessor;
}
</pre><BR><BR>2. and an execute method that executes the search:<BR><BR><pre class="ip-ubbcode-code-pre"> /**
* This method is the heart of the search engine. It stores the results into the servlet session as well as the search.
* @return <tt>true</tt> if the search yields a result greater than 0, <tt>false</tt> otherwise.
*/
public boolean execute() {
OPCServiceLocator service_locator = OPCServiceLocator.getInstance();
//TODO: externalize those two strings
TXMLObjectAccessor xmlObjectAccessor = service_locator.getTXMLObjectAccessor("http://localhost/tamino/prueba_2", "ibermarcreferencec");
TXQuery xquery = TXQuery.newInstance(opcquery.getXQuery() + footer);
try {
TResponse response = xmlObjectAccessor.xquery(xquery, 5);
List list = OPCConvertUtil.convertResponseIntoDisplayableList(response);
if (response.hasQueryContent() && response != null) {
OPCSessionUtil.putTResponseIntoSession(response);
OPCSessionUtil.putSearchResultsIntoSession(list);
}
return response.hasQueryContent();
} catch (TXQueryException e) {
e.printStackTrace();
return false;
}
}
Any idea why I get this exception?
Thanks in advance,
Julien Martin. Software AG Spain.
Software AG Spain
#webMethods-Tamino-XML-Server-APIs#API-Management#webMethods