0 Replies Latest reply: Aug 26, 2009 6:08 PM by rahul_akkina RSS

    Information needed with regards HdrmSdk Webservice Usage

    rahul_akkina
      Hi All,

      I'm a newbie to this forums im'nt sre whether if this is the right place where i post my query. My manager had given me a new task in devoloping a offline java web application through which can enable me to copy an existing version available in Hyperion DRM to a new one and he's instrested in setting Status of the new version to "finalized" after the copy. Therefore as a prototype to demostrate this functionality i started with HdrmSdk bundle and was able to copy an exisiting version to a new one from the method com.oracle.drm.examples.HdrmScriptSample.copyVersion(String abbEv) method.

      However, in order to accomplish my next task i have slightly changed the copyVersion method to something as stated below

      private void copyVersion(String newVersionName) throws RemoteException, IOException{

      TRemVersion version = hdrmIf.getVersionMgr().versionByAbbrev(getSessionId(), newVersionName);

      if (version != null){
      deleteVersion(newVersionName);
      }

      TRemVersion ver =
      hdrmIf.getVersionMgr().copyVersion(getSessionId(), getVersionName(), newVersionName, newVersionName, false,
      false, false);

      ver.setStatus(Tmdm_VersionStatus.vsFinalized);

      //now commit the verison

      saveVersion(newVersionName);

      logger.info("Created new copied Version: " + newVersionName);

      }

      private void saveVersion(String versionName) throws RemoteException, IOException
      {
      logger.info("Start Job to save Version: " + versionName);
      TRemASyncJobID job = hdrmIf.getVersionMgr().startSaveVersionJob(getSessionId(), versionName);

      job.setMachineName(getMachinesMAC());

      boolean isFinish = false;
      while (isFinish == false)
      {
      Tmdm_JobStatus jobStatus = hdrmIf.getJobMgr().checkJobStatus(job);

      if (jobStatus.equals(Tmdm_JobStatus.jsDone))
      {
      isFinish = true;
      logger.info("Version: " + versionName + " saved");
      }
      }
      }

      which as expected is not performing any changes to the version status in the targetted version(new version) as we were currently trying to modify the marshalled object ws client. Can someone here guide me through the correct process or point me to the helpful webservice related documentation(apart from reglar api docs we get with the SDK) or correct me if it practially not possible with the WS api. It'd be of great help.

      Thanks in advance

      Best Regards,
      Rahul Sharma