chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1735804 - in /chemistry/opencmis/trunk: ./ chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/ chemistry-opencmis-server/chemistry-opencmis-server-bindings/ chemistry-opencmis-server/chemistry-opencmis...
Date Sat, 19 Mar 2016 19:22:54 GMT
Author: fmui
Date: Sat Mar 19 19:22:54 2016
New Revision: 1735804

URL: http://svn.apache.org/viewvc?rev=1735804&view=rev
Log:
removed Spring dependency

Removed:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/cxf-servlet.xml
Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml
    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/pom.xml

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml?rev=1735804&r1=1735803&r2=1735804&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml
Sat Mar 19 19:22:54 2016
@@ -59,11 +59,6 @@
             <artifactId>cxf-rt-transports-http</artifactId>
             <version>${cxf.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
         <!-- server-support is not a *runtime* dependency but it's added for commodity
in the WAR -->
         <dependency>
             <groupId>${project.groupId}</groupId>

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java?rev=1735804&r1=1735803&r2=1735804&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java
Sat Mar 19 19:22:54 2016
@@ -44,14 +44,14 @@ import org.apache.chemistry.opencmis.ser
 import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
-import org.apache.cxf.transport.servlet.CXFServlet;
+import org.apache.cxf.transport.servlet.CXFNonSpringServlet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * CMIS Web Services servlet.
  */
-public class CmisWebServicesServlet extends CXFServlet {
+public class CmisWebServicesServlet extends CXFNonSpringServlet {
 
     public static final String PARAM_CMIS_VERSION = "cmisVersion";
     public static final String CMIS_VERSION = "org.apache.chemistry.opencmis.cmisVersion";
@@ -176,10 +176,10 @@ public class CmisWebServicesServlet exte
 
         String respDoc = doc;
         respDoc = BASE_PATTERN.matcher(respDoc).replaceAll(baseUrl.toString());
-        respDoc = CORE_PATTERN.matcher(respDoc).replaceAll(
-                (new UrlBuilder(baseUrl)).addPath("cmis").addParameter("core").toString());
-        respDoc = MSG_PATTERN.matcher(respDoc).replaceAll(
-                (new UrlBuilder(baseUrl)).addPath("cmis").addParameter("msg").toString());
+        respDoc = CORE_PATTERN.matcher(respDoc)
+                .replaceAll((new UrlBuilder(baseUrl)).addPath("cmis").addParameter("core").toString());
+        respDoc = MSG_PATTERN.matcher(respDoc)
+                .replaceAll((new UrlBuilder(baseUrl)).addPath("cmis").addParameter("msg").toString());
 
         PrintWriter pw = response.getWriter();
         pw.print(respDoc);
@@ -192,14 +192,12 @@ public class CmisWebServicesServlet exte
         response.setContentType("text/html");
         response.setCharacterEncoding(IOUtils.UTF8);
 
-        String urlEscaped = StringEscapeUtils.escapeHtml4((new UrlBuilder(baseUrl)).addPath("cmis")
-                .addParameter("wsdl").toString());
+        String urlEscaped = StringEscapeUtils
+                .escapeHtml4((new UrlBuilder(baseUrl)).addPath("cmis").addParameter("wsdl").toString());
 
         PrintWriter pw = response.getWriter();
 
-        pw.print("<html><head><title>Apache Chemistry OpenCMIS - CMIS "
-                + cmisVersion.value()
-                + " Web Services</title>"
+        pw.print("<html><head><title>Apache Chemistry OpenCMIS - CMIS "
+ cmisVersion.value() + " Web Services</title>"
                 + "<style><!--H1 {font-size:24px;line-height:normal;font-weight:bold;background-color:#f0f0f0;color:#003366;border-bottom:1px
solid #3c78b5;padding:2px;} "
                 + "BODY {font-family:Verdana,arial,sans-serif;color:black;font-size:14px;}
"
                 + "HR {color:#3c78b5;height:1px;}--></style></head><body>");
@@ -256,7 +254,7 @@ public class CmisWebServicesServlet exte
     }
 
     @Override
-    public void loadBus(ServletConfig servletConfig) {
+    protected void loadBus(ServletConfig servletConfig) {
         super.loadBus(servletConfig);
 
         CmisServiceFactory factory = CmisRepositoryContextListener.getServiceFactory(servletConfig.getServletContext());
@@ -267,6 +265,7 @@ public class CmisWebServicesServlet exte
 
         Bus bus = getBus();
         BusFactory.setDefaultBus(bus);
+
         if (factory.getTempDirectory() != null) {
             bus.setProperty("bus.io.CachedOutputStream.OutputDirectory", factory.getTempDirectory().getAbsolutePath());
         }
@@ -278,6 +277,8 @@ public class CmisWebServicesServlet exte
             bus.setProperty("bus.io.CachedOutputStream.CipherTransformation", "AES/CTR/PKCS5Padding");
         }
 
+        configureInterceptors(bus);
+
         if (cmisVersion == CmisVersion.CMIS_1_0) {
             publish("/RepositoryService", new RepositoryService10());
             publish("/NavigationService", new NavigationService());
@@ -301,6 +302,16 @@ public class CmisWebServicesServlet exte
         }
     }
 
+    /**
+     * Adds and configures interceptors for OpenCMIS.
+     * 
+     * Override this method to add more interceptors.
+     */
+    protected void configureInterceptors(Bus bus) {
+        bus.getInInterceptors().add(new SoapActionRemoveInterceptor());
+        bus.getInInterceptors().add(new UsernameTokenInterceptor());
+    }
+
     private Endpoint publish(String adress, Object implementor) {
         Endpoint endpoint = Endpoint.publish(adress, implementor);
         SOAPBinding binding = (SOAPBinding) endpoint.getBinding();

Modified: chemistry/opencmis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/pom.xml?rev=1735804&r1=1735803&r2=1735804&view=diff
==============================================================================
--- chemistry/opencmis/trunk/pom.xml (original)
+++ chemistry/opencmis/trunk/pom.xml Sat Mar 19 19:22:54 2016
@@ -237,8 +237,7 @@
         <slf4j.version>1.7.5</slf4j.version>
         <log4j.version>2.5</log4j.version>
         <apacheclient.version>4.2.6</apacheclient.version>
-        <cxf.version>3.0.7</cxf.version>
-        <spring.version>4.1.7.RELEASE</spring.version>
+        <cxf.version>3.0.8</cxf.version>
     </properties>
 
     <build>



Mime
View raw message