Author: fmui
Date: Sat Jul 11 20:40:12 2015
New Revision: 1690403
URL: http://svn.apache.org/r1690403
Log:
CMIS-917: changed Web Service implementation to use CXF
Added:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-jre-dependencies-assembly.xml
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/cxf-servlet.xml
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/sun-web.xml
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/SoapActionRemoveInterceptor.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/UsernameTokenInterceptor.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/assembly/workbench-jre-assembly.xml
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench-jre.bat
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench-jre.sh
Removed:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-cxf-dependencies-assembly.xml
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/sun-jaxws.xml
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractUsernameTokenAuthHandler.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AuthHandler.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/WebSphereAuthHandler.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/assembly/workbench-cxf-assembly.xml
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench-cxf.bat
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench-cxf.sh
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/Axis2PortProvider.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunJREPortProvider.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-client/chemistry-opencmis-client-impl/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-ri-dependencies-assembly.xml
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/tube/client/JreWssMUTube.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/CMIS-Messaging.xsd
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/CMIS-Messaging.xsd
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/web.xml
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/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/ObjectService10.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectServicePort10.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryService10.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryServicePort10.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/VersioningService.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/assembly/workbench-assembly.xml
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/assembly/workbench-axis2-assembly.xml
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/assembly/workbench-mac-assembly.xml
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/assembly/workbench-ri-assembly.xml
chemistry/opencmis/trunk/pom.xml
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
Sat Jul 11 20:40:12 2015
@@ -77,7 +77,6 @@
</Export-Package>
<Import-Package>
com.sun.xml.ws.*;version="[2.1.7,3.0)";resolution:=optional,
- org.apache.cxf.*;resolution:=optional,
org.apache.http.*;resolution:=optional,
org.apache.axis2.*;resolution:=optional,
*
@@ -119,6 +118,16 @@
<version>${apacheclient.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
<dependency>
<groupId>org.jvnet.mimepull</groupId>
<artifactId>mimepull</artifactId>
@@ -142,7 +151,7 @@
<exclusion>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-asl</artifactId>
- </exclusion>
+ </exclusion>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -154,18 +163,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxws</artifactId>
- <version>${cxf.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http</artifactId>
- <version>${cxf.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-jaxws</artifactId>
<version>${axis2.version}</version>
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/Axis2PortProvider.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/Axis2PortProvider.java?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/Axis2PortProvider.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/Axis2PortProvider.java
Sat Jul 11 20:40:12 2015
@@ -27,7 +27,6 @@ import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.ws.BindingProvider;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.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/ObjectServiceImpl.java?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java
Sat Jul 11 20:40:12 2015
@@ -174,7 +174,7 @@ public class ObjectServiceImpl extends A
throw new CmisNotSupportedException("Repository is a CMIS 1.0
repository!");
}
- ObjectServicePort port =
portProvider.getObjectServicePort(CmisVersion.CMIS_1_1, "createItem");
+ ObjectServicePort port =
portProvider.getObjectServicePort(CmisVersion.CMIS_1_1, "");
try {
javax.xml.ws.Holder<String> objectId = new
javax.xml.ws.Holder<String>();
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunJREPortProvider.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/SunJREPortProvider.java?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunJREPortProvider.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunJREPortProvider.java
Sat Jul 11 20:40:12 2015
@@ -67,7 +67,6 @@ public class SunJREPortProvider extends
/**
* Creates a port object.
*/
- @SuppressWarnings("restriction")
protected BindingProvider createPortObject(CmisServiceHolder
serviceHolder) {
if (LOG.isDebugEnabled()) {
LOG.debug("Session {}: Creating Web Service port object of {}
...", getSession().getSessionId(),
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=1690403&r1=1690402&r2=1690403&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
Sat Jul 11 20:40:12 2015
@@ -27,7 +27,6 @@ import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.ws.BindingProvider;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml
Sat Jul 11 20:40:12 2015
@@ -84,7 +84,7 @@
<descriptors>
<descriptor>src/main/assembly/client-with-dependencies-assembly.xml</descriptor>
<descriptor>src/main/assembly/client-with-ri-dependencies-assembly.xml</descriptor>
-
<descriptor>src/main/assembly/client-with-cxf-dependencies-assembly.xml</descriptor>
+
<descriptor>src/main/assembly/client-with-jre-dependencies-assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
@@ -120,6 +120,22 @@
<version>${osgi.version}</version>
<scope>provided</scope>
</dependency>
+ <!-- CXF -->
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-ws-policy</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
<!-- Sun RI -->
<dependency>
<groupId>org.jvnet.mimepull</groupId>
@@ -155,25 +171,6 @@
</exclusion>
</exclusions>
</dependency>
- <!-- CXF -->
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxws</artifactId>
- <version>${cxf.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http</artifactId>
- <version>${cxf.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-ws-policy</artifactId>
- <version>${cxf.version}</version>
- <scope>provided</scope>
- </dependency>
<!-- Test -->
<dependency>
<groupId>log4j</groupId>
Added:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-jre-dependencies-assembly.xml
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-jre-dependencies-assembly.xml?rev=1690403&view=auto
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-jre-dependencies-assembly.xml
(added)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-jre-dependencies-assembly.xml
Sat Jul 11 20:40:12 2015
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+-->
+
+<!--
+ This assembly is for development only and should not be released!
+-->
+<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>with-jre-dependencies</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <useProjectArtifact></useProjectArtifact>
+ <unpack>false</unpack>
+ <scope>runtime</scope>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
+ <excludes>
+ <exclude>org.apache.cxf</exclude>
+ </excludes>
+ </dependencySet>
+ <dependencySet>
+ <useProjectArtifact></useProjectArtifact>
+ <unpack>false</unpack>
+ <scope>provided</scope>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
+ <excludes>
+ <exclude>com.sun.xml.ws:jaxws-rt</exclude>
+ <exclude>org.jvnet.mimepull:mimepull</exclude>
+ <exclude>org.osgi:org.osgi.core</exclude>
+ </excludes>
+ </dependencySet>
+ </dependencySets>
+ <fileSets>
+ <!-- license, readme, etc. calculated at build time -->
+ <fileSet>
+
<directory>${project.build.directory}/maven-shared-archive-resources/META-INF</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-ri-dependencies-assembly.xml
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-ri-dependencies-assembly.xml?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-ri-dependencies-assembly.xml
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/assembly/client-with-ri-dependencies-assembly.xml
Sat Jul 11 20:40:12 2015
@@ -35,6 +35,10 @@
<useProjectArtifact></useProjectArtifact>
<unpack>false</unpack>
<scope>runtime</scope>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
+ <excludes>
+ <exclude>org.apache.cxf</exclude>
+ </excludes>
</dependencySet>
<dependencySet>
<useProjectArtifact></useProjectArtifact>
@@ -42,7 +46,7 @@
<scope>provided</scope>
<useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
- <exclude>org.apache.cxf</exclude>
+ <exclude>org.osgi:org.osgi.core</exclude>
</excludes>
</dependencySet>
</dependencySets>
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=1690403&r1=1690402&r2=1690403&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
Sat Jul 11 20:40:12 2015
@@ -113,29 +113,32 @@
</executions>
</plugin>
<plugin>
- <groupId>org.jvnet.jax-ws-commons</groupId>
- <artifactId>jaxws-maven-plugin</artifactId>
- <version>2.2</version>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>${cxf.version}</version>
<executions>
<execution>
+ <id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
- <goal>wsimport</goal>
+ <goal>wsdl2java</goal>
</goals>
<configuration>
-
<wsdlDirectory>${project.basedir}/src/main/resources/wsdl/cmis11</wsdlDirectory>
- <wsdlFiles>
- <wsdlFile>CMISWS-Service.wsdl</wsdlFile>
- </wsdlFiles>
-
<packageName>org.apache.chemistry.opencmis.commons.impl.jaxb</packageName>
- <destdir />
-
<sourceDestDir>${project.basedir}/target/generated</sourceDestDir>
- <extension>true</extension>
- <target>2.1</target>
+
<sourceRoot>${project.basedir}/target/generated</sourceRoot>
+ <wsdlOptions>
+ <wsdlOption>
+
<wsdl>${project.basedir}/src/main/resources/wsdl/cmis11/CMISWS-Service.wsdl</wsdl>
+ <extraargs>
+ <extraarg>-verbose</extraarg>
+ <extraarg>-p</extraarg>
+
<extraarg>org.apache.chemistry.opencmis.commons.impl.jaxb</extraarg>
+ </extraargs>
+ </wsdlOption>
+ </wsdlOptions>
</configuration>
</execution>
</executions>
- </plugin>
+ </plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/client/JreWssMUTube.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/tube/client/JreWssMUTube.java?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/client/JreWssMUTube.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/client/JreWssMUTube.java
Sat Jul 11 20:40:12 2015
@@ -30,6 +30,7 @@ import com.sun.xml.internal.ws.api.SOAPV
import com.sun.xml.internal.ws.api.WSBinding;
import com.sun.xml.internal.ws.api.message.Header;
import com.sun.xml.internal.ws.api.message.HeaderList;
+import com.sun.xml.internal.ws.api.message.Message;
import com.sun.xml.internal.ws.api.message.Packet;
import com.sun.xml.internal.ws.api.pipe.NextAction;
import com.sun.xml.internal.ws.api.pipe.Tube;
@@ -59,7 +60,15 @@ public class JreWssMUTube extends Abstra
return super.processResponse(response);
}
- Object headersObject = response.getMessage().getHeaders();
+ Object headersObject = null;
+ Message message = response.getMessage();
+
+ try {
+ Method m = message.getClass().getMethod("getHeaders");
+ headersObject = m.invoke(new Object[0]);
+ } catch (Exception e) {
+ throw new CmisRuntimeException("Could not mark WSSE header as
understood.", e);
+ }
if (headersObject instanceof HeaderList) {
HeaderList headers = (HeaderList) headersObject;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/CMIS-Messaging.xsd
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/CMIS-Messaging.xsd?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/CMIS-Messaging.xsd
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis10/CMIS-Messaging.xsd
Sat Jul 11 20:40:12 2015
@@ -1,17 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
- <!--
- 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.
- -->
+<!-- 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. -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://docs.oasis-open.org/ns/cmis/messaging/200908/"
@@ -60,11 +55,11 @@
<xs:any minOccurs="0" maxOccurs="unbounded"
namespace="##other" />
</xs:sequence>
</xs:complexType>
-
+
<!-- types for WS -->
<xs:complexType name="cmisTypeContainer">
<xs:sequence>
- <xs:element name="type"
type="cmis:cmisTypeDefinitionType"
+ <xs:element name="type"
type="cmis:cmisTypeDefinitionType"
minOccurs="1" maxOccurs="1" />
<xs:element name="children"
type="cmism:cmisTypeContainer"
minOccurs="0" maxOccurs="unbounded" />
@@ -87,7 +82,7 @@
</xs:sequence>
<xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
</xs:complexType>
-
+
<xs:complexType name="cmisObjectInFolderContainerType">
<xs:sequence>
<xs:element name="objectInFolder"
type="cmism:cmisObjectInFolderType"
@@ -97,7 +92,7 @@
<xs:any namespace="##other" processContents="lax"
minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
- <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
+ <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
</xs:complexType>
<xs:complexType name="cmisObjectListType">
@@ -111,33 +106,33 @@
<xs:any namespace="##other" processContents="lax"
minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
- <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
+ <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
</xs:complexType>
-
+
<xs:complexType name="cmisObjectInFolderType">
<xs:sequence>
- <xs:element name="object" type="cmis:cmisObjectType"
- minOccurs="1" maxOccurs="1"/>
+ <xs:element name="object" type="cmis:cmisObjectType"
+ minOccurs="1" maxOccurs="1" />
<xs:element name="pathSegment" type="xs:string"
minOccurs="0"
maxOccurs="1" />
<xs:any namespace="##other" processContents="lax"
minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
- <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
+ <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
</xs:complexType>
<xs:complexType name="cmisObjectParentsType">
<xs:sequence>
- <xs:element name="object" type="cmis:cmisObjectType"
- minOccurs="1" maxOccurs="1"/>
- <xs:element name="relativePathSegment" type="xs:string"
minOccurs="0"
- maxOccurs="1" />
+ <xs:element name="object" type="cmis:cmisObjectType"
+ minOccurs="1" maxOccurs="1" />
+ <xs:element name="relativePathSegment" type="xs:string"
+ minOccurs="0" maxOccurs="1" />
<xs:any namespace="##other" processContents="lax"
minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
- <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
+ <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
</xs:complexType>
-
+
<xs:complexType name="cmisObjectInFolderListType">
<xs:sequence>
<xs:element name="objects"
type="cmism:cmisObjectInFolderType"
@@ -151,13 +146,13 @@
</xs:sequence>
<xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
</xs:complexType>
-
+
<xs:complexType name="cmisRepositoryEntryType">
<xs:sequence>
- <xs:element name="repositoryId" type="xs:string"
minOccurs="1"
- maxOccurs="1" />
- <xs:element name="repositoryName" type="xs:string"
minOccurs="1"
- maxOccurs="1" />
+ <xs:element name="repositoryId" type="xs:string"
+ minOccurs="1" maxOccurs="1" />
+ <xs:element name="repositoryName" type="xs:string"
+ minOccurs="1" maxOccurs="1" />
<xs:any namespace="##other" minOccurs="0"
maxOccurs="unbounded"
processContents="lax" />
</xs:sequence>
@@ -181,17 +176,17 @@
<xs:sequence>
<xs:element name="ACL"
type="cmis:cmisAccessControlListType"
minOccurs="1" maxOccurs="1" />
- <xs:element name="exact" type="xs:boolean"
- minOccurs="0" maxOccurs="1"/>
+ <xs:element name="exact" type="xs:boolean" minOccurs="0"
+ maxOccurs="1" />
<xs:any namespace="##other" processContents="lax"
minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
<xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
</xs:complexType>
-
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<!-- [Repository Services] -->
-
+
<!-- getRepositories Operation -->
<xs:element name="getRepositories">
<xs:complexType>
@@ -242,8 +237,8 @@
<xs:element name="getRepositoryInfoResponse">
<xs:complexType>
<xs:sequence>
- <xs:element name="repositoryInfo"
type="cmis:cmisRepositoryInfoType"
- minOccurs="1" maxOccurs="1"/>
+ <xs:element name="repositoryInfo"
type="cmis:cmisRepositoryInfoType"
+ minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -352,10 +347,10 @@
</xs:sequence>
</xs:complexType>
</xs:element>
-
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<!-- [Navigation Services] -->
-
+
<!-- getDescendants Operation -->
<xs:element name="getDescendants">
<xs:complexType>
@@ -410,7 +405,7 @@
maxOccurs="1" />
<xs:element name="depth" type="xs:integer"
minOccurs="0"
maxOccurs="1" nillable="true" />
-
+
<xs:element name="filter" type="xs:string"
minOccurs="0"
maxOccurs="1" nillable="true" />
<xs:element name="includeAllowableActions"
type="xs:boolean"
@@ -528,7 +523,7 @@
</xs:complexType>
</xs:element>
- <!-- getObjectParents Operation-->
+ <!-- getObjectParents Operation -->
<xs:element name="getObjectParents">
<xs:complexType>
<xs:sequence>
@@ -657,7 +652,7 @@
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<!-- [Object Services] -->
-
+
<!-- createDocument Operation -->
<xs:element name="createDocument">
<xs:complexType>
@@ -672,8 +667,8 @@
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="versioningState"
type="cmis:enumVersioningState"
minOccurs="0" maxOccurs="1"
nillable="true" />
- <xs:element name="policies" type="xs:string"
- minOccurs="0" maxOccurs="unbounded"
nillable="true" />
+ <xs:element name="policies" type="xs:string"
minOccurs="0"
+ maxOccurs="unbounded" nillable="true" />
<xs:element name="addACEs"
type="cmis:cmisAccessControlListType"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="removeACEs"
type="cmis:cmisAccessControlListType"
@@ -723,18 +718,18 @@
<xs:element name="sourceId" type="xs:string"
minOccurs="1"
maxOccurs="1" />
<xs:element name="properties"
type="cmis:cmisPropertiesType"
- minOccurs="1" maxOccurs="1" />
+ minOccurs="1" maxOccurs="1" />
<xs:element name="folderId" type="xs:string"
minOccurs="0"
maxOccurs="1" nillable="true" />
<xs:element name="versioningState"
type="cmis:enumVersioningState"
minOccurs="0" maxOccurs="1"
nillable="true" />
- <xs:element name="policies" type="xs:string"
- minOccurs="0" maxOccurs="unbounded"
nillable="true" />
+ <xs:element name="policies" type="xs:string"
minOccurs="0"
+ maxOccurs="unbounded" nillable="true" />
<xs:element name="addACEs"
type="cmis:cmisAccessControlListType"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="removeACEs"
type="cmis:cmisAccessControlListType"
minOccurs="0" maxOccurs="1"
nillable="true" />
-
+
<xs:element name="extension"
type="cmism:cmisExtensionType"
minOccurs="0" maxOccurs="1"
nillable="true">
<xs:annotation>
@@ -780,8 +775,8 @@
minOccurs="1" maxOccurs="1" />
<xs:element name="folderId" type="xs:string"
minOccurs="1"
maxOccurs="1" />
- <xs:element name="policies" type="xs:string"
- minOccurs="0" maxOccurs="unbounded"
nillable="true" />
+ <xs:element name="policies" type="xs:string"
minOccurs="0"
+ maxOccurs="unbounded" nillable="true" />
<xs:element name="addACEs"
type="cmis:cmisAccessControlListType"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="removeACEs"
type="cmis:cmisAccessControlListType"
@@ -831,8 +826,8 @@
<xs:element name="properties"
type="cmis:cmisPropertiesType"
minOccurs="1" maxOccurs="1" />
- <xs:element name="policies" type="xs:string"
- minOccurs="0" maxOccurs="unbounded"
nillable="true" />
+ <xs:element name="policies" type="xs:string"
minOccurs="0"
+ maxOccurs="unbounded" nillable="true" />
<xs:element name="addACEs"
type="cmis:cmisAccessControlListType"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="removeACEs"
type="cmis:cmisAccessControlListType"
@@ -882,8 +877,8 @@
minOccurs="1" maxOccurs="1" />
<xs:element name="folderId" type="xs:string"
minOccurs="0"
maxOccurs="1" nillable="true" />
- <xs:element name="policies" type="xs:string"
- minOccurs="0" maxOccurs="unbounded"
nillable="true" />
+ <xs:element name="policies" type="xs:string"
minOccurs="0"
+ maxOccurs="unbounded" nillable="true" />
<xs:element name="addACEs"
type="cmis:cmisAccessControlListType"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="removeACEs"
type="cmis:cmisAccessControlListType"
@@ -922,7 +917,7 @@
</xs:sequence>
</xs:complexType>
</xs:element>
-
+
<!-- getAllowableActions Operation -->
<xs:element name="getAllowableActions">
<xs:complexType>
@@ -996,8 +991,8 @@
<xs:element name="objectId" type="xs:string"
minOccurs="1"
maxOccurs="1" />
- <xs:element name="filter" type="xs:string"
- minOccurs="0" maxOccurs="1"
nillable="true" />
+ <xs:element name="filter" type="xs:string"
minOccurs="0"
+ maxOccurs="1" nillable="true" />
<xs:element name="includeAllowableActions"
type="xs:boolean"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="includeRelationships"
type="cmis:enumIncludeRelationships"
@@ -1040,8 +1035,8 @@
<xs:element name="path" type="xs:string"
minOccurs="1"
maxOccurs="1" />
- <xs:element name="filter" type="xs:string"
- minOccurs="0" maxOccurs="1"
nillable="true" />
+ <xs:element name="filter" type="xs:string"
minOccurs="0"
+ maxOccurs="1" nillable="true" />
<xs:element name="includeAllowableActions"
type="xs:boolean"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="includeRelationships"
type="cmis:enumIncludeRelationships"
@@ -1052,7 +1047,7 @@
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="includeACL" type="xs:boolean"
minOccurs="0" maxOccurs="1"
nillable="true" />
-
+
<xs:element name="extension"
type="cmism:cmisExtensionType"
minOccurs="0" maxOccurs="1"
nillable="true">
<xs:annotation>
@@ -1060,7 +1055,7 @@
This is an extension
element to hold any
repository or
vendor-specific
extensions
- </xs:documentation>
+ </xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
@@ -1089,7 +1084,7 @@
maxOccurs="1" nillable="true" />
<xs:element name="length" type="xs:integer"
minOccurs="0"
maxOccurs="1" nillable="true" />
-
+
<xs:element name="extension"
type="cmism:cmisExtensionType"
minOccurs="0" maxOccurs="1"
nillable="true">
<xs:annotation>
@@ -1097,7 +1092,7 @@
This is an extension
element to hold any
repository or
vendor-specific
extensions
- </xs:documentation>
+ </xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
@@ -1120,15 +1115,13 @@
minOccurs="1" maxOccurs="1" />
<xs:element name="objectId" type="xs:string"
minOccurs="1"
maxOccurs="1" />
- <!--
- if objectId is present in the
properties the value must match this
- objectId
- -->
+ <!-- if objectId is present in the properties
the value must match this
+ objectId -->
<xs:element name="changeToken" type="xs:string"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="properties"
type="cmis:cmisPropertiesType"
minOccurs="1" maxOccurs="1" />
-
+
<xs:element name="extension"
type="cmism:cmisExtensionType"
minOccurs="0" maxOccurs="1"
nillable="true">
<xs:annotation>
@@ -1136,7 +1129,7 @@
This is an extension
element to hold any
repository or
vendor-specific
extensions
- </xs:documentation>
+ </xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
@@ -1157,7 +1150,7 @@
This is an extension
element to hold any
repository or
vendor-specific
extensions
- </xs:documentation>
+ </xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
@@ -1378,7 +1371,7 @@
maxOccurs="1" />
<xs:element name="changeToken" type="xs:string"
minOccurs="0" maxOccurs="1" />
-
+
<xs:element name="extension"
type="cmism:cmisExtensionType"
minOccurs="0" maxOccurs="1"
nillable="true">
<xs:annotation>
@@ -1392,9 +1385,9 @@
</xs:sequence>
</xs:complexType>
</xs:element>
-
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
- <!--[Multi-filing Services]-->
+ <!--[Multi-filing Services] -->
<!-- addObjectToFolder Operation -->
<xs:element name="addObjectToFolder">
@@ -1432,7 +1425,7 @@
This is an extension
element to hold any
repository or
vendor-specific
extensions
- </xs:documentation>
+ </xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
@@ -1479,10 +1472,10 @@
</xs:sequence>
</xs:complexType>
</xs:element>
-
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<!-- [Discovery Services] -->
-
+
<!-- query Operation -->
<xs:element name="query">
<xs:complexType>
@@ -1516,7 +1509,6 @@
</xs:annotation>
</xs:element>
</xs:sequence>
- <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
</xs:complexType>
</xs:element>
<xs:element name="queryResponse">
@@ -1674,8 +1666,8 @@
<xs:element name="checkinComment"
type="xs:string"
minOccurs="0" maxOccurs="1"
nillable="true" />
- <xs:element name="policies" type="xs:string"
- minOccurs="0" maxOccurs="unbounded"
nillable="true" />
+ <xs:element name="policies" type="xs:string"
minOccurs="0"
+ maxOccurs="unbounded" nillable="true" />
<xs:element name="addACEs"
type="cmis:cmisAccessControlListType"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="removeACEs"
type="cmis:cmisAccessControlListType"
@@ -1720,8 +1712,8 @@
<xs:sequence>
<xs:element name="repositoryId" type="xs:string"
minOccurs="1" maxOccurs="1" />
- <xs:element name="objectId" type="xs:string"
- minOccurs="1" maxOccurs="1" />
+ <xs:element name="objectId" type="xs:string"
minOccurs="1"
+ maxOccurs="1" />
<xs:element name="major" type="xs:boolean"
minOccurs="0"
maxOccurs="1" />
<xs:element name="filter" type="xs:string"
minOccurs="0"
@@ -1759,8 +1751,8 @@
maxOccurs="1" />
<xs:element name="major" type="xs:boolean"
minOccurs="0"
maxOccurs="1" />
- <xs:element name="filter" type="xs:string"
- minOccurs="0" maxOccurs="1"
nillable="true" />
+ <xs:element name="filter" type="xs:string"
minOccurs="0"
+ maxOccurs="1" nillable="true" />
<xs:element name="includeAllowableActions"
type="xs:boolean"
minOccurs="0" maxOccurs="1"
nillable="true" />
<xs:element name="includeRelationships"
type="cmis:enumIncludeRelationships"
@@ -1800,8 +1792,8 @@
<xs:sequence>
<xs:element name="repositoryId" type="xs:string"
minOccurs="1" maxOccurs="1" />
- <xs:element name="objectId" type="xs:string"
- minOccurs="1" maxOccurs="1" />
+ <xs:element name="objectId" type="xs:string"
minOccurs="1"
+ maxOccurs="1" />
<xs:element name="filter" type="xs:string"
minOccurs="0"
maxOccurs="1" nillable="true" />
@@ -1831,7 +1823,7 @@
</xs:element>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
- <!--[Relationship Services]-->
+ <!--[Relationship Services] -->
<!-- getRelationships Operation -->
<xs:element name="getObjectRelationships">
@@ -1881,7 +1873,7 @@
</xs:element>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
- <!--[Policy Services]-->
+ <!--[Policy Services] -->
<!-- applyPolicy Operation -->
<xs:element name="applyPolicy">
@@ -2029,9 +2021,9 @@
<xs:element name="ACL" type="cmism:cmisACLType"
minOccurs="1" maxOccurs="1" />
</xs:sequence>
- </xs:complexType>
+ </xs:complexType>
</xs:element>
-
+
<!-- applyACL Operation -->
<xs:element name="applyACL">
<xs:complexType>
@@ -2054,7 +2046,7 @@
This is an extension
element to hold any
repository or
vendor-specific
extensions
- </xs:documentation>
+ </xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/CMIS-Messaging.xsd
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/CMIS-Messaging.xsd?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/CMIS-Messaging.xsd
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/wsdl/cmis11/CMIS-Messaging.xsd
Sat Jul 11 20:40:12 2015
@@ -1753,7 +1753,6 @@
</xs:annotation>
</xs:element>
</xs:sequence>
- <xs:attributeGroup ref="cmis:cmisUndefinedAttribute" />
</xs:complexType>
</xs:element>
<xs:element name="queryResponse">
Added:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/cxf-servlet.xml
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/cxf-servlet.xml?rev=1690403&view=auto
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/cxf-servlet.xml
(added)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/cxf-servlet.xml
Sat Jul 11 20:40:12 2015
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://cxf.apache.org/core"
+ xsi:schemaLocation="http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+ <bean id="soapActionInterceptorRemove"
+
class="org.apache.chemistry.opencmis.server.impl.webservices.SoapActionRemoveInterceptor"
/>
+ <bean id="usernameTokenForCallContext"
+
class="org.apache.chemistry.opencmis.server.impl.webservices.UsernameTokenInterceptor"
/>
+
+ <cxf:bus>
+ <cxf:inInterceptors>
+
+ <!-- removes the CXfs SOAP Action handling to be
backwards compatible
+ with older OpenCMIS versions -->
+ <ref bean="soapActionInterceptorRemove" />
+
+ <!-- extracts username and password and adds them to
the call context -->
+ <ref bean="usernameTokenForCallContext" />
+
+ </cxf:inInterceptors>
+ </cxf:bus>
+
+</beans>
\ No newline at end of file
Added:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/sun-web.xml
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/sun-web.xml?rev=1690403&view=auto
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/sun-web.xml
(added)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/sun-web.xml
Sat Jul 11 20:40:12 2015
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Application
Server 9.0 Servlet 2.5//EN'
'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'>
+<sun-web-app>
+<class-loader delegate="false"/>
+</sun-web-app>
\ No newline at end of file
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/web.xml
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/web.xml?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/web.xml
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/WEB-INF/web.xml
Sat Jul 11 20:40:12 2015
@@ -32,10 +32,6 @@
<listener-class>org.apache.chemistry.opencmis.server.impl.CmisRepositoryContextListener</listener-class>
</listener>
- <listener>
-
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
- </listener>
-
<!--
A servlet filter that logs all requests in files. Useful for
monitoring and debugging.
Use it with care! It can generate a huge amount of files and will
slow down performance
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=1690403&r1=1690402&r2=1690403&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 Jul 11 20:40:12 2015
@@ -50,36 +50,19 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.jvnet.mimepull</groupId>
- <artifactId>mimepull</artifactId>
- <version>${mimepull.version}</version>
- </dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
<dependency>
- <groupId>com.sun.xml.ws</groupId>
- <artifactId>jaxws-rt</artifactId>
- <version>${jaxws-rt.version}</version>
- <exclusions>
- <exclusion> <!-- included in Java 6 and above -->
- <groupId>javax.xml.stream</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- <exclusion> <!-- included in Java 6 and above -->
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jvnet</groupId>
- <artifactId>mimepull</artifactId>
- </exclusion>
- </exclusions>
+ <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>
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=1690403&r1=1690402&r2=1690403&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 Jul 11 20:40:12 2015
@@ -21,7 +21,6 @@ package org.apache.chemistry.opencmis.se
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
-import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
@@ -31,7 +30,8 @@ import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.soap.SOAPBinding;
import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
@@ -41,16 +41,13 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.server.impl.CmisRepositoryContextListener;
import org.apache.chemistry.opencmis.server.shared.Dispatcher;
import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.transport.servlet.CXFServlet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.sun.xml.ws.api.WSFeatureList;
-import com.sun.xml.ws.developer.StreamingAttachmentFeature;
-import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
-import com.sun.xml.ws.transport.http.servlet.WSServlet;
-import com.sun.xml.ws.transport.http.servlet.WSServletDelegate;
-
-public class CmisWebServicesServlet extends WSServlet {
+public class CmisWebServicesServlet extends CXFServlet {
public static final String PARAM_CMIS_VERSION = "cmisVersion";
public static final String CMIS_VERSION =
"org.apache.chemistry.opencmis.cmisVersion";
@@ -117,43 +114,47 @@ public class CmisWebServicesServlet exte
}
@Override
- public void service(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
+ public void handleRequest(HttpServletRequest request, HttpServletResponse
response) throws ServletException {
// set CMIS version
request.setAttribute(CMIS_VERSION, cmisVersion);
- // handle GET requests
- if (request.getMethod().equals("GET")) {
- UrlBuilder baseUrl = compileBaseUrl(request, response);
-
- String queryString = request.getQueryString();
- if (queryString != null) {
- String doc = docs.get(queryString.toLowerCase(Locale.ENGLISH));
- if (doc != null) {
- printXml(request, response, doc, baseUrl);
- return;
+ try {
+ // handle GET requests
+ if (request.getMethod().equals("GET")) {
+ UrlBuilder baseUrl = compileBaseUrl(request, response);
+
+ String queryString = request.getQueryString();
+ if (queryString != null) {
+ String doc =
docs.get(queryString.toLowerCase(Locale.ENGLISH));
+ if (doc != null) {
+ printXml(request, response, doc, baseUrl);
+ return;
+ }
}
+
+ printPage(request, response, baseUrl);
+ return;
}
- printPage(request, response, baseUrl);
- return;
- }
+ // handle other non-POST requests
+ if (!request.getMethod().equals("POST")) {
+ printError(request, response, "Not a HTTP POST request.");
+ return;
+ }
- // handle other non-POST requests
- if (!request.getMethod().equals("POST")) {
- printError(request, response, "Not a HTTP POST request.");
- return;
- }
+ // handle POST requests
+ ProtectionRequestWrapper requestWrapper = null;
+ try {
+ requestWrapper = new ProtectionRequestWrapper(request,
MAX_SOAP_SIZE);
+ } catch (ServletException e) {
+ printError(request, response, "The request is not MTOM
encoded.");
+ return;
+ }
- // handle POST requests
- ProtectionRequestWrapper requestWrapper = null;
- try {
- requestWrapper = new ProtectionRequestWrapper(request,
MAX_SOAP_SIZE);
- } catch (ServletException e) {
- printError(request, response, "The request is not MTOM encoded.");
- return;
+ super.handleRequest(requestWrapper, response);
+ } catch (IOException ioe) {
+ throw new ServletException(ioe);
}
-
- super.service(requestWrapper, response);
}
private void printXml(HttpServletRequest request, HttpServletResponse
response, String doc, UrlBuilder baseUrl)
@@ -244,48 +245,53 @@ public class CmisWebServicesServlet exte
}
@Override
- protected WSServletDelegate getDelegate(ServletConfig servletConfig) {
- WSServletDelegate delegate = super.getDelegate(servletConfig);
+ public void loadBus(ServletConfig servletConfig) {
+ super.loadBus(servletConfig);
- // set temp directory and the threshold for all services with a
- // StreamingAttachment annotation
- if (delegate.adapters != null) {
- // get the CmisService factory
- CmisServiceFactory factory = (CmisServiceFactory)
getServletContext().getAttribute(
- CmisRepositoryContextListener.SERVICES_FACTORY);
+ CmisServiceFactory factory = (CmisServiceFactory)
getServletContext().getAttribute(
+ CmisRepositoryContextListener.SERVICES_FACTORY);
- if (factory == null) {
- throw new CmisRuntimeException("Service factory not available!
Configuration problem?");
- }
+ if (factory == null) {
+ throw new CmisRuntimeException("Service factory not available!
Configuration problem?");
+ }
- // iterate of all adapters
- for (ServletAdapter adapter : delegate.adapters) {
- WSFeatureList wsfl =
adapter.getEndpoint().getBinding().getFeatures();
- for (WebServiceFeature ft : wsfl) {
- if (ft instanceof StreamingAttachmentFeature) {
- ((StreamingAttachmentFeature)
ft).setDir(factory.getTempDirectory().getAbsolutePath());
- setMemoryThreshold(factory,
(StreamingAttachmentFeature) ft);
- }
- }
- }
+ Bus bus = getBus();
+ BusFactory.setDefaultBus(bus);
+ bus.setProperty("bus.io.CachedOutputStream.OutputDirectory",
factory.getTempDirectory().getAbsolutePath());
+ bus.setProperty("bus.io.CachedOutputStream.Threshold",
String.valueOf(factory.getMemoryThreshold()));
+ bus.setProperty("bus.io.CachedOutputStream.MaxSize", "-1");
+ if (factory.encryptTempFiles()) {
+ bus.setProperty("bus.io.CachedOutputStream.CipherTransformation",
"AES/CTR/PKCS5Padding");
}
- return delegate;
+ if (cmisVersion == CmisVersion.CMIS_1_0) {
+ publish("/RepositoryService", new RepositoryService10());
+ publish("/NavigationService", new NavigationService());
+ publish("/ObjectService", new ObjectService10());
+ publish("/VersioningService", new VersioningService());
+ publish("/RelationshipService", new RelationshipService());
+ publish("/DiscoveryService", new DiscoveryService());
+ publish("/MultiFilingService", new MultiFilingService());
+ publish("/ACLService", new AclService());
+ publish("/PolicyService", new PolicyService());
+ } else {
+ publish("/RepositoryService", new RepositoryService());
+ publish("/NavigationService", new NavigationService());
+ publish("/ObjectService", new ObjectService());
+ publish("/VersioningService", new VersioningService());
+ publish("/RelationshipService", new RelationshipService());
+ publish("/DiscoveryService", new DiscoveryService());
+ publish("/MultiFilingService", new MultiFilingService());
+ publish("/ACLService", new AclService());
+ publish("/PolicyService", new PolicyService());
+ }
}
- private void setMemoryThreshold(CmisServiceFactory factory,
StreamingAttachmentFeature ft) {
- try {
- // JAX-WS RI 2.1
- ft.setMemoryThreshold(factory.getMemoryThreshold());
- } catch (NoSuchMethodError e) {
- // JAX-WS RI 2.2
- // see CMIS-626
- try {
- Method m = ft.getClass().getMethod("setMemoryThreshold",
long.class);
- m.invoke(ft, (long) factory.getMemoryThreshold());
- } catch (Exception e2) {
- LOG.warn("Could not set memory threshold for streaming");
- }
- }
+ private Endpoint publish(String adress, Object implementor) {
+ Endpoint endpoint = Endpoint.publish(adress, implementor);
+ SOAPBinding binding = (SOAPBinding) endpoint.getBinding();
+ binding.setMTOMEnabled(true);
+
+ return endpoint;
}
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectService.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/ObjectService.java?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectService.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectService.java
Sat Jul 11 20:40:12 2015
@@ -64,13 +64,10 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.jaxb.ObjectServicePort;
import org.apache.chemistry.opencmis.commons.server.CmisService;
-import com.sun.xml.ws.developer.StreamingAttachment;
-
/**
* CMIS Object Service.
*/
@MTOM
-@StreamingAttachment(parseEagerly = false, memoryThreshold = 4 * 1024 * 1204)
@WebService(endpointInterface =
"org.apache.chemistry.opencmis.commons.impl.jaxb.ObjectServicePort")
public class ObjectService extends AbstractService implements
ObjectServicePort {
@Resource
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectService10.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/ObjectService10.java?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectService10.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectService10.java
Sat Jul 11 20:40:12 2015
@@ -18,17 +18,63 @@
*/
package org.apache.chemistry.opencmis.server.impl.webservices;
+import java.math.BigInteger;
+
+import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.xml.ws.Holder;
import javax.xml.ws.soap.MTOM;
-import com.sun.xml.ws.developer.StreamingAttachment;
+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.CmisFaultType;
+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.EnumServiceException;
/**
* CMIS 1.0 Object Service. Excludes CMIS 1.1 operations.
*/
@MTOM
-@StreamingAttachment(parseEagerly = false, memoryThreshold = 4 * 1024 * 1204)
@WebService(endpointInterface =
"org.apache.chemistry.opencmis.server.impl.webservices.ObjectServicePort10")
-public class ObjectService10 extends ObjectService {
+public class ObjectService10 extends ObjectService implements
ObjectServicePort10 {
+
+ @WebMethod(exclude = true)
+ public void createItem(String repositoryId, CmisPropertiesType properties,
String folderId,
+ CmisAccessControlListType addACEs, CmisAccessControlListType
removeACEs,
+ Holder<CmisExtensionType> extension, Holder<String> objectId)
throws CmisException {
+ CmisFaultType fault = new CmisFaultType();
+ fault.setCode(BigInteger.ZERO);
+ fault.setMessage("This is a CMIS 1.0 endpoint.");
+ fault.setType(EnumServiceException.NOT_SUPPORTED);
+
+ throw new CmisException(fault.getMessage(), fault);
+ }
+
+ @WebMethod(exclude = true)
+ public void bulkUpdateProperties(String repositoryId, CmisBulkUpdateType
bulkUpdateData,
+ Holder<CmisExtensionType> extension,
Holder<CmisObjectIdAndChangeTokenType> objectIdAndChangeToken)
+ throws CmisException {
+ CmisFaultType fault = new CmisFaultType();
+ fault.setCode(BigInteger.ZERO);
+ fault.setMessage("This is a CMIS 1.0 endpoint.");
+ fault.setType(EnumServiceException.NOT_SUPPORTED);
+
+ throw new CmisException(fault.getMessage(), fault);
+ }
+
+ @WebMethod(exclude = true)
+ public void appendContentStream(String repositoryId, Holder<String>
objectId, Boolean isLastChunk,
+ Holder<String> changeToken, CmisContentStreamType contentStream,
Holder<CmisExtensionType> extension)
+ throws CmisException {
+ CmisFaultType fault = new CmisFaultType();
+ fault.setCode(BigInteger.ZERO);
+ fault.setMessage("This is a CMIS 1.0 endpoint.");
+ fault.setType(EnumServiceException.NOT_SUPPORTED);
+ throw new CmisException(fault.getMessage(), fault);
+ }
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectServicePort10.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/ObjectServicePort10.java?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectServicePort10.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/ObjectServicePort10.java
Sat Jul 11 20:40:12 2015
@@ -18,37 +18,13 @@
*/
package org.apache.chemistry.opencmis.server.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)
- 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)
- void bulkUpdateProperties(String repositoryId, CmisBulkUpdateType
bulkUpdateData,
- Holder<CmisExtensionType> extension,
Holder<CmisObjectIdAndChangeTokenType> objectIdAndChangeToken)
- throws CmisException;
-
- @WebMethod(action = "appendContentStream", exclude = true)
- void appendContentStream(String repositoryId, Holder<String> objectId,
Boolean isLastChunk,
- Holder<String> changeToken, CmisContentStreamType contentStream,
Holder<CmisExtensionType> extension)
- throws CmisException;
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryService10.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/RepositoryService10.java?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryService10.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryService10.java
Sat Jul 11 20:40:12 2015
@@ -18,9 +18,19 @@
*/
package org.apache.chemistry.opencmis.server.impl.webservices;
+import java.math.BigInteger;
+
+import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.xml.ws.Holder;
import javax.xml.ws.soap.MTOM;
+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.CmisFaultType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.EnumServiceException;
+
/**
* CMIS 1.0 Repository Service. Excludes CMIS 1.1 operations.
*/
@@ -28,4 +38,36 @@ import javax.xml.ws.soap.MTOM;
@WebService(endpointInterface =
"org.apache.chemistry.opencmis.server.impl.webservices.RepositoryServicePort10")
public class RepositoryService10 extends RepositoryService implements
RepositoryServicePort10 {
+ @WebMethod(exclude = true)
+ public void createType(String repositoryId, Holder<CmisTypeDefinitionType>
type, CmisExtensionType extension)
+ throws CmisException {
+ CmisFaultType fault = new CmisFaultType();
+ fault.setCode(BigInteger.ZERO);
+ fault.setMessage("This is a CMIS 1.0 endpoint.");
+ fault.setType(EnumServiceException.NOT_SUPPORTED);
+
+ throw new CmisException(fault.getMessage(), fault);
+ }
+
+ @WebMethod(exclude = true)
+ public void updateType(String repositoryId, Holder<CmisTypeDefinitionType>
type, CmisExtensionType extension)
+ throws CmisException {
+ CmisFaultType fault = new CmisFaultType();
+ fault.setCode(BigInteger.ZERO);
+ fault.setMessage("This is a CMIS 1.0 endpoint.");
+ fault.setType(EnumServiceException.NOT_SUPPORTED);
+
+ throw new CmisException(fault.getMessage(), fault);
+ }
+
+ @WebMethod(exclude = true)
+ public void deleteType(String repositoryId, String typeId,
Holder<CmisExtensionType> extension)
+ throws CmisException {
+ CmisFaultType fault = new CmisFaultType();
+ fault.setCode(BigInteger.ZERO);
+ fault.setMessage("This is a CMIS 1.0 endpoint.");
+ fault.setType(EnumServiceException.NOT_SUPPORTED);
+
+ throw new CmisException(fault.getMessage(), fault);
+ }
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryServicePort10.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/RepositoryServicePort10.java?rev=1690403&r1=1690402&r2=1690403&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryServicePort10.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/RepositoryServicePort10.java
Sat Jul 11 20:40:12 2015
@@ -18,29 +18,13 @@
*/
package org.apache.chemistry.opencmis.server.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)
- void createType(String repositoryId, Holder<CmisTypeDefinitionType> type,
CmisExtensionType extension)
- throws CmisException;
-
- @WebMethod(action = "updateType", exclude = true)
- void updateType(String repositoryId, Holder<CmisTypeDefinitionType> type,
CmisExtensionType extension)
- throws CmisException;
-
- @WebMethod(action = "deleteType", exclude = true)
- void deleteType(String repositoryId, String typeId,
Holder<CmisExtensionType> extension) throws CmisException;
}
Added:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/SoapActionRemoveInterceptor.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/SoapActionRemoveInterceptor.java?rev=1690403&view=auto
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/SoapActionRemoveInterceptor.java
(added)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/SoapActionRemoveInterceptor.java
Sat Jul 11 20:40:12 2015
@@ -0,0 +1,58 @@
+/*
+ * 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.server.impl.webservices;
+
+import java.util.Iterator;
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
+import org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.Phase;
+
+/**
+ * Removes the CXF SOAP Action handling to be backwards compatible with the
+ * OpenCMIS server framework 0.13.0 and earlier.
+ */
+public class SoapActionRemoveInterceptor extends AbstractSoapInterceptor {
+
+ public SoapActionRemoveInterceptor() {
+ super(Phase.READ);
+ addBefore(SoapActionInInterceptor.class.getName());
+ }
+
+ @Override
+ public void handleMessage(SoapMessage message) throws Fault {
+ Interceptor<? extends Message> soapActionInInterceptor = null;
+ Iterator<Interceptor<? extends Message>> iterator =
message.getInterceptorChain().getIterator();
+ while (iterator.hasNext()) {
+ Interceptor<? extends Message> interceptor = iterator.next();
+ if (interceptor instanceof SoapActionInInterceptor) {
+ soapActionInInterceptor = interceptor;
+ break;
+ }
+ }
+
+ if (soapActionInInterceptor != null) {
+ message.getInterceptorChain().remove(soapActionInInterceptor);
+ }
+ }
+}
Added:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/UsernameTokenInterceptor.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/UsernameTokenInterceptor.java?rev=1690403&view=auto
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/UsernameTokenInterceptor.java
(added)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/UsernameTokenInterceptor.java
Sat Jul 11 20:40:12 2015
@@ -0,0 +1,124 @@
+/*
+ * 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.server.impl.webservices;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+import org.apache.chemistry.opencmis.commons.server.CallContext;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
+import org.apache.cxf.headers.Header;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.phase.Phase;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Extracts username and password from the UsernameToken header and prepares
+ * them for the call context.
+ *
+ * This class emulates the behavior of the OpenCMIS server framework 0.13.0 and
+ * earlier.
+ */
+public class UsernameTokenInterceptor extends AbstractSoapInterceptor {
+
+ public UsernameTokenInterceptor() {
+ super(Phase.PRE_INVOKE);
+ }
+
+ protected static final String WSSE_NS =
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
+ protected static final QName WSSE_SECURITY = new QName(WSSE_NS,
"Security");
+ protected static final String WSSE_USERNAME_TOKEN = "UsernameToken";
+ protected static final String WSSE_USERNAME = "Username";
+ protected static final String WSSE_PASSWORD = "Password";
+ protected static final String WSSE_PASSWORD_TYPE =
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";
+
+ @Override
+ public void handleMessage(SoapMessage message) throws Fault {
+ Header securityHeader = message.getHeader(WSSE_SECURITY);
+ if (securityHeader != null) {
+ if (!(securityHeader.getObject() instanceof Node)) {
+ throw new CmisRuntimeException("Cannot read Security header.");
+ }
+
+ Node usernameTokenNode = getUsernameTokenNode((Node)
securityHeader.getObject());
+ if (usernameTokenNode == null) {
+ return;
+ }
+
+ String username = getUsername(usernameTokenNode);
+ if (username == null) {
+ return;
+ }
+
+ String password = getPasswordText(usernameTokenNode);
+
+ Map<String, String> callContextMap = new HashMap<String, String>();
+ callContextMap.put(CallContext.USERNAME, username);
+ callContextMap.put(CallContext.PASSWORD, password);
+
+
message.getExchange().getInMessage().put(AbstractService.CALL_CONTEXT_MAP,
callContextMap);
+ }
+ }
+
+ protected Node getUsernameTokenNode(Node securityNode) {
+ return findElement(securityNode, WSSE_NS, WSSE_USERNAME_TOKEN);
+ }
+
+ protected String getUsername(Node usernameTokenNode) {
+ Node node = findElement(usernameTokenNode, WSSE_NS, WSSE_USERNAME);
+
+ if (node != null) {
+ return node.getTextContent();
+ }
+
+ return null;
+ }
+
+ protected String getPasswordText(Node usernameTokenNode) {
+ Node node = findElement(usernameTokenNode, WSSE_NS, WSSE_PASSWORD);
+
+ if (node != null) {
+ Node type = node.getAttributes().getNamedItem("Type");
+ if (type == null ||
WSSE_PASSWORD_TYPE.equals(type.getTextContent())) {
+ return node.getTextContent();
+ }
+ }
+
+ return null;
+ }
+
+ protected Node findElement(Node parent, String namespace, String
localname) {
+ NodeList nl = parent.getChildNodes();
+
+ for (int i = 0; i < nl.getLength(); i++) {
+ Node node = nl.item(i);
+ if (namespace.equals(node.getNamespaceURI()) &&
localname.equals(node.getLocalName())
+ && node.getNodeType() == Node.ELEMENT_NODE) {
+ return node;
+ }
+ }
+
+ return null;
+ }
+}