Skip to Content
The KM Web Service API was introduced for SAP NetWeaver 7.0 SPS 13 and offers a new possibility to connect to KM functions remotely. In this blog I will give a first impression what capabilities the new API will offer. h5. How to get the WSDL of the KM Web Services ?  Of course to get started with Web Services at all it is required to get access to the WSDL of the called Web Service. For KM Web Services you will find the WSDL description in the *Web Service Navigator* ([http://:/wsnavigator | http://:/wsnavigator]) of your SAP NetWeaver installation. h5. RepositoryFrameworkWS and IndexManagementWS – new Web Services in SAP NetWeaver ! There are two different Web Services in the SAP NetWeaver shipment which allow a remote KM access.  The *Repository Framework Web Service* (RepositoryFrameworkWS) offers basic functions like create, copy, move, rename or delete operations on documents (resources) in the KM repository framework. It is mainly designed for executing functions on top of a repository manager. You also can get navigations trees (folder hierarchies) and metadata of documents with this Web Service.  The followinging aspects of a repository manager are supported: 0.1. Lookup: This aspect covers lookup operations. Lookup operations are operations used to look up resources identified by resource identifiers in an repository. The resource identifier of a resource is the address of the resource and identifies exactly this single resource.  0.2. Namespace: This aspect covers namespace operations. Namespace operations are operations reading or manipulating the hierarchy of resources in the repository. Retrieving all child resources of a collection is an example of reading – creating a new document is an example of writing.  0.3. Property: This aspect covers property operations. Properties are bits of information attached to a resource. They have a name, are of a predefined type, e.g. boolean or string and have one or multiple values. Retrieving all properties of a resource is an example of reading – setting a new property is an example of writing.  0.4. Content: Content is stored in a byte array and only documents may have content. When a content is set, certain properties are set along with, e.g. the content length or type. Thoose properties are also available as one single object, the content metadata object. Retrieving content or content metadata is an example of reading – setting content is an example of writing.  0.5. Lock: Locking a resource helps synchronizing on resources. Different locks are available, e.g. for reading or writing and can be set or removed. Locks have a timeout in order to automatically free resources. Getting all locks on a resource is an example of reading – aquiring a lock on a resource is an example of writing.  0.6. Security: When a read or write operation on an aspect is called the caller must have certain permissions to do so, e.g. user A may read, but may not create new resources. These permissions can be queried or set using this aspect. Checking for a certain permission for a user is an example of reading – setting the permission for a certain user is an example of writing, but not yet supported.  0.7. Versioning: Resources can be set under version control, meaning that all changes to the resources can be tracked. Only checked out resources can be modified and all changes will be collected and assigned to the revision given back by the system when checking the resource in again. Querying the revision history is an example of reading – checking a resource in is an example of writing.    The *Index Management Web Service* (IndexManagementWS) offers indexing and search capabilities on top of KM’s index management service.  The followinging aspects of the index management are supported: 0.1. Index: This aspect covers index management operations. It provides some basic management features to create/delete indexes and to attach/detach datasources as well as the search funtionality.  0.2. PerfIdxMgmt: This aspect covers performance issues and is needed for Web Service maintenance purposes only. Performance information supports developers in using and optimizing the Service. Among other information the processing time (on average/last call) or failure rate (number of caught exceptions in relation to number of made calls) can be queried per Web Service method.  0.3. CfgIdxMgmt: This aspect covers config operations and is needed for Web Service maintenance purposes only. Configuration settings define various runtime properties of the Web Service. Among other settings tracing or logging can thereby be switched on or off.  The following diagram will show a simplified architecture of the KM Web Services:
To report this post you need to login first.

12 Comments

You must be Logged on to comment or reply to a post.

  1. Sven Wylock
    Hi,

    is there a possibility to use this approach as a repositoy in OAC0 to be used in e-Recruiting 6.0 as storage for the documents produced during the process? If yes, what is the HTTP script to be used when configuring the content repository in OAC0?

    Thanks.

    Sven Wylock.

    (0) 
  2. Pankaj Chouhan
    Hi Brandit,
    I am trying to access the SAP KM Repository through Web Service. I want to know that do i have to authenticate the user by username and password.

    Is there any other web service for authentication?

    Or RepositoryFrameworkWS solves this purpose?

    If RepositoryFrameworkWS is used for authenticating the user by passing username and password then how can we do that?

    I dont find any function in RepositoryFrameworkWS which is used to authenticate the user?

    Kindly help me, am in a big mess.

    Thanks in advance and waiting for ur reply

    (0) 
    1. Thilo Brandt Post author
      Hi Pankaj,

      you can authenticate users directly in the Web Service call:

      // added basic authentication credentials to WebService call
                ((BindingProvider)vi).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, user);
                ((BindingProvider)vi).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);

      user and password fields ist of type String. Both fields are passed to the Web Service proxy.

      Kind regards,
      Thilo

      (0) 
  3. Douglas Wegscheid
    From the documentation and playing with the wsnavigator, it appears that reading and manipulating subscription information is not possible in SPS 13. Is this correct, or am I missing something?
    (0) 
  4. Venkat Raman
    Hi Thilo,

    Excellent Blog!
    We are trying to build a .NET component to use the KM Web Service and within the .NET component if we already have a session cookie MYSAPSSO2 how do we pass this on to the Web SErvice call to KM.

    Thanks
    Venkat

    (0) 
    1. Claus Eiche
      Hi Thilo,

      Again – great Blog
      I’m comming back to this one. We are planning to integrate TREX via the KM webservice into our enterpise search portal running on JBoss.
      We have already an MYSAPSSO2 cookie. How can I use this for authentication agains the KM webservice.

      Thanks

      Claus

      (0) 
  5. Enrico Bobel
    Hi,
    we would like to implement an Excel based tool for KM folder security management. This tool could be similar to the one we currently use for managing KM properties that comes from a SAP contribution. Our problem is that setting security through the KM WS seams not yet possible. Am I right? Any plan for releasing this feature? Many Thanks. Enrico 
    (0) 
  6. Anand K
    When I use the wsdl to generate the client code using axis, I get the following error.  Few of the datatype have package defined as “java”. 

    java.lang.ExceptionInInitializerError
         at RepositoryFrameworkWSWsd.RepositoryFrameworkWSLocator.getConfig1Port_Rpc(RepositoryFrameworkWSLocator.java:55)
         at RepositoryFrameworkWSWsd.RepositoryFrameworkWSLocator.getConfig1Port_Rpc(RepositoryFrameworkWSLocator.java:50)
         at pkg.temp.CallWebService.main(CallWebService.java:32)
    Caused by: java.lang.SecurityException: Prohibited package name: java
         at java.lang.ClassLoader.defineClass(ClassLoader.java:524)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)

    ANy help?

    (0) 
  7. Jiang Liu
    Hi,

    Thanks for your excellent example. However this is done in Java with JDK6.0. Is this possible to be done in Flex builder, say Builder 3?

    I have tried standard flex web services component but none of them work. Do we need to have some sort of “proxy” in actionscript in order to get our flex application to get access to KM service?

    (0) 

Leave a Reply