chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1467986 [1/13] - in /chemistry/opencmis/trunk: chemistry-opencmis-android/chemistry-opencmis-android-client/ chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webse...
Date Mon, 15 Apr 2013 12:47:09 GMT
Author: fmui
Date: Mon Apr 15 12:47:08 2013
New Revision: 1467986

URL: http://svn.apache.org/r1467986
Log:
CMIS 1.1: Web Services preparations

Added:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunPortProvider.java   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/ObjectServicePort10.java   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/RepositoryServicePort10.java   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/CMIS-Core.xsd   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/CMIS-Messaging.xsd   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/CMISWS-Service.wsdl   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/xml.xsd   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/CMIS-Core.xsd   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/CMIS-Messaging.xsd   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/CMISWS-Service.wsdl   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/xml.xsd   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectService10.java   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryService10.java   (with props)
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/cmis10/
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/cmis10/CMIS-Core.xsd.template
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/cmis10/CMIS-Messaging.xsd.template
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/cmis10/CMISWS-Service.wsdl.template
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/cmis11/
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/cmis11/CMIS-Core.xsd.template
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/cmis11/CMIS-Messaging.xsd.template
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/cmis11/CMISWS-Service.wsdl.template
Removed:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Core.xsd
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMIS-Messaging.xsd
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/CMISWS-Service.wsdl
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/xml.xsd
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/wsdl/CMIS-Core.xsd
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/wsdl/CMIS-Messaging.xsd
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/wsdl/CMISWS-Service.wsdl
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/wsdl/xml.xsd
Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectService.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryService.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/sun-jaxws.xml
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml

Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml?rev=1467986&r1=1467985&r2=1467986&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml Mon Apr 15 12:47:08 2013
@@ -72,6 +72,7 @@
 										<include name="**/*.java" />
 										<exclude name="**/tube/**" />
 										<exclude name="**/jaxb/**" />
+										<exclude name="**/webservices/**" />
 										<exclude name="**/impl/Converter.*" />
 										<exclude name="**/impl/XMLConverter.*" />										
 									</fileset>

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java?rev=1467986&r1=1467985&r2=1467986&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java Mon Apr 15 12:47:08 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.chemistry.opencmis.client.bindings.spi.webservices;
 
+import java.lang.reflect.Constructor;
 import java.net.URL;
 import java.util.Collections;
 import java.util.HashMap;
@@ -27,6 +28,7 @@ import java.util.Map;
 import javax.xml.namespace.QName;
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
 import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.http.HTTPException;
 
@@ -57,27 +59,133 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.impl.jaxb.RepositoryServicePort;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.VersioningService;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.VersioningServicePort;
+import org.apache.chemistry.opencmis.commons.impl.webservices.ObjectServicePort10;
+import org.apache.chemistry.opencmis.commons.impl.webservices.RepositoryServicePort10;
 import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public abstract class AbstractPortProvider {
 
-    private static final Logger log = LoggerFactory.getLogger(AbstractPortProvider.class);
+    private static final Logger LOG = LoggerFactory.getLogger(AbstractPortProvider.class);
 
-    public static final String CMIS_NAMESPACE = "http://docs.oasis-open.org/ns/cmis/ws/200908/";
+    protected static final int CHUNK_SIZE = (64 * 1024) - 1;
 
-    public static final String REPOSITORY_SERVICE = "RepositoryService";
-    public static final String OBJECT_SERVICE = "ObjectService";
-    public static final String DISCOVERY_SERVICE = "DiscoveryService";
-    public static final String NAVIGATION_SERVICE = "NavigationService";
-    public static final String MULTIFILING_SERVICE = "MultiFilingService";
-    public static final String VERSIONING_SERVICE = "VersioningService";
-    public static final String RELATIONSHIP_SERVICE = "RelationshipService";
-    public static final String POLICY_SERVICE = "PolicyService";
-    public static final String ACL_SERVICE = "ACLService";
+    protected enum CmisWebSerivcesService {
+        REPOSITORY_SERVICE("RepositoryService", false, RepositoryService.class, RepositoryServicePort10.class,
+                RepositoryServicePort.class, SessionParameter.WEBSERVICES_REPOSITORY_SERVICE,
+                SessionParameter.WEBSERVICES_REPOSITORY_SERVICE_ENDPOINT),
+
+        NAVIGATION_SERVICE("NavigationService", false, NavigationService.class, NavigationServicePort.class,
+                NavigationServicePort.class, SessionParameter.WEBSERVICES_NAVIGATION_SERVICE,
+                SessionParameter.WEBSERVICES_NAVIGATION_SERVICE_ENDPOINT),
+
+        OBJECT_SERVICE("ObjectService", true, ObjectService.class, ObjectServicePort10.class, ObjectServicePort.class,
+                SessionParameter.WEBSERVICES_OBJECT_SERVICE, SessionParameter.WEBSERVICES_OBJECT_SERVICE_ENDPOINT),
+
+        VERSIONING_SERVICE("VersioningService", true, VersioningService.class, VersioningServicePort.class,
+                VersioningServicePort.class, SessionParameter.WEBSERVICES_VERSIONING_SERVICE,
+                SessionParameter.WEBSERVICES_VERSIONING_SERVICE_ENDPOINT),
+
+        DISCOVERY_SERVICE("DiscoveryService", false, DiscoveryService.class, DiscoveryServicePort.class,
+                DiscoveryServicePort.class, SessionParameter.WEBSERVICES_DISCOVERY_SERVICE,
+                SessionParameter.WEBSERVICES_DISCOVERY_SERVICE_ENDPOINT),
+
+        MULTIFILING_SERVICE("MultiFilingService", false, MultiFilingService.class, MultiFilingServicePort.class,
+                MultiFilingServicePort.class, SessionParameter.WEBSERVICES_MULTIFILING_SERVICE,
+                SessionParameter.WEBSERVICES_MULTIFILING_SERVICE_ENDPOINT),
+
+        RELATIONSHIP_SERVICE("RelationshipService", false, RelationshipService.class, RelationshipServicePort.class,
+                RelationshipServicePort.class, SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE,
+                SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE_ENDPOINT),
+
+        POLICY_SERVICE("PolicyService", false, PolicyService.class, PolicyServicePort.class, PolicyServicePort.class,
+                SessionParameter.WEBSERVICES_POLICY_SERVICE, SessionParameter.WEBSERVICES_POLICY_SERVICE_ENDPOINT),
+
+        ACL_SERVICE("ACLService", false, ACLService.class, ACLServicePort.class, ACLServicePort.class,
+                SessionParameter.WEBSERVICES_ACL_SERVICE, SessionParameter.WEBSERVICES_ACL_SERVICE_ENDPOINT);
+
+        private String name;
+        private QName qname;
+        private boolean handlesContent;
+        private Class<? extends Service> serviceClass;
+        private Class<?> port10Class;
+        private Class<?> port11Class;
+        private String wsdlKey;
+        private String endpointKey;
+
+        CmisWebSerivcesService(String localname, boolean handlesContent, Class<? extends Service> serviceClass,
+                Class<?> port10Class, Class<?> port11Class, String wsdlKey, String endpointKey) {
+            this.name = localname;
+            this.qname = new QName("http://docs.oasis-open.org/ns/cmis/ws/200908/", localname);
+            this.handlesContent = handlesContent;
+            this.serviceClass = serviceClass;
+            this.port10Class = port10Class;
+            this.port11Class = port11Class;
+            this.wsdlKey = wsdlKey;
+            this.endpointKey = endpointKey;
+        }
 
-    protected static final int CHUNK_SIZE = (64 * 1024) - 1;
+        public String getServiceName() {
+            return name;
+        }
+
+        public QName getQName() {
+            return qname;
+        }
+
+        public boolean handlesContent() {
+            return handlesContent;
+        }
+
+        public Class<? extends Service> getServiceClass() {
+            return serviceClass;
+        }
+
+        public Class<?> getPort10Class() {
+            return port10Class;
+        }
+
+        public Class<?> getPort11Class() {
+            return port11Class;
+        }
+
+        public String getWsdlKey() {
+            return wsdlKey;
+        }
+
+        public String getEndpointKey() {
+            return endpointKey;
+        }
+    }
+
+    static class CmisServiceHolder {
+        private CmisWebSerivcesService service;
+        private Service serviceObject;
+        private URL endpointUrl;
+
+        public CmisServiceHolder(CmisWebSerivcesService service, Service serviceObject, URL endpointUrl) {
+            this.service = service;
+            this.serviceObject = serviceObject;
+            this.endpointUrl = endpointUrl;
+        }
+
+        public CmisWebSerivcesService getService() {
+            return service;
+        }
+
+        public Service getServiceObject() {
+            return serviceObject;
+        }
+
+        public URL getEndpointUrl() {
+            return endpointUrl;
+        }
+
+        public String getServiceName() {
+            return service.getServiceName();
+        }
+    }
 
     private BindingSession session;
     protected boolean useCompression;
@@ -106,68 +214,68 @@ public abstract class AbstractPortProvid
      * Return the Repository Service port object.
      */
     public RepositoryServicePort getRepositoryServicePort() {
-        return (RepositoryServicePort) getPortObject(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE);
+        return (RepositoryServicePort) getPortObject(CmisWebSerivcesService.REPOSITORY_SERVICE);
     }
 
     /**
      * Return the Navigation Service port object.
      */
     public NavigationServicePort getNavigationServicePort() {
-        return (NavigationServicePort) getPortObject(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE);
+        return (NavigationServicePort) getPortObject(CmisWebSerivcesService.NAVIGATION_SERVICE);
     }
 
     /**
      * Return the Object Service port object.
      */
     public ObjectServicePort getObjectServicePort() {
-        return (ObjectServicePort) getPortObject(SessionParameter.WEBSERVICES_OBJECT_SERVICE);
+        return (ObjectServicePort) getPortObject(CmisWebSerivcesService.OBJECT_SERVICE);
     }
 
     /**
      * Return the Versioning Service port object.
      */
     public VersioningServicePort getVersioningServicePort() {
-        return (VersioningServicePort) getPortObject(SessionParameter.WEBSERVICES_VERSIONING_SERVICE);
+        return (VersioningServicePort) getPortObject(CmisWebSerivcesService.VERSIONING_SERVICE);
     }
 
     /**
      * Return the Discovery Service port object.
      */
     public DiscoveryServicePort getDiscoveryServicePort() {
-        return (DiscoveryServicePort) getPortObject(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE);
+        return (DiscoveryServicePort) getPortObject(CmisWebSerivcesService.DISCOVERY_SERVICE);
     }
 
     /**
      * Return the MultiFiling Service port object.
      */
     public MultiFilingServicePort getMultiFilingServicePort() {
-        return (MultiFilingServicePort) getPortObject(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE);
+        return (MultiFilingServicePort) getPortObject(CmisWebSerivcesService.MULTIFILING_SERVICE);
     }
 
     /**
      * Return the Relationship Service port object.
      */
     public RelationshipServicePort getRelationshipServicePort() {
-        return (RelationshipServicePort) getPortObject(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE);
+        return (RelationshipServicePort) getPortObject(CmisWebSerivcesService.RELATIONSHIP_SERVICE);
     }
 
     /**
      * Return the Policy Service port object.
      */
     public PolicyServicePort getPolicyServicePort() {
-        return (PolicyServicePort) getPortObject(SessionParameter.WEBSERVICES_POLICY_SERVICE);
+        return (PolicyServicePort) getPortObject(CmisWebSerivcesService.POLICY_SERVICE);
     }
 
     /**
      * Return the ACL Service port object.
      */
     public ACLServicePort getACLServicePort() {
-        return (ACLServicePort) getPortObject(SessionParameter.WEBSERVICES_ACL_SERVICE);
+        return (ACLServicePort) getPortObject(CmisWebSerivcesService.ACL_SERVICE);
     }
 
     public void endCall(Object portObject) {
         AuthenticationProvider authProvider = CmisBindingsHelper.getAuthenticationProvider(session);
-        if (authProvider != null) {
+        if (authProvider != null && portObject instanceof BindingProvider) {
             BindingProvider bp = (BindingProvider) portObject;
             String url = (String) bp.getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
             @SuppressWarnings("unchecked")
@@ -180,101 +288,98 @@ public abstract class AbstractPortProvid
 
     // ---- internal ----
 
-    /**
-     * Gets a port object from the session or (re-)initializes the port objects.
-     */
     @SuppressWarnings("unchecked")
-    protected Object getPortObject(String serviceKey) {
-        Map<String, Service> serviceMap = (Map<String, Service>) session.get(SpiSessionParameter.SERVICES);
+    protected BindingProvider getPortObject(CmisWebSerivcesService service) {
+        Map<String, CmisServiceHolder> serviceMap = (Map<String, CmisServiceHolder>) session
+                .get(SpiSessionParameter.SERVICES);
 
         // does the service map exist?
         if (serviceMap == null) {
             session.writeLock();
             try {
                 // try again
-                serviceMap = (Map<String, Service>) session.get(SpiSessionParameter.SERVICES);
+                serviceMap = (Map<String, CmisServiceHolder>) session.get(SpiSessionParameter.SERVICES);
                 if (serviceMap == null) {
-                    serviceMap = Collections.synchronizedMap(new HashMap<String, Service>());
+                    serviceMap = Collections.synchronizedMap(new HashMap<String, CmisServiceHolder>());
                     session.put(SpiSessionParameter.SERVICES, serviceMap, true);
                 }
 
-                if (serviceMap.containsKey(serviceKey)) {
-                    return createPortObject(serviceMap.get(serviceKey));
+                if (serviceMap.containsKey(service.getServiceName())) {
+                    return createPortObject(serviceMap.get(service.getServiceName()));
                 }
 
                 // create service object
-                Service serviceObject = initServiceObject(serviceKey);
-                serviceMap.put(serviceKey, serviceObject);
+                CmisServiceHolder serviceholder = initServiceObject(service);
+                serviceMap.put(service.getServiceName(), serviceholder);
 
                 // create port object
-                return createPortObject(serviceObject);
+                return createPortObject(serviceholder);
             } finally {
                 session.writeUnlock();
             }
         }
 
         // is the service in the service map?
-        if (!serviceMap.containsKey(serviceKey)) {
+        if (!serviceMap.containsKey(service.getServiceName())) {
             session.writeLock();
             try {
                 // try again
-                if (serviceMap.containsKey(serviceKey)) {
-                    return createPortObject(serviceMap.get(serviceKey));
+                if (serviceMap.containsKey(service.getServiceName())) {
+                    return createPortObject(serviceMap.get(service.getServiceName()));
                 }
 
                 // create object
-                Service serviceObject = initServiceObject(serviceKey);
-                serviceMap.put(serviceKey, serviceObject);
+                CmisServiceHolder serviceholder = initServiceObject(service);
+                serviceMap.put(service.getServiceName(), serviceholder);
 
-                return createPortObject(serviceObject);
+                return createPortObject(serviceholder);
             } finally {
                 session.writeUnlock();
             }
         }
 
-        return createPortObject(serviceMap.get(serviceKey));
+        return createPortObject(serviceMap.get(service.getServiceName()));
     }
 
     /**
      * Creates a service object.
      */
-    protected Service initServiceObject(String serviceKey) {
-
-        if (log.isDebugEnabled()) {
-            log.debug("Initializing Web Service " + serviceKey + "...");
+    protected CmisServiceHolder initServiceObject(CmisWebSerivcesService service) {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Initializing Web Service " + service.getServiceName() + "...");
         }
 
-        Service serviceObject;
         try {
-            // get WSDL URL
-            URL wsdlUrl = new URL((String) session.get(serviceKey));
-
-            // build the requested service object
-            if (SessionParameter.WEBSERVICES_REPOSITORY_SERVICE.equals(serviceKey)) {
-                serviceObject = new RepositoryService(wsdlUrl, new QName(CMIS_NAMESPACE, REPOSITORY_SERVICE));
-            } else if (SessionParameter.WEBSERVICES_NAVIGATION_SERVICE.equals(serviceKey)) {
-                serviceObject = new NavigationService(wsdlUrl, new QName(CMIS_NAMESPACE, NAVIGATION_SERVICE));
-            } else if (SessionParameter.WEBSERVICES_OBJECT_SERVICE.equals(serviceKey)) {
-                serviceObject = new ObjectService(wsdlUrl, new QName(CMIS_NAMESPACE, OBJECT_SERVICE));
-            } else if (SessionParameter.WEBSERVICES_VERSIONING_SERVICE.equals(serviceKey)) {
-                serviceObject = new VersioningService(wsdlUrl, new QName(CMIS_NAMESPACE, VERSIONING_SERVICE));
-            } else if (SessionParameter.WEBSERVICES_DISCOVERY_SERVICE.equals(serviceKey)) {
-                serviceObject = new DiscoveryService(wsdlUrl, new QName(CMIS_NAMESPACE, DISCOVERY_SERVICE));
-            } else if (SessionParameter.WEBSERVICES_MULTIFILING_SERVICE.equals(serviceKey)) {
-                serviceObject = new MultiFilingService(wsdlUrl, new QName(CMIS_NAMESPACE, MULTIFILING_SERVICE));
-            } else if (SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE.equals(serviceKey)) {
-                serviceObject = new RelationshipService(wsdlUrl, new QName(CMIS_NAMESPACE, RELATIONSHIP_SERVICE));
-            } else if (SessionParameter.WEBSERVICES_POLICY_SERVICE.equals(serviceKey)) {
-                serviceObject = new PolicyService(wsdlUrl, new QName(CMIS_NAMESPACE, POLICY_SERVICE));
-            } else if (SessionParameter.WEBSERVICES_ACL_SERVICE.equals(serviceKey)) {
-                serviceObject = new ACLService(wsdlUrl, new QName(CMIS_NAMESPACE, ACL_SERVICE));
+            // get URLs
+            URL wsdlUrl = null;
+            URL endpointUrl = null;
+
+            String wsdlUrlStr = (String) session.get(service.getWsdlKey());
+            if (wsdlUrlStr != null) {
+                wsdlUrl = new URL(wsdlUrlStr);
             } else {
-                throw new CmisRuntimeException("Cannot find Web Services service object [" + serviceKey + "]!");
+                String endpointUrlStr = (String) session.get(service.getEndpointKey());
+                if (endpointUrlStr != null) {
+                    endpointUrl = new URL(endpointUrlStr);
+                }
+            }
+
+            if (wsdlUrl == null && endpointUrl == null) {
+                throw new CmisRuntimeException("Neither a WSDL URL nor an endpoint URL is specified for the service "
+                        + service.getServiceName() + "!");
             }
+
+            // build the requested service object
+            Constructor<? extends Service> serviceConstructor = service.getServiceClass().getConstructor(
+                    new Class<?>[] { URL.class, QName.class });
+            Service serviceObject = serviceConstructor.newInstance(new Object[] { wsdlUrl, service.getQName() });
+
+            return new CmisServiceHolder(service, serviceObject, endpointUrl);
         } catch (CmisBaseException ce) {
             throw ce;
         } catch (Exception e) {
-            String message = "Cannot initalize Web Services service object [" + serviceKey + "]: " + e.getMessage();
+            String message = "Cannot initalize Web Services service object [" + service.getServiceName() + "]: "
+                    + e.getMessage();
 
             if (e instanceof HTTPException) {
                 HTTPException he = (HTTPException) e;
@@ -287,11 +392,12 @@ public abstract class AbstractPortProvid
 
             throw new CmisConnectionException(message, e);
         }
-
-        return serviceObject;
     }
 
-    protected void setHTTPHeaders(Object portObject, Map<String, List<String>> httpHeaders) {
+    /**
+     * Sets the default HTTP headers on a {@link BindingProvider} object.
+     */
+    protected void setHTTPHeaders(BindingProvider portObject, Map<String, List<String>> httpHeaders) {
         if (httpHeaders == null) {
             httpHeaders = new HashMap<String, List<String>>();
         }
@@ -314,11 +420,31 @@ public abstract class AbstractPortProvid
             httpHeaders.put("Accept-Language", Collections.singletonList(acceptLanguage));
         }
 
-        ((BindingProvider) portObject).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders);
+        portObject.getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders);
+    }
+
+    /**
+     * Sets the endpoint URL if the URL is not <code>null</code>.
+     */
+    protected void setEndpointUrl(BindingProvider portObject, URL endpointUrl) {
+        if (endpointUrl == null) {
+            return;
+        }
+
+        portObject.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointUrl.toString());
+    }
+
+    /**
+     * Creates a simple port object from a CmisServiceHolder object.
+     */
+    protected BindingProvider createPortObjectFromServiceHolder(CmisServiceHolder serviceHolder,
+            WebServiceFeature... features) {
+        return (BindingProvider) serviceHolder.getServiceObject().getPort(serviceHolder.getService().getPort10Class(),
+                features);
     }
 
     /**
      * Creates a port object.
      */
-    protected abstract Object createPortObject(Service service);
+    protected abstract BindingProvider createPortObject(CmisServiceHolder serviceHolder);
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java?rev=1467986&r1=1467985&r2=1467986&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java Mon Apr 15 12:47:08 2013
@@ -63,7 +63,7 @@ public class CmisWebServicesSpi implemen
 
         String portProviderClass = (String) session.get(SessionParameter.WEBSERVICES_PORT_PROVIDER_CLASS);
         if (portProviderClass == null) {
-            portProvider = new PortProvider();
+            portProvider = new SunPortProvider();
         } else {
             Object portProviderObj = null;
 

Added: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunPortProvider.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunPortProvider.java?rev=1467986&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunPortProvider.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunPortProvider.java Mon Apr 15 12:47:08 2013
@@ -0,0 +1,129 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.client.bindings.spi.webservices;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLSocketFactory;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.soap.MTOMFeature;
+
+import org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingsHelper;
+import org.apache.chemistry.opencmis.commons.SessionParameter;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException;
+import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Element;
+
+import com.sun.xml.ws.api.message.Headers;
+import com.sun.xml.ws.developer.JAXWSProperties;
+import com.sun.xml.ws.developer.StreamingAttachmentFeature;
+import com.sun.xml.ws.developer.WSBindingProvider;
+
+/**
+ * Provides CMIS Web Services port objects for JAX-WS RI. Handles authentication
+ * headers.
+ */
+public class SunPortProvider extends AbstractPortProvider {
+    private static final Logger LOG = LoggerFactory.getLogger(SunPortProvider.class);
+
+    /**
+     * Creates a port object.
+     */
+    protected BindingProvider createPortObject(CmisServiceHolder serviceHolder) {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Creating Web Service port object of " + serviceHolder.getServiceName() + "...");
+        }
+
+        try {
+            // prepare features
+            WebServiceFeature[] features;
+            if (serviceHolder.getService().handlesContent()) {
+                int threshold = getSession().get(SessionParameter.WEBSERVICES_MEMORY_THRESHOLD, 4 * 1024 * 1024);
+                features = new WebServiceFeature[] { new MTOMFeature(),
+                        new StreamingAttachmentFeature(null, true, threshold) };
+            } else {
+                features = new WebServiceFeature[] { new MTOMFeature() };
+            }
+
+            // create port object
+            BindingProvider portObject = createPortObjectFromServiceHolder(serviceHolder, features);
+
+            // set streaming for services that transport content
+            if (serviceHolder.getService().handlesContent()) {
+                ((BindingProvider) portObject).getRequestContext().put(
+                        JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, CHUNK_SIZE);
+            }
+
+            // add SOAP and HTTP authentication headers
+            AuthenticationProvider authProvider = CmisBindingsHelper.getAuthenticationProvider(getSession());
+            Map<String, List<String>> httpHeaders = null;
+            if (authProvider != null) {
+                // SOAP header
+                Element soapHeader = authProvider.getSOAPHeaders(portObject);
+                if (soapHeader != null) {
+                    ((WSBindingProvider) portObject).setOutboundHeaders(Headers.create(soapHeader));
+                }
+
+                // HTTP header
+                String url = (serviceHolder.getEndpointUrl() != null ? serviceHolder.getEndpointUrl().toString()
+                        : serviceHolder.getServiceObject().getWSDLDocumentLocation().toString());
+                httpHeaders = authProvider.getHTTPHeaders(url);
+
+                SSLSocketFactory sf = authProvider.getSSLSocketFactory();
+                if (sf != null) {
+                    portObject.getRequestContext().put(JAXWSProperties.SSL_SOCKET_FACTORY, sf);
+                }
+
+                HostnameVerifier hv = authProvider.getHostnameVerifier();
+                if (hv != null) {
+                    portObject.getRequestContext().put(JAXWSProperties.HOSTNAME_VERIFIER, hv);
+                }
+            }
+
+            // set HTTP headers
+            setHTTPHeaders(portObject, httpHeaders);
+
+            // set endpoint URL
+            setEndpointUrl(portObject, serviceHolder.getEndpointUrl());
+
+            // timeouts
+            int connectTimeout = getSession().get(SessionParameter.CONNECT_TIMEOUT, -1);
+            if (connectTimeout >= 0) {
+                portObject.getRequestContext().put(JAXWSProperties.CONNECT_TIMEOUT, connectTimeout);
+            }
+
+            int readTimeout = getSession().get(SessionParameter.READ_TIMEOUT, -1);
+            if (readTimeout >= 0) {
+                portObject.getRequestContext().put("com.sun.xml.ws.request.timeout", readTimeout);
+            }
+
+            return portObject;
+        } catch (CmisBaseException ce) {
+            throw ce;
+        } catch (Exception e) {
+            throw new CmisConnectionException("Cannot initalize Web Services port object: " + e.getMessage(), e);
+        }
+    }
+}

Propchange: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunPortProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java?rev=1467986&r1=1467985&r2=1467986&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java Mon Apr 15 12:47:08 2013
@@ -31,23 +31,12 @@ import javax.xml.transform.TransformerFa
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
 import javax.xml.ws.soap.MTOMFeature;
 
 import org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingsHelper;
 import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException;
-import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.ACLService;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.DiscoveryService;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.MultiFilingService;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.NavigationService;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.ObjectService;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.PolicyService;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.RelationshipService;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.RepositoryService;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.VersioningService;
 import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -58,41 +47,19 @@ import org.w3c.dom.Element;
  * headers.
  */
 public class WebSpherePortProvider extends AbstractPortProvider {
-    private static final Logger log = LoggerFactory.getLogger(WebSpherePortProvider.class);
+    private static final Logger LOG = LoggerFactory.getLogger(WebSpherePortProvider.class);
 
     /**
      * Creates a port object.
      */
-    protected Object createPortObject(Service service) {
-
-        if (log.isDebugEnabled()) {
-            log.debug("Creating Web Service port object of " + (service == null ? "???" : service.getServiceName())
-                    + "...");
+    protected BindingProvider createPortObject(CmisServiceHolder serviceHolder) {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Creating Web Service port object of " + serviceHolder.getServiceName() + "...");
         }
 
-        Object portObject;
         try {
-            if (service instanceof RepositoryService) {
-                portObject = ((RepositoryService) service).getRepositoryServicePort(new MTOMFeature());
-            } else if (service instanceof NavigationService) {
-                portObject = ((NavigationService) service).getNavigationServicePort(new MTOMFeature());
-            } else if (service instanceof ObjectService) {
-                portObject = ((ObjectService) service).getObjectServicePort(new MTOMFeature());
-            } else if (service instanceof VersioningService) {
-                portObject = ((VersioningService) service).getVersioningServicePort(new MTOMFeature());
-            } else if (service instanceof DiscoveryService) {
-                portObject = ((DiscoveryService) service).getDiscoveryServicePort(new MTOMFeature());
-            } else if (service instanceof MultiFilingService) {
-                portObject = ((MultiFilingService) service).getMultiFilingServicePort(new MTOMFeature());
-            } else if (service instanceof RelationshipService) {
-                portObject = ((RelationshipService) service).getRelationshipServicePort(new MTOMFeature());
-            } else if (service instanceof PolicyService) {
-                portObject = ((PolicyService) service).getPolicyServicePort(new MTOMFeature());
-            } else if (service instanceof ACLService) {
-                portObject = ((ACLService) service).getACLServicePort(new MTOMFeature());
-            } else {
-                throw new CmisRuntimeException("Cannot find Web Services service object!");
-            }
+            // create port object
+            BindingProvider portObject = createPortObjectFromServiceHolder(serviceHolder, new MTOMFeature());
 
             // add SOAP and HTTP authentication headers
             AuthenticationProvider authProvider = CmisBindingsHelper.getAuthenticationProvider(getSession());
@@ -110,17 +77,21 @@ public class WebSpherePortProvider exten
                     Map<QName, List<String>> header = new HashMap<QName, List<String>>();
                     header.put(new QName(soapHeader.getNamespaceURI(), soapHeader.getLocalName()),
                             Collections.singletonList(headerXml.toString()));
-                    ((BindingProvider) portObject).getRequestContext().put("jaxws.binding.soap.headers.outbound",
-                            header);
+                    portObject.getRequestContext().put("jaxws.binding.soap.headers.outbound", header);
                 }
 
                 // HTTP header
-                httpHeaders = authProvider.getHTTPHeaders(service.getWSDLDocumentLocation().toString());
+                String url = (serviceHolder.getEndpointUrl() != null ? serviceHolder.getEndpointUrl().toString()
+                        : serviceHolder.getServiceObject().getWSDLDocumentLocation().toString());
+                httpHeaders = authProvider.getHTTPHeaders(url);
             }
 
             // set HTTP headers
             setHTTPHeaders(portObject, httpHeaders);
 
+            // set endpoint URL
+            setEndpointUrl(portObject, serviceHolder.getEndpointUrl());
+
             // timeouts
             int connectTimeout = getSession().get(SessionParameter.CONNECT_TIMEOUT, -1);
             if (connectTimeout >= 0) {
@@ -131,12 +102,12 @@ public class WebSpherePortProvider exten
             if (readTimeout >= 0) {
                 ((BindingProvider) portObject).getRequestContext().put("request_timeout", readTimeout);
             }
+
+            return portObject;
         } catch (CmisBaseException ce) {
             throw ce;
         } catch (Exception e) {
             throw new CmisConnectionException("Cannot initalize Web Services port object: " + e.getMessage(), e);
         }
-
-        return portObject;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java?rev=1467986&r1=1467985&r2=1467986&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java Mon Apr 15 12:47:08 2013
@@ -51,6 +51,18 @@ public final class SessionParameter {
     public static final String WEBSERVICES_MULTIFILING_SERVICE = "org.apache.chemistry.opencmis.binding.webservices.MultiFilingService";
     public static final String WEBSERVICES_POLICY_SERVICE = "org.apache.chemistry.opencmis.binding.webservices.PolicyService";
     public static final String WEBSERVICES_ACL_SERVICE = "org.apache.chemistry.opencmis.binding.webservices.ACLService";
+
+    /** Endpoint URLs for Web Services. */
+    public static final String WEBSERVICES_REPOSITORY_SERVICE_ENDPOINT = "org.apache.chemistry.opencmis.binding.webservices.RepositoryService.endpoint";
+    public static final String WEBSERVICES_NAVIGATION_SERVICE_ENDPOINT = "org.apache.chemistry.opencmis.binding.webservices.NavigationService.endpoint";
+    public static final String WEBSERVICES_OBJECT_SERVICE_ENDPOINT = "org.apache.chemistry.opencmis.binding.webservices.ObjectService.endpoint";
+    public static final String WEBSERVICES_VERSIONING_SERVICE_ENDPOINT = "org.apache.chemistry.opencmis.binding.webservices.VersioningService.endpoint";
+    public static final String WEBSERVICES_DISCOVERY_SERVICE_ENDPOINT = "org.apache.chemistry.opencmis.binding.webservices.DiscoveryService.endpoint";
+    public static final String WEBSERVICES_RELATIONSHIP_SERVICE_ENDPOINT = "org.apache.chemistry.opencmis.binding.webservices.RelationshipService.endpoint";
+    public static final String WEBSERVICES_MULTIFILING_SERVICE_ENDPOINT = "org.apache.chemistry.opencmis.binding.webservices.MultiFilingService.endpoint";
+    public static final String WEBSERVICES_POLICY_SERVICE_ENDPOINT = "org.apache.chemistry.opencmis.binding.webservices.PolicyService.endpoint";
+    public static final String WEBSERVICES_ACL_SERVICE_ENDPOINT = "org.apache.chemistry.opencmis.binding.webservices.ACLService.endpoint";
+
     public static final String WEBSERVICES_MEMORY_THRESHOLD = "org.apache.chemistry.opencmis.binding.webservices.memoryThreshold";
 
     public static final String WEBSERVICES_PORT_PROVIDER_CLASS = "org.apache.chemistry.opencmis.binding.webservices.portprovider.classname";

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml?rev=1467986&r1=1467985&r2=1467986&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml Mon Apr 15 12:47:08 2013
@@ -69,7 +69,7 @@
                             <goal>wsimport</goal>
                         </goals>
                         <configuration>
-                            <wsdlDirectory>${project.basedir}/src/main/resources/wsdl</wsdlDirectory>
+                            <wsdlDirectory>${project.basedir}/src/main/resources/wsdl/cmis11</wsdlDirectory>
                             <wsdlFiles>
                                 <wsdlFile>CMISWS-Service.wsdl</wsdlFile>
                             </wsdlFiles>

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java?rev=1467986&r1=1467985&r2=1467986&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/UrlBuilder.java Mon Apr 15 12:47:08 2013
@@ -133,6 +133,25 @@ public class UrlBuilder {
     }
 
     /**
+     * Adds a parameter without value to the URL.
+     * 
+     * @param name
+     *            parameter name
+     */
+    public UrlBuilder addParameter(String name) {
+        if (name == null) {
+            return this;
+        }
+
+        if (queryPart.length() > 0) {
+            queryPart.append('&');
+        }
+        queryPart.append(name);
+
+        return this;
+    }
+
+    /**
      * Adds a path segment to the URL.
      * 
      * @param pathSegment

Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/ObjectServicePort10.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/ObjectServicePort10.java?rev=1467986&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/ObjectServicePort10.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/ObjectServicePort10.java Mon Apr 15 12:47:08 2013
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.commons.impl.webservices;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Holder;
+
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisAccessControlListType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisBulkUpdateType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisContentStreamType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisException;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectIdAndChangeTokenType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.ObjectFactory;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.ObjectServicePort;
+
+@WebService(name = "ObjectServicePort", targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/")
+@XmlSeeAlso({ ObjectFactory.class })
+public interface ObjectServicePort10 extends ObjectServicePort {
+
+    @WebMethod(action = "createItem", exclude = true)
+    public void createItem(String repositoryId, CmisPropertiesType properties, String folderId,
+            CmisAccessControlListType addACEs, CmisAccessControlListType removeACEs,
+            Holder<CmisExtensionType> extension, Holder<String> objectId) throws CmisException;
+
+    @WebMethod(action = "bulkUpdateProperties", exclude = true)
+    public void bulkUpdateProperties(String repositoryId, CmisBulkUpdateType bulkUpdateData,
+            Holder<CmisExtensionType> extension, Holder<CmisObjectIdAndChangeTokenType> objectIdAndChangeToken)
+            throws CmisException;
+
+    @WebMethod(action = "appendContentStream", exclude = true)
+    public void appendContentStream(String repositoryId, Holder<String> objectId, Boolean isLastChunk,
+            Holder<String> changeToken, CmisContentStreamType contentStream, Holder<CmisExtensionType> extension)
+            throws CmisException;
+}

Propchange: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/ObjectServicePort10.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/RepositoryServicePort10.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/RepositoryServicePort10.java?rev=1467986&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/RepositoryServicePort10.java (added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/RepositoryServicePort10.java Mon Apr 15 12:47:08 2013
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+package org.apache.chemistry.opencmis.commons.impl.webservices;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Holder;
+
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisException;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.ObjectFactory;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.RepositoryServicePort;
+
+@WebService(name = "RepositoryServicePort", targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200908/")
+@XmlSeeAlso({ ObjectFactory.class })
+public interface RepositoryServicePort10 extends RepositoryServicePort {
+
+    @WebMethod(action = "createType", exclude = true)
+    public void createType(String repositoryId, Holder<CmisTypeDefinitionType> type, CmisExtensionType extension)
+            throws CmisException;
+
+    @WebMethod(action = "updateType", exclude = true)
+    public void updateType(String repositoryId, Holder<CmisTypeDefinitionType> type, CmisExtensionType extension)
+            throws CmisException;
+
+    @WebMethod(action = "deleteType", exclude = true)
+    public void deleteType(String repositoryId, String typeId, Holder<CmisExtensionType> extension)
+            throws CmisException;
+}

Propchange: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/webservices/RepositoryServicePort10.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message