Documentum : Creation of DFS Web Service

I would like to describe step by step how to create a DFS service and DFS client via Composer. In this post, I am not exposing neither the deployment of this DFS service on an application server, neither the configuration of DFC file on server allowing the access to Documentum Content Server.

First, what is DFS?EMC Documentum Foundation Services (DFS) are a set of technologies that enable service-oriented programmatic access to the EMC Documentum Content Server platform and related products. […] The design and technical implementation of DFS is grounded in the principles of Service-Oriented Architecture (SOA).

The DFS Software Development Kit (SDK) includes Java class libraries, .NET assemblies, tools, documentation, and samples that you can use to build DFS services that extend the delivered DFS services, or to build DFS consumers using the optional C# or Java client library.

DFS Service Creation

Create a Documentum Project:

DFS LibrariesWhen an Documentum Project is created it also adds all the necessary DFS resources to allow you to develop Documentum services. It will deploy a copy of the DFS SDK to your core project (incidentally this is why creating the first project in a workspace takes a little longer than you might expect) and add the DFS Services Library to your project’s java build path. And add a DFS Builder for building your services.

Click on the Documentum Project and bring up its DFS Module properties:

…then select Builders, you should see DFS builder:

…then select the Java Build Path, then the Libraries tab you will see DFS Service Library:

Some words concerning the DFS Library, If you select DFS Services Library and click on Edit… button:

…OR if you click on Add Library…:

As you can see there are 4 types of DFS Services Library:
o DFS Services Library: it is the default library used in order to developing services.
o DFS Remote Client Library with UCF/MTOM: Theses libraries are used in order to developing services consumers.
o DFS Local Client Library: This library is also used in order to developing services consumers, however, this type of library is added to projects that are acting as “functional tests” for your services projects. Typically, you create one or more of these “functional test” projects in the same workspace as your services projects and configure them with this type of library. This then allows you to debug from the client into the service and back again without having to deploy to a server. A useful feature.

o Assuming that you have automatic build turned on from project menu in composer, you should see the DFS Builder leap into life and attempt to build the service. In your Console view you’ll get a build report:

o After building, the Web Services/bin/gen-src folder contains a set of generated sources from the POJO service : jax-ws web service sources, a set of classes and wsdl.

Export/Test the service

There are two approaches to test our service:

o The first approach is to create a parallel test project with Junit tests that exercise your service. To facilitate this your test project would be configured with the local client library, as described above, so that it can make local invocations to your service. This project should of course be placed under the same version control as your services project.

o The second approach is to export your services as an ear, deploy it to an application server and exercise your service again via another project capable of making remote service invocations. The service’s context root and module name affect the URL of service, these informations must be set via right-click on the project and select Properties->Documentum Project->DFS Module:

Here, we use the second approach:

o Right-click on the project and select Export…, then Documentum >> Export Service Archive to generate ear of service and client reference library: