public static void fillVector(String docType, Vector docVector, String qStrXpath, String qStrValue, String qStrOpr) {
try {
BusinessDocumentWorkspace ws = new BusinessDocumentWorkspace(store);
QueryContainer query = new QueryContainer(docType);
query.add(new QueryElement(qStrXpath, qStrValue, qStrOpr));
Cursor docCursor = ws.query(“qry”+docType, query);
int counter = 0;
while (docCursor.hasNext()) {
BusinessDocument doc = (BusinessDocument)docCursor.next();
counter++;
System.out.println( docType+ ": " + doc.getDocumentId());
docVector.add(doc);
}
docCursor.close();
} catch (StoreException e) { e.printStackTrace(); }
}
this one a simple query code.
But first you should create store and register doctype
public static TaminoStore createStore( String url ) throws StoreException {
tstore = new TaminoStore(url);
return tstore;
}
url is your database like
“http://localhost/tamino/SampleDB”;
protected static void RegisterDocType(String docType,String coll) {
tstore.registerDoctypeCollection(docType,coll);
}
coll is your collection
Brgs
#webMethods#API-Management#Tamino