Creating DFS Services using Documentum Composer
I’m not sure how many people realize it but when you create a Documentum “artifact” project within composer, it is also a “dfs services” project. If you right click one of your Documentum projects and bring up its properties, then select the Java Build Path, then the Libraries tab you should see something similar to this:-
An if you select Properties->Builders, you should see something like this:-
When an “artifact” 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.
Creating a Service Consumer
Just as a quick aside if you do need to create a consumer, select the “DFS Services Library” entry and then select Edit, you should see something like this:-
As you can see there are in fact 4 flavours of DFS services library. The first, and the default, is concerned with developing services (today’s topic). The remaining three are actually concerned with developing service consumers. They are pretty self-explanatory. The only one that perhaps requires a little explanation is the last; “DFS Local Client”. You add this type of library 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. I will talk more about developing service consumers in a future articles.
Building a Service
OK, so back to developing the services themselves. As you can see your project is all set up for service development. Now you need to develop a service. As you will probably all be aware there are a couple of flavours of DFS service; one based on a POJO and another based on a BOF SBO (service-based object). They are, in fact, very similar and are just annotated java classes. You can read more about DFS and its annotations from the DFS developer’s guide. I won’t go into these here. We’ll use the POJO variant here. And for convenience we’re going to use one of the samples provided in the DFS SDK; <DFS SDK install dir>/samples/HelloWorldService. All we need to do is navigate to <DFS SDK install dir/samples/HelloWorldService/src/service folder and copy the top level folder of the source tree, “com” in this case. Then paste it into the the /Web Services/src folder of your Documentum project.
Once you drop these sources packages and class files into the Web Services folder, and assuming that you have “automatic build” turned on, then 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:-
And if you open the standard Navigator view (Window->Open View->Navigator) and navigate to the Web Services/bin/gen-src folder you should also see a set of generated source. This is actually a jax-ws web service that has been generated from your POJO service. And under the classes folder you should see a set of classes and wsdl. These classes are an aggregate compilation of your POJO (and associated classes) and the generated jax-ws web service. The wsdl is obviously just standard wsdl also generated from your POJO:-
If for some reason your service fails to compile then you will of course get all the same familiar productivity tools for dealing with these issues that you have for plain old java development. For example you’ll get errors and warnings reported in your Problem view:-
And just so you know the DFS Builder does support incremental builds and will only rebuild services that have changed since the last build so it should be reasonably efficient.
Testing the service
So now we’ve reached the point where we have a service that needs testing. There are two approaches to this. The first 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.
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. Before you do this though you must remember to set the archive’s context root and module name as both of these affect the eventual URL of your service. This is a one time deal though so just right-click on the project and select Properties->Documentum Project->DFS Module:-
Just so you are aware. Typically all EMC DFS services share a context root of “services” and a module name that describes their general function. Core for core services, bpm for business process, etc. These will then be available via URLs such as http://localhost:8080/services/core… and http://localhost:8080/services/bpm…
Once these settings are made you can export the service. Right-click on the project and select Export->Documentum->Export Service Archive:-
The archive name and context root should be defaulted for you from your DFS Module settings page. Choose an output folder. Uncheck the Generate Publish Manifest. This is only required is you want to publish your services to a UDDI registry using the DFS tools. And click finish. This will produce your ear file. Once you are in possession of the ear you can deploy it onto your app server using the appropriate app manager console or by dropping it into the hot deploy folder. Whichever works for you. Once you have it deployed you can perform a quick sanity check by requesting the service’s WSDL document by requesting something like http://localhost:8080/services/helloworld/HelloWorldService?wsdl. Assuming you get back the WSDL document (that matches the one that was generated by the builder earlier) then you are good to go.
Next you will need to create yourself another test project. But this time configure it with one of the two available Remote Client library options, depending on your content transfer requirements. Again, creating Junit test cases I find is the quickest and easiest. These can be rolled up into test suites and all can be invoked easily enough through the Composer (eclipse) UI. And once again, if you can standardize this process across your development team then you can check this test project into source control right along side your services project.
In Summary
In summary we have walked through the out-of-the-box capabilities of a Documentum project with respect to creating DFS services. Every Documentum project has the capability to host the development and testing of DFS services. There are four libraries that are at your disposal for development and testing. Each project has an incremental builder that is capable of automatically building your services. And finally there is an exporter that can produce an ear file containing your services that is ready for deployment onto any app server.
Looking forward, in future articles I will talk more about another development option which leverages both Composer’s and WTP’s capabilities. This option gives you far greater control over the contents of your ear and brings remote debugging of your services to your IDE.
In the meantime, happy Composing.
September 3, 2008 at 3:27 pm
[...] Creating DFS services using Documentum Composer [...]
September 13, 2008 at 9:13 pm
Hi Paul,
Thanks for the tutorial. I followed the steps that you mentioned and I got the following errors when I copied the folder ‘com’ to the web Services folder. Any ideas on how to resolve this?
Buildfile: C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\dfs-build.xml
[echo] defaultclasspath is C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\emc-dfs-rt.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\emc-dfs-services.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\emc-dfs-tools.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\FastInfoset.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\activation.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\http.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\jaxb-api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\jaxb-impl.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\jaxb-xjc.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\jaxws-api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\jaxws-rt.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\jaxws-tools.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\jsr173_api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\jsr181-api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\jsr250-api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\resolver.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\saaj-api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\saaj-impl.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\sjsxp.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\stax-ex.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\jaxws\streambuffer.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\dfc\bpm_infra.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\dfc\certjFIPS.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\dfc\dfc.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\dfc\dms-client-api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\dfc\jsafeFIPS.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\ucf\client\All-MB.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\aspectjrt.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\log4j.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\serializer.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\xalan.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\xercesImpl.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\xml-apis.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\xtrim-api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\xtrim-server.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\ucf\server\ucf-server-api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\ucf\server\ucf-server-impl.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\ucf\server\xml-ca.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\ucf\client\MacOSXForker.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\ucf\client\mac_utilities.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\ucf\client\ucf-client-api.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\ucf\client\ucf-client-impl.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\ucf\client\ucf-installer.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\commons\commons-cli-1.0.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\commons\commons-codec-1.3.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\commons\commons-io-1.2.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\commons\commons-lang-2.1.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\javassist.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\javax.servlet.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\servlet.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\tools.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\xmlsec.jar;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\lib\utils\xws-security.jar;C:\Documents and Settings\dkannoju\workspace\dfsProject\dfs-gen-rsc;C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\emc-dfs-sdk-6.0\etc
[echo] projectclasspath is ../;../../../../../Program Files/Java/jdk1.5.0_16/jre/lib/rt.jar;../../../../../Program Files/Java/jdk1.5.0_16/jre/lib/jsse.jar;../../../../../Program Files/Java/jdk1.5.0_16/jre/lib/jce.jar;../../../../../Program Files/Java/jdk1.5.0_16/jre/lib/charsets.jar;../../../../../Program Files/Java/jdk1.5.0_16/jre/lib/ext/dnsns.jar;../../../../../Program Files/Java/jdk1.5.0_16/jre/lib/ext/localedata.jar;../../../../../Program Files/Java/jdk1.5.0_16/jre/lib/ext/sunjce_provider.jar;../../../../../Program Files/Java/jdk1.5.0_16/jre/lib/ext/sunpkcs11.jar;../../dfsProject/src;emc-dfs-sdk-6.0/lib/emc-dfs-services.jar;emc-dfs-sdk-6.0/lib/emc-dfs-rt.jar;emc-dfs-sdk-6.0/lib/jaxws/activation.jar;emc-dfs-sdk-6.0/lib/jaxws/FastInfoset.jar;emc-dfs-sdk-6.0/lib/jaxws/http.jar;emc-dfs-sdk-6.0/lib/jaxws/jaxb-api.jar;emc-dfs-sdk-6.0/lib/jaxws/jaxb-impl.jar;emc-dfs-sdk-6.0/lib/jaxws/jaxb-xjc.jar;emc-dfs-sdk-6.0/lib/jaxws/jaxws-api.jar;emc-dfs-sdk-6.0/lib/jaxws/jaxws-rt.jar;emc-dfs-sdk-6.0/lib/jaxws/jsr173_api.jar;emc-dfs-sdk-6.0/lib/jaxws/jsr181-api.jar;emc-dfs-sdk-6.0/lib/jaxws/jsr250-api.jar;emc-dfs-sdk-6.0/lib/jaxws/resolver.jar;emc-dfs-sdk-6.0/lib/jaxws/saaj-api.jar;emc-dfs-sdk-6.0/lib/jaxws/saaj-impl.jar;emc-dfs-sdk-6.0/lib/jaxws/sjsxp.jar;emc-dfs-sdk-6.0/lib/jaxws/stax-ex.jar;emc-dfs-sdk-6.0/lib/jaxws/streambuffer.jar;emc-dfs-sdk-6.0/lib/dfc/dfc.jar;emc-dfs-sdk-6.0/lib/utils/aspectjrt.jar;emc-dfs-sdk-6.0/lib/dfc/certjFIPS.jar;emc-dfs-sdk-6.0/lib/dfc/dms-client-api.jar;emc-dfs-sdk-6.0/lib/dfc/jsafeFIPS.jar;emc-dfs-sdk-6.0/lib/utils/xalan.jar;emc-dfs-sdk-6.0/lib/utils/xercesImpl.jar;emc-dfs-sdk-6.0/lib/utils/xtrim-api.jar;emc-dfs-sdk-6.0/lib/utils/xtrim-server.jar;emc-dfs-sdk-6.0/lib/dfc/bpm_infra.jar;emc-dfs-sdk-6.0/lib/bof/workflow.jar;emc-dfs-sdk-6.0/lib/commons/commons-codec-1.3.jar;emc-dfs-sdk-6.0/lib/commons/commons-io-1.2.jar;emc-dfs-sdk-6.0/lib/commons/commons-lang-2.1.jar;emc-dfs-sdk-6.0/lib/utils/javax.servlet.jar;emc-dfs-sdk-6.0/lib/ucf/client/ucf-installer.jar;emc-dfs-sdk-6.0/lib/ucf/server/ucf-server-api.jar;emc-dfs-sdk-6.0/lib/ucf/server/ucf-server-impl.jar;emc-dfs-sdk-6.0/lib/ucf/server/xml-ca.jar;emc-dfs-sdk-6.0/lib/utils/log4j.jar;emc-dfs-sdk-6.0/lib/utils/xml-apis.jar;../../dfsProject/Web Services;../../dfsProject/dfs-gen-src;
[echo] default_project_libraries is C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs
[echo] project_libraries.path is C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs
[echo] default_project_resources is C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs
[echo] project_resources.path is C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs
generate:
[generateModel] Creating ‘context-root-module-name-service-model.xml’
[generateModel] || The following EXCEPTION occurred while executing the task:
[generateModel] || Message: Generation of model file failed.
[generateModel] || Caused by: Failed to generate model file due to an APT execution error. “{0}”
[generateModel] || Caused by: APT has returned the following errors:
[generateModel] Problem encountered during annotation processing;
[generateModel] see stacktrace below for more information.
[generateModel] java.lang.NoClassDefFoundError: javax/activation/DataSource
[generateModel] at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.(RuntimeBuiltinLeafInfoImpl.java:186)
[generateModel] at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.(RuntimeTypeInfoSetImpl.java:25)
[generateModel] at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:89)
[generateModel] at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:42)
[generateModel] at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:114)
[generateModel] at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.(RuntimeModelBuilder.java:49)
[generateModel] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:389)
[generateModel] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:253)
[generateModel] at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:84)
[generateModel] at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:66)
[generateModel] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[generateModel] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[generateModel] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[generateModel] at java.lang.reflect.Method.invoke(Method.java:585)
[generateModel] at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
[generateModel] at javax.xml.bind.ContextFinder.find(ContextFinder.java:366)
[generateModel] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
[generateModel] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
[generateModel] at com.emc.documentum.fs.tools.impl.XmlGeneratorFactory$DsfProcessor.writePackages(XmlGeneratorFactory.java:153)
[generateModel] at com.emc.documentum.fs.tools.impl.XmlGeneratorFactory$DsfProcessor.process(XmlGeneratorFactory.java:87)
[generateModel] at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
[generateModel] at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
[generateModel] at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
[generateModel] at com.sun.tools.apt.main.Main.compile(Main.java:1075)
[generateModel] at com.sun.tools.apt.main.Main.compile(Main.java:938)
[generateModel] at com.sun.tools.apt.Main.processing(Main.java:95)
[generateModel] at com.sun.tools.apt.Main.process(Main.java:85)
[generateModel] at com.sun.tools.apt.Main.process(Main.java:67)
[generateModel] at com.emc.documentum.fs.tools.impl.ServiceModelGenerator.runAPT(ServiceModelGenerator.java:147)
[generateModel] at com.emc.documentum.fs.tools.impl.ServiceModelGenerator.generate(ServiceModelGenerator.java:117)
[generateModel] at com.emc.documentum.fs.tools.GenerateModelTask.executeTask(GenerateModelTask.java:147)
[generateModel] at com.emc.documentum.fs.tools.impl.ChainedExceptionReportingTask.execute(ChainedExceptionReportingTask.java:18)
[generateModel] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[generateModel] at org.apache.tools.ant.Task.perform(Task.java:364)
[generateModel] at org.apache.tools.ant.Target.execute(Target.java:341)
[generateModel] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[generateModel] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[generateModel] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[generateModel] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[generateModel] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[generateModel] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[generateModel] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[generateModel] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
BUILD FAILED
C:\Documents and Settings\dkannoju\workspace\DocumentumCoreProject\dfs\dfs-build.xml:203: Generation of model file failed.
Total time: 4 seconds
September 19, 2008 at 9:45 am
Apologies for the late reply.
Clearly this is a classpath issue.
Are you using Composer 6.0 or 6.5?
It looks like you are using Composer 6.5 but perhaps with a project that was originally created in Composer 6.0. The paths looks like 6.5 paths but the actual libraries being included are 6.0 libraries, which, perhaps pertinent to this conversation resided in a different strucutre.
The easiest thing to do might be to re-create your project in Composer 6.5 and then re-import your sources.
Hope that helps
_Paul
October 6, 2008 at 9:04 am
Hi Paul,
I created custom DFS service from Documentum Composer 6.5. Service is deployed on JBoos. Everything works fine except that in some lines in my code I have some cyrilic characters (ш, ћ, ж, ч …) that I write to some html log file. Problem is that insted of writting this characters (ш, ћ, ж, ч …) I see characters Предмет 2Ä….. I put text file encoding to UTF-8 on my project workspace. Whole DFS code executes on JBoos.
Any help please
October 6, 2008 at 9:47 am
Hi Ivica,
It is unclear where the problems lies at the moment. Composer (woudl appaear doubtful, DFS, java, environmental?).
My recommendation is that you extract the log writing code (or a sample thereof) into a simple main java class and then try and run it on your *target* machine.
If this fails then it points at an environmental problem on the target machine or a java problem (I recall some StringBuffer problems on Sun’s VM a while back but cant remember the details I’m afraid).
If it works then we may need to look at DFS but, if this is the case, you should go through appropriate channels and raise your bug with EMC Tech Support.
Many thanks
October 16, 2008 at 9:26 am
Hi Ivica,
Compile your code with ANT, and there you can add “encoding” property to the javac task. Eclipse is using file encoding to determine how to display and save a source file, it’s not passing this setting to it’s compiler.
May 5, 2009 at 3:10 am
Hello Paul,
I created simple HelloWorldService using Composer6.5 and i am getting following error. Any help..
Buildfile: C:\workspace\DocumentumCoreProject\dfs6.5\dfs-build.xml
[echo] dfs.sdk.home is C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5
[echo] defaultclasspath is C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\FastInfoset.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\activation.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\http.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\jaxb-api.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\jaxb-impl.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\jaxb-xjc.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\jaxws-api.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\jaxws-rt.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\jaxws-tools.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\jsr173_api.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\jsr181-api.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\jsr250-api.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\resolver.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\saaj-api.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\saaj-impl.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\sjsxp.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\stax-ex.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\jaxws\streambuffer.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\dfc\certjFIPS.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\dfc\dfc.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\dfc\dms-client-api.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\dfc\jsafeFIPS.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\client\All-MB.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\utils\aspectjrt.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\utils\log4j.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\server\ucf-server-api.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\server\ucf-server-impl.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\server\xml-ca.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\client\MacOSXForker.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\client\jacob.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\client\mac_utilities.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\client\ucf-ca-office-auto.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\client\ucf-client-api.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\client\ucf-client-impl.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\client\ucf-connection.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\ucf\client\ucf-installer.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\commons\commons-cli-1.0.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\commons\commons-codec-1.3.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\commons\commons-io-1.2.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\commons\commons-lang-2.1.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\utils\javassist.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\utils\servlet.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\utils\tools.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\utils\xmlsec.jar;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\lib\java\utils\xws-security.jar;C:\workspace\TestProject\Web Services\bin\gen-rsc;C:\workspace\DocumentumCoreProject\dfs6.5\emc-dfs-sdk-6.5\etc
[echo] projectclasspath is emc-dfs-sdk-6.5/lib/java/emc-dfs-services.jar;emc-dfs-sdk-6.5/lib/java/emc-dfs-rt.jar;emc-dfs-sdk-6.5/lib/java/jaxws/activation.jar;emc-dfs-sdk-6.5/lib/java/jaxws/FastInfoset.jar;emc-dfs-sdk-6.5/lib/java/jaxws/http.jar;emc-dfs-sdk-6.5/lib/java/jaxws/jaxb-api.jar;emc-dfs-sdk-6.5/lib/java/jaxws/jaxb-impl.jar;emc-dfs-sdk-6.5/lib/java/jaxws/jaxb-xjc.jar;emc-dfs-sdk-6.5/lib/java/jaxws/jaxws-api.jar;emc-dfs-sdk-6.5/lib/java/jaxws/jaxws-rt.jar;emc-dfs-sdk-6.5/lib/java/jaxws/jsr173_api.jar;emc-dfs-sdk-6.5/lib/java/jaxws/jsr181-api.jar;emc-dfs-sdk-6.5/lib/java/jaxws/jsr250-api.jar;emc-dfs-sdk-6.5/lib/java/jaxws/resolver.jar;emc-dfs-sdk-6.5/lib/java/jaxws/saaj-api.jar;emc-dfs-sdk-6.5/lib/java/jaxws/saaj-impl.jar;emc-dfs-sdk-6.5/lib/java/jaxws/sjsxp.jar;emc-dfs-sdk-6.5/lib/java/jaxws/stax-ex.jar;emc-dfs-sdk-6.5/lib/java/jaxws/streambuffer.jar;emc-dfs-sdk-6.5/lib/java/dfc/dfc.jar;emc-dfs-sdk-6.5/lib/java/utils/aspectjrt.jar;emc-dfs-sdk-6.5/lib/java/dfc/certjFIPS.jar;emc-dfs-sdk-6.5/lib/java/dfc/dms-client-api.jar;emc-dfs-sdk-6.5/lib/java/dfc/jsafeFIPS.jar;emc-dfs-sdk-6.5/lib/java/dfc/xtrim-api.jar;emc-dfs-sdk-6.5/lib/java/dfc/xtrim-server.jar;emc-dfs-sdk-6.5/lib/java/bof/bpm_infra.jar;emc-dfs-sdk-6.5/lib/java/bof/workflow.jar;emc-dfs-sdk-6.5/lib/java/commons/commons-codec-1.3.jar;emc-dfs-sdk-6.5/lib/java/commons/commons-io-1.2.jar;emc-dfs-sdk-6.5/lib/java/commons/commons-lang-2.1.jar;emc-dfs-sdk-6.5/lib/java/ucf/client/ucf-installer.jar;emc-dfs-sdk-6.5/lib/java/ucf/server/ucf-server-api.jar;emc-dfs-sdk-6.5/lib/java/ucf/server/ucf-server-impl.jar;emc-dfs-sdk-6.5/lib/java/ucf/server/xml-ca.jar;emc-dfs-sdk-6.5/lib/java/utils/log4j.jar;emc-dfs-sdk-6.5/lib/java/utils/servlet.jar;
[echo] default_project_libraries is C:\workspace\DocumentumCoreProject\dfs6.5
[echo] project_libraries.path is C:\workspace\DocumentumCoreProject\dfs6.5
[echo] default_project_resources is C:\workspace\DocumentumCoreProject\dfs6.5
[echo] project_resources.path is C:\workspace\DocumentumCoreProject\dfs6.5
generate:
[generateModel] Creating ’services-sample-service-model.xml’
[generateArtifacts] Log4j not found. In order to avoid error messages during build process, please include log4j.jar into your classpath or copy it into $ANT_HOME/lib folder
[generateArtifacts] Generating DFS artifacts
[generateArtifacts] Generating JAXWS artifacts (wsgen & wsimport)
[generateArtifacts] C:\workspace\TestProject\Web Services\src\com\service\example\HelloWorldService.java:5: illegal character: \64
[generateArtifacts] @DfsPojoService(targetNamespace = “http://samples.services.com”)
[generateArtifacts] ^
[generateArtifacts] 1 error
[generateArtifacts] || Task execution failed. Please add “-verbose” to your Ant command line for additional details
[generateArtifacts] || Message: Failed generating a full set of DFS service artifacts for model file: “C:\workspace\TestProject\Web Services\bin\gen-src\services-sample-service-model.xml”
[generateArtifacts] || Caused by: Failed generating a full set of DFS service artifacts for model file: “C:\workspace\TestProject\Web Services\bin\gen-src\services-sample-service-model.xml”
[generateArtifacts] || Caused by: Compile failed; see the compiler error output for details.
BUILD FAILED
C:\workspace\DocumentumCoreProject\dfs6.5\dfs-build.xml:192: Failed generating a full set of DFS service artifacts for model file: “C:\workspace\TestProject\Web Services\bin\gen-src\services-sample-service-model.xml”
Total time: 14 seconds
Thanks
May 5, 2009 at 10:40 am
Hi Mohit,
This is a generated classpath problem.
I’ve seen something like this before when a user had created or imported his projects through a subst r: drive. Composer was therefore using r: rooted file paths but ant was still trying to use c: rooted file paths.
Perhaps you have somehting similar.
I have emailed you at your yahoo address with more detail. Le’s resolve over that channel and then I will follow up here with a post so others can benefit.
Thanks
_Paul
July 3, 2009 at 1:30 am
Hi,
It took me little while since I am new but your article left me hanging….
Do you have the steps for setting up the test project also? I got the service deployed finally….But not sure how to test it…..
Next you will need to create yourself another test project. But this time configure it with one of the two available Remote Client library options, depending on your content transfer requirements. Again, creating Junit test cases I find is the ……
July 3, 2009 at 4:54 pm
Hi Deepak,
My bad. I should not have ended the post quite so abruptly like that.
Try my new post:-
http://paulcwarren.wordpress.com/2009/07/03/creating-a-dfs-services-client-using-documentum-composer/
See if that answers your questions. If not, then as always, let me know by return comment.
Many thanks
_Paul
July 3, 2009 at 6:04 pm
Hi Paul,
Many Thanks…..Appreciate the quick post…..
I am just getting started with created DFS and WS, so if you have any pointers I would appreciate it….
I have Documentum developers installed on my laptop and also the composer….