You can disable service security by using the LiveCycle Java API. By default, service security is enabled. However,
when service security is disabled, service operations can be invoked
without specifying a user name and password. That is, when setting
connection properties that are required to invoke service operations,
you do not need to specify a user name and corresponding password.
(See Setting connection properties).
To invoke a service that originated from a process created by
using Workbench without specifying a user name or corresponding
password, you must disable security of the service and all of the
services that are invoked from within the process. Consider, for
example, the following short-lived process named EncryptDocument.
(For information about a short-lived process, see Understanding LiveCycle Processes.)
To invoke this service without specifying a user name or password,
disable security from three services:
EncryptDocument: The name of process (which is
a service once activated within Workbench)
SetValue: The name of the first service within this
process
Encryption service: The name of the second service
within this process
Hinweis: You cannot disable service security by using
web services.
Summary of stepsTo disable service security, perform the following tasks:
Include project files.
Create a ServiceRegistryClient API object.
Reference services that belong to the process.
Disable security.
Include project filesInclude the necessary files in your development
project. If you are creating a client application by using Java,
include the necessary JAR files.
The following JAR files
must be added to your project’s class path:
adobe-livecycle-client.jar
adobe-usermanager-client.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-discovery.jar
commons-logging.jar
adobe-utilities.jar (required if LiveCycle is deployed
on JBoss)
jbossall-client.jar (required if LiveCycle is deployed
on JBoss)
For information about the location of
these JAR files, see Including LiveCycle Java library files.
Create a ServiceRegistryClient API objectBefore you can programmatically
set the execution context of a service, create a ServiceRegistryClient object.
Reference services that belong to the processTo set the execution
context of a service, the service must be referenced. For example,
assume that you want to set the execution content of a service named EncryptDocument.
In this situation, you must reference the EncryptDocument service.
Disable securitySecurity must be disabled from each service that
is located within a process in order to invoke the process without
specifying a user name or password. For example, consider the process
introduced in this section. To invoke this process without specifying
a user name or password, security must be disabled from the EncryptDocument
service, the SetValue service, and the Encryption service.
Disabling service security using the Java APITo disable service security by using the Java API, perform
the following steps:
Include project files.
Include client JAR files,
such as adobe-livecycle-client.jar, in your Java project’s class
path.
Create a ServiceRegistryClient API object.
Reference services that belong to the process.
Reference
each service that belongs to the process by invoking the ServiceRegistryClient object’s getHeadActiveConfiguration method
and passing a string value that specifies the name of the service.
If multiple service versions exist, the latest version (referred
to as the head version) is returned. This method returns
a ServiceConfiguration object that represents the
service (a ServiceConfiguration object must exist for
each service from which security is disabled).
Disable security.
Create a ModifyServiceInfo object
by using its constructor.
Set the service identifier value by invoking the ModifyServiceInfo object’s setId method
and passing the service identifier value (pass the return value
of the ServiceConfiguration object’s getServiceId method).
Disable security from the service by invoking the ModifyServiceInfo object’s setSecurityEnabled method
and passing the Boolean value false.
Invoke the ServiceRegistryClient object’s modifyConfiguration method
and pass the ModifyServiceInfo object.
Hinweis: This step must be performed for each service from
which security is disabled.
|
|
|