You can programmatically remove an endpoint from a service
by using the LiveCycle Java API. After you remove an endpoint,
the service cannot be invoked by using the invocation method that
the endpoint enabled. For example, if you remove an EJB endpoint
from a service, you cannot invoke the service by using the EJB mode.
To demonstrate how to remove an endpoint from a service, this
section removes an EJB endpoint from a service named EncryptDocument.
Remarque : You cannot remove an endpoint by using web services.
Summary of stepsTo remove an endpoint from a service, perform the following
tasks:
Include project files.
Create an EndpointRegistryClient object.
Retrieve the endpoint.
Remove the endpoint.
Include project filesInclude the necessary files into your development
project. If you are creating a client application by using Java,
include the necessary JAR files. If you are using web services,
make sure that you include the proxy files.
The following
JAR files must be added to your project’s class path:
adobe-livecycle-client.jar
adobe-usermanager-client.jar
adobe-utilities.jar (required if LiveCycle is deployed
on JBoss Application Server)
jbossall-client.jar (required if LiveCycle is deployed
on JBoss Application Server)
For information about
the location of these JAR files, see Including LiveCycle Java library files.
Create an EndpointRegistry Client objectTo programmatically
remove an endpoint, you must create an EndpointRegistryClient object.
Retrieve the endpoint to removeBefore you can remove an endpoint,
you must retrieve it. To retrieve an endpoint, you must connect
as a user who can access an endpoint. It is recommended that you
connect as an administrator. (See Setting connection properties).
You can retrieve an endpoint
by retrieving a list of endpoints. You can then iterate through
the list, searching for the specific endpoint to remove. For example,
you can locate an endpoint by determining the service that corresponds
to the endpoint and the type of endpoint. When you locate the endpoint,
you can remove it.
Remove the endpointAfter you create a new endpoint, you must
enable it. When the endpoint is enabled, it can be used to invoke
the service. After you enable the endpoint, you can view it within
Administration Console.
Removing an endpoint using the Java APIRemove an endpoint by using the Java API:
Include project files.
Include client JAR files,
such as adobe-livecycle-client.jar, in your Java project’s class
path.
Create an EndpointRegistry Client object.
Retrieve the endpoint to remove.
Retrieve a
list of all endpoints to which the current user (specified in the connection
properties) has access by invoking the EndpointRegistryClient object’s getEndpoints method
and passing a PagingFilter object that acts as
a filter. You can pass (PagingFilter)null to return
all endpoints. This method returns a java.util.List object
where each element is an Endpoint object.
Iterate through the java.util.List object
to determine whether it has endpoints. If endpoints exist, each
element is a EndPoint instance.
Determine the service that corresponds to an endpoint by
invoking the EndPoint object’s getServiceId method.
This method returns a string value that specifies the service name.
Determine the type of endpoint by invoking the EndPoint object’s getConnectorId method.
This method returns a string value that specifies the type of endpoint.
For example, if the endpoint is an EJB endpoint, this method returns EJB.
Remove the endpoint.
Remove the endpoint by invoking
the EndpointRegistryClient object’s remove method
and passing the EndPoint object that represents the
endpoint to remove.
|
|
|