• Request: example how to use (OpenKM) webservices

  • 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.
 #1555  by peter
 
hi,

i have some experience in programming (c++, c#). but i have never used webservices.
i have no idea where to begin and how to use a webservice in particular the OpenKM one.

i have read trough the OpenKM documentation and the webservice specs. i have also search the internet about webservice. i now understand what it is and what is possible.

i hope that somebody will be kind enough to post a complete working example on how to use the OpenKM webservice. for example: how to create a new folder in the OKM/root folder using webservice?

any help will be very appreciated thanks
 #1590  by pavila
 
This is a simple client using Python:
Code: Select all
from SOAPpy import WSDL

wsdlAuth = \'http://localhost:8080/OpenKM/OKMAuth?wsdl\'
wsdlSearch = \'http://localhost:8080/OpenKM/OKMSearch?wsdl\'
sAuth = WSDL.Proxy(wsdlAuth)
sSearch = WSDL.Proxy(wsdlSearch)

token = sAuth.login(arg0=\'user\', arg1=\'pass\')
print \'Token: \'+token

xpath = \'/jcr:root/okm:root//element(*,okm:document)[jcr:contains(@okm:keywords,\\\'document\\\')]\'
findByStatementResponse = sSearch.findByStatement(arg0=token, arg1=xpath, arg2=\'xpath\');

sAuth.logout(arg0=token)

for queryResult in findByStatementResponse[\'value\']:
	print queryResult
It search creating a custom XPath query.

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.