chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r918377 - in /incubator/chemistry/trunk/chemistry/chemistry-soap-server: examples/ src/main/java/org/apache/chemistry/soap/server/
Date Wed, 03 Mar 2010 10:02:59 GMT
Author: fguillaume
Date: Wed Mar  3 10:02:58 2010
New Revision: 918377

URL: http://svn.apache.org/viewvc?rev=918377&view=rev
Log:
Classes for SOAP bindings, start work on implementation (bridge to SPI)

Added:
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ACLServicePortImpl.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/MultiFilingServicePortImpl.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/NavigationServicePortImpl.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ObjectServicePortImpl.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/PolicyServicePortImpl.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RelationshipServicePortImpl.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/VersioningServicePortImpl.java   (with props)
Modified:
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/examples/sun-jaxws.xml
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ChemistryHelper.java
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/DiscoveryServicePortImpl.java
    incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RepositoryServicePortImpl.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-soap-server/examples/sun-jaxws.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/examples/sun-jaxws.xml?rev=918377&r1=918376&r2=918377&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/examples/sun-jaxws.xml (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/examples/sun-jaxws.xml Wed Mar  3 10:02:58 2010
@@ -1,5 +1,82 @@
 <?xml version="1.0"?>
 <endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">
+  <endpoint name="ACLService"
+      implementation="org.apache.chemistry.soap.server.ACLServicePortImpl"
+      url-pattern="/webservices/cmis/ACLService">
+    <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+      <handler-chain>
+        <handler>
+          <handler-class>org.apache.chemistry.soap.server.AuthHandler</handler-class>
+        </handler>
+      </handler-chain>
+    </handler-chains>
+  </endpoint>
+  <endpoint name="DiscoveryService"
+      implementation="org.apache.chemistry.soap.server.DiscoveryServicePortImpl"
+      url-pattern="/webservices/cmis/DiscoveryService">
+    <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+      <handler-chain>
+        <handler>
+          <handler-class>org.apache.chemistry.soap.server.AuthHandler</handler-class>
+        </handler>
+      </handler-chain>
+    </handler-chains>
+  </endpoint>
+  <endpoint name="MultiFilingService"
+      implementation="org.apache.chemistry.soap.server.MultiFilingServicePortImpl"
+      url-pattern="/webservices/cmis/MultiFilingService">
+    <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+      <handler-chain>
+        <handler>
+          <handler-class>org.apache.chemistry.soap.server.AuthHandler</handler-class>
+        </handler>
+      </handler-chain>
+    </handler-chains>
+  </endpoint>
+  <endpoint name="NavigationService"
+      implementation="org.apache.chemistry.soap.server.NavigationServicePortImpl"
+      url-pattern="/webservices/cmis/NavigationService">
+    <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+      <handler-chain>
+        <handler>
+          <handler-class>org.apache.chemistry.soap.server.AuthHandler</handler-class>
+        </handler>
+      </handler-chain>
+    </handler-chains>
+  </endpoint>
+  <endpoint name="ObjectService"
+      implementation="org.apache.chemistry.soap.server.ObjectServicePortImpl"
+      url-pattern="/webservices/cmis/ObjectService">
+    <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+      <handler-chain>
+        <handler>
+          <handler-class>org.apache.chemistry.soap.server.AuthHandler</handler-class>
+        </handler>
+      </handler-chain>
+    </handler-chains>
+  </endpoint>
+  <endpoint name="PolicyService"
+      implementation="org.apache.chemistry.soap.server.PolicyServicePortImpl"
+      url-pattern="/webservices/cmis/PolicyService">
+    <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+      <handler-chain>
+        <handler>
+          <handler-class>org.apache.chemistry.soap.server.AuthHandler</handler-class>
+        </handler>
+      </handler-chain>
+    </handler-chains>
+  </endpoint>
+  <endpoint name="RelationshipService"
+      implementation="org.apache.chemistry.soap.server.RelationshipServicePortImpl"
+      url-pattern="/webservices/cmis/RelationshipService">
+    <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+      <handler-chain>
+        <handler>
+          <handler-class>org.apache.chemistry.soap.server.AuthHandler</handler-class>
+        </handler>
+      </handler-chain>
+    </handler-chains>
+  </endpoint>
   <endpoint name="RepositoryService"
       implementation="org.apache.chemistry.soap.server.RepositoryServicePortImpl"
       url-pattern="/webservices/cmis/RepositoryService">
@@ -11,4 +88,15 @@
       </handler-chain>
     </handler-chains>
   </endpoint>
+  <endpoint name="VersioningService"
+      implementation="org.apache.chemistry.soap.server.VersioningServicePortImpl"
+      url-pattern="/webservices/cmis/VersioningService">
+    <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+      <handler-chain>
+        <handler>
+          <handler-class>org.apache.chemistry.soap.server.AuthHandler</handler-class>
+        </handler>
+      </handler-chain>
+    </handler-chains>
+  </endpoint>
 </endpoints>

Added: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ACLServicePortImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ACLServicePortImpl.java?rev=918377&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ACLServicePortImpl.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ACLServicePortImpl.java Wed Mar  3 10:02:58 2010
@@ -0,0 +1,59 @@
+/*
+ * Licensed 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.
+ *
+ * Authors:
+ *     Florent Guillaume, Nuxeo
+ */
+package org.apache.chemistry.soap.server;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.chemistry.ws.ACLServicePort;
+import org.apache.chemistry.ws.CmisACLType;
+import org.apache.chemistry.ws.CmisAccessControlListType;
+import org.apache.chemistry.ws.CmisException;
+import org.apache.chemistry.ws.CmisExtensionType;
+import org.apache.chemistry.ws.EnumACLPropagation;
+import org.apache.chemistry.ws.ObjectFactory;
+
+@WebService(name = "ACLServicePort", //
+targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/", //
+serviceName = "ACLService", //
+portName = "ACLServicePort", //
+endpointInterface = "org.apache.chemistry.ws.ACLServicePort")
+public class ACLServicePortImpl implements ACLServicePort {
+
+    private static final ObjectFactory factory = new ObjectFactory();
+
+    @Resource
+    private WebServiceContext wscontext;
+
+    public CmisACLType applyACL(String repositoryId, String objectId,
+            CmisAccessControlListType addACEs,
+            CmisAccessControlListType removeACEs,
+            EnumACLPropagation aclPropagation, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisACLType getACL(String repositoryId, String objectId,
+            Boolean onlyBasicPermissions, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ACLServicePortImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ACLServicePortImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ChemistryHelper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ChemistryHelper.java?rev=918377&r1=918376&r2=918377&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ChemistryHelper.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ChemistryHelper.java Wed Mar  3 10:02:58 2010
@@ -20,8 +20,10 @@
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.net.URI;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Calendar;
+import java.util.Collection;
 import java.util.GregorianCalendar;
 import java.util.List;
 import java.util.Map.Entry;
@@ -30,35 +32,86 @@
 import javax.xml.datatype.DatatypeFactory;
 import javax.xml.datatype.XMLGregorianCalendar;
 
+import org.apache.chemistry.BaseType;
 import org.apache.chemistry.CapabilityJoin;
 import org.apache.chemistry.CapabilityQuery;
+import org.apache.chemistry.ListPage;
 import org.apache.chemistry.ObjectEntry;
 import org.apache.chemistry.Property;
+import org.apache.chemistry.PropertyDefinition;
 import org.apache.chemistry.PropertyType;
+import org.apache.chemistry.RepositoryCapabilities;
+import org.apache.chemistry.RepositoryInfo;
+import org.apache.chemistry.Type;
+import org.apache.chemistry.Updatability;
+import org.apache.chemistry.ws.CmisObjectListType;
 import org.apache.chemistry.ws.CmisObjectType;
 import org.apache.chemistry.ws.CmisPropertiesType;
 import org.apache.chemistry.ws.CmisProperty;
 import org.apache.chemistry.ws.CmisPropertyBoolean;
 import org.apache.chemistry.ws.CmisPropertyDateTime;
 import org.apache.chemistry.ws.CmisPropertyDecimal;
+import org.apache.chemistry.ws.CmisPropertyDefinitionType;
 import org.apache.chemistry.ws.CmisPropertyHtml;
 import org.apache.chemistry.ws.CmisPropertyId;
 import org.apache.chemistry.ws.CmisPropertyInteger;
 import org.apache.chemistry.ws.CmisPropertyString;
 import org.apache.chemistry.ws.CmisPropertyUri;
+import org.apache.chemistry.ws.CmisRepositoryCapabilitiesType;
+import org.apache.chemistry.ws.CmisRepositoryInfoType;
+import org.apache.chemistry.ws.CmisTypeContainer;
+import org.apache.chemistry.ws.CmisTypeDefinitionListType;
+import org.apache.chemistry.ws.CmisTypeDefinitionType;
+import org.apache.chemistry.ws.EnumBaseObjectTypeIds;
 import org.apache.chemistry.ws.EnumCapabilityJoin;
 import org.apache.chemistry.ws.EnumCapabilityQuery;
+import org.apache.chemistry.ws.EnumCardinality;
+import org.apache.chemistry.ws.EnumPropertyType;
+import org.apache.chemistry.ws.EnumUpdatability;
+import org.apache.chemistry.ws.ObjectFactory;
+import org.apache.chemistry.ws.QueryResponse;
 
 /**
  * Helper for various Chemistry to JAXB conversions.
  */
 public class ChemistryHelper {
 
+    private static final ObjectFactory factory = new ObjectFactory();
+
     private ChemistryHelper() {
         // utility class;
     }
 
-    public static EnumCapabilityQuery chemistryToJAXB(CapabilityQuery query) {
+    public static CmisRepositoryInfoType convert(RepositoryInfo cri) {
+        CmisRepositoryInfoType ri = factory.createCmisRepositoryInfoType();
+        ri.setRepositoryId(cri.getId());
+        ri.setRepositoryName(cri.getName());
+        ri.setRepositoryDescription(cri.getDescription());
+        ri.setVendorName(cri.getVendorName());
+        ri.setProductName(cri.getProductName());
+        ri.setProductVersion(cri.getProductVersion());
+        ri.setCmisVersionSupported(cri.getVersionSupported());
+        ri.setRootFolderId(cri.getRootFolderId().getId());
+
+        CmisRepositoryCapabilitiesType cap = factory.createCmisRepositoryCapabilitiesType();
+        RepositoryCapabilities ccap = cri.getCapabilities();
+        ri.setCapabilities(cap);
+        cap.setCapabilityMultifiling(ccap.hasMultifiling());
+        cap.setCapabilityUnfiling(ccap.hasUnfiling());
+        cap.setCapabilityVersionSpecificFiling(ccap.hasVersionSpecificFiling());
+        cap.setCapabilityPWCUpdatable(ccap.isPWCUpdatable());
+        cap.setCapabilityPWCSearchable(ccap.isPWCSearchable());
+        cap.setCapabilityAllVersionsSearchable(ccap.isAllVersionsSearchable());
+        cap.setCapabilityQuery(convert(ccap.getQueryCapability()));
+        cap.setCapabilityJoin(convert(ccap.getJoinCapability()));
+
+        return ri;
+    }
+
+    public static EnumCapabilityQuery convert(CapabilityQuery query) {
+        if (query == null) {
+            return null;
+        }
         switch (query) {
         case NONE:
             return EnumCapabilityQuery.NONE;
@@ -71,11 +124,14 @@
         case BOTH_SEPARATE:
             return EnumCapabilityQuery.BOTHSEPARATE;
         default:
-            throw new RuntimeException();
+            throw new RuntimeException(query.name());
         }
     }
 
-    public static EnumCapabilityJoin chemistryToJAXB(CapabilityJoin join) {
+    public static EnumCapabilityJoin convert(CapabilityJoin join) {
+        if (join == null) {
+            return null;
+        }
         switch (join) {
         case NONE:
             return EnumCapabilityJoin.NONE;
@@ -84,18 +140,162 @@
         case INNER_AND_OUTER:
             return EnumCapabilityJoin.INNERANDOUTER;
         default:
-            throw new RuntimeException();
+            throw new RuntimeException(join.name());
+        }
+    }
+
+    public static EnumBaseObjectTypeIds convert(BaseType type) {
+        if (type == null) {
+            return null;
+        }
+        switch (type) {
+        case DOCUMENT:
+            return EnumBaseObjectTypeIds.CMIS_DOCUMENT;
+        case FOLDER:
+            return EnumBaseObjectTypeIds.CMIS_FOLDER;
+        case POLICY:
+            return EnumBaseObjectTypeIds.CMIS_POLICY;
+        case RELATIONSHIP:
+            return EnumBaseObjectTypeIds.CMIS_RELATIONSHIP;
+        default:
+            throw new RuntimeException(type.name());
         }
     }
 
-    public static void chemistryToJAXB(ObjectEntry entry, CmisObjectType object) {
-        CmisPropertiesType properties = new CmisPropertiesType();
+    public static EnumPropertyType convert(PropertyType type) {
+        if (type == null) {
+            return null;
+        }
+        switch (type.ordinal()) {
+        case PropertyType.STRING_ORD:
+            return EnumPropertyType.STRING;
+        case PropertyType.DECIMAL_ORD:
+            return EnumPropertyType.DECIMAL;
+        case PropertyType.INTEGER_ORD:
+            return EnumPropertyType.INTEGER;
+        case PropertyType.BOOLEAN_ORD:
+            return EnumPropertyType.BOOLEAN;
+        case PropertyType.DATETIME_ORD:
+            return EnumPropertyType.DATETIME;
+        case PropertyType.URI_ORD:
+            return EnumPropertyType.URI;
+        case PropertyType.ID_ORD:
+            return EnumPropertyType.ID;
+        case PropertyType.HTML_ORD:
+            return EnumPropertyType.HTML;
+        default:
+            throw new RuntimeException(type.name());
+        }
+    }
+
+    public static EnumCardinality convertMulti(boolean bool) {
+        return bool ? EnumCardinality.MULTI : EnumCardinality.SINGLE;
+    }
+
+    public static EnumUpdatability convert(Updatability up) {
+        if (up == null) {
+            return null;
+        }
+        switch (up) {
+        case READ_ONLY:
+            return EnumUpdatability.READONLY;
+        case READ_WRITE:
+            return EnumUpdatability.READWRITE;
+        case WHEN_CHECKED_OUT:
+            return EnumUpdatability.WHENCHECKEDOUT;
+        case ON_CREATE:
+            return EnumUpdatability.ONCREATE;
+        default:
+            throw new RuntimeException(up.name());
+        }
+    }
+
+    public static CmisPropertyDefinitionType convert(PropertyDefinition cpd) {
+        CmisPropertyDefinitionType pd = factory.createCmisPropertyDefinitionType();
+        pd.setId(cpd.getId());
+        pd.setLocalName(cpd.getLocalName());
+        URI dlns = cpd.getLocalNamespace();
+        pd.setLocalNamespace(dlns == null ? null : dlns.toString());
+        pd.setDisplayName(cpd.getDisplayName());
+        pd.setQueryName(cpd.getQueryName());
+        pd.setDescription(cpd.getDescription());
+        pd.setPropertyType(convert(cpd.getType()));
+        pd.setCardinality(convertMulti(cpd.isMultiValued()));
+        pd.setUpdatability(convert(cpd.getUpdatability()));
+        pd.setInherited(Boolean.valueOf(cpd.isInherited()));
+        pd.setRequired(cpd.isRequired());
+        pd.setQueryable(cpd.isQueryable());
+        pd.setOrderable(cpd.isOrderable());
+        pd.setOpenChoice(Boolean.valueOf(cpd.isOpenChoice()));
+        return pd;
+    }
+
+    public static CmisTypeDefinitionType convert(Type ct) {
+        CmisTypeDefinitionType t = factory.createCmisTypeDefinitionType();
+        t.setId(ct.getId());
+        t.setLocalName(ct.getLocalName());
+        URI tlns = ct.getLocalNamespace();
+        t.setLocalNamespace(tlns == null ? null : tlns.toString());
+        t.setDisplayName(ct.getDisplayName());
+        t.setQueryName(ct.getQueryName());
+        t.setDescription(ct.getDescription());
+        t.setBaseId(convert(ct.getBaseType()));
+        t.setParentId(ct.getParentId());
+        t.setCreatable(ct.isCreatable());
+        t.setFileable(ct.isFileable());
+        t.setQueryable(ct.isQueryable());
+        t.setFulltextIndexed(ct.isFulltextIndexed());
+        t.setIncludedInSupertypeQuery(ct.isIncludedInSuperTypeQuery());
+        t.setControllablePolicy(ct.isControllablePolicy());
+        t.setControllableACL(ct.isControllableACL());
+        List<CmisPropertyDefinitionType> pdl = t.getPropertyDefinition();
+        for (PropertyDefinition cpd : ct.getPropertyDefinitions()) {
+            pdl.add(convert(cpd));
+        }
+        return t;
+    }
+
+    public static CmisTypeDefinitionListType convert(ListPage<Type> ctl) {
+        CmisTypeDefinitionListType tl = factory.createCmisTypeDefinitionListType();
+        for (Type ct : ctl) {
+            tl.getTypes().add(convert(ct));
+        }
+        tl.setHasMoreItems(ctl.getHasMoreItems());
+        tl.setNumItems(BigInteger.valueOf(ctl.getNumItems()));
+        return tl;
+    }
+
+    public static List<CmisTypeContainer> convert(Collection<Type> ctl) {
+        List<CmisTypeContainer> list = new ArrayList<CmisTypeContainer>(
+                ctl.size());
+        // for (Type ct : ctl) {
+        // XXX
+        // }
+        return list;
+    }
+
+    public static CmisObjectType convert(ObjectEntry entry) {
+        CmisObjectType object = factory.createCmisObjectType();
+        CmisPropertiesType properties = factory.createCmisPropertiesType();
         List<CmisProperty> list = properties.getProperty();
         for (Entry<String, Serializable> e : entry.getValues().entrySet()) {
             list.add(getWSCmisProperty(e.getKey(), e.getValue()));
         }
         object.setProperties(properties);
         // object.setAllowableActions(null);
+        return object;
+    }
+
+    public static QueryResponse convertQuery(ListPage<ObjectEntry> res) {
+        QueryResponse response = factory.createQueryResponse();
+        CmisObjectListType objects = factory.createCmisObjectListType();
+        response.setObjects(objects);
+        for (ObjectEntry entry : res) {
+            objects.getObjects().add(convert(entry));
+        }
+        objects.setHasMoreItems(res.getHasMoreItems());
+        objects.setNumItems(BigInteger.valueOf(res.getNumItems()));
+        return response;
     }
 
     /**

Modified: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/DiscoveryServicePortImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/DiscoveryServicePortImpl.java?rev=918377&r1=918376&r2=918377&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/DiscoveryServicePortImpl.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/DiscoveryServicePortImpl.java Wed Mar  3 10:02:58 2010
@@ -41,6 +41,7 @@
 import org.apache.chemistry.ws.CmisObjectType;
 import org.apache.chemistry.ws.DiscoveryServicePort;
 import org.apache.chemistry.ws.EnumIncludeRelationships;
+import org.apache.chemistry.ws.ObjectFactory;
 import org.apache.chemistry.ws.Query;
 import org.apache.chemistry.ws.QueryResponse;
 
@@ -52,7 +53,7 @@
 public class DiscoveryServicePortImpl implements DiscoveryServicePort {
 
     @Resource
-    WebServiceContext wscontext;
+    private WebServiceContext wscontext;
 
     public QueryResponse query(Query parameters) throws CmisException {
         // repository
@@ -94,29 +95,16 @@
         Inclusion inclusion = new Inclusion(null, renditions, relationships,
                 allowableActions, false, false);
 
-        // response
-        QueryResponse response = new QueryResponse();
-        CmisObjectListType objects = new CmisObjectListType();
-        response.setObjects(objects);
-
         Map<String, Serializable> params = CallContext.mapFromWebServiceContext(wscontext);
         SPI spi = repository.getSPI(params);
         try {
             ListPage<ObjectEntry> res = spi.query(statement, searchAllVersions,
                     inclusion, paging);
-            objects.setHasMoreItems(res.getHasMoreItems());
-            objects.setNumItems(BigInteger.valueOf(res.getNumItems()));
-            List<CmisObjectType> objectList = objects.getObjects();
-            for (ObjectEntry entry : res) {
-                CmisObjectType object = new CmisObjectType();
-                ChemistryHelper.chemistryToJAXB(entry, object);
-                objectList.add(object);
-            }
+
+            return ChemistryHelper.convertQuery(res);
         } finally {
             spi.close();
         }
-
-        return response;
     }
 
     public void getContentChanges(String repositoryId,

Added: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/MultiFilingServicePortImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/MultiFilingServicePortImpl.java?rev=918377&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/MultiFilingServicePortImpl.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/MultiFilingServicePortImpl.java Wed Mar  3 10:02:58 2010
@@ -0,0 +1,54 @@
+/*
+ * Licensed 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.
+ *
+ * Authors:
+ *     Florent Guillaume, Nuxeo
+ */
+package org.apache.chemistry.soap.server;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.chemistry.ws.CmisException;
+import org.apache.chemistry.ws.CmisExtensionType;
+import org.apache.chemistry.ws.MultiFilingServicePort;
+import org.apache.chemistry.ws.ObjectFactory;
+
+@WebService(name = "MultiFilingServicePort", //
+targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/", //
+serviceName = "MultiFilingService", //
+portName = "MultiFilingServicePort", //
+endpointInterface = "org.apache.chemistry.ws.MultiFilingServicePort")
+public class MultiFilingServicePortImpl implements MultiFilingServicePort {
+
+    private static final ObjectFactory factory = new ObjectFactory();
+
+    @Resource
+    private WebServiceContext wscontext;
+
+    public CmisExtensionType addObjectToFolder(String repositoryId,
+            String objectId, String folderId, Boolean allVersions,
+            CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisExtensionType removeObjectFromFolder(String repositoryId,
+            String objectId, String folderId, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/MultiFilingServicePortImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/MultiFilingServicePortImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/NavigationServicePortImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/NavigationServicePortImpl.java?rev=918377&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/NavigationServicePortImpl.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/NavigationServicePortImpl.java Wed Mar  3 10:02:58 2010
@@ -0,0 +1,105 @@
+/*
+ * Licensed 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.
+ *
+ * Authors:
+ *     Florent Guillaume, Nuxeo
+ */
+package org.apache.chemistry.soap.server;
+
+import java.math.BigInteger;
+import java.util.List;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.chemistry.ws.CmisException;
+import org.apache.chemistry.ws.CmisExtensionType;
+import org.apache.chemistry.ws.CmisObjectInFolderContainerType;
+import org.apache.chemistry.ws.CmisObjectInFolderListType;
+import org.apache.chemistry.ws.CmisObjectListType;
+import org.apache.chemistry.ws.CmisObjectParentsType;
+import org.apache.chemistry.ws.CmisObjectType;
+import org.apache.chemistry.ws.EnumIncludeRelationships;
+import org.apache.chemistry.ws.NavigationServicePort;
+import org.apache.chemistry.ws.ObjectFactory;
+
+@WebService(name = "NavigationService", //
+targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/", //
+serviceName = "NavigationService", //
+portName = "NavigationServicePort", //
+endpointInterface = "org.apache.chemistry.ws.NavigationServicePort")
+public class NavigationServicePortImpl implements NavigationServicePort {
+
+    private static final ObjectFactory factory = new ObjectFactory();
+
+    @Resource
+    private WebServiceContext wscontext;
+
+    public CmisObjectListType getCheckedOutDocs(String repositoryId,
+            String folderId, String filter, String orderBy,
+            Boolean includeAllowableActions,
+            EnumIncludeRelationships includeRelationships,
+            String renditionFilter, BigInteger maxItems, BigInteger skipCount,
+            CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisObjectInFolderListType getChildren(String repositoryId,
+            String folderId, String filter, String orderBy,
+            Boolean includeAllowableActions,
+            EnumIncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePathSegment,
+            BigInteger maxItems, BigInteger skipCount,
+            CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public List<CmisObjectInFolderContainerType> getDescendants(
+            String repositoryId, String folderId, BigInteger depth,
+            String filter, Boolean includeAllowableActions,
+            EnumIncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePathSegment,
+            CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisObjectType getFolderParent(String repositoryId, String folderId,
+            String filter, CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public List<CmisObjectInFolderContainerType> getFolderTree(
+            String repositoryId, String folderId, BigInteger depth,
+            String filter, Boolean includeAllowableActions,
+            EnumIncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePathSegment,
+            CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public List<CmisObjectParentsType> getObjectParents(String repositoryId,
+            String objectId, String filter, Boolean includeAllowableActions,
+            EnumIncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includeRelativePathSegment,
+            CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/NavigationServicePortImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/NavigationServicePortImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ObjectServicePortImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ObjectServicePortImpl.java?rev=918377&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ObjectServicePortImpl.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ObjectServicePortImpl.java Wed Mar  3 10:02:58 2010
@@ -0,0 +1,200 @@
+/*
+ * Licensed 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.
+ *
+ * Authors:
+ *     Florent Guillaume, Nuxeo
+ */
+package org.apache.chemistry.soap.server;
+
+import java.math.BigInteger;
+import java.util.List;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.chemistry.ws.CmisAccessControlListType;
+import org.apache.chemistry.ws.CmisAllowableActionsType;
+import org.apache.chemistry.ws.CmisContentStreamType;
+import org.apache.chemistry.ws.CmisException;
+import org.apache.chemistry.ws.CmisExtensionType;
+import org.apache.chemistry.ws.CmisObjectType;
+import org.apache.chemistry.ws.CmisPropertiesType;
+import org.apache.chemistry.ws.CmisRenditionType;
+import org.apache.chemistry.ws.EnumIncludeRelationships;
+import org.apache.chemistry.ws.EnumUnfileObject;
+import org.apache.chemistry.ws.EnumVersioningState;
+import org.apache.chemistry.ws.ObjectFactory;
+import org.apache.chemistry.ws.ObjectServicePort;
+import org.apache.chemistry.ws.DeleteTreeResponse.FailedToDelete;
+
+@WebService(name = "ObjectServicePort", //
+targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/", //
+serviceName = "ObjectService", //
+portName = "ObjectServicePort", //
+endpointInterface = "org.apache.chemistry.ws.ObjectServicePort")
+public class ObjectServicePortImpl implements ObjectServicePort {
+
+    private static final ObjectFactory factory = new ObjectFactory();
+
+    @Resource
+    private WebServiceContext wscontext;
+
+    public void createDocument(String repositoryId,
+            CmisPropertiesType properties, String folderId,
+            CmisContentStreamType contentStream,
+            EnumVersioningState versioningState, List<String> policies,
+            CmisAccessControlListType addACEs,
+            CmisAccessControlListType removeACEs,
+            Holder<CmisExtensionType> extension, Holder<String> objectId)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void createDocumentFromSource(String repositoryId, String sourceId,
+            CmisPropertiesType properties, String folderId,
+            EnumVersioningState versioningState, List<String> policies,
+            CmisAccessControlListType addACEs,
+            CmisAccessControlListType removeACEs,
+            Holder<CmisExtensionType> extension, Holder<String> objectId)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void createFolder(String repositoryId,
+            CmisPropertiesType properties, String folderId,
+            List<String> policies, CmisAccessControlListType addACEs,
+            CmisAccessControlListType removeACEs,
+            Holder<CmisExtensionType> extension, Holder<String> objectId)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void createPolicy(String repositoryId,
+            CmisPropertiesType properties, String folderId,
+            List<String> policies, CmisAccessControlListType addACEs,
+            CmisAccessControlListType removeACEs,
+            Holder<CmisExtensionType> extension, Holder<String> objectId)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void createRelationship(String repositoryId,
+            CmisPropertiesType properties, List<String> policies,
+            CmisAccessControlListType addACEs,
+            CmisAccessControlListType removeACEs,
+            Holder<CmisExtensionType> extension, Holder<String> objectId)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void deleteContentStream(String repositoryId,
+            Holder<String> objectId, Holder<String> changeToken,
+            Holder<CmisExtensionType> extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisExtensionType deleteObject(String repositoryId, String objectId,
+            Boolean allVersions, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public FailedToDelete deleteTree(String repositoryId, String folderId,
+            Boolean allVersions, EnumUnfileObject unfileObjects,
+            Boolean continueOnFailure, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisAllowableActionsType getAllowableActions(String repositoryId,
+            String objectId, CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisContentStreamType getContentStream(String repositoryId,
+            String objectId, String streamId, BigInteger offset,
+            BigInteger length, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisObjectType getObject(String repositoryId, String objectId,
+            String filter, Boolean includeAllowableActions,
+            EnumIncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePolicyIds,
+            Boolean includeACL, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisObjectType getObjectByPath(String repositoryId, String path,
+            String filter, Boolean includeAllowableActions,
+            EnumIncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePolicyIds,
+            Boolean includeACL, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisPropertiesType getProperties(String repositoryId,
+            String objectId, String filter, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public List<CmisRenditionType> getRenditions(String repositoryId,
+            String objectId, String renditionFilter, BigInteger maxItems,
+            BigInteger skipCount, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void moveObject(String repositoryId, Holder<String> objectId,
+            String targetFolderId, String sourceFolderId,
+            Holder<CmisExtensionType> extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void setContentStream(String repositoryId, Holder<String> objectId,
+            Boolean overwriteFlag, Holder<String> changeToken,
+            CmisContentStreamType contentStream,
+            Holder<CmisExtensionType> extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateProperties(String repositoryId, Holder<String> objectId,
+            Holder<String> changeToken, CmisPropertiesType properties,
+            Holder<CmisExtensionType> extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ObjectServicePortImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/ObjectServicePortImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/PolicyServicePortImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/PolicyServicePortImpl.java?rev=918377&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/PolicyServicePortImpl.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/PolicyServicePortImpl.java Wed Mar  3 10:02:58 2010
@@ -0,0 +1,62 @@
+/*
+ * Licensed 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.
+ *
+ * Authors:
+ *     Florent Guillaume, Nuxeo
+ */
+package org.apache.chemistry.soap.server;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.chemistry.ws.CmisException;
+import org.apache.chemistry.ws.CmisExtensionType;
+import org.apache.chemistry.ws.CmisObjectType;
+import org.apache.chemistry.ws.ObjectFactory;
+import org.apache.chemistry.ws.PolicyServicePort;
+
+@WebService(name = "PolicyServicePort", //
+targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/", //
+serviceName = "PolicyService", //
+portName = "PolicyServicePort", //
+endpointInterface = "org.apache.chemistry.ws.PolicyServicePort")
+public class PolicyServicePortImpl implements PolicyServicePort {
+
+    private static final ObjectFactory factory = new ObjectFactory();
+
+    @Resource
+    private WebServiceContext wscontext;
+
+    public CmisExtensionType applyPolicy(String repositoryId, String policyId,
+            String objectId, CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public List<CmisObjectType> getAppliedPolicies(String repositoryId,
+            String objectId, String filter, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisExtensionType removePolicy(String repositoryId, String policyId,
+            String objectId, CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/PolicyServicePortImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/PolicyServicePortImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RelationshipServicePortImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RelationshipServicePortImpl.java?rev=918377&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RelationshipServicePortImpl.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RelationshipServicePortImpl.java Wed Mar  3 10:02:58 2010
@@ -0,0 +1,54 @@
+/*
+ * Licensed 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.
+ *
+ * Authors:
+ *     Florent Guillaume, Nuxeo
+ */
+package org.apache.chemistry.soap.server;
+
+import java.math.BigInteger;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.chemistry.ws.CmisException;
+import org.apache.chemistry.ws.CmisExtensionType;
+import org.apache.chemistry.ws.CmisObjectListType;
+import org.apache.chemistry.ws.EnumRelationshipDirection;
+import org.apache.chemistry.ws.ObjectFactory;
+import org.apache.chemistry.ws.RelationshipServicePort;
+
+@WebService(name = "RelationshipServicePort", //
+targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/", //
+serviceName = "RelationshipService", //
+portName = "RelationshipServicePort", //
+endpointInterface = "org.apache.chemistry.ws.RelationshipServicePort")
+public class RelationshipServicePortImpl implements RelationshipServicePort {
+
+    private static final ObjectFactory factory = new ObjectFactory();
+
+    @Resource
+    private WebServiceContext wscontext;
+
+    public CmisObjectListType getObjectRelationships(String repositoryId,
+            String objectId, Boolean includeSubRelationshipTypes,
+            EnumRelationshipDirection relationshipDirection, String typeId,
+            String filter, Boolean includeAllowableActions,
+            BigInteger maxItems, BigInteger skipCount,
+            CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RelationshipServicePortImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RelationshipServicePortImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RepositoryServicePortImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RepositoryServicePortImpl.java?rev=918377&r1=918376&r2=918377&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RepositoryServicePortImpl.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/RepositoryServicePortImpl.java Wed Mar  3 10:02:58 2010
@@ -17,27 +17,39 @@
 package org.apache.chemistry.soap.server;
 
 import java.math.BigInteger;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+import javax.annotation.Resource;
 import javax.jws.WebService;
+import javax.xml.bind.JAXBElement;
+import javax.xml.ws.WebServiceContext;
 
+import org.apache.chemistry.ListPage;
+import org.apache.chemistry.Paging;
+import org.apache.chemistry.PropertyDefinition;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.RepositoryCapabilities;
 import org.apache.chemistry.RepositoryEntry;
 import org.apache.chemistry.RepositoryInfo;
 import org.apache.chemistry.RepositoryManager;
+import org.apache.chemistry.Type;
 import org.apache.chemistry.ws.CmisException;
 import org.apache.chemistry.ws.CmisExtensionType;
+import org.apache.chemistry.ws.CmisPropertyDefinitionType;
 import org.apache.chemistry.ws.CmisRepositoryCapabilitiesType;
 import org.apache.chemistry.ws.CmisRepositoryEntryType;
 import org.apache.chemistry.ws.CmisRepositoryInfoType;
 import org.apache.chemistry.ws.CmisTypeContainer;
 import org.apache.chemistry.ws.CmisTypeDefinitionListType;
 import org.apache.chemistry.ws.CmisTypeDefinitionType;
+import org.apache.chemistry.ws.ObjectFactory;
 import org.apache.chemistry.ws.RepositoryServicePort;
 
+import sun.security.pkcs11.Secmod.DbMode;
+
 @WebService(name = "RepositoryServicePort", //
 targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/", //
 serviceName = "RepositoryService", //
@@ -45,13 +57,18 @@
 endpointInterface = "org.apache.chemistry.ws.RepositoryServicePort")
 public class RepositoryServicePortImpl implements RepositoryServicePort {
 
+    private static final ObjectFactory factory = new ObjectFactory();
+
+    @Resource
+    private WebServiceContext wscontext;
+
     public List<CmisRepositoryEntryType> getRepositories(
             CmisExtensionType extension) throws CmisException {
         Collection<RepositoryEntry> repos = RepositoryManager.getInstance().getRepositories();
         List<CmisRepositoryEntryType> entries = new ArrayList<CmisRepositoryEntryType>(
                 repos.size());
         for (RepositoryEntry repo : repos) {
-            CmisRepositoryEntryType entry = new CmisRepositoryEntryType();
+            CmisRepositoryEntryType entry = factory.createCmisRepositoryEntryType();
             entry.setRepositoryId(repo.getId());
             entry.setRepositoryName(repo.getName());
             entries.add(entry);
@@ -66,53 +83,61 @@
         if (repo == null) {
             return null; // TODO or fault?
         }
-        RepositoryInfo info = repo.getInfo();
-        RepositoryCapabilities cap = info.getCapabilities();
 
-        CmisRepositoryInfoType repositoryInfo = new CmisRepositoryInfoType();
-        repositoryInfo.setRepositoryId(info.getId());
-        repositoryInfo.setRepositoryName(info.getName());
-        repositoryInfo.setRepositoryDescription(info.getDescription());
-        repositoryInfo.setVendorName(info.getVendorName());
-        repositoryInfo.setProductName(info.getProductName());
-        repositoryInfo.setProductVersion(info.getProductVersion());
-        repositoryInfo.setCmisVersionSupported(info.getVersionSupported());
-        repositoryInfo.setRootFolderId(info.getRootFolderId().getId());
-
-        CmisRepositoryCapabilitiesType capabilities = new CmisRepositoryCapabilitiesType();
-        repositoryInfo.setCapabilities(capabilities);
-        capabilities.setCapabilityMultifiling(cap.hasMultifiling());
-        capabilities.setCapabilityUnfiling(cap.hasUnfiling());
-        capabilities.setCapabilityVersionSpecificFiling(cap.hasVersionSpecificFiling());
-        capabilities.setCapabilityPWCUpdatable(cap.isPWCUpdatable());
-        capabilities.setCapabilityPWCSearchable(cap.isPWCSearchable());
-        capabilities.setCapabilityAllVersionsSearchable(cap.isAllVersionsSearchable());
-        capabilities.setCapabilityQuery(ChemistryHelper.chemistryToJAXB(cap.getQueryCapability()));
-        capabilities.setCapabilityJoin(ChemistryHelper.chemistryToJAXB(cap.getJoinCapability()));
+        RepositoryInfo info = repo.getInfo();
 
-        return repositoryInfo;
+        return ChemistryHelper.convert(info);
     }
 
     public CmisTypeDefinitionType getTypeDefinition(String repositoryId,
             String typeId, CmisExtensionType extension) throws CmisException {
-        // TODO Auto-generated method stub
-        throw new UnsupportedOperationException();
+        Repository repo = RepositoryManager.getInstance().getRepository(
+                repositoryId);
+        if (repo == null) {
+            return null; // TODO or fault?
+        }
+
+        Type type = repo.getType(typeId);
+
+        return ChemistryHelper.convert(type);
     }
 
     public CmisTypeDefinitionListType getTypeChildren(String repositoryId,
             String typeId, Boolean includePropertyDefinitions,
             BigInteger maxItems, BigInteger skipCount,
             CmisExtensionType extension) throws CmisException {
-        // TODO Auto-generated method stub
-        throw new UnsupportedOperationException();
+        Repository repo = RepositoryManager.getInstance().getRepository(
+                repositoryId);
+        if (repo == null) {
+            return null; // TODO or fault?
+        }
+
+        boolean ipd = Boolean.TRUE.equals(includePropertyDefinitions);
+        int mi = maxItems == null ? -1 : maxItems.intValue();
+        int sc = skipCount == null ? -1 : skipCount.intValue();
+        Paging paging = new Paging(mi, sc);
+
+        ListPage<Type> types = repo.getTypeChildren(typeId, ipd, paging);
+
+        return ChemistryHelper.convert(types);
     }
 
     public List<CmisTypeContainer> getTypeDescendants(String repositoryId,
             String typeId, BigInteger depth,
             Boolean includePropertyDefinitions, CmisExtensionType extension)
             throws CmisException {
-        // TODO Auto-generated method stub
-        throw new UnsupportedOperationException();
+        Repository repo = RepositoryManager.getInstance().getRepository(
+                repositoryId);
+        if (repo == null) {
+            return null; // TODO or fault?
+        }
+
+        boolean ipd = Boolean.TRUE.equals(includePropertyDefinitions);
+        int d = depth == null ? -1 : depth.intValue();
+
+        Collection<Type> ctl = repo.getTypeDescendants(typeId, d, ipd);
+
+        return ChemistryHelper.convert(ctl);
     }
 
 }

Added: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/VersioningServicePortImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/VersioningServicePortImpl.java?rev=918377&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/VersioningServicePortImpl.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/VersioningServicePortImpl.java Wed Mar  3 10:02:58 2010
@@ -0,0 +1,96 @@
+/*
+ * Licensed 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.
+ *
+ * Authors:
+ *     Florent Guillaume, Nuxeo
+ */
+package org.apache.chemistry.soap.server;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.chemistry.ws.CmisAccessControlListType;
+import org.apache.chemistry.ws.CmisContentStreamType;
+import org.apache.chemistry.ws.CmisException;
+import org.apache.chemistry.ws.CmisExtensionType;
+import org.apache.chemistry.ws.CmisObjectType;
+import org.apache.chemistry.ws.CmisPropertiesType;
+import org.apache.chemistry.ws.EnumIncludeRelationships;
+import org.apache.chemistry.ws.ObjectFactory;
+import org.apache.chemistry.ws.VersioningServicePort;
+
+@WebService(name = "VersioningServicePort", //
+targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/", //
+serviceName = "VersioningService", //
+portName = "VersioningServicePort", //
+endpointInterface = "org.apache.chemistry.ws.VersioningServicePort")
+public class VersioningServicePortImpl implements VersioningServicePort {
+
+    private static final ObjectFactory factory = new ObjectFactory();
+
+    @Resource
+    private WebServiceContext wscontext;
+
+    public CmisExtensionType cancelCheckOut(String repositoryId,
+            String objectId, CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void checkIn(String repositoryId, Holder<String> objectId,
+            Boolean major, CmisPropertiesType properties,
+            CmisContentStreamType contentStream, String checkinComment,
+            List<String> policies, CmisAccessControlListType addACEs,
+            CmisAccessControlListType removeACEs,
+            Holder<CmisExtensionType> extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public void checkOut(String repositoryId, Holder<String> objectId,
+            Holder<CmisExtensionType> extension, Holder<Boolean> contentCopied)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public List<CmisObjectType> getAllVersions(String repositoryId,
+            String objectId, String filter, Boolean includeAllowableActions,
+            CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisObjectType getObjectOfLatestVersion(String repositoryId,
+            String objectId, Boolean major, String filter,
+            Boolean includeAllowableActions,
+            EnumIncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePolicyIds,
+            Boolean includeACL, CmisExtensionType extension)
+            throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+    public CmisPropertiesType getPropertiesOfLatestVersion(String repositoryId,
+            String objectId, Boolean major, String filter,
+            CmisExtensionType extension) throws CmisException {
+        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException();
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/VersioningServicePortImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-soap-server/src/main/java/org/apache/chemistry/soap/server/VersioningServicePortImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message