I am getting exception as below for java client code snippet while inspecting document which is secured using MS Word 2007.
Properties connectionProps = new Properties();
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT _EJB_ENDPOINT, "jnp://vvcon-qa-1.ptcnet.ptc.com:1099");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPO RT_PROTOCOL,ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_ TYPE, "JBoss");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENT IAL_USERNAME, "administrator");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENT IAL_PASSWORD, "administrator");
ServiceClientFactory factory = ServiceClientFactory.createInstance(connectionProps);
RightsManagementClient rightsClient = new RightsManagementClient(factory);
//Reference a policy-protected Word document from which to remove a policy
FileInputStream is = new FileInputStream(args[0]);
Document inPDF = new Document(is);
//Create a Document Manager object
DocumentManager documentManager = rightsClient.getDocumentManager();
RMInspectResult lic = documentManager.inspectDocument(inPDF);
Exception I am getting
com.adobe.edc.sdk.SDKException: Error while looking up RM Header in the document -- Invalid argument(error code bin: 1281, hex: 0x501)
at com.adobe.livecycle.rightsmanagement.RightsManagementService.throwSDK Exception(RightsManagementService.java:958)
at com.adobe.livecycle.rightsmanagement.RightsManagementService.getLicen seID(RightsManagementService.java:794)
at com.adobe.livecycle.rightsmanagement.RightsManagementService.inspectD ocument(RightsManagementService.java:2260)
Event if I try with user who can access document after connecting to LiveCycle ES2 from Microsoft Word 2007 I am getting same exception.
I can acess document from MS Word after I have secured it using all users who have right permission for document but from java client I am not able to do that. Looks like RMS information is not embedded properly in my document.
jars included in my classpath are
adobe-rightsmanagement-client.jar,namespace.jar,jaxb-api.jar,jaxb-impl .jar,jaxb-libs.jar,jaxb-xjc.jar,relaxngDatatype.jar,adobe-livecycle-cl ient.jar,adobe-usermanager-client.jar,jbossall-client.jar
My client is running on Windows XP 32 bit with Office 2007.
Server is installed on Windows server 2008 R2 64 bit and deplyoed using JBoss.
One more intresting fact here is my java client can protect document and unprotect same document.
However document which is protected by Microsoft Rights Management extension plugin cannot
be unprotected by my java client.
Regards,
Sharang
Views
Replies
Total Likes