• web services statement search

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #6695  by ashishk.kulkarni
 
Code: Select all
public void statementSearch()
     {
    	 String token=null;
    	  OKMAuthProxy authP=new OKMAuthProxy();
	    	List filePath=new ArrayList();
	    	
    	 try
    	 {
		      
		     token=authP.login("okmAdmin","admin");
		     System.out.println("token"+token);
		     OKMSearchProxy con=new OKMSearchProxy();
		     
		     System.out.println("2");

		     //con.findByContent("token","i");

		     //System.out.println("Object created")
		       //   System.out.println("2");
		    	 
		    
		    	QueryResult [] qR=con.findByStatement(token, txtsearch.getText(),"xpath");
		    	   System.out.println("22");
		    	   alert("before for loop");
		    	for(int j=0;j<qR.length;j++)
		    	{
		    		//alert("Author:"+qR[j].getDocument().getAuthor());
		    		 filePath.add(qR[j].getDocument().getPath());
		    		 
		    	alert("data");
		    		//String f=qR[j].getDocument().toString();
                  		    		
		        }
		    	alert("after for loop");
		    	 ListModel lstsearch=new SimpleListModel(filePath);
		    	 lstSearch.setModel(lstsearch);
		    	System.out.println("3");
		        authP.logout(token);
		     }
    	 catch(Exception e)
    	 {
    		 try
    		 {
    		 authP.logout(token);
    		 }
    		 catch(Exception ex)
    		 {
    			 System.out.println("ex:"+ex);
    		 }
    		 System.out.println("e:"+e);
    	 }
    			 
    	 
     	}
it is not giving any error but how to give xpath i cant understand in text box
 #6723  by ashishk.kulkarni
 
As in OKMsearch Proxy.java findbyname,findbycontent methods are there and find is not there.But there is give on webservices guide on open km site one more method is given which is find how to use this method.
 #6761  by pavila
 
The XPath query is wrong and should be so:
Code: Select all
/jcr:root/okm:root/Type1/Category 1/Sub-Category 1//element(*, okm:document)

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.