Creating form using OIM API

Hi
can anyone help me in creatig a form and assigning it to a resource object.
please tell what all should i mention in the map which is to be passed to createForm() method.
Thank you

Hi all
what attributes i need to to map to create a from using OIM API
createForm Method?
I have tried with this but did not work:The form is getting created , i.e I am seeing an entry in DB.
At the same time I am aslo getting an exception which is whown below:
formMap.put("Structure Utility.Table Name", "SAM");
          formMap.put("Structure Utility.Description", "TESTING API USAGE FOR FORM");
The Exceptions I get are :
Thor.API.Exceptions.tcInvalidNameException
     at com.thortech.xl.ejb.beansimpl.tcFormDefinitionOperationsBean.createForm(Unknown Source)
     at com.thortech.xl.ejb.beansimpl.tcFormDefinitionOperationsBean.createForm(Unknown Source)
     at com.thortech.xl.ejb.beans.tcFormDefinitionOperationsSession.createForm(Unknown Source)
09:05:13,772 ERROR [DATABASE] Class/Method: tcDataBase/writeStatement encounter
some problems: ORA-02089: COMMIT is not allowed in a subordinate session
java.sql.SQLException: ORA-02089: COMMIT is not allowed in a subordinate session
09:05:13,819 ERROR [ADAPTERS] Event: Adding Columns to SDC. has encountered an error.
09:05:13,819 ERROR [SERVER] Class/Method: tcDataObj/runEvent Error :EVT Fatal Rejection Occured
09:05:13,819 ERROR [APIS] Class/Method: tcFormDefinitionOperationsBean/createForm encounter some problems: maoErrors:Error Adding Column.
How can i resolve this?
When and where can I view the form that I have created?
Thank you

Similar Messages

  • Creating self registration request using OIM API

    Hi guys,
    When we try to create a self regisrtation request using OIM API , we ge the following exception:
    We get this error when we set the following in Design console.
    Does user have to provide challenge information during registration = FALSE
    and passed an blank object in place of challenge question parameter in createSelfRegistrationRequest method in tcUtilityBaseClass.
    19:22:17,218 ERROR [REQUESTS] Error: Failed to save REQ_CONSOLIDATED_DATA_VALUE
    data for Create Entity.
    java.lang.NullPointerException
    at org.apache.xml.serializer.TreeWalker.dispatachChars(TreeWalker.java:2
    44)
    at org.apache.xml.serializer.TreeWalker.startNode(TreeWalker.java:414)
    at org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:143)
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
    ormerIdentityImpl.java:389)
    at com.thortech.xl.dataobj.util.RequestDataConsolidator.convertNodeToXML
    (Unknown Source)
    at com.thortech.xl.dataobj.util.RequestDataConsolidator.addUser(Unknown
    Source)
    at com.thortech.xl.dataobj.tcDataBase.createRequestForCreateEntity(Unkno
    wn Source)
    at com.thortech.xl.dataobj.tcDataBase.createRegistrationRequest(Unknown
    Source)
    at com.thortech.xl.dataobj.tcDataBase.createRegistrationRequest(Unknown
    Source)
    at com.thortech.xl.ejb.beansimpl.tcUnauthenticatedOperationsBean.createR
    egistrationRequest(Unknown Source)
    at com.thortech.xl.ejb.beans.tcUnauthenticatedOperationsSession.createRe
    gistrationRequest(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
    tatelessSessionContainer.java:237)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
    ke(CachedConnectionInterceptor.java:158)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
    elessSessionInstanceInterceptor.java:169)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
    Interceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
    rceptor.java:121)
    How do we create a self registration request , using OIM API , with and without challenge questions?

    Well try this piece of code. This might be similar to yours but it worked perfectly for me. For you the error might be the attribute names which you are passing, it should be the one dfined in the FormMetaData xml as below.
         import Thor.API.tcUtilityFactory;
         // define you class below
         ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
         final Hashtable env = config.getAllSettings();
         Hashtable quesAns = new Hashtable();
         HashMap user = new HashMap();
         user.put("Users.User ID", "SelfTesting");
         user.put("Users.First Name", "SelfTesting");
         user.put("Users.Last Name", "SelfTesting");
         user.put("Users.Email", "[email protected]");
         user.put("Users.Password", "SelfTesting");
         user.put("ConfirmPassword", "SelfTesting");
         tcUtilityFactory.createRegistrationRequest(env, user, quesAns);
    And for the query of challenge QnA, these are the following combinations possible:
    1) Property Does user have to provide challenge information during registration set to TRUE
    - During self-registration from web console, it will show you Challenge Questions section on the right. If you do not select any questions, it will thow you an error there itself.
    - Doing it from API will create no difference(even if you pass a blank HashTable). The request will be created successfully and on completion when the user tries to login, it will ask for Security QnA.
    2) Property Does user have to provide challenge information during registration set to FALSE
    - During self-registration from web console, it doesn't show you Challenge Questions section on the right. The request will be created successfully and on completion when the user tries to login, it will ask for Security QnA.
    - Doing it from API, you will have to pass a blank HashTable as in above code. The request will be created successfully and on completion when the user tries to login, it will ask for Security QnA.
    Hope it works.
    Thanks
    Sunny

  • Raising Request using OIM ApI's in oim 11g R2

    Hi all
    I trying to raise a request using OIM API in R2. I have written a sample code and it is throwing me the below error....
    Exception in thread "main" java.lang.NullPointerException
    *     at oracle.iam.ui.custom.updateuser.<init>(updateuser.java:76)*
    *     at oracle.iam.ui.custom.updateuser.main(updateuser.java:118)*
    Please take a look at my code....
    RequestEntityAttribute rea = null;
    rea.setName("Modify User Profile");//This is the place where i am getting the error...
    System.out.println("I am Here3");
    rea.setAction(RequestEntityAttribute.ACTION.Modify);
    List<RequestEntityAttribute> lrea = new ArrayList<RequestEntityAttribute>();
    lrea.add(rea);
    RequestEntity re = null;
    re.setEntityData(lrea);
    List<RequestEntity> reqentity = new ArrayList<RequestEntity>();
    reqentity.add(re);
    RequestData requestData = null;
    requestData.setJustification("I need this Role");
    requestData.setTargetEntities(reqentity);
    String str = null;
    try {
    str = _service.submitRequest(requestData);
    } catch (InvalidRequestException e) {
    } catch (InvalidRequestDataException e) {
    } catch (RequestServiceException e) {
    } catch (BulkBeneficiariesAddException e) {
    } catch (BulkEntitiesAddException e) {
    Thanks in Advance

    look at below link
    Creating a Request via OIM 11g API
    http://www.pathmaker-group.com/querying-oracle-iam-requests/

  • Using OIM API

    Hi All
    First can we use OIM API from a PC where OIM Server/Design console is not installed?If so, how?
    I have server running in a different PC in the same network.How do I connect from my PC to use OIM API.
    Thank u
    sas

    It shouldn't matter whether you are invoking OIM APIs from standalone Java app or WebApp as long as you are able to create an instance of tcUtilityFactory. Once obtained the process remains same.
    But if you are invoking APIs from JSP that is custom built but within same xlWebApp, then it gets trivial.
    Thanks,
    Aman

  • While creating Projects Using the API, get two errors: 'Customer name must be passed' and 'class category is invalid'

    Hi
    While trying to Create Projects using the API, I'm getting two types of errors -
    The first is : 'API failed in one stage 1 Customer Name is a mandatory Quick Entry field. Value must be passed'
    The second is : '
    'API failed in one stage 1 Project: '<Project_Number>'
    The class category is invalid.'
    Both the messages are produced by our custom program. .. however I am not able to understand why the underlying errors occur.
    The first error ( Customer Name is a mandatory quick entry field), is caused by Projects that are to be created from Project templates where it is configured with Quick Entry Customer Name required. We are passing Customer Site number ( Party Bill to site number and Party Ship to side number). The site numbers being passed are also set as 'Primary'. Yet they are failing.
    For the second Error ( The Class Category is invalid), I rechecked multiple times, the Class categories for the Projects I am trying to create, with the Config in R12 and they are fine. Can't understand the reason for these two issues. Has anyone encountered such an issue ? If so how was it resolved?
    Regards
    Vivek

    HI All
    I resolved both the issues. In case there are others facing similar issues, following was the cause and resolution of my errors
    1. Error 1: Customer Name is a Mandatory Quick Entry field. Value must be passed.
    The cause was that the data loaded into our custom staging table was not in the right fields. This was because the data file values and the CTL were not in sync.
    Resolution:
    Corrected the data file to be in Sync with the structure defined in the CTL and  this loaded it successfully
    2. Error 2: The class category is invalid.
    The cause of this error was that  in the  Projects Template (used to create the project from), the Quick Entry setup had a Class Category set as required and I was not passing a value ( a class code value) for that Class Category.
    Hope this helps somebody else
    Cheers
    Turnbill

  • Trying to create Invoice using the API,however i am not able to create the customer accounts in the front end

    when creating invoice using the API AR_INVOICE_AP_PUB.Create_Single_invoice Am Getting the below Error:
    Transaction type is invalid with current transaction date
    invalid transaction type
    either an inventory item description must be provided
    Kindly help me here

    Hi Team,
    I  tried creating the invoice and I got the above errors, however, when updated the batch source ID I am now getting this following error only, i am just left with the following Error only
    Either an inventory item or description must be provided.
    Please help me on this.

  • We can't create form using dblink  and synonim

    We have created a dblink pointing to a table in the remote database.
    When we create a form based on table or view using this dblink, we get the error "page not found".
    We read from
    Re: I can't create form using dblink
    that we must create a synonim, and this was done creating one in the same schema of the db-link using the "Database Objects" of oracle portal 10g (external db is an oracle 9.0.2).
    The new synonim work (tested with reports and pl/sql page)
    but if we click on "Grant Access" (of the synonim) we get the following error :
    Error: The underlying object of the synonym does not exist, is a remote object or is not of type function, procedure, package, sequence, synonym, table or view. (WWV-17076)
    Does form work only with table and view of the portal database (not external one)? or have we loose something in the creation of the synonim?
    Have someone succesfully created a form based on a db-link towards an external database?
    Thanks to all.

    Hei guys, has nobody created succesfully a data-driven forms based on a dblink towards an external database?
    I can't believe this!!!!

  • Request Approval using OIM API

    Hi all
    Which API I need to use to approve a resouce request using OIM API?
    I have tried with the following:
    tcReqOp.setRequestResponse(85, 1 , "java.lang.String psResponse");
    i do not know what to pass in place of java.lang.String psResponse.
    I aslo tried passing "C","Completed"
    can anyone correct what I am doing?
    Thank u
    sas

    I assume you want to run a scheduled task for this. Try this approach. Run this query to retrieve specific approval tasks that are in a pending state:
    select oti.sch_key, mil.mil_name, to_char(oti.oti_update, 'dd-mon-yyyy hh24:mi:ss')
    from oti, mil, obj, pkg, orc, sch
    where oti.mil_key=mil.mil_key
    and oti.pkg_key=pkg.pkg_key
    and pkg.obj_key=obj.obj_key
    and oti.orc_key=orc.orc_key
    and oti.sch_key=sch.sch_key
    and oti.sch_status='P'
    and obj.obj_name='Test Object'
    and pkg.pkg_type='Approval'
    You can modify the obj.obj_name or remove, or do any changes you want. When you grab the time of the oti.oti_update, compare it against the sysdate to determine the time difference. If the update did not occur within that time, use this code:
    provIntf = (tcProvisioningOperationsIntf)getUtilityOps("Thor.API.Operations.tcProvisioningOperationsIntf");
    Hashtable taskHash = new Hashtable();
    taskHash.put("Process Instance.Task Details.Data", "<Insert Response Value Here>");
    provIntf.updateTask(key, taskHash) ; //---> Key is the same as the oti.sch_key field
    I have not tried this, but give it a shot.
    -Kevin

  • Using OIM APIs

    I need to use OIM APIs from a third party web application.
    I would like to know, would it be possible as our OIM server would be at a different m/c then the client web application.
    So how would the settings be done in this case, as we set some system variables in the code for accessing the OIM APIs which include mentioning the path of Xellerate folder.
    Kindly guide.

    I have gone through this link, and have used OIM APIs earlier, but in that case both my code and the OIM server were running on the same m/c.
    But now its a third party web app which wants to call OIM APIs, hence I would like to knw, how d following settings would be done.
    System.setProperty("XL.HomeDir", "D:/NewOIM/xellerate");
    System.setProperty("java.security.policy", "D:/NewOIM/xellerate/config/xl.policy");
    System.setProperty("java.security.auth.login.config", "D:/NewOIM/xellerate/config/authwl.conf");
    System.setProperty("log4j.configuration", "D:/NewOIM/xellerate/config/log.properties");
    System.setProperty("java.naming.provider.url", "t3://blrkec87910d:7001");
    As uptil now I was giving the local location of these folders.
    But now how would I give it?

  • Provisioning OIM user using OIM APIS

    Hi All,
    Could anyone help me out on how to provision a User using OIM APIS.
    Thanks and Regards,
    Vaasu.

    public class GetGroups {
    tcUtilityFactory utilFactory = null;
    tcSignatureMessage moSignature = null;
    tcUserOperationsIntf moUserUtility = null;
    tcResultSet userResultSet,userSet = null;
    ConfigurationClient.ComplexSetting myConfig = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    final Hashtable env = myConfig.getAllSettings();
    Map v = new HashMap();
    public void UserGroups(String userid) {
    try {
    System.out.println(" I am in TRY");
    moSignature = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
    utilFactory = new tcUtilityFactory(env, moSignature);
    moUserUtility =
    (tcUserOperationsIntf) utilFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    v.put("Users.User ID", userid);
    userSet = moUserUtility.findAllUsers(v);
    long user_key = userSet.getLongValue("Users.Key");
    System.out.println( " Group Name " + grpName );
    } catch(Exception e){
    e.getMessage();
    Like that
    moobjIntf =
    *(tcObjectOperationsIntf) utilFactory.getUtility("Thor.API.Operations.tcObjectOperationsIntf");*
    Map objmap =new HashMap(0;
    objmap.put("Objects.Name", "AD User") \\ just hardcoding this AD User you can pass it as variable also
    tcResultSet moResultSet = moobjIntf.findObjects(objmap);
    long obj_key = moResultSet.getLongValue("Objects.Key");

  • Create new schedule task using OIM API

    Hello,
    Steps for setting up eclipse :
    1)Create a new JAVA project.
    2)Right click on your newly created JAVA project & select properties.
    3)In Properties window select JavaBuildPath & select libraries tab.
    4)Click on AddExternalJar's button & add jar files from lib,ext folders of OIM client installation.
    5)Click OK.
    CODE<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<package oimscheduler;
    import java.util.HashMap;
    import java.util.Hashtable;
    import javax.naming.Context;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Exceptions.tcChallengeNotSetException;
    import Thor.API.Exceptions.tcLoginAttemptsExceededException;
    import Thor.API.Exceptions.tcPasswordResetAttemptsExceededException;
    import Thor.API.Exceptions.tcUserAccountDisabledException;
    import Thor.API.Exceptions.tcUserAccountInvalidException;
    import Thor.API.Exceptions.tcUserAlreadyLoggedInException;
    import Thor.API.tcUtilityFactory;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    import com.thortech.xl.util.config.ConfigurationClient;
    public class Scheduler extends SchedulerBaseTask
         tcUtilityFactory ioUtilityFactory = null;
         @Override
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createConnection();
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createConnection()
              try
                   System.setProperty("XL.HomeDir","D:\\Oracle\\OIM\\xellerate");
                   System.setProperty("java.security.policy","D:\\Oracle\\OIM\\xellerate\\config\\xl.policy");
                   System.setProperty("java.security.auth.login.config","D:\\Oracle\\OIM\\xellerate\\config\\authwl.conf");
                   System.setProperty("java.naming.provider.url","t3://localhost:7001 ");
                   System.out.println("Setting Configurations .....");
                   System.out.println("Starting .....");
                   ConfigurationClient.ComplexSetting config =
                   ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
                   System.out.println("Login...");
                   Hashtable env = config.getAllSettings();
                   env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
                   env.put("java.naming.provider.url","t3://localhost:7001");
                   ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","abcd1234");
              catch(tcAPIException ae)
                   System.out.println("Error In createConnection:tcAPIException "+ae.toString());
              catch(tcChallengeNotSetException cnse)
                   System.out.println("Error In createConnection:tcChallengeNotSetException "+cnse.toString());
              catch(tcLoginAttemptsExceededException laee)
                   System.out.println("Error In createConnection:tcLoginAttemptsExceededException "+laee.toString());
              catch(tcPasswordResetAttemptsExceededException praee)
                   System.out.println("Error In createConnection:tcPasswordResetAttemptsExceededException "+praee.toString());
    catch(tcUserAccountDisabledException uade)
         System.out.println("Error In createConnection:tcUserAccountDisabledException "+uade.toString());
    catch(tcUserAccountInvalidException uaie)
         System.out.println("Error In createConnection:tcUserAccountInvalidException "+uaie.toString());
    catch(tcUserAlreadyLoggedInException uale)
         System.out.println("Error In createConnection:tcUserAlreadyLoggedInException "+uale.toString());
              catch(Exception e)
                   System.out.println("Error In createConnection:Exception "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH");
                   user.put("Users.First Name","Oracle-SCH");
                   user.put("Users.Middle Name","JAVA-SCH");
                   user.put("Users.Last Name","SUN-SCH");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    After writing above code ,we have to create jar file.
    Steps To Be Follwed In OIM Design Console
    1)Copy jar file in ScheduleTask folder of your OIM server installation.
    2)Expand administration tree & select TaskScheduler.
    3)Create new task & in class name textfield we have to mention package.classname & mention appropriate values in other textfields & execute it.
    4)Check output.

    We need to override 2 methods while extending from SchedulerBaseTask i.e
    init() :- this method is run before execute by the scheduler .
    execute() :- is executed by the scheduler.
    Revised code :-
    package oimscheduler;
    import java.util.HashMap;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    public class Scheduler extends SchedulerBaseTask
         tcUserOperationsIntf moUserUtility = null;
         @Override
         public void init()
              try
                   System.out.println("In Init");
                   moUserUtility = (tcUserOperationsIntf) this.getUtility("Thor.API.Operations.tcUserOperationsIntf");
              catch (tcAPIException e)
                   e.printStackTrace();
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH1");
                   user.put("Users.First Name","Oracle-SCH1");
                   user.put("Users.Middle Name","JAVA-SCH1");
                   user.put("Users.Last Name","SUN-SCH1");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    Edited by: Rahul Shah on Jul 11, 2011 4:16 AM

  • Creating Modules using Open API

    Hi,
    I am trying to create Form module using Open API.
    What I would like to know is :-
    1. How to link the source file (c++) against the Open
    API library (f60d2f32.lib).
    The c++ source file, Does it have to be .c extension ?
    2. Compile the files to create an executable.
    Anyone got any idea or can point to URL where I can get more info.
    Thanks - Appreciate your help.

    This really needs to go to one of the Developer (FOrms/Reports) forums, but any interface to Forms/Reports/Etc. will need to be compiled and linked as 'C', not 'C++'.

  • How to install OID connector using OIM API in 11g?

    Hi All,
    We are using OID connector in OIM 11g environment. It is a simple process to install OID connector by unzipping the connector zip file to ConnectorDefaultDirectory and goto Admin console and load the connector.
    However, we are looking for API methods to simulate "load the connector " step in GUI.
    Please help.
    Thanks
    Mahendra.

    Hey Mahendra,
    I am not aware of this API to do the 'Deployment Manager' load task. But III try to help you using another way:
    1-You can use ICF API to do this task(creating it specifically to OID). Using ICF: http://www.groenenberg.nu/Oracle_Doc/AS_11.1.1.5/doc.1111/e14309/icf.htm#BABFDJHJ
    2- And following this example that my buddy did for Open DS: http://itnaf.org/2011/12/30/developing-icf-connectors/
    Another helpful doc: http://docs.oracle.com/cd/E14571_01/doc.1111/e14309.pdf
    I hope this helps,
    Thiago Leoncio.

  • Create lov using open api

    i want to create a assistant of lov using open api(code C).
    can anyone give me the steps and procedures for do this .

    This really needs to go to one of the Developer (FOrms/Reports) forums, but any interface to Forms/Reports/Etc. will need to be compiled and linked as 'C', not 'C++'.

  • Creating PDF using ITEXT API's - error

    Hi,
    In my WebDynpro Application I want to generate a PDF (using ITEXT API's) out of the data retrieved from back end system .
    I used this source code.
    Document document = new Document(PageSize.A4);
    document.open();
    PdfPTable table = new PdfPTable(1);
    PdfPCell cell;
    cell = new PdfPCell(new Paragraph("ONE"));
    table.addCell(cell);
    cell = new PdfPCell(new Paragraph("TWO"));      
    table.addCell(cell);
    document.add(table);
    document.close();
    byte[] b = new byte[100 * 1024];
    b =  document.toString().getBytes("UTF-8");
    IWDCachedWebResource pdfRes = WDWebResource.getPublicCachedWebResource(b, WDWebResourceType.PDF, WDScopeType.CLIENTSESSION_SCOPE,      wdThis.wdGetAPI().getComponent().getDeployableObjectPart(),"FileNameHelloText"));
    I have used Window Manager to create a external window with the URL from pdfRes.getUrl() method.
    After execution i get a pop up window with out PDF document.
    Please let me know your thoughts & solutions to the above mentioned problem.
    Thanks
    Senthil

    Hello Folks,
                   Use the following snippet of the code to generate PDF using ITEXT API.
                                       Document document = new Document(PageSize.A4);
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         PdfWriter.getInstance(document, bos);
         document.open();
                    PdfPTable table = new PdfPTable(1);
                    PdfPCell cell;
                    cell = new PdfPCell(new Paragraph("ONE"));
                    table.addCell(cell);
                    cell = new PdfPCell(new Paragraph("TWO"));      
                    table.addCell(cell);
                    document.add(table);
                    document.close();
                    byte [] byteContent = bos.toByteArray();
         IWDCachedWebResource cachedResource =
                             WDWebResource.getPublicCachedWebResource(
              byteContent,
              WDWebResourceType.PDF,
              WDScopeType.CLIENTSESSION_SCOPE,
              wdThis
                                          .wdGetAPI()
                                          .getComponent()
                                          .getDeployableObjectPart(),
              "TestPDF");
                  IWDWindow externalWindow =
            wdComponentAPI
                            .getWindowManager()
                            .createExternalWindow(cachedResource.getURL(),                         "PDF Window",true);
                  externalWindow.open();
    Thanks and Regards,
    Gopi

Maybe you are looking for