Accessing events for a Resource through Java API

I need to display the calendar events for a Resource through a portlet preferably using Java WebServices API. I am trying to figure out if there is a way to authenticate as a Resource, similar to user authentication so that I can display events associated with that resource.
Thanks,
Niraj Dhondi

login as sysop (connectAsSysop) and switch identity to the desired resource (setIdentity) .
you may need to add the line
allowsysoplogon_capi = TRUE
to the [ENG] section in unison.ini .
g.

Similar Messages

  • Set browser proxy through JAVA API - is it possible?

    I have a proxy that listening http traffic. And I need a solution to set my browser (it may be IE, FF, Safari) options to go through this proxy. Does anybody know possible solutions?

    If each browser has a Java API you can use that, there is no support for assorted browsers built in to Java.

  • User defined Metadata for XML DB using Java API

    I have been looking through and reading the documentation for Oracle XML DB. I am trying to find out if there is a way to create user define metadata using a Java API. when I look in the XML "Java API Reference (Javadoc)" setProperty(java.lang.String name, java.lang.String value, int type) it states: Sets the specified (single-value) property to the specified value. If the property does not yet exist, it is created. I have tried several ways to do this and have not been successful. I have looked for java examples in the XML DB Developer's Guide, XML Developer's Kit Programmer's Guide.
    Is there a good example out there as to how to create user-defined metadata that can be populated using the JCR API.
    Thanks in advance.

    We need to create the 2 xml schemas, one for request and the other for response of selected operation in the WSDL.
    This we need to do dynamically. There will not be any java classes generated, the xsd files need to be created on the fly.
    Please suggest xml schema creation in this sequence.

  • Need Sample Code for Vendor creation using JAVA API

    Hi,
    I have a scenario like Vendor creation using <b>Java API</b>.
    1.I have Vendors (Main) Table.
    2.I have <b>look up</b> tables like Account Group.
    3.Also <b>Qualifier table</b>(Phone numbers) too.
    Could you please give me the sample code which helps me to create Vendor records using Java API?
    <b>I need Code samples which should cover all of the above scenario.</b>
    <b>Marks will be given for the relevent answers.</b>
    Best Regards
    PK Devaraj

    Hi Devraj,
    I hope the below code might solve all your problem:-
    //Adding Qualified field
    //Creating empty record in Qualifed table 
    //Adding No Qualifiers
    Record qualified_record = RecordFactory.createEmptyRecord(new TableId(<TableId>));
    try {
    qualified_record.setFieldValue(new FieldId(<fieldId of NoQualifier), new StringValue(<StringValue>));//Adding No Qualifier
    catch (IllegalArgumentException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    catch (MdmValueTypeException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    //Creating Record in Qualified table
    CreateRecordCommand create_command = new CreateRecordCommand(connections);
    create_command.setSession(sessionId);
    create_command.setRecord(qualified_record);
    try
    create_command.execute();
    catch(Exception e)
    System.out.println(e.toString());
    RecordId record_id = create_command.getRecord().getId();
    //Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
    QualifiedLookupValue lookup_value = new QualifiedLookupValue();
    int link = lookup_value.createQualifiedLink(new QualifiedLinkValue(record_id));
    //Adding Yes Qualifiers
    lookup_value.setQualifierFieldValue(0 , new FieldId(<FieldID of Yes Qualifier>) , new StringValue(<StringValue>));
    //Now adding LookUP values
    //Fetch the RecordID of the value selected by user using the following function
    public RecordId getRecordID(ConnectionPool connections , String sessionID , String value , String Fieldid , String tableid)
    ResultDefinition rsd = new ResultDefinition(new TableId(tableid));
    rsd.addSelectField(new FieldId(Fieldid));
    StringValue [] val = new StringValue[1];
    val[0] = new StringValue(value);
    RetrieveRecordsByValueCommand val_command = new RetrieveRecordsByValueCommand(connections);
    val_command.setSession(sessionID);
    val_command.setResultDefinition(rsd);
    val_command.setFieldId(new FieldId(Fieldid));
    val_command.setFieldValues(val);
    try
         val_command.execute();
    catch(Exception e)
    RecordResultSet result_set = val_command.getRecords();
    RecordId id = null;
    if(result_set.getCount()>0)
         for(int i = 0 ; i < result_set.getCount() ; i++)
         id = result_set.getRecord(i).getId();     
    return id;
    //Finally creating the record in Main table
    com.sap.mdm.data.Record empty_record = RecordFactory.createEmptyRecord(new TableId("T1"));
    try {
         empty_record.setFieldValue(new FieldId(<FieldId of text field in Main table>),new StringValue(<StringValue>));
         empty_record.setFieldValue(new FieldId(<FieldId of lookup field in Main table>), new LookupValue(<RecordID of the value retrieved using the above getRecordID function>));
    empty_record.setFieldValue(new FieldId(<FieldId of Qualified field in Main table>), new QualifiedLookupValue(<lookup_value>));//QualifiedLookUp  value Retrieved above
    } catch (IllegalArgumentException e1) {
    // TODO Auto-generated catch block
         e1.printStackTrace();
    } catch (MdmValueTypeException e1) {
         // TODO Auto-generated catch block
         e1.printStackTrace();
    //Actually creating the record in Main table
    CreateRecordCommand create_main_command = new CreateRecordCommand(connections);
    create_main_command.setSession(sessionId);
    create_main_command.setRecord(empty_record);
    try
         create_main_command.execute();
    catch(Exception e)
         System.out.println(e.toString());
    Thanks
    Namrata

  • Executing Workflow Task through JAVA APIs

    Hi,
    I'm able to send the workflow task to the next step with JAVA APIs.
    The problem comes here if I try to log in into MDM through IConnectorGatewayService.
    If I get a connection to MDM through CatalogData's login method, everything works fine, task is getting executed properly. But, if I try to run the same code where I get the connection through IConnectorGatewayService, the same code doesn't work.
    Surprisingly, there is no problem in retrieving data from MDM while connecting with ConnectorGatewayService.
    Please do let me know if I need to specify some parameters while getting the connection with IConnectorGatewayService so that I can change the workflow task status.
    Thanks and Regards,
    Mausam

    Hi Mausam
    Please go through this document u will get the solution
    https://help.sap.com/javadocs/MDM/current/index.html
    https://help.sap.com/javadocs/MDM/current/index.html
    I think it may help you
    Regards
    Hari

  • Bug report (and solution): adding multiple records through Java API in bulk

    I have found some bugs in the Java API (version 4.1.25) that makes it impossible to add mulitple values in bulk to a RECNO database. The fixes are as follows:
    MultipleEntry.java, line 80:
    "DbUtil.int2array(curr_off, this.data, pos);"
    should be replaced by
    " DbUtil.int2array(recno, this.data, pos);"
    MultipleRecnoDatabaseEntry.java, line 130:
    "return append_internal(data, doff, dlen, recno);"
    should be replaced by
    "return append_internal(data, offset, len, recno);"
    Regards,
    Johan Walters

    Hello,
    It looks like there were some corrections to this area in the post 4.1 i.e. 4.2 release. And I do not see these same issues in the current 5.1.25 release. If you do find them in the current release, just let us know.
    Thanks,
    Sandra

  • Calling MDM Assignments through Java API

    Hi there!
    Is there any way to call MDM assignment rule from Java application? As far as I know, there is no appropriate API function available (even in MDM 7.1), but may be there is some workaround to call these rules indirectly?
    Any help will be appreciated.

    Hi Ivan,
    As you already mentioned there are no Java API's to call assignments written in MDM.
    1. You can handle this by creating a workflow with only assignment component. But this activity will be a manual activity.
    2. You can also write assignments in Portal.
    Hope it hepls.
    Regards,
    Pramod

  • Problem creating in some attribute options for class through java API

    Hello everyone,
    I am successfully creating class and its attributes but i am not able to create attributes with its option like IS REQUIRED, IS INDEXED, IS SETTABLE and READ ONLY.....
    public void create_class(String cname,String cdesc,String scname)
    try
    ClassObjectDefinition cod = new ClassObjectDefinition(csession);
    cod.setSuperclassName(scname);
    cod.setName(cname);
    ClassObject co = (ClassObject)csession.createSchemaObject(cod);
    AttributeDefinition ad2 = new AttributeDefinition(csession);
    ad2.setAttributeByUpperCaseName("NAME",AttributeValue.newAttributeValue("Divya"));
    ad2.setAttributeByUpperCaseName("DATATYPE",AttributeValue.newAttributeValue(Attribute.ATTRIBUTEDATATYPE_STRING));
    ad2.setAttributeByUpperCaseName("DATALENGTH",AttributeValue.newAttributeValue(151));
    ad2.setAttributeByUpperCaseName("DESCRIPTION",AttributeValue.newAttributeValue("This the attribute number 2"));
    //here is some problem,,, Is Required is not been able to set
    //ad2.setAttributeByUpperCaseName("REQUIRED",AttributeValue.newAttributeValue(true));
    co.addAttribute(ad2);
    catch(IfsException e)
    e.printStackTrace();
    }

    Hi Kabilesh,
    Could you please let me know the exast soution u had for this?
    I even set the SHLIB_PATH in the environment, but still this problem persists.
    I am compiling the program and making into a shared library as
    cc -c -g -n +z -I$JAVA_HOME/include -I$JAVA_HOME/include/hp-ux -L/opt/java1.4/jre/lib/PA_RISC2.0/server -ljvm Test.c -o Test.o
    ld -b Test.o -L/opt/java1.4/jre/lib/PA_RISC2.0/server -ljvm -o Test.slMy java code is looks like this :
    void create_Jvm()
        JNIEnv * env;
        JavaVM * jvm;
        //JDK1_1InitArgs vm_args;
        /* Note : In JNI1.2 and Java2 SDK 1.4, the new structure JavaVMInitArgs has been introduced.*/
        JavaVMInitArgs vm_args;
        //JavaVMOption options[1];
        jint res;
        vm_args.nOptions = 0;
        vm_args.ignoreUnrecognized = JNI_TRUE;
        /* IMPORTANT: specify vm_args version # if you use JDK1.1.2 and beyond */
        vm_args.version = JNI_VERSION_1_4;
        //vm_args.version = JNI_VERSION_1_2;
        /*In JNI1.2 and Java2 SDK 1.4 the JNI_GetDefaultJavaVMInitArgs method call is not required.*/
        //JNI_GetDefaultJavaVMInitArgs( & vm_args);
        res = JNI_CreateJavaVM( &jvm, (void**)&env, &vm_args);
        if (res < 0) {
            fprintf(stderr, "Can't create Java VM\n Error is :%ld\n ", res);
            exit(1);
        iJvmInitialized = 1;
    } hi
    Check the lib path
    May be u have not included : at the end of the lib
    path that u have added
    THis was the mistake that i did
    kabilesh

  • How to generate a report on 'Event Received' events for a resource objects

    Hello,
    I want to generate a report on all the recon events which are in 'Event Received' status, on a daily basis. Can you please let me know how to do this and what all tables are involved?
    Thanks

    Well thats pretty simple. Actually there are multiple tables in OIM database responsible for holding reconciliation data but event information is stored in one table RCE. So there are two simple ways to do that as follows:
    *1) Using OIM API ::*
    There is an API exposed (*findReconciliationEvent()*) in the tcReconciliationOperationsIntf interface. You can just pass a HashMap with one filter parameter for ReconEvent status as Event Received. In addition to it this API also requires the StartDate and EndDate (You can give current date for both arguments). This will return you a ResultSet containing all the events which are in that particular state. Just iterate through the ResultSet for all the event information ad create your report.
    *2) Using OIM database query::*
    Just write an SQL query to run in the database schema. Let's assume you have written a scheduler for the same. This is the code for your class:
    tcDataSet dsList = new tcDataSet();
    String query = " select * from RCE where RCE_STATUS='Event Received' ";
    log.debug(query);
    try {
    dsList.setQuery(getDataBase(), query);
    dsList.executeQuery();
    if (!dsList.isEmpty()){
    log.debug("Total Rows Found:" + dsList.getTotalRowCount());
    result = true;
    for (int i = 0; i < dsList.getTotalRowCount(); i++) {
    Write your custom logic here for generation of report
    }else{
    log.debug("No Events Found");
    result = false;
    } catch (tcDataSetException e) {
    e.printStackTrace();
    result = false;
    So you can do it both ways.
    Thanks
    Sunny

  • Help on accessing tables available in SAP through Java

    Hi All
    I want to access some tables available in SAP through my Java program.  Do I have to write any code for database connectivity or straightaway I can write SQL statements in my Java code?
    Can anyone please suggest the sample code for this?
    Thanks in Advance,
    Vijay.

    Hi,
    You need JCO(Java Connector)
    Check this sample code.
    import com.sap.mw.jco.*;
    public class JcoTest {
    private static JCO.Client theConnection;
    private static IRepository theRepository;
    public static void main(String[] args) {
      createConnection();
      retrieveRepository(); 
      try {
      JCO.Function function = getFunction("RFC_READ_TABLE");
      JCO.ParameterList listParams = function.getImportParameterList();
      listParams.setValue("BSAUTHORS", "QUERY_TABLE");
      theConnection.execute(function);
      JCO.Table tableList = function.getTableParameterList().getTable("DATA");
      if (tableList.getNumRows() > 0) {
       do {
        for (JCO.FieldIterator fI = tableList.fields();
          fI.hasMoreElements();)
          JCO.Field tabField = fI.nextField();
          System.out.println(tabField.getName()
               + ":t" +
               tabField.getString());
         System.out.println("n");
       while (tableList.nextRow() == true);
      catch (Exception ex) {
       ex.printStackTrace();
    private static void createConnection() {
      try {
       theConnection = JCO.createClient("000", "DDIC", "minisap", "en", "sincgo", "00");
       theConnection.connect();
      catch (Exception ex) {
       System.out.println("Failed to connect to SAP system");
    private static void retrieveRepository() {
      try {
       theRepository = new JCO.Repository("saprep", theConnection);
      catch (Exception ex)
       System.out.println("failed to retrieve repository");
      public static JCO.Function getFunction(String name) {
        try {
             return theRepository.getFunctionTemplate(name.toUpperCase()).getFunction();
        catch (Exception ex) {
         ex.printStackTrace();
          return null;
    Regards
    vijay

  • Accessing the folders and items through Portal API

    Hi,
    I am working for a customer who is currently using Oracle Portal 3.0.x (9iAS Release 1) and uploaded/stored a lot of MS Office content (thousands of documents). They are evaluating Oracle Files as the document management application. They would like to automate the process to move the documents from Oracle Portal Content Areas to Oracle Files.
    Is there an api through which i can browse through the folder hierarchy (so that i can create the same in files) , and access all the items including the content stored in DB as blob in WWDOC_DOCUMENT$ table ? If there is not one , what are the tables and the relationships i should be looking at ?
    Thanks in advance,
    Prakash.

    The main reason I've heard for people wanting to do this is that Files supports desktop integration (e.g. drag and drop or save/load from Windows). However, if you're looking for this feature it is available in Portal Release 2 using the WebDAV (Web Folders) integration.
    You can also use WebDAV to copy between Files and Portal, however WebDAV is not available in Portal Release 1.
    The content area views and APIs for Release 1 are fully documented in the PDK (these views and APIs will also be supported for Release 2 starting with the April PDK). Note that Files does not have equivalent APIs, so you will have a difficult time moving content from Portal to Files programmatically.
    Regards,
    Jerry
    Portal PM

  • Provision Resource through OIM APIS

    I am using the OIMClient and the new APIs to provision a resource
    I am using the Provisioning Service provision() method. For the Account details how should the AccountData be initialized. It says int he APIs that the AccountData constructor is only for already provisioned accounts.
    Please suggest if there is any other way this can be done.

    Try this:
    //Account profile data - need not be set if all data is coming from prepop adapters
      HashMap parentData = new HashMap();
      parentData.put("UD_ADUSER_UID","Larry.Jones");
      parentData.put("UD_ADUSER_FNAME","Larry");
      parentData.put("UD_ADUSER_LNAME","Jones");
    //Construct account data VO with process form key sdk_key=15
      AccountData objAccountData = new AccountData("15", null, parentData);
    //Construct account VO with app instance and account data VO
      Account objAccount = new Account(appInstance, objAccountData);
      //Provision the account to user with usr_key=6
      long oiuKey = provisioningService.provision("6", objAccount);

  • [Q] Trigger an event for calls passing through a CUBE

    Hi Guys
    Are there any events I could catch to trigger a script for new calls as they pass through a CUBE?
    I'm wanting to set up an alert based on a certain number been dialed.
    Ta
    Peter

    Not directly, but Tcl IVR can help here.  You can use IVR to generate a syslog message that EEM can process.  I'm not sure if this is applicable to CUBE, though (it works with CME).  Here's one such example implementation:
    https://supportforums.cisco.com/docs/DOC-19345

  • Manipulating xsd schemas through java api

    Hi,
    I am working on an aplication that requires on-line creation of new xsd schemas. I am looking for a package that will allow me to create such schemas (i dont want to have to understand all the schema logic myself and create just a regular xml document).
    I also require a way to be able to easily extract restrcitions regarding certain elements in the schema (i need to be able to answer questions such as what restrictions does X node have).
    Does anyone happen to know of a package that may help me?
    thanks!
    shahar

    Hi,
    I am working on an aplication that requires on-line creation of new xsd schemas. I am looking for a package that will allow me to create such schemas (i dont want to have to understand all the schema logic myself and create just a regular xml document).
    I also require a way to be able to easily extract restrcitions regarding certain elements in the schema (i need to be able to answer questions such as what restrictions does X node have).
    Does anyone happen to know of a package that may help me?
    thanks!
    shahar

  • Java API for CVS access

    Hi,
    I am looking for a third party Java API which i can use to connect to a CVS repository and perform code synch up operations with the repository. If anybody has any informations. Pls let me know.
    Thanks.

    Thanks for the reply. I did try jcvs. I am still trying to get it running in my system. That apart, i am not sure if jcvs exposes any of its API's that I could use to connect to a CVS repository. I did not find any API documentation with it. I am finding it painfull to go thru its source code to find out what its core classes are and how I should call them.
    Anyways, there should be other third party APIs in the www. And I need to get my hands on them.
    Pls help !!

Maybe you are looking for

  • After upgrading to Mavericks my Time Machine gives me error message.

    I use a WD Live Book that keeps my security copies on my home network. Since installing Mavericks I get an error message saying that it cannot perform security copies cause sparse file already exists and refers back to latest copy 48 days ago. Howeve

  • What's wrong with my player?!!? PLAYBACK ERR

    Whats wrong with my Zen Touch if my player keeps saying playback error? it plays like 5 seconds of the song before it shows that there is a "playback error" and skips to the next song? i tried fastforwarding past the 5 seconds, and it played fine....

  • Lost iTunes with lion

    I purchased Lion from the app store to use the cloud and now I lost Itunes.  If I reinstall it will I lose my library?

  • Convert from String to Long

    Hello Frineds I want to convert from String to Long. My String is like str="600 700 250 300" and I want to convert it to long and get the total value in to the long variable.like the total of str in long varible should be 1850. Thank You Nilesh Vasan

  • Dealing with old AVI files - what is best format for 'master' storage.

    I kept a lot of original AVI footage from the original DV Tapes. I see these as the MASTER material. I also have the same footage on MPG. My new Smart TV will link to ny network and can see the AVI files but not play them. It seems i need to convert