How to use KM APIs, Can we use them in Standalone J2ee Application

Hi Experts,
I got KM APIs.
I need to use them to access the KM Repository Content.
I m a newbie in SAP KM.
Can anyone help me to use KM APIs.
For Eg:
com.sapportals.portal.security.usermanagement.IUser user = …
IResourceContext resourceContext = new ResourceContext(user);
RID rid = RID.getRID("/etc");
try {
  IResource resource = ResourceFactory.getInstance()
                       .getResource(rid, resourceContext);
  if( resource != null ) {
    // resource found
    System.out.println("resource " + resource.getRID() + " found");
  } else {
    // resource not found
    System.out.println("resource " + resource.getRID() + " does not exist");
catch( ResourceException e ) {
  // problem while retrieving the resource
  System.out.println(
                    "exception while trying to get resource " + e.getRID()
                    + ": " + e.getMessage()
How will i get the IUser populated?
Can i use KM APIs from a standalone J2EE application?
Can i Populate IUser in standalone J2EE application's Servlet?
Please help me out.
Waiting for reply
-pankaj

Hi Prem,
Can u tell me how to deploy a war file on to the SAP J2EE server?
I know how to deploy on Tomcat Server, but dont have any experience abt SAP J2EE server.
Does SAP J2EE server also have some Webapp directory like TOMCAT where we have to put our WAR File?
Or to Deploy a WAR File in SAP J2EE server is different, if yes then wats the procedure to do that?
And can i access the KM APIs in SAP J2EE Server?

Similar Messages

  • Downloaded ringtones to microSD card but can't figure out how to use them

    I downloaded a bunch of ringtones and I can find them if I go to "Files/ringtones" on my microSD card, but when I try to use one in Settings/sounds/phone ringtone they are not there.  I can't figure out how to use them.  Can anyone help??  Thanks!

    When I go to Music app, the ringtones aren't in the list of artists/songs.  They are stored in the ringtones folder so I don't think they would show up in the Music app.

  • I've just brought myself a new MacBook Pro from a friend I have no idea how to use them I YouTube how to reset a MacBook Pro I done everything all we'll In till you reinstall then it say "this disk is locked"??? Can anyone help me please

    I've just brought myself a new MacBook Pro from a friend I have no idea how to use them I YouTube how to reset a MacBook Pro I done everything all we'll In till you reinstall then it say "this disk is locked"??? Can anyone help me please

    I done everything all we'll In till you reinstall
    Please detail ALL you have done so far in the way of troubleshooting?   Need this info to avoid the been there done that scenarios.
    Care to share which OS you are using?
    Which MBP model do you have? 

  • What are SMOUTIL1,SMOUTIL2,SMOUTIL3?where can i see?how to use them?

    What are SMOUTIL1,SMOUTIL2,SMOUTIL3?
    where can i see?
    how to use them?
    Please tell me,Thank you very much.

    SMOUTIL1, SMOUTIL2, SMOUTIL3 are considered the WMD's of the CRM middleware. 
    If they fall into improper hands, your middleware system could be wiped out and destroyed, reaping havoc on both CRM & ERP.
    Please read the all the documentation located here, before you try to use these wmd's.
    http://help.sap.com/saphelp_crm40/helpdata/en/c8/93ad3a9bfd664ee10000000a114084/frameset.htm
    You may want to also first read the book just published by the SAP press called the SAP CRM Middleware optimization guide, before you try doing any work with the CRM middleware.
    Take care,
    Stephen

  • What is Digital Signature, How to use it in web based applications?

    I am new to digital signatures. Any body can help me how to create a digital signature and how to use it in web based applications. Do we need certificates to use digital signatures?

    <link_farm_and_everything_else_removed_by_moderator>
    Edited by: Julius Bussche on Sep 3, 2008 8:59 AM

  • My phone has no more storage but it says i have 5gb on icloud but i don't know how to use them.

    My phone has no more storage but it says i have 5gb on icloud but i don't know how to use them.

    iCloud storage doesn't affect the available storage on your device.  It's for backing up your device and syncing your data, so you can recover the data if needed.
    You probably need to import photos/videos to your computer or another destination (like a photo kiosk & burn CDs), and then delete them from your device.  Or, delete some unused apps from your device.

  • How to use " toFront() " method in java application and in which package or

    How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.

    The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
    To use it in a Java application, create an object x of either of those two classes and write "x.toFront();".

  • Hi yesterday i downloaded a software from i tunes for keyboard short cut and i don't know how to use them and install them, how to use keyboard shorts bought from i tunes

    hi yesterday i downloaded a software from i tunes for keyboard short cut and i don't know how to use them and install them, how to use keyboard shorts bought from i tunes

    You can install it on your iOS device (iPad, iPhone, iPod Touch) either by redownloading it directly on the device via the Purchased tab in the App Store app on it, or by connecting the device to your computer's iTunes and syncing it to it.
    Syncing apps from a Mac : iTunes 11 for Mac: Sync and organize iOS apps
    from a PC : iTunes 11 for Windows: Sync and organize iOS apps
    As to how to then use the app, if the description on the app's description page in the store doesn't describe how to use it in enough detail, then is there a link to the developer's website on its description page, and does that have details ?

  • What are variables or parameters in Apex and how to use them?

    Hi
    What are variables or parameters in apex and how to use them to connect and run BI Publisher Report
    From Apex URL

    Hello Kanaiya,
    You should go here: http://www.oracle.com/technology/products/database/application_express/index.html
    Look at "What is Oracle APEX?" then download the documentation and review the various PDF files that are available.
    If you have a version of APEX installed and available, go through the 2-Day Application Express Developer's Guide followed by the Advanced Developer's Guide.
    Good luck,
    Don.

  • How to use crystal report in J2EE Project.

    how to use crystal report in J2EE Project.. any one know please inform me...
    thank you..

    http://www.inetsoftware.de/products/crystalclear/Crystal-Reports.htm?adwords=googleCrystal&gclid=CKDD1YDem5UCFRpknAodZA4EhA
    I think this might help u...

  • How to use JMS in a J2EE environment

    Hello all,
    I would like to find out how to use JMS in a J2EE environment. I use Borland Enterprise Server. Do I need to buy a message software to use JMS? How to use JMS with Message Driven bean?
    Thanks a lot.
    Best regards
    Susan

    If you don't want to buy you could try OpenJMS, a free JMS product (http://openjms.sourceforge.net/)
    As for learning how to use JMS w/ MDBs, I would suggest grabbing a book on JMS. I found the OReilly book on JMS to be pretty helpful for me.

  • NI 6008 - Questions on the C APIs and how to use them

    Hi
    I am trying to use the NI 6008 to drive a Digital Programmable Attenuator and had a few questions. I am newbie with this device, so most of my questions are relating to figuring out the basics with this device.
    1) I am hoping to be able to write a simple C program to have the NI USB 6008 drive this Digital Programmable Attenuator. Is this possible? I could find the NI-DAQmx C Reference Help file, but I cant seem to find how to build and load a program onto the NI USB 6008?
    2) I would like to be able to turn ON a particular attenuation setting on the Digital Prog. Atten. at a specific instant and after a few milliseconds turn it OFF. And repeat this endlessly. I was looking for a Timer API to let me control the Digital Prog. Atten. at set timer interrupts but I am not sure if there is a way to do this. I see the APIs: DAQmxCfgImplicitTiming and DAQmxCfgSampClkTiming. But I am not 100% sure if these are the right APIs to use for this purpose. Also which APIs can I use to set the Digital lines in the DAQ to highs and lows?
    Like I said earlier, I am a newbie with this device and I am not really sure if I am going in the right direction. Any help would be greatly appreciated.
    Thanks
    Anand

    You do not load a program onto the device. Your program runs on your pc and you build your program that calls the DAQmx functions.
    There is no clock for for the digital I/O. As the spec says, it is strictly software timed which means you explicitly write a true or false, one state at a time. This is subject to jitter from Windows and I would not expect rates above 100 Hz.

  • Standard Bapi... how to use them

    Hi \
    How to use standars Bapi's..
    i need step by  demo for the same...
    Can any buddy ....give me the right way to  play with Bapi's
    Regads.
    Lakhan

    Hi,
    ABAP -> BAPI ->BAPI Step by Step Example
    <b>Business Application Program Interface</b>
    1.     About the Example
    2.     STEP 1 - Define a structures for the BAPI
    3.     STEP 2 - Write Function Module
    4.     STEP 3 - Create the API Method Using the BAPI WIZARD
    5.     STEP 4 - Final steps
    About the example
    This BAPI reads system status for a production order from table JEST and system status text from table TJ02T
    Name
    ZGetOrderStatus
    Function group      ZBAPISTATUS
    Function module:      Z_BAPI_GET_ORDER_STATUS
    Import parameters:      ORDER_STATUS_IMPORT type ZBAPI_ORDER_STATUS_IMPORT:
    •     AUFNR Order number (Keyfield)
    •     SPRAS Language
    •     ExcludeInactive - Checkbox - Exclude inactive status
    Tables      T_BAPISTAT type ZBAPISTAT:
    •     OBJNR like JEST-OBJNR
    •     STAT like JEST-STAT
    •     INACT like JEST-INACT
    •     TXT04 like TJ02T-TXT04
    •     TXT30 likeTJ02T-TXT30
    Export parameters      RETURN like BAPIRETURN
    <b>STEP 1 - Define a structures for the BAPI</b>
    In this step a structures for the parameters and tables of the function module used for the BAPI are defined.
    Use Data type -> Structure
    Define the following structures:
    ZBAPI_ORDER_STATUS_IMPORT which contains the following fields:
    •     ORDERID Order number (Keyfield)
    •     SPRAS Language
    •     ExcludeInactive - Checkbox - Exclude inactive status
    ZBAPISTAT:
    OBJNR like JEST-OBJNR
    •     STAT like JEST-STAT
    •     INACT like JEST-INACT
    •     TXT04 like TJ02T-TXT04
    •     TXT30 likeTJ02T-TXT30
    Important note:
    You will have to define a structure for every parameter in the BAPI. You cannot use the same structures used in existing applications because BAPI structures are frozen when BAPIs are released and then there are restrictions on changing them.
    ZBAPI_ORDER_STATUS_IMPORT
    ZBAPISTAT
    <b>STEP 2 - Write Function Module</b>
    Important notes:
    •     Each BAPI must have its own function group.
    •     Under the attributes tab remember to select Processing Type Remote Enabled module, otherwise the function module cannot be invoked via RFC and used as a BAPI
    •     Import/Export parameters can only be BY VALUE for an RFC enabled function module
    •     We are only creating one BAPI in this example, but you can create related BAPIs in the same function pool, so they will be able to share global data.
    Attributes
    Import Parameters
    Export Parameters
    Tables
    Code
    Notes:
    •     The subroutine SET_RETURN_MESSAGE is a standard routine used for BAPIs that use the BAPIRETURN structure
    •     In form Z_BAPI_GET_ORDER_SYSTEM_STATUS there is a test IF 1 = 2. If the test is true a message is displayed. The condition will obviously never be true, and we will never want to display a message in a BAPI. The reason why it is included is, that it create a reference for the message, so that the WHERE USED functionality can be used for the message. This is the SAP standard way to handle it, copied from the Company Code GetList BAPI.
    INCLUDE LZBAPISTATUSUXX
      THIS FILE IS GENERATED BY THE FUNCTION LIBRARY.             *
      NEVER CHANGE IT MANUALLY, PLEASE!                           *
    INCLUDE LZBAPISTATUSU02.
                        "Z_BAPI_GET_ORDER_SYSTEM_STATUS
    INCLUDE LZBAPISTATUSTOP - Global data
    FUNCTION-POOL ZBAPISTATUS.                  "MESSAGE-ID Z3
    Types:
      begin of Type_tj02t,
        istat  like tj02t-istat,
        txt04  like tj02t-txt04,
        txt30  like tj02t-txt30,
      end of type_tj02t.
    DATA:
    Declarations for TABLE parameter
      T_BAPISTAT like ZBAPISTAT occurs 0,
      G_BAPISTAT like ZBAPISTAT,
    Table for object texts
      t_tj02t    type type_tj02t occurs 0,
      g_tj02t    type type_tj02t.
    Structure for return messages
    DATA:
      BEGIN OF MESSAGE,
        MSGTY LIKE SY-MSGTY,
        MSGID LIKE SY-MSGID,
        MSGNO LIKE SY-MSGNO,
        MSGV1 LIKE SY-MSGV1,
        MSGV2 LIKE SY-MSGV2,
        MSGV3 LIKE SY-MSGV3,
        MSGV4 LIKE SY-MSGV4,
      END OF MESSAGE.
    INCLUDE LZBAPISTATUSF01 - Subroutines
    ***INCLUDE LZBAPISTATUSF01 .
    *&      Form  SET_RETURN_MESSAGE
    This routine is used for setting the BAPI return message.
    The routine is a standard routine for BAPIs that handles the message
    structure for the BAPIRETURN structure. It has been copied from the
    BAPI Company Code Getlist
         -->P_MESSAGE  text
         <--P_RETURN  text
    form SET_RETURN_MESSAGE USING    VALUE(P_MESSAGE)   LIKE MESSAGE
                            CHANGING P_RETURN  LIKE BAPIRETURN.
      CHECK NOT MESSAGE IS INITIAL.
      CALL FUNCTION 'BALW_BAPIRETURN_GET'
           EXPORTING
                TYPE       = P_MESSAGE-MSGTY
                CL         = P_MESSAGE-MSGID
                NUMBER     = P_MESSAGE-MSGNO
                PAR1       = P_MESSAGE-MSGV1
                PAR2       = P_MESSAGE-MSGV2
                PAR3       = P_MESSAGE-MSGV3
                PAR4       = P_MESSAGE-MSGV4
             LOG_NO     = ' '
             LOG_MSG_NO = ' '
           IMPORTING
                BAPIRETURN = P_RETURN
           EXCEPTIONS
                OTHERS     = 1.
    endform.                    " SET_RETURN_MESSAGE
    FUNCTION Z_BAPI_GET_ORDER_STATUS
    FUNCTION z_bapi_get_order_system_status.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(I_AUFNR) TYPE  AUFNR
    *"     VALUE(I_SPRAS) TYPE  SPRAS DEFAULT SY-LANGU
    *"     VALUE(I_EXCLUDEINACTIVE) TYPE  CHAR1 OPTIONAL
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRETURN
    *"  TABLES
    *"      T_BAPISTAT STRUCTURE  ZBAPISTAT
    *"Local interface:
    *"  IMPORTING
    *"     VALUE(I_AUFNR) TYPE  AUFNR
    *"     VALUE(I_SPRAS) TYPE  SPRAS DEFAULT SY-LANGU
    *"     VALUE(I_EXCLUDEINACTIVE) TYPE  CHAR1 OPTIONAL
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRET2
    *"  TABLES
    *"      T_BAPISTAT STRUCTURE  ZBAPISTAT
      DATA:
       l_aufnr LIKE afko-aufnr,
       l_objnr LIKE jest-objnr.
    Check if order exists
      SELECT SINGLE aufnr
        FROM afko
        INTO  l_aufnr
        WHERE aufnr = BAPI_ORDER_STATUS_IMPORT-orderid.
      IF sy-subrc NE 0.
        CLEAR message.
        message-msgty = 'E'.
        message-msgid = 'Z3'.
        message-msgno = '000'.
        message-msgv1 = BAPI_ORDER_STATUS_IMPORT-orderid.
        PERFORM set_return_message USING    message
                                   CHANGING return.
        IF 1 = 2.
        The only reason to include this statement, that will obviously
        never execute, is that it will create a referecence so that you
        can find out where a particular message is being used. This
        functionality is used by the BAPIs programmed by SAP
          MESSAGE e000(z3).
        ENDIF.
      ENDIF.
      CHECK return IS INITIAL.
    Read order status
      CONCATENATE 'OR' BAPI_ORDER_STATUS_IMPORT-orderid INTO l_objnr.
      IF BAPI_ORDER_STATUS_IMPORT-i_excludeinactive = 'X'.
        SELECT objnr stat inact
          FROM  jest
          INTO  TABLE t_bapistat
          WHERE objnr = l_objnr AND
                inact <> 'X'.
      ELSE.
        SELECT objnr stat inact
          FROM  jest
          INTO  TABLE t_bapistat
          WHERE objnr = l_objnr.
      ENDIF.
      IF sy-subrc <> 0.
      No object status found
        CLEAR message.
        message-msgty = 'E'.
        message-msgid = 'Z3'.
        message-msgno = '001'.
        message-msgv1 = BAPI_ORDER_STATUS_IMPORT-orderid.
        PERFORM set_return_message USING    message
                                   CHANGING return.
        IF 1 = 2.
          MESSAGE e001(z3).
        ENDIF.
      ENDIF.
      CHECK return IS INITIAL.
    Read order status texts
      SELECT istat txt04 txt30
        FROM tj02t
        INTO TABLE t_tj02t
        FOR ALL ENTRIES IN t_bapistat
        WHERE istat = t_bapistat-stat AND
              spras = BAPI_ORDER_STATUS_IMPORT-i_spras.
      SORT t_tj02t BY istat.
      LOOP AT t_bapistat INTO g_bapistat.
        READ TABLE t_tj02t
          WITH KEY istat = g_bapistat-stat BINARY SEARCH
          INTO g_tj02t.
        IF sy-subrc = 0.
          MOVE:
            g_tj02t-txt04 TO g_bapistat-txt04,
            g_tj02t-txt30 TO g_bapistat-txt30.
          MODIFY t_bapistat FROM g_bapistat TRANSPORTING txt04 txt30.
        ENDIF.
      ENDLOOP.
    ENDFUNCTION.
    <b>STEP 3 - Create the API Method Using the BAPI WIZARD</b>
    The BAPI wizard is used toTo expose the remote function module as a BAPI. The wizard will generate some additional code, so the function module is a valid method of the BOR. This allows the BAPi to be called as a workflow method in addition to be called by an outside program.
    Note: Each functionmodule corresponds to a method in the BOR
    Go to the Busines Object Builder SWO1.
    You can either create the new Object type as a subtype of an existing business object or create a new business object from scratch. In this example it would be obvious to create the Object type as a subtype of BUS2005 Production order. However, to illustrate how to create a new Object type from scratch, we will do this.
    In the Object/Interface type field write the name of the new Business Object: ZORDERSTAT. Press enter and fill in the additional fields necessary to create the object type.
    Supertype: Not relevant because we are creating our object from scratch
    Program. This is the name of the program where the wizard generates code for the Object type, NOT the function module we craeted earlier. The program name must not be the name of an existinbg program.
    Press enter and create the new business object. Note that when you create the business object a standard interface, an attribute ObjectType and the methods ExistenceCheck and Display are automatically generated. These cannot be changed !
    The next step is to add the Z_BAPI_GET_ORDER_STATUS method to the business object. Select Utillities -> API methods -> Add method and write the name of the functionmodule in the dialogbox. Next the dialogbox show below will be shown. This is the start screen of the BAPI wizard. Proceed with wizard by pressing the button.
    After you have finished the wizard, tyou will notice that the ZGetOrderStatus has been added to the business object:
    You can doubleclick on the method to see its properties. To use the business object you must change the Object type status to Implemented. Use menu Edit->Change releases status->Object type->To implemented. No you can test thge object (Press F8).
    Note that the BAPI wizard has added a wrapper class for the function module so it can be sued as method in the business object. Choose menu Goto->Program to display the program:
              Implementation of object type ZORDERSTAT           *****
    INCLUDE <OBJECT>.
    BEGIN_DATA OBJECT. " Do not change.. DATA is generated
    only private members may be inserted into structure private
    DATA:
    " begin of private,
    "   to declare private attributes remove comments and
    "   insert private attributes here ...
    " end of private,
          KEY LIKE SWOTOBJID-OBJKEY.
    END_DATA OBJECT. " Do not change.. DATA is generated
    BEGIN_METHOD ZGETORDERSTATUS CHANGING CONTAINER.
    DATA:
          BAPIORDERSTATUSIMPORT LIKE ZBAPI_ORDER_STATUS_IMPORT,
          RETURN LIKE BAPIRETURN,
          TBAPISTAT LIKE ZBAPISTAT OCCURS 0.
      SWC_GET_ELEMENT CONTAINER 'BapiOrderStatusImport'
           BAPIORDERSTATUSIMPORT.
      SWC_GET_TABLE CONTAINER 'TBapistat' TBAPISTAT.
      CALL FUNCTION 'Z_BAPI_GET_ORDER_STATUS'
        EXPORTING
          BAPI_ORDER_STATUS_IMPORT = BAPIORDERSTATUSIMPORT
        IMPORTING
          RETURN = RETURN
        TABLES
          T_BAPISTAT = TBAPISTAT
        EXCEPTIONS
          OTHERS = 01.
      CASE SY-SUBRC.
        WHEN 0.            " OK
        WHEN OTHERS.       " to be implemented
      ENDCASE.
      SWC_SET_ELEMENT CONTAINER 'Return' RETURN.
      SWC_SET_TABLE CONTAINER 'TBapistat' TBAPISTAT.
    END_METHOD.
    <b>STEP 4 - Final steps</b>
    When the Business object has been checked and the documentation created, the following steps must be carried out:
    •     Release the BAPI function module (in the Function Builder).
    •     Release the business object type (in the BOR ObjectType -> Change release status to -> Implemented ).
    •     Release the BAPI as a method in the BOR (Release the methods you has created - Set the cursor on the method then
    Edit -> Change release status -> Object type component -> To released )
    •     For potential write BAPIs: Release the IDoc and its segments
    You can now display the BAPI in the BAPI Explorer:
    Pls reward points.
    Regards,
    Ameet

  • Firefox crashed before I could load my previous session - how may I restore it? I have backed up relevant session files, but have no idea how to use them.

    I was using Firefox shortly before deciding to restore my previous session (100+ tabs!), but the browser froze and went blank with the "Not Responding" label on top. This happened to me before, and I decided to just quit the session. I knew that I would lose the session I wanted, but I backed up the important session files found in the Mozilla directory (or at least whatever has "session" and "restore" in its name) while the browser was stuck (before quitting).
    What I'd like to understand is HOW TO USE these files to get my session back. I've tried replacing the session files with the back-up copies to no avail. Once long ago I managed to recover a session successfully, but with Firefox constantly changing, I may have lost touch with this.
    I use Firefox 34 and Windows 8.1, but I'll need others' help in identifying the session backup/restore files I need to use from the ones I backed up.
    I believe that the "recovery.bak" is vital, because it contains the tab/page names I was viewing.
    I would greatly appreciate whoever would help me in this, especially if they can teach me the proper methods to follow if this ever happens again (which most likely will!)

    You can look at this post in this MozillaZine forum thread about inspecting a sessionstore file and possibly extract URLs.
    *http://forums.mozillazine.org/viewtopic.php?f=38&p=12098147&start=60#p12098147
    You can open the Browser Console (Firefox/Tools > Web Developer).
    Paste the JavaScript code in the command line and press the Enter key to run the code.
    *Toggle the devtools.chrome.enabled pref on the <b>about:config</b> page to true to enable the command line
    *https://developer.mozilla.org/Tools/Browser_Console#Browser_Console_command_line

  • How to use Berkeley DB in an application without installing

    I'm using Berkeley DB in a python project, and I am wondering if I can make the libraries available to python without specifically installing berkeley DB.
    How can you embed Berkeley DB in an application generally?
    Has anyone done this with python and bsddb3?
    Thank you
    Sachi.

    The python BDB libraries are maintained independently of Oracle.  You will probably have more success asking this question on the BDB python mailing list at https://mailman.jcea.es/listinfo/pybsddb
    Lauren Foutz

Maybe you are looking for