QUICK START: DFS and Adobe Flex: a Quick Start Tutorial
Total Page:16
File Type:pdf, Size:1020Kb
EMC | Documentum Technical White Paper QUICK START: DFS and Adobe Flex: A Quick Start Tutorial April 2009 EMC | Documentum, Inc. 6801 Koll Center Parkway Pleasanton, CA 94566-7047 phone (925) 600-6800 © 2009 Documentum, Inc. All rights reserved. Documentum, and the corporate logo are trademarks or fax (925) 600-6850 registered trademarks of Documentum, Inc. in the United States and throughout the world. All other company and product names are used for identification purposes only and may be trademarks of their respective owners. Documentum cannot guarantee completion of any future products or product features mentioned in www.documentum.com this document, and no reliance should be placed on their availability. Printed in the U.S.A. 60491003V1 1 EMC | Documentum Technical White Paper Documentum Foundation Services (DFS) Contents QUICK START: ............................................................................................................................................. 1 DFS and Adobe Flex: A Quick Start Tutorial ................................................................................................. 1 Contents ........................................................................................................................................................ 2 Overview ........................................................................................................................................................ 3 Tutorial Files and Notes .......................................................................................................... 3 Adobe FLEX ........................................................................................................................... 4 Documentum Foundation Services (DFS) .............................................................................. 4 Adobe LiveCycle Enterprise Suite (ES) ................................................................................. 4 BlazeDS .................................................................................................................................. 5 Quick Start to Configure the Demo ................................................................................................................ 5 Eclipse Configuration ............................................................................................................. 7 FLEX Server Configuration .................................................................................................... 8 Appendix A - Java Source Code .................................................................................................................... 9 Appendix B - FLEX Source Code ................................................................................................................ 22 Appendix C - FLEX Adobe LiveCycle Remoting-Config.xml ....................................................................... 23 2 EMC | Documentum Technical White Paper Documentum Foundation Services (DFS) Overview This quick start tutorial will allow a developer to quickly install and run a DFS/Flex demo; the focus of this demo is a simple web based user interface (using Adobe FLEX) using EMC's Documentum Foundation Services (DFS) to query and display some documents from the Documentum repository. The user will enter in some text into the search field and click on the 'Search' button. DFS will query the dm_document document type and return several properties, including Title, Name, Owner, Last Modified and Object ID. To accomplish this scenario, we will use the Adobe LiveCycle Data Services product.1 Please note that while there are several ways to accomplish this scenario technically, this approach will use the DFS Java productivity layer. There is no need to generate custom WSDL or use another remoting model, like Axis2 or JAX-WS. Figure 1 - FLEX User Interface (UI) calling DFS Tutorial Files and Notes This tutorial uses a number of files, shown below. • Flex 3 Project - testdrive-httpservice.zip • Eclipse 3.4 Project - testwebappwdfs.zip In addition, this tutorial focuses on DFS Release D6.5 SP1, using the Java Release 1.5 or greater. This demo was tested on the following platforms. • MAC OS 10.x • Windows Vista 64-bit 1 If you do not want to use Adobe LiveCycle, you can use the open-source project BlazeDS. 3 EMC | Documentum Technical White Paper Documentum Foundation Services (DFS) • Windows 2003 Server Adobe FLEX Adobe Flex is a collection of technologies released by Adobe Systems for the development and deployment of cross-platform rich Internet applications based on the proprietary Adobe Flash platform. The initial release in March 2004 by Macromedia included a software development kit, an IDE, and a J2EE integration application known as Flex Data Services. Since Adobe acquired Macromedia in 2005, subsequent releases of Flex no longer require a license for Flex Data Services, which has become a separate product rebranded as LiveCycle Data Services. In February 2008, Adobe released the Flex 3 SDK under the open source Mozilla Public License. Adobe Flash Player, the runtime on which Flex applications are viewed, and Adobe Flex Builder, the IDE built on the open source Eclipse platform and used to build Flex applications, remain proprietary. Documentum Foundation Services (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. It includes the following technologies. DFS technology Description Enterprise Content A set of services that provide service-oriented APIs based on DFS to EMC software Services products. Many of these services are delivered as part of the DFS product (delivered with Content Server). Other services require purchase of additional products. For further information on the complete set of services, see the Enterprise Content Services 6.5 Reference Data model and API A data model and API, exposed primary as a set of WSDLs and secondarily as Java and .NET class libraries, providing the underlying architecture for DFS services and DFS consumers. Client productivity layer Optional client-side runtime libraries for DFS consumers. These libraries are based on static proxies generated using JAX-WS for Java clients and Windows Communication Foundation for .NET clients. Tools for generating Service-generation tools based on JAX-WS (Java API for XML-based Web Services), services and runtime and Ant, which generate deployable DFS services from annotated source code, or from support WSDL. These tools also generate client-side runtime support for Java clients. C# runtime support is generated using the DFS Proxy Generator utility. SDK A software development kit for development of DFS consumers, which includes the Java and .NET APIs, design-time build tools, and samples. The .NET APIs are CLS compliant, so they can be used to develop consumers using any .NET language (such as Visual Basic). EMC Documentum DFS provides a custom service registry solution with an administration interface Solution Catalog available in Documentum Composer. DFS also supports existing UDDI version 2 Repository service registries and provides an Ant task for service publication. Adobe LiveCycle Enterprise Suite (ES) Adobe LiveCycle Enterprise Suite (ES) is a SOA J2EE-based (Java 2 Enterprise Edition) server software product from Adobe Systems Incorporated used to build applications that automate a broad range of business processes for enterprises and government agencies. It combines technologies for data capture, information assurance, document 4 EMC | Documentum Technical White Paper Documentum Foundation Services (DFS) output, content services, and process management to deliver solutions such as account opening, services and benefits enrollment, correspondence management, request for proposal processes, and other manual based workflows. LiveCycle ES incorporates PDF (Portable Document Format) technology with Flex (Flash-based UI technology) to allow developers to create human interactive applications. Adobe positions LiveCycle ES as a platform to help with customer engagement by providing end users with more compelling experiences which can be extended outside the organization to customers, partners, and citizens. LiveCycle applications also function in both online or offline environments. These capabilities are enabled through the use of Adobe Reader and the Flash Player clients that are found on the majority of desktop computers and 2 mobile devices. Figure 2 - The Adobe LiveCycle Install Directory After installing LiveCycle (or LCDS), you will see a folder under C:\lcds (the default); LCDS will install a Tomcat Server running on port 8400. Adobe Flex will call your Java components on this port. You will configure LCDS from Flex. A file, called remoting-config.xml will contain the ID's and classes of the Java components Flex will use. BlazeDS An alternative to Adobe LiveCycle, you can use BlazeDS. BlazeDS is a server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real- time to Adobe® Flex® and Adobe AIR™ applications for more responsive rich Internet application (RIA) experiences. BlazeDS uses a Tomcat server just like LCDS, and offers the same approach (same port, configuration files). For a great tutorial on installing BlazeDS, check out http://flexbandit.com/archives/55 Quick Start to Configure the Demo Please follow these steps to quickly