During recent years, we at Sourcesense supported our customers by implementing different system integrations based on open source technology. At Sourcesense, our main goal is to help our customers to choose the best approach for adopting open source.
Sourcesense offers consultancy, integration, high-level support, and training in enterprise-ready open source technologies across four business areas: Enterprise Content Management, Enterprise Search, Business Intelligence, and Application Lifecycle Management. We have offices in four European cities—London, Amsterdam, Rome, and Milan and we are able to offer local, co-developers and near-shoring solutions.
Sourcesense is well regarded in the open source community, contributing to many OS projects through the Apache foundation and JBoss community; we actively look for contributors and committers to hire, and we encourage them to keep contributing to the OS ecosystem. Sourcesense is also one of the exclusive training partner of Alfresco, we are the only one offering official training in the UK, Italy, and Netherlands.
Alfresco 3 is one of the most versatile open source Enterprise Content Management (ECM) platforms. This is a real open source alternative to commercial product such as Microsoft SharePoint and EMC Documentum. It is also very well designed and suitable to be customized and extended. The open source adoption allows developers to contribute on the project and that's why you can find more than 240 extensions in the Alfresco Forge.
This book shows you how to build applications on top of Alfresco using all the Web Service interfaces exposed by the product. Alfresco provides services to client applications for manipulating content and for performing additional operations to manage the content lifecycle.
We start discussing about the Web Services API of Alfresco that is based on the SOAP protocol. Then we describe how to extend the REST API of Alfresco using the Web Scripts Framework. Finally, we explain the new specification named Content Management Interoperability Services (CMIS), it is dedicated to improve interoperability between content management systems. Alfresco was one of the first ECM platforms to provide a complete CMIS implementation. We hope that it could be useful for you to learn this new standard and how you can use it with any CMIS-compliant repository.
Chapter 1, Introducing the SOAP Web Services introduces the basic information about Web Services and the specific Alfresco Web Services implementation. It also explains how to set up your development environment before starting to use the Alfresco Web Services API.
Chapter 2, Creating and Modifying Content includes an overview of the Content Manipulation Language (CML) of Alfresco. It also describes how to use the CML language for manipulating content using the Alfresco Web Services API. This chapter also teaches you how to search contents in the repository.
Chapter 3, Collaboration and Administration covers operations for collaborative editing. You'll also learn how to manage repository actions, rules, and users.
Chapter 4, A Complete Example describes an example of a bookshop application implemented using the Web Service Client stub provided by Alfresco. This chapter shows you how to implement basic operations to manage users, books, and the cart for orders.
Chapter 5, Using the Alfresco Web Services from .NET teaches you how to use the Alfresco Web Services API from your Microsoft .NET application. It also shows you how to configure your development environment using the open source IDE SharpDevelop.
Chapter 6, Introducing the Web Scripts Framework takes you through an overview of REST concepts and also provides you a step-by-step example to start developing your first Web Script.
Chapter 7, Templating with Freemarker gives the basic concepts about Freemarker discussing about how to build your view template. It also includes an overview about the Alfresco Template Node API and the JSON format.
Chapter 8, Writing a Web Script Controller in JavaScript and Java covers how to implement a Web Script using a JavaScript controller. It describes all the root objects available in the JavaScript API of Alfresco and how to perform basic operations to manage the content. It also shows you how to pass values to the view template. It also explains how to implement Web Scripts in Java, if you need more powerful features for your functionality.
Chapter 9, Putting it All Together shows you a complete example of how to implement a bookshop application using the Web Scripts Framework.
Chapter 10, Overview of CMIS focuses on the Content Management Interoperability Services (CMIS) specification. You'll learn the history of this new standard and its main objectives. You'll also learn the available protocol bindings and the CMIS domain model.
Chapter 11, The CMIS AtomPub Binding introduces a section about how to perform basic operations using the REST Binding of CMIS.
Chapter 12, Developing a CMIS Client Using Apache Chemistry explains how to implement a CMIS client using the REST binding. It describes with a complete example how to perform basic operations on contents and how to search contents in the repository using Apache Chemistry.
Chapter 13, The Web Services Binding describes how to implement your client application using the CMIS SOAP binding. This chapter starts showing you how to retrieve all the WSDLs and how to generate your client stub using Apache CXF. It also explains how to perform basic operations on contents using the SOAP binding of CMIS.
Chapter 14, A Complete CMIS Client Application shows you a complete example of a Wiki application that stores contents in a CMIS-compliant repository.
At the end of the book, you will find an Appendix about the CMIS query language. In this section, you'll find reference information about how to build queries to search contents using CMIS. Specifically, in this section, you'll learn the CMIS relational view, clauses, operators, and predicates.
The following is a list of the software that you will need for this book:
Alfresco Community 3.3
Eclipse 3.5
Apache Chemistry (unreleased)
Google Web Toolkit 2.0.3
Spring Framework 2.5.6
Apache CXF 2.2.6
Microsoft .NET Framework 3.5
SharpDevelop 3.2
If you are a web developer who wants to build business applications on top of Alfresco, then this is the book for you. It is intended to be a complete overview to help developers choose a specific API with related method invocations.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "A CML operation is defined with an XML complexType
and its sequence
of properties."
A block of code is set as follows:
<soapenv:Body> <update xmlns="http://www.alfresco.org/ws/service/repository/1.0"> <statements> <ns1:create xmlns:ns1="http://www.alfresco.org/ws/cml/1.0"> <ns1:id>1</ns1:id> <ns1:parent>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
<soapenv:Body>
<update xmlns="http://www.alfresco.org/ws/service/repository/1.0">
<statements>
<ns1:create xmlns:ns1="http://www.alfresco.org/ws/cml/1.0">
<ns1:id>1</ns1:id>
<ns1:parent>
Any command-line input or output is written as follows:
curl -v -u admin:admin -X DELETE 'http://localhost:8080/alfresco/service/books/999-0552997858'
New terms and important words are shown in bold. Words that you see on the screen, in menus, or dialog boxes for example, appear in the text like this: "Right-click on the Package Explorer, and click on Import...".
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail <[email protected]>
.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Note
Downloading the example code for the book
You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.