You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2013/07/23 20:55:30 UTC
svn commit: r1506212 - in /chemistry/opencmis/trunk:
chemistry-opencmis-android/chemistry-opencmis-android-client/
chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/
chemistry-o...
Author: fmui
Date: Tue Jul 23 18:55:29 2013
New Revision: 1506212
URL: http://svn.apache.org/r1506212
Log:
use the same StandardAuthentictaionProvider for Java SE and Android
Removed:
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/StandardAuthenticationProvider.java
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/StandardAuthenticationProvider.java
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=1506212&r1=1506211&r2=1506212&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 Tue Jul 23 18:55:29 2013
@@ -84,7 +84,6 @@
<copy todir="${gendir}">
<fileset dir="${client-bindings}/${sourcefiles}">
<include name="**/*.java" />
- <exclude name="**/spi/StandardAuthenticationProvider.*" />
<exclude name="**/spi/LTPAWSSecurityAuthenticationProvider.*" />
<exclude name="**/spi/local/**" />
<exclude name="**/spi/http/DefaultHttpInvoker.*" />
Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java?rev=1506212&r1=1506211&r2=1506212&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java Tue Jul 23 18:55:29 2013
@@ -25,6 +25,8 @@ import java.math.BigInteger;
import java.util.GregorianCalendar;
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+import org.w3c.dom.Document;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
@@ -260,7 +262,8 @@ public class XMLUtils {
/**
* Parses a tag that contains text.
- * @throws XmlPullParserException
+ *
+ * @throws XmlPullParserException
*/
public static String readText(XmlPullParser parser, int maxLength) throws XmlPullParserException {
StringBuilder sb = new StringBuilder();
@@ -295,4 +298,8 @@ public class XMLUtils {
return sb.toString();
}
+
+ public static Document newDomDocument() {
+ throw new CmisRuntimeException("This method should never be used on Android!");
+ }
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/StandardAuthenticationProvider.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/StandardAuthenticationProvider.java?rev=1506212&r1=1506211&r2=1506212&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/StandardAuthenticationProvider.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/StandardAuthenticationProvider.java Tue Jul 23 18:55:29 2013
@@ -25,8 +25,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.xml.parsers.ParserConfigurationException;
-
import org.apache.chemistry.opencmis.client.bindings.spi.cookies.CmisCookieManager;
import org.apache.chemistry.opencmis.commons.SessionParameter;
import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
@@ -171,7 +169,7 @@ public class StandardAuthenticationProvi
usernameTokenElement.appendChild(createdElement);
return wsseSecurityElement;
- } catch (ParserConfigurationException e) {
+ } catch (Exception e) {
// shouldn't happen...
throw new CmisRuntimeException("Could not build SOAP header: " + e.getMessage(), e);
}