Author: kwright
Date: Thu Oct  6 13:11:49 2016
New Revision: 1763587

URL: http://svn.apache.org/viewvc?rev=1763587&view=rev
Log:
Another fix for CONNECTORS-1325.

Modified:
    manifoldcf/trunk/CHANGES.txt
    
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1763587&r1=1763586&r2=1763587&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Oct  6 13:11:49 2016
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 2.6-dev =====================
 
+CONNECTORS-1325: Another example of bad XML from Microsoft has
+been found and worked around.
+(Konstantin Avdeev, Karl Wright)
+
 CONNECTORS-1340: Revise connection strings for sybase and for
 Oracle.  It's not clear why these were working before, given the change.
 (Julien Massiera)

Modified: 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java?rev=1763587&r1=1763586&r2=1763587&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java
 (original)
+++ 
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SPSProxyHelper.java
 Thu Oct  6 13:11:49 2016
@@ -228,6 +228,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       currentTime = System.currentTimeMillis();
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
@@ -448,6 +453,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       currentTime = System.currentTimeMillis();
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
@@ -709,6 +719,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return false;
+      }
       currentTime = System.currentTimeMillis();
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
@@ -1141,6 +1156,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       currentTime = System.currentTimeMillis();
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
@@ -1294,6 +1314,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       currentTime = System.currentTimeMillis();
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
@@ -1746,6 +1771,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
         org.w3c.dom.Element elem = e.lookupFaultDetail(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HttpErrorCode";));
@@ -1888,6 +1918,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
         org.w3c.dom.Element elem = e.lookupFaultDetail(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HttpErrorCode";));
@@ -2182,6 +2217,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
         org.w3c.dom.Element elem = e.lookupFaultDetail(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HttpErrorCode";));
@@ -2326,6 +2366,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
         org.w3c.dom.Element elem = e.lookupFaultDetail(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HttpErrorCode";));
@@ -2496,6 +2541,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
         org.w3c.dom.Element elem = e.lookupFaultDetail(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HttpErrorCode";));
@@ -2672,6 +2722,11 @@ public class SPSProxyHelper {
     }
     catch (org.apache.axis.AxisFault e)
     {
+      // Bad XML can come from Microsoft.
+      if (e.getCause() != null && (e.getCause() instanceof 
org.xml.sax.SAXParseException))
+      {
+        return null;
+      }
       if (e.getFaultCode().equals(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HTTP";)))
       {
         org.w3c.dom.Element elem = e.lookupFaultDetail(new 
javax.xml.namespace.QName("http://xml.apache.org/axis/","HttpErrorCode";));


Reply via email to