chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r787165 [9/10] - in /websites/staging/chemistry/trunk/content: ./ dotnet/ internal/ java/ java/developing/ java/developing/client/ java/developing/repositories/ java/developing/tools/ java/examples/ java/how-to/ php/ project/ python/
Date Fri, 18 Mar 2011 11:57:50 GMT
Added: websites/staging/chemistry/trunk/content/java/how-to/how-to-create-server.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/how-to/how-to-create-server.html (added)
+++ websites/staging/chemistry/trunk/content/java/how-to/how-to-create-server.html Fri Mar 18 11:57:49 2011
@@ -0,0 +1,793 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css" />
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS, cmislib, DotCMIS" />
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>
+Apache Chemistry - How To Build A Server
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 5px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/how-to">How-to</a>&nbsp;&raquo&nbsp;<a href="/java/how-to/how-to-create-server.html">How To Build A Server</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="/project/cmis.html" title="What's CMIS">What is CMIS?</A></LI>
+   <LI><A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="/project/community.html" title="Community">Community</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+   <LI><A href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/java/overview.html" title="OpenCMIS Overview and Index">Overview</A></LI>
+  <LI><A href="/java/download.html" title="Downloads">Downloads</A></LI>
+  <LI><A href="/java/develop/dev-index.html" title="">Developing with OpenCMIS</A></LI>
+  <LI><A href="/java/examples/example-index.html" title="Example Code">Example Code</A></LI>
+  <LI><A href="/java/howto/how-to-index.html" title="OpenCMIS HowTos">OpenCMIS HowTos</A></LI>
+  <LI><A href="http://incubator.apache.org/chemistry/javadoc/index.html" class="external-link" rel="nofollow">JavaDoc</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/python/cmislib.html" title="cmislib">cmislib</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/cmislib-doc/" class="external-link" rel="nofollow">cmislib Documentation</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/php/phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/dotnet/dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Internal"></A>Internal Docs</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://chemistry.apache.org/internal/opencmis-maven-release-documentation.html" class="external-link" rel="nofollow">Release Process</A></LI>
+</UL>
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><div class="toc">
+<ul>
+<li><a href="#how_to_create_a_cmis_server_using_opencmis">How to create a CMIS server using OpenCMIS</a><ul>
+<li><a href="#getting_started">Getting started:</a><ul>
+<li><a href="#using_maven">Using maven</a></li>
+<li><a href="#without_maven">Without maven</a></li>
+</ul>
+</li>
+<li><a href="#implementing_the_services">Implementing the services</a><ul>
+<li><a href="#the_servicewrapper">The ServiceWrapper</a></li>
+</ul>
+</li>
+<li><a href="#differences_between_the_cmis_bindings">Differences between the CMIS bindings</a><ul>
+<li><a href="#the_objectinfo_interface">The ObjectInfo interface</a></li>
+<li><a href="#the_create_methods">The create() methods</a></li>
+<li><a href="#applying_acls">Applying ACLs</a></li>
+</ul>
+</li>
+<li><a href="#running_the_server">Running The Server</a></li>
+<li><a href="#handling_authentication">Handling Authentication</a></li>
+<li><a href="#configuring_your_server">Configuring your server</a></li>
+<li><a href="#testing_the_server">Testing the server</a><ul>
+<li><a href="#test_using_curl">Test using curl</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<h1 id="how_to_create_a_cmis_server_using_opencmis">How to create a CMIS server using OpenCMIS</h1>
+<p><a name="HowToBuildAServer-HowtocreateaCMISserverusingOpenCMIS"></a></p>
+<p>This document contains a step-by-step introduction how you can use opencmis
+to build an CMIS server. The document is divided into the following
+sections:</p>
+<p>Getting started. (download, setup Eclipse, etc.)</p>
+<ol>
+<li>Implementing the services</li>
+<li>The ServiceWrapper</li>
+<li>Differences between SOAP and AtomPub (ObjectHolder)</li>
+<li>Running the server</li>
+<li>Handling Authentication</li>
+<li>Testing the server</li>
+</ol>
+<p><a name="HowToBuildAServer-Gettingstarted:"></a></p>
+<h2 id="getting_started">Getting started:</h2>
+<p>The following step-by-step guide is a sample how to create a web
+application acting as CMIS server. It will support both bindings web
+services and AtomPub.</p>
+<p>The following section describes how to initially setup a project to compile
+a CMIS server. Please note that CMIS comes with two built-in servers. The
+fileshare and the in-memory server. It is a good hint for all upcoming
+questions to look at these implementations as example code containing
+working implementations.</p>
+<p><a name="HowToBuildAServer-Usingmaven"></a></p>
+<h3 id="using_maven">Using maven</h3>
+<p>Using maven is the easiest way to get started. OpenCMIS itself is using
+maven and you can get easily your setup and dependencies using maven. This
+requires that you have a working maven environment. In case you don't yet
+have one you can find instructions <a href="http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html">here</a>.</p>
+<p>The first step is to create your initial pom.xml file to build your project
+and to setup the dependencies. The following steps require that you have
+build opencmis and installed it to your local maven repository (<code>mvn
+install</code>). See <a href="how-to-build.html">here</a>
+ for detailed instructions how to do this.</p>
+<p>You can create your initial setup using maven itself (adjust package name,
+version number and so on according to your needs):</p>
+<div class="codehilite"><pre><span class="n">mvn</span> <span class="n">archetype:generate</span> <span class="o">-</span><span class="n">DgroupId</span><span class="o">=</span><span class="n">org</span><span class="o">.</span><span class="n">mycmis</span> <span class="o">-</span><span class="n">DartifactId</span><span class="o">=</span> <span class="n">mycmissrv</span> <span class="o">\</span>
+<span class="o">-</span><span class="n">DpackageName</span><span class="o">=</span><span class="nb">local</span><span class="o">.</span><span class="n">mycmis</span> <span class="o">-</span><span class="n">Dversion</span><span class="o">=</span><span class="mf">0.1</span>
+</pre></div>
+
+
+<p>Then select option 18 <code>maven-archetype-webapp</code> and confirm settings.</p>
+<p>You will find a project setup then consisting of a directory <code>mycmissvr</code>
+and subdirectories for source code and test code and the Java packages. We
+need to adapt the <code>.pom</code> file so that maven creates a web application file
+that can be deployed in a servlet container (like Apache Tomcat or Jetty).
+We also need to setup the dependencies to opencmis and we need to instruct
+maven generating an overlay with the existing server code in opencmis.
+Please remove therefore the entire generated <code>src/webapp</code> directory and all
+included files (<code>*.jsp</code>, <code>web.xml</code>).
+The final <code>pom.xml</code> will look like this:</p>
+<div class="codehilite"><pre><span class="nt">&lt;project</span> <span class="na">xmlns=</span><span class="s">&quot;http://maven.apache.org/POM/4.0.0&quot;</span>
+  <span class="na">xmlns:xsi=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
+  <span class="na">xsi:schemaLocation=</span><span class="s">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;modelVersion&gt;</span>4.0.0<span class="nt">&lt;/modelVersion&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>org.mycmis<span class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>mycmissrv<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;packaging&gt;</span>war<span class="nt">&lt;/packaging&gt;</span>
+  <span class="nt">&lt;version&gt;</span>0.1<span class="nt">&lt;/version&gt;</span>
+  <span class="nt">&lt;name&gt;</span>mycmissrv Maven Webapp<span class="nt">&lt;/name&gt;</span>
+  <span class="nt">&lt;url&gt;</span>http://maven.apache.org<span class="nt">&lt;/url&gt;</span>
+
+  <span class="nt">&lt;properties&gt;</span>
+    <span class="nt">&lt;opencmisVersion&gt;</span>0.1.0-incubating-SNAPSHOT<span class="nt">&lt;/opencmisVersion&gt;</span>
+    <span class="nt">&lt;opencmisGroupId&gt;</span>org.apache.chemistry.opencmis<span class="nt">&lt;/opencmisGroupId&gt;</span>
+  <span class="nt">&lt;/properties&gt;</span>
+
+  <span class="nt">&lt;build&gt;</span>
+    <span class="nt">&lt;finalName&gt;</span>mycmissrv<span class="nt">&lt;/finalName&gt;</span>
+    <span class="nt">&lt;plugins&gt;</span>
+      <span class="nt">&lt;plugin&gt;</span>
+        <span class="nt">&lt;groupId&gt;</span>org.apache.maven.plugins<span class="nt">&lt;/groupId&gt;</span>
+        <span class="nt">&lt;artifactId&gt;</span>maven-war-plugin<span class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;configuration&gt;</span>
+          <span class="nt">&lt;overlays&gt;</span>
+            <span class="nt">&lt;overlay&gt;</span>
+            <span class="nt">&lt;/overlay&gt;</span>
+            <span class="nt">&lt;overlay&gt;</span>
+              <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+              <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-server-bindings<span class="nt">&lt;/artifactId&gt;</span>
+            <span class="nt">&lt;/overlay&gt;</span>
+          <span class="nt">&lt;/overlays&gt;</span>
+        <span class="nt">&lt;/configuration&gt;</span>
+      <span class="nt">&lt;/plugin&gt;</span>
+      <span class="nt">&lt;plugin&gt;</span>
+        <span class="nt">&lt;artifactId&gt;</span>maven-compiler-plugin<span class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;configuration&gt;</span>
+          <span class="nt">&lt;target&gt;</span>1.5<span class="nt">&lt;/target&gt;</span>
+          <span class="nt">&lt;source&gt;</span>1.5<span class="nt">&lt;/source&gt;</span>
+          <span class="nt">&lt;encoding&gt;</span>UTF-8<span class="nt">&lt;/encoding&gt;</span>
+        <span class="nt">&lt;/configuration&gt;</span>
+      <span class="nt">&lt;/plugin&gt;</span>
+    <span class="nt">&lt;/plugins&gt;</span>
+  <span class="nt">&lt;/build&gt;</span>
+
+  <span class="nt">&lt;dependencies&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>junit<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>junit<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>3.8.1<span class="nt">&lt;/version&gt;</span>
+      <span class="nt">&lt;scope&gt;</span>test<span class="nt">&lt;/scope&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-commons-api<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-commons-impl<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-test-util<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-server-bindings<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+      <span class="nt">&lt;type&gt;</span>war<span class="nt">&lt;/type&gt;</span>
+   <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>${opencmisGroupId}<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>chemistry-opencmis-server-support<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>${opencmisVersion}<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>
+    <span class="nt">&lt;dependency&gt;</span>
+      <span class="nt">&lt;groupId&gt;</span>org.antlr<span class="nt">&lt;/groupId&gt;</span>
+      <span class="nt">&lt;artifactId&gt;</span>antlr-runtime<span class="nt">&lt;/artifactId&gt;</span>
+      <span class="nt">&lt;version&gt;</span>3.1.3<span class="nt">&lt;/version&gt;</span>
+    <span class="nt">&lt;/dependency&gt;</span>  
+  <span class="nt">&lt;/dependencies&gt;</span>
+<span class="nt">&lt;/project&gt;</span>
+</pre></div>
+
+
+<p>You will get your <code>web.xml</code> and other required files for your web
+application from opencmis which you may adjust according to your needs. You
+may run <code>mvn eclipse:eclipse</code> to generate the required <code>.projects</code> and
+<code>.classpath</code> files for Eclipse that you just need to import in your
+Eclipse workspace.</p>
+<h3 id="without_maven">Without maven</h3>
+<p>If you do not want to use maven to build your project you currently have to
+use maven to produce the binaries from the source code. Download the source
+code and run</p>
+<div class="codehilite"><pre><span class="n">mvn</span> <span class="nb">package</span>
+</pre></div>
+
+
+<p>to produce a binary version of all packaged files. To reuse the relevant
+files from the server implementation in opencmis type:</p>
+<div class="codehilite"><pre><span class="n">cd</span> <span class="n">chemistry</span><span class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span class="n">server</span>
+<span class="n">cd</span> <span class="n">chemistry</span><span class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">bindings</span>
+</pre></div>
+
+
+<p>Unzip the file
+<code>chemistry-opencmis-server-bindings-0.1-incubating-SNAPSHOT.jar</code> and copy
+the contents to your project. It includes all required jars, web.xml and
+other supporting files. In case you prefer an empty classes directory and
+use a jar instead you can use:</p>
+<div class="codehilite"><pre><span class="n">mvn</span> <span class="n">jar:jar</span>
+</pre></div>
+
+
+<p>Then copy the file named <code>opencmis-server-impl-0.1-SNAPSHOT.jar</code> from the
+target directory to your project directory. Add all jar files from the
+<code>.war</code> and the one created in the previous step to your project setup.
+Add the <code>repository.properties</code> file to your classpath.</p>
+<p>Now you have an initial <code>web.xml</code> and the required support files for the
+web services binding. Unless you have specific requirements you do not need
+to modify them.</p>
+<h2 id="implementing_the_services">Implementing the services</h2>
+<p>The first step is to tell opencmis where it can find your classes that
+implement the CMIS logic. For this purpose a file named
+repository.properties must be in the classpath. It must contain a property
+named class that refers to your service factory:</p>
+<div class="codehilite"><pre><span class="na">class</span><span class="o">=</span><span class="s">local.mycmis.ServiceFactory</span>
+</pre></div>
+
+
+<p>The ServiceFactory class should extend the <code>AbstractServiceFactory</code> class
+from org.apache.chemistry.opencmis.commons.impl.server. You have to
+implement the interface CmisServiceFactory:</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kt">void</span> <span class="nf">init</span><span class="o">(</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span><span class="o">)</span> <span class="o">{</span>
+<span class="o">}</span>
+
+<span class="kd">public</span> <span class="kt">void</span> <span class="nf">destroy</span><span class="o">()</span> <span class="o">{</span>
+<span class="o">}</span>
+
+<span class="kd">public</span> <span class="kd">abstract</span> <span class="n">CmisService</span> <span class="nf">getService</span><span class="o">(</span><span class="n">CallContext</span> <span class="n">context</span><span class="o">);</span>
+</pre></div>
+
+
+<p>The <code>init()</code> method is used to perform initialization and passes a set of
+configuration parameters from repository.properties:</p>
+<div class="codehilite"><pre><span class="nd">@Override</span>
+<span class="kd">public</span> <span class="kt">void</span> <span class="nf">init</span><span class="o">(</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span><span class="o">)</span> <span class="o">{</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>Typically you will create an instance of your service implementation.</p>
+<p>There is also wrapper classes is explained in the next section.</p>
+<p>The next step is that you need to implement the services according to the
+CMIS spec. We will do this here for one example call. The important piece
+is that your class implements <code>CmisService</code> which is central access point
+to all incoming calls. Here is an implementation of an example call
+<code>getRepositoryInfo()</code>:</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyCmisServiceImpl</span> <span class="kd">extends</span> <span class="n">AbstractCmisService</span> <span class="o">{</span>
+
+    <span class="kd">public</span> <span class="n">RepositoryInfo</span> <span class="nf">getRepositoryInfo</span><span class="o">(</span><span class="n">CallContext</span> <span class="n">context</span><span class="o">,</span>
+      <span class="n">String</span> <span class="n">repositoryId</span><span class="o">,</span> <span class="n">ExtensionsData</span> <span class="n">extension</span><span class="o">)</span> <span class="o">{</span>
+
+        <span class="n">RepositoryInfoImpl</span> <span class="n">repoInfo</span> <span class="o">=</span> <span class="k">new</span> <span class="n">RepositoryInfoImpl</span><span class="o">();</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setRepositoryId</span><span class="o">(</span><span class="n">repositoryId</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setRepositoryName</span><span class="o">(</span><span class="s">&quot;My CMIS Repository&quot;</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setRepositoryDescription</span><span class="o">(</span><span class="s">&quot;Sample Repository&quot;</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setCmisVersionSupported</span><span class="o">(</span><span class="s">&quot;1.0&quot;</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setRepositoryCapabilities</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setRootFolder</span><span class="o">(</span><span class="s">&quot;MyRootFolderId&quot;</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setPrincipalAnonymous</span><span class="o">(</span><span class="s">&quot;anonymous&quot;</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setPrincipalAnyone</span><span class="o">(</span><span class="s">&quot;anyone&quot;</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setThinClientUri</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setChangesIncomplete</span><span class="o">(</span><span class="n">Boolean</span><span class="o">.</span><span class="na">TRUE</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setChangesOnType</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setLatestChangeLogToken</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setVendorName</span><span class="o">(</span><span class="s">&quot;ACME&quot;</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setProductName</span><span class="o">(</span><span class="s">&quot;ACME CMIS Connector&quot;</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setProductVersion</span><span class="o">(</span><span class="s">&quot;0.1&quot;</span><span class="o">);</span>
+
+        <span class="c1">// set capabilities</span>
+        <span class="n">RepositoryCapabilitiesImpl</span> <span class="n">caps</span> <span class="o">=</span> <span class="k">new</span> <span class="n">RepositoryCapabilitiesImpl</span><span class="o">();</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setAllVersionsSearchable</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityAcl</span><span class="o">(</span><span class="n">CapabilityAcl</span><span class="o">.</span><span class="na">NONE</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityChanges</span><span class="o">(</span><span class="n">CapabilityChanges</span><span class="o">.</span><span class="na">PROPERTIES</span><span class="o">);</span>
+
+        <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityContentStreamUpdates</span><span class="o">(</span><span class="n">CapabilityContentStreamUpdates</span><span class="o">.</span><span class="na">PWCONLY</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityJoin</span><span class="o">(</span><span class="n">CapabilityJoin</span><span class="o">.</span><span class="na">NONE</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityQuery</span><span class="o">(</span><span class="n">CapabilityQuery</span><span class="o">.</span><span class="na">METADATAONLY</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setCapabilityRendition</span><span class="o">(</span><span class="n">CapabilityRenditions</span><span class="o">.</span><span class="na">NONE</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setIsPwcSearchable</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setIsPwcUpdatable</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setSupportsGetDescendants</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setSupportsGetFolderTree</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setSupportsMultifiling</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setSupportsUnfiling</span><span class="o">(</span><span class="kc">true</span><span class="o">);</span>
+        <span class="n">caps</span><span class="o">.</span><span class="na">setSupportsVersionSpecificFiling</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setRepositoryCapabilities</span><span class="o">(</span><span class="n">caps</span><span class="o">);</span>
+
+        <span class="n">AclCapabilitiesDataImpl</span> <span class="n">aclCaps</span> <span class="o">=</span> <span class="k">new</span> <span class="n">AclCapabilitiesDataImpl</span><span class="o">();</span>
+        <span class="n">aclCaps</span><span class="o">.</span><span class="na">setAclPropagation</span><span class="o">(</span><span class="n">AclPropagation</span><span class="o">.</span><span class="na">REPOSITORYDETERMINED</span><span class="o">);</span>
+        <span class="n">aclCaps</span><span class="o">.</span><span class="na">setPermissionDefinitionData</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
+        <span class="n">aclCaps</span><span class="o">.</span><span class="na">setPermissionMappingData</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
+        <span class="n">repoInfo</span><span class="o">.</span><span class="na">setAclCapabilities</span><span class="o">(</span><span class="n">aclCaps</span><span class="o">);</span>
+
+        <span class="k">return</span> <span class="n">repoInfo</span><span class="o">;</span>
+      <span class="o">}</span>
+     <span class="c1">// ...</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>Now you can start implementing all the required methods with their methods.</p>
+<p><a name="HowToBuildAServer-TheServiceWrapper"></a></p>
+<h3 id="the_servicewrapper">The ServiceWrapper</h3>
+<p>For the CmisService interface exists a corresponding abstract class. This
+can be used as a starting point for your implementation. This is optional
+but gives you the benefit of providing many common null pointer checks and
+default values for optional parameters. The abstract class also provides a
+default implementation for generating the ObjectInfo needed for the AtomPub
+binding. This wrapper can reduce the code required in your service
+implementation. You should always start using the wrapper class and
+directly implement the CmisService interface only when necessary. It is
+strongly recommended however to provide a better implementation for create
+the ObjectInfo however (see next section for details).</p>
+<p><a name="HowToBuildAServer-DifferencesbetweentheCMISbindings"></a></p>
+<h2 id="differences_between_the_cmis_bindings">Differences between the CMIS bindings</h2>
+<p>OpenCMIS supports both the AtomPub and the web services binding interface.
+It hides all the details how to handle the protocol but there are some
+subtle differences that need to be reflected in the Java interfaces. This
+chapter explains where the differences are and why they are needed.</p>
+<p><a name="HowToBuildAServer-TheObjectInfointerface"></a></p>
+<h3 id="the_objectinfo_interface">The ObjectInfo interface</h3>
+<p>The methods in the interfaces <code>CmisService</code> are following the data model
+in the CMIS specification. The specification defines the following
+services:</p>
+<ul>
+<li>AclService</li>
+<li>DiscoveryService</li>
+<li>ObjectService</li>
+<li>MultifFlingService</li>
+<li>NavigationService</li>
+<li>PolicyService</li>
+<li>RelationshipService</li>
+<li>RepositoryService</li>
+<li>Versioning Service</li>
+</ul>
+<p>For each of these services exists a corresponding interface in opencmis.
+CmisService is an interface that unifies all interfaces in one interface.
+The methods in this interface correspond to the methods in the
+specification. For the web service binding this is a one-to-one mapping.
+For the AtomPub binding this information is not sufficient in all cases.
+Take the creation of a document as an example. The web service returns in
+this case a single string value containing the id of the created document.
+A response in the AtomPub binding however consists of an AtomPub entry
+element which is an XML fragment (for an example look at
+<code>DocumentEntry.xml</code> in the examples directory of the CMIS specification).
+You will notice that generating this XML requires much more information
+than the create...() methods in the specification provide as return value.
+Your implementation needs to provide all the information so that opencmis
+can generate the complete response. For this purpose the <code>ObjectInfo</code> was
+introduced. <code>getObjectInfo</code> is the method of the <code>CmisService</code> interface
+that provides this information. The <code>AbstractCmisService</code> contains a
+member <code>objectInfoMap</code> that you can fill with this information. If you
+ignore this the class <code>AbstractCmisService</code> contains a default
+implementation which works but is very ineffecient. You should use this
+only as a starting point. Beware that a service can be called from multiple
+threads, so have to take care to handle threading issues properly.</p>
+<p>If the method you are implementing returns a list of objects and not only a
+single value (for example methods like <code>getChildren()</code>, <code>getDescendants()</code>
+in the navigation service) you need to provide an <code>ObjectInfo</code> for each
+element in the collection. <code>getObjectInfo</code> therefore returns a map with
+the object id for each object as key and the corresponding <code>ObjectInfo</code>
+as value. You can use the method <code>addObjectInfo</code> to add an element to the
+map. </p>
+<p><a name="HowToBuildAServer-Thecreate()methods"></a></p>
+<h3 id="the_create_methods">The create() methods</h3>
+<p>The web service binding has separate calls for each object type to be
+created: policies, relationships, documents and folders:</p>
+<ul>
+<li>createDocument</li>
+<li>createFolder</li>
+<li>createRelationship</li>
+<li>createPolicy</li>
+</ul>
+<p>In the AtomPub binding there is one general <code>create()</code> method that is
+used for all object types. The CmisObjectService interface therefore
+contains 5 <code>create()</code> methods, the four specific ones are used for the
+web service bindings and the general one for the AtomPub binding.</p>
+<p><a name="HowToBuildAServer-ApplyingACLs"></a></p>
+<h3 id="applying_acls">Applying ACLs</h3>
+<p>The class <code>CmisAclService</code> has two methods <code>applyAcl()</code>. One uses two
+<code>AccessControlList</code>s with one <code>Acl</code> to add &nbsp;and one to remove. The other
+method contains only one <code>Acl</code> to be set on the target object. The web
+service binding uses the method with two parameters, the AtomPub binding
+uses the method with one parameter.</p>
+<p><a name="HowToBuildAServer-RunningTheServer"></a></p>
+<h2 id="running_the_server">Running The Server</h2>
+<p>When your services are implemented (or parts of them) you can try to run
+the server in a servlet container like Tomcat. If you have used maven to
+setup your project you can run</p>
+<div class="codehilite"><pre><span class="n">mvn</span> <span class="nb">package</span>
+</pre></div>
+
+
+<p>to generate a war file that you will find in the target directory. If you
+have not used maven, create the war with the mechanisms of your build
+environment. Check the war contains a <code>web.xml</code>, the wsdl files in
+<code>WEB-INF</code> and all the required jars from opencmis and dependent libraries
+in <code>WEB-INF/lib</code>. For jetty maven contains a build-in integration that
+you may use if you like using <code>mvn jetty:run</code>. Adjust your <code>pom.xml</code> in
+this case accordingly.</p>
+<p>Deploy your application and start testing.</p>
+<p><a name="HowToBuildAServer-HandlingAuthentication"></a></p>
+<h2 id="handling_authentication">Handling Authentication</h2>
+<p>Opencmis does not provide or expect any specific mechanism how
+authentication is handled. It provides some basic mechanisms hot to extract
+user name and password depending on the protocol. For AtomPub binding http
+basic authentication is supported, for web services WS-Security 1.1 for
+Username Token Profile 1.1 is supported.</p>
+<p>If you want to use servlet filters dealing with authentication, just
+add them to your <code>web.xml</code> file. You also can handle authentication inside of
+your code. In this case derive a class from <code>BasicAuthCallContextHandler</code>
+and implement method <code>getCallContextMap()</code>. There you have access to user
+name and password as provided by the user. By default opencmis does not
+enforce authentication, so initially the map will be null. If you raise a
+<code>CmisPermissionDeniedException</code> the exception is caught by the server
+implementation and a <code>401</code> http return code is sent as response to the
+browser. This usually opens a dialog for user name and password then.</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyContextHandler</span>
+    <span class="kd">extends</span> <span class="n">BasicAuthCallContextHandler</span>
+<span class="o">{</span>
+  <span class="kd">public</span> <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">getCallContextMap</span><span class="o">(</span><span class="n">HttpServletRequest</span> <span class="n">request</span><span class="o">){</span>
+
+    <span class="c1">// call superclass to get user and password via basic authentication</span>
+    <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span>  <span class="n">ctxMap</span> <span class="o">=</span> <span class="kd">super</span><span class="o">.</span><span class="na">getCallContextMap</span><span class="o">(</span><span class="n">request</span><span class="o">);</span>
+
+    <span class="k">if</span> <span class="o">(</span><span class="kc">null</span> <span class="o">==</span> <span class="n">ctxMap</span><span class="o">)</span>
+      <span class="c1">// no user name, password given yet say: we need authentication:</span>
+      <span class="k">throw</span> <span class="k">new</span> <span class="nf">CmisPermissionDeniedException</span><span class="o">(</span><span class="s">&quot;Authentication required&quot;</span><span class="o">);</span>
+
+    <span class="c1">// call your authentication</span>
+
+    <span class="n">MyAuthentication</span><span class="o">.</span><span class="na">login</span><span class="o">(</span>
+        <span class="n">ctxMap</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="n">CallContext</span><span class="o">.</span><span class="na">USERNAME</span><span class="o">),</span>
+        <span class="n">ctxMap</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="n">CallContext</span><span class="o">.</span><span class="na">PASSWORD</span><span class="o">));</span>
+
+    <span class="k">return</span> <span class="n">ctxMap</span><span class="o">;</span>
+  <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>Beyond this it is up to you how to implement authentication. Creating
+tokens for example, using cookies, etc. is not covered by opencmis, but you
+can add it in your code.</p>
+<h2 id="configuring_your_server">Configuring your server</h2>
+<p>Opencmis reads a file <code>repository.properties</code> on startup. By default you only
+have to configure the class of your service factory (see above). You can
+add additional properties in this file. These configuration parameters are
+then passed to the <code>init()</code> method of your <code>ServiceFactory</code> as key
+value pairs in a hashmap.</p>
+<DIV class="codeHeader">repository.properties</DIV>
+
+<div class="codehilite"><pre><span class="na">class</span><span class="o">=</span><span class="s">local.mycmis.ServiceFactory</span>
+<span class="na">myparam</span><span class="o">=</span><span class="s">my-configuration-value</span>
+</pre></div>
+
+
+<DIV class="codeHeader">local.mycmis.ServiceFactory.java</DIV>
+
+<div class="codehilite"><pre><span class="c1">// ...</span>
+<span class="nd">@Override</span>
+<span class="kd">public</span> <span class="kt">void</span> <span class="nf">init</span><span class="o">(</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span><span class="o">)</span> <span class="o">{</span>
+  <span class="n">String</span> <span class="n">myParamValue</span> <span class="o">=</span> <span class="n">parameters</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">&quot;myparam&quot;</span><span class="o">);</span>
+         <span class="c1">// use myParamValue</span>
+<span class="o">}</span>
+<span class="c1">// ...</span>
+</pre></div>
+
+
+<h2 id="testing_the_server">Testing the server</h2>
+<p>There are various ways how you can test your implementation. You may add
+unit tests that directly call your service implementations as a first step.
+Opencmis also contains some basic tests that perform client-server
+communication. You can choose the protocol binding and whether read-only or
+read-write tests are performed. The amount of functionality tested depends
+on the capabilities returned in your getRepositoryInfo return value. You
+can run them using junit:</p>
+<p>Examples:</p>
+<p>Test class:</p>
+<div class="codehilite"><pre><span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">chemistry</span><span class="o">.</span><span class="n">opencmis</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">bindings</span><span class="o">.</span><span class="n">atompub</span><span class="o">.</span><span class="n">SimpleReadOnlyTests</span>
+</pre></div>
+
+
+<p>Test Parameters (passed as JVM args):</p>
+<div class="codehilite"><pre><span class="o">-</span><span class="n">Dopencmis</span><span class="o">.</span><span class="n">test</span><span class="o">=</span><span class="n">true</span>
+<span class="o">-</span><span class="n">Dopencmis</span><span class="o">.</span><span class="n">test</span><span class="o">.</span><span class="n">username</span><span class="o">=</span><span class="n">myuser</span>
+<span class="o">-</span><span class="n">Dopencmis</span><span class="o">.</span><span class="n">test</span><span class="o">.</span><span class="n">password</span><span class="o">=</span><span class="n">mypasswd</span>
+<span class="o">-</span><span class="n">Dopencmis</span><span class="o">.</span><span class="n">test</span><span class="o">.</span><span class="n">repository</span><span class="o">=</span><span class="n">my_repository_id</span><span class="o">&amp;</span><span class="n">nbsp</span><span class="p">;</span>
+<span class="o">-</span><span class="n">Dopencmis</span><span class="o">.</span><span class="n">test</span><span class="o">.</span><span class="n">atompub</span><span class="o">.</span><span class="n">url</span><span class="o">=</span><span class="p">[</span><span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8080</span><span class="sr">/opencmis/</span><span class="n">atom</span><span class="p">]</span>
+</pre></div>
+
+
+<p>The following test classes exist:</p>
+<div class="codehilite"><pre><span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">opencmis</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">bindings</span><span class="o">.</span><span class="n">atompub</span><span class="o">.</span><span class="n">SimpleReadOnlyTests</span>
+<span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">opencmis</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">bindings</span><span class="o">.</span><span class="n">atompub</span><span class="o">.</span><span class="n">SimpleReadWriteTests</span>
+<span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">opencmis</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">bindings</span><span class="o">.</span><span class="n">webservices</span><span class="o">.</span><span class="n">SimpleReadOnlyTests</span>
+<span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">opencmis</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">bindings</span><span class="o">.</span><span class="n">webservices</span><span class="o">.</span><span class="n">SimpleReadWriteTests</span>
+</pre></div>
+
+
+<p>For web services you need an additional parameter for the service endpoint:</p>
+<div class="codehilite"><pre><span class="o">-</span><span class="n">Dopencmis</span><span class="o">.</span><span class="n">test</span><span class="o">.</span><span class="n">webservices</span><span class="o">.</span><span class="n">url</span><span class="o">=</span><span class="p">[</span><span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8080</span><span class="sr">/opencmis/s</span><span class="n">ervices</span><span class="o">/</span><span class="p">]</span>
+</pre></div>
+
+
+<h3 id="test_using_curl">Test using curl</h3>
+<p>Simple tests (which might be useful at the beginning) can also be done
+using tools like curl or wget (AtomPub binding only). A simple example for
+a <code>.BAT</code> file (Windows) would look like this:</p>
+<div class="codehilite"><pre><span class="c">rem set PATH=...\libcurl-7.19.7;...\OpenSSL\bin;%PATH%</span>
+<span class="k">set</span> <span class="nv">CURL</span><span class="o">=</span>curl.exe
+<span class="k">set</span> <span class="nv">VIEWER</span><span class="o">=</span><span class="s2">&quot;C:\Program Files\Mozilla Firefox\firefox.exe&quot;</span>
+<span class="k">set</span> <span class="nv">USER</span><span class="o">=</span>XXX
+<span class="k">set</span> <span class="nv">PWD</span><span class="o">=</span>YYY
+<span class="k">set</span> <span class="nv">URLPREFIX</span><span class="o">=</span>[http:<span class="n">//localhost:8080/opencmis/atom]</span>
+<span class="k">SET</span> <span class="nv">OUTFILE</span><span class="o">=</span>atom.xml
+
+<span class="nv">%CURL%</span> \--user <span class="nv">%USER%</span>:<span class="nv">%PWD%</span> \--dump-header header.txt \--output <span class="nv">%OUTFILE%</span> <span class="nv">%URLPREFIX%</span>
+<span class="k">IF</span> <span class="k">ERRORLEVEL</span> <span class="m">0</span> <span class="nv">%VIEWER%</span> <span class="nv">%OUTFILE%</span>
+</pre></div>
+
+
+<p>Another example how to get a document with id MyDocument:</p>
+<div class="codehilite"><pre><span class="c">%CURL% \--user %USER%:%PWD% \--dump-header header.txt \--output %OUTFILE% %URLPREFIX%/A1/entry?id=%%2FMyDocument</span>
+</pre></div>
+
+
+<p>You also can use this to create documents:</p>
+<div class="codehilite"><pre><span class="c">%CURL% \--user %USER%:%PWD% \--header &quot;Content-Type: application/atom+xml;type=entry&quot; \-d @post-item.xml \--output %OUTFILE%&amp;nbsp; \--url %URLPREFIX%/A1/children?id=/</span>
+</pre></div>
+
+
+<p>The file <code>post-item.xml</code> must contain a valid Atom entry then:</p>
+<div class="codehilite"><pre><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</span>
+<span class="nt">&lt;entry</span> <span class="na">xmlns=</span><span class="s">&quot;http://www.w3.org/2005/Atom&quot;</span>
+    <span class="na">xmlns:cmis=</span><span class="s">&quot;http://docs.oasis-open.org/ns/cmis/core/200908/&quot;</span>
+    <span class="na">xmlns:cmisra=</span><span class="s">&quot;http://docs.oasis-open.org/ns/cmis/restatom/200908/&quot;</span>
+    <span class="na">xmlns:app=</span><span class="s">&quot;http://www.w3.org/2007/app&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;id&gt;</span>http://vmelcmis1:8080/cmis/atom/cd-library/main/Default-I10915<span class="nt">&lt;/id&gt;</span>
+  <span class="nt">&lt;author&gt;</span>
+    <span class="nt">&lt;name&gt;</span>Admin<span class="nt">&lt;/name&gt;</span>
+  <span class="nt">&lt;/author&gt;</span>
+  <span class="nt">&lt;updated&gt;</span>2009-03-01T00:00:00.000Z<span class="nt">&lt;/updated&gt;</span>
+  <span class="nt">&lt;title</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span><span class="nt">&gt;</span>Content from Curl<span class="nt">&lt;/title&gt;</span>
+  <span class="nt">&lt;cmisra:object&gt;</span>
+    <span class="nt">&lt;cmis:properties&gt;</span>
+      <span class="nt">&lt;cmis:propertyId</span> <span class="na">propertyDefinitionId=</span><span class="s">&quot;cmis:name&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;cmis:value&gt;</span>Content from Curl<span class="nt">&lt;/cmis:value&gt;</span>
+      <span class="nt">&lt;/cmis:propertyId&gt;</span>
+      <span class="nt">&lt;cmis:propertyId</span> <span class="na">propertyDefinitionId=</span><span class="s">&quot;cmis:objectTypeId&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;cmis:value&gt;</span>cmis:document<span class="nt">&lt;/cmis:value&gt;</span>
+      <span class="nt">&lt;/cmis:propertyId&gt;</span>
+    <span class="nt">&lt;/cmis:properties&gt;</span>
+  <span class="nt">&lt;/cmisra:object&gt;</span>
+
+  <span class="nt">&lt;cmisra:content</span> <span class="na">type=</span><span class="s">&quot;text/plain&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;cmisra:base64&gt;</span>
+RmF1c3Q6DQoNCk1laW4gc2No9m5lcyBGcuR1bGVpbiwgZGFyZiBpY2ggd2FnZW4sDQpNZWlu
+ZW4gQXJtIHVuZCBHZWxlaXQgSWhyIGFuenV0cmFnZW4/DQoNCk1hcmdhcmV0ZToNCg0KQmlu
+IHdlZGVyIEZy5HVsZWluLCB3ZWRlciBzY2j2biwNCkthbm4gdW5nZWxlaXRldCBuYWNoIEhh
+dXNlIGdlaG4uDQoNCihTaWUgbWFjaHQgc2ljaCBsb3MgdW5kIGFiLikNCg0KRmF1c3Q6DQoN
+CkJlaW0gSGltbWVsLCBkaWVzZXMgS2luZCBpc3Qgc2No9m4hDQpTbyBldHdhcyBoYWIgaWNo
+IG5pZSBnZXNlaG4uDQpTaWUgaXN0IHNvIHNpdHQtIHVuZCB0dWdlbmRyZWljaCwNClVuZCBl
+dHdhcyBzY2huaXBwaXNjaCBkb2NoIHp1Z2xlaWNoLg0KRGVyIExpcHBlIFJvdCwgZGVyIFdh
+bmdlIExpY2h0LA0KRGllIFRhZ2UgZGVyIFdlbHQgdmVyZ2XfIGljaCdzIG5pY2h0IQ0KV2ll
+IHNpZSBkaWUgQXVnZW4gbmllZGVyc2NobORndCwNCkhhdCB0aWVmIHNpY2ggaW4gbWVpbiBI
+ZXJ6IGdlcHLkZ3Q7DQpXaWUgc2llIGt1cnogYW5nZWJ1bmRlbiB3YXIsDQpEYXMgaXN0IG51
+biB6dW0gRW50evxja2VuIGdhciE=
+  <span class="nt">&lt;/cmisra:base64&gt;</span>
+  <span class="nt">&lt;/cmisra:content&gt;</span>
+<span class="nt">&lt;/entry&gt;</span>
+</pre></div></div>
+             <!-- Content -->
+           </td>
+          </tr>
+        </table>
+     </td>
+     <td id="cell-2-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-3-0">&nbsp;</td>
+      <td id="cell-3-1">&nbsp;</td>
+      <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+     <td id="cell-3-0">&nbsp;</td>
+     <td id="cell-3-1">
+       <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+          
+          Apache Chemistry, Apache, the Apache feather logo, and the Apache 
+          Chemistry project logo are trademarks of The Apache Software 
+          Foundation.
+          <BR />
+          Content Management Interoperability Services (CMIS) is an
+          <a href="http://www.oasis-open.org/committees/cmis/">OASIS</a>
+          specification.
+          
+       </div>
+       <!-- Footer -->
+       </div>
+     </td>
+     <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-4-0">&nbsp;</td>
+      <td id="cell-4-1">&nbsp;</td>
+      <td id="cell-4-2">&nbsp;</td>
+    </tr>
+  </table>
+</body>
+</html>

Added: websites/staging/chemistry/trunk/content/java/how-to/how-to-index.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/how-to/how-to-index.html (added)
+++ websites/staging/chemistry/trunk/content/java/how-to/how-to-index.html Fri Mar 18 11:57:49 2011
@@ -0,0 +1,241 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css" />
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS, cmislib, DotCMIS" />
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>
+Apache Chemistry - Debugging OpenCMIS
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 5px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/how-to">How-to</a>&nbsp;&raquo&nbsp;<a href="/java/how-to/how-to-index.html">Debugging OpenCMIS</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="/project/cmis.html" title="What's CMIS">What is CMIS?</A></LI>
+   <LI><A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="/project/community.html" title="Community">Community</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+   <LI><A href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/java/overview.html" title="OpenCMIS Overview and Index">Overview</A></LI>
+  <LI><A href="/java/download.html" title="Downloads">Downloads</A></LI>
+  <LI><A href="/java/develop/dev-index.html" title="">Developing with OpenCMIS</A></LI>
+  <LI><A href="/java/examples/example-index.html" title="Example Code">Example Code</A></LI>
+  <LI><A href="/java/howto/how-to-index.html" title="OpenCMIS HowTos">OpenCMIS HowTos</A></LI>
+  <LI><A href="http://incubator.apache.org/chemistry/javadoc/index.html" class="external-link" rel="nofollow">JavaDoc</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/python/cmislib.html" title="cmislib">cmislib</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/cmislib-doc/" class="external-link" rel="nofollow">cmislib Documentation</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/php/phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/dotnet/dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Internal"></A>Internal Docs</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://chemistry.apache.org/internal/opencmis-maven-release-documentation.html" class="external-link" rel="nofollow">Release Process</A></LI>
+</UL>
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><h1 id="opencmis_how_tos">OpenCMIS How Tos</h1>
+<p>Instructions how to perform frequently occuring tasks with OpenCMIS</p>
+<p>How to...</p>
+<ul>
+<li><a href="how-to-add-extension.html">Add CMIS Extensions</a>    <br />
+</li>
+<li><a href="how-to-build.html">Build OpenCMIS</a></li>
+<li><a href="how-to-connect.html">Connect to a repository</a>          <br />
+</li>
+<li><a href="how-to-create-server.html">Create a Server</a></li>
+<li><a href="how-to-integrate-spring.html">Integrate with Spring</a> <br />
+</li>
+<li><a href="how-to-process-query.html">Process a Query</a></li>
+<li><a href="how-to-tune-perfomance.html">Tune performance</a></li>
+</ul></div>
+             <!-- Content -->
+           </td>
+          </tr>
+        </table>
+     </td>
+     <td id="cell-2-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-3-0">&nbsp;</td>
+      <td id="cell-3-1">&nbsp;</td>
+      <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+     <td id="cell-3-0">&nbsp;</td>
+     <td id="cell-3-1">
+       <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+          
+          Apache Chemistry, Apache, the Apache feather logo, and the Apache 
+          Chemistry project logo are trademarks of The Apache Software 
+          Foundation.
+          <BR />
+          Content Management Interoperability Services (CMIS) is an
+          <a href="http://www.oasis-open.org/committees/cmis/">OASIS</a>
+          specification.
+          
+       </div>
+       <!-- Footer -->
+       </div>
+     </td>
+     <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-4-0">&nbsp;</td>
+      <td id="cell-4-1">&nbsp;</td>
+      <td id="cell-4-2">&nbsp;</td>
+    </tr>
+  </table>
+</body>
+</html>

Added: websites/staging/chemistry/trunk/content/java/how-to/how-to-integrate-spring.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/how-to/how-to-integrate-spring.html (added)
+++ websites/staging/chemistry/trunk/content/java/how-to/how-to-integrate-spring.html Fri Mar 18 11:57:49 2011
@@ -0,0 +1,278 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css" />
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS, cmislib, DotCMIS" />
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>
+Apache Chemistry - Using Spring Framework (Server)
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 5px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/how-to">How-to</a>&nbsp;&raquo&nbsp;<a href="/java/how-to/how-to-integrate-spring.html">Using Spring Framework (Server)</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="/project/cmis.html" title="What's CMIS">What is CMIS?</A></LI>
+   <LI><A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="/project/community.html" title="Community">Community</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+   <LI><A href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/java/overview.html" title="OpenCMIS Overview and Index">Overview</A></LI>
+  <LI><A href="/java/download.html" title="Downloads">Downloads</A></LI>
+  <LI><A href="/java/develop/dev-index.html" title="">Developing with OpenCMIS</A></LI>
+  <LI><A href="/java/examples/example-index.html" title="Example Code">Example Code</A></LI>
+  <LI><A href="/java/howto/how-to-index.html" title="OpenCMIS HowTos">OpenCMIS HowTos</A></LI>
+  <LI><A href="http://incubator.apache.org/chemistry/javadoc/index.html" class="external-link" rel="nofollow">JavaDoc</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/python/cmislib.html" title="cmislib">cmislib</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/cmislib-doc/" class="external-link" rel="nofollow">cmislib Documentation</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/php/phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/dotnet/dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Internal"></A>Internal Docs</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://chemistry.apache.org/internal/opencmis-maven-release-documentation.html" class="external-link" rel="nofollow">Release Process</A></LI>
+</UL>
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><h1 id="using_spring_framework_server">Using Spring Framework (Server)</h1>
+<p>By default, the OpenCMIS services factory is set up by a context listner
+configured in the web.xml. If you want or need Spring to set up the
+services factory, remove the context listener from the <code>web.xml</code> and use a
+bean like this instead:</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">class</span> <span class="nc">CmisLifecycleBean</span> <span class="kd">implements</span> <span class="n">ServletContextAware</span><span class="o">,</span>
+<span class="n">InitializingBean</span><span class="o">,</span> <span class="n">DisposableBean</span>
+<span class="o">{</span>
+    <span class="kd">private</span> <span class="n">ServletContext</span> <span class="n">servletContext</span><span class="o">;</span>
+    <span class="kd">private</span> <span class="n">CmisServiceFactory</span> <span class="n">factory</span><span class="o">;</span>
+
+    <span class="nd">@Override</span>
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">setServletContext</span><span class="o">(</span><span class="n">ServletContext</span> <span class="n">servletContext</span><span class="o">)</span>
+    <span class="o">{</span>
+        <span class="k">this</span><span class="o">.</span><span class="na">servletContext</span> <span class="o">=</span> <span class="n">servletContext</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">setCmisServiceFactory</span><span class="o">(</span><span class="n">CmisServiceFactory</span> <span class="n">factory</span><span class="o">)</span>
+    <span class="o">{</span>
+        <span class="k">this</span><span class="o">.</span><span class="na">factory</span> <span class="o">=</span> <span class="n">factory</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="nd">@Override</span>
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">afterPropertiesSet</span><span class="o">()</span> <span class="kd">throws</span> <span class="n">Exception</span>
+    <span class="o">{</span>
+        <span class="k">if</span> <span class="o">(</span><span class="n">factory</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span>
+        <span class="o">{</span>
+            <span class="n">factory</span><span class="o">.</span><span class="na">init</span><span class="o">(</span><span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;());</span>
+            <span class="n">servletContext</span><span class="o">.</span><span class="na">setAttribute</span><span class="o">(</span><span class="n">CmisRepositoryContextListener</span><span class="o">.</span><span class="na">SERVICES_FACTORY</span><span class="o">,</span> <span class="n">factory</span><span class="o">);</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+
+    <span class="nd">@Override</span>
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">destroy</span><span class="o">()</span> <span class="kd">throws</span> <span class="n">Exception</span>
+    <span class="o">{</span>
+        <span class="k">if</span> <span class="o">(</span><span class="n">factory</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span>
+        <span class="o">{</span>
+            <span class="n">factory</span><span class="o">.</span><span class="na">destroy</span><span class="o">();</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>The Spring configuration could look like this:</p>
+<div class="codehilite"><pre><span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;CmisLifecycleBean&quot;</span> <span class="na">class=</span><span class="s">&quot;org.example.mycmisservice.CmisLifecycleBean&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;cmisServiceFactory&quot;</span> <span class="na">ref=</span><span class="s">&quot;CmisServiceFactory&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/bean&gt;</span>
+
+<span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;CmisServiceFactory&quot;</span> <span class="na">class=</span><span class="s">&quot;org.example.mycmisservice.MyCmisServiceFactory&quot;</span><span class="nt">&gt;</span>
+<span class="nt">&lt;/bean&gt;</span>
+</pre></div></div>
+             <!-- Content -->
+           </td>
+          </tr>
+        </table>
+     </td>
+     <td id="cell-2-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-3-0">&nbsp;</td>
+      <td id="cell-3-1">&nbsp;</td>
+      <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+     <td id="cell-3-0">&nbsp;</td>
+     <td id="cell-3-1">
+       <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+          
+          Apache Chemistry, Apache, the Apache feather logo, and the Apache 
+          Chemistry project logo are trademarks of The Apache Software 
+          Foundation.
+          <BR />
+          Content Management Interoperability Services (CMIS) is an
+          <a href="http://www.oasis-open.org/committees/cmis/">OASIS</a>
+          specification.
+          
+       </div>
+       <!-- Footer -->
+       </div>
+     </td>
+     <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-4-0">&nbsp;</td>
+      <td id="cell-4-1">&nbsp;</td>
+      <td id="cell-4-2">&nbsp;</td>
+    </tr>
+  </table>
+</body>
+</html>



Mime
View raw message