manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1523848 - in /manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice: ISAPI/MCPermissionsdisco.aspx ISAPI/MCPermissionswsdl.aspx MCPermissions.cs
Date Tue, 17 Sep 2013 00:05:07 GMT
Author: kwright
Date: Tue Sep 17 00:05:07 2013
New Revision: 1523848

URL: http://svn.apache.org/r1523848
Log:
Add GetSites method to plugin, to support AWS sites.

Modified:
    manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionsdisco.aspx
    manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionswsdl.aspx
    manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/MCPermissions.cs

Modified: manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionsdisco.aspx
URL: http://svn.apache.org/viewvc/manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionsdisco.aspx?rev=1523848&r1=1523847&r2=1523848&view=diff
==============================================================================
--- manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionsdisco.aspx
(original)
+++ manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionsdisco.aspx
Tue Sep 17 00:05:07 2013
@@ -14,7 +14,7 @@
 <% // limitations under the License.                                          %>
 
 <%@ Page Language="C#" Inherits="System.Web.UI.Page" %> 
-<%@ Assembly Name="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%> 
+<%@ Assembly Name="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%> 
 <%@ Import Namespace="Microsoft.SharePoint.Utilities" %> 
 <%@ Import Namespace="Microsoft.SharePoint" %> 
 <% Response.ContentType = "text/xml"; %>

Modified: manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionswsdl.aspx
URL: http://svn.apache.org/viewvc/manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionswsdl.aspx?rev=1523848&r1=1523847&r2=1523848&view=diff
==============================================================================
--- manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionswsdl.aspx
(original)
+++ manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/ISAPI/MCPermissionswsdl.aspx
Tue Sep 17 00:05:07 2013
@@ -13,7 +13,7 @@
 <% // See the License for the specific language governing permissions and     %>
 <% // limitations under the License.                                          %>
 <%@ Page Language="C#" Inherits="System.Web.UI.Page" %> 
-<%@ Assembly Name="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%> 
+<%@ Assembly Name="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
%> 
 <%@ Import Namespace="Microsoft.SharePoint.Utilities" %> 
 <%@ Import Namespace="Microsoft.SharePoint" %> 
 <% Response.ContentType = "text/xml"; %>
@@ -63,6 +63,25 @@
           </s:sequence>
         </s:complexType>
       </s:element>
+      <s:element name="GetSites">
+        <s:complexType>
+          <s:sequence>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="GetSitesResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="GetSitesResult">
+              <s:complexType mixed="true">
+                <s:sequence>
+                  <s:any />
+                </s:sequence>
+              </s:complexType>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
     </s:schema>
   </wsdl:types>
   <wsdl:message name="GetPermissionCollectionSoapIn">
@@ -77,6 +96,12 @@
   <wsdl:message name="GetListItemsSoapOut">
     <wsdl:part name="parameters" element="tns:GetListItemsResponse" />
   </wsdl:message>
+  <wsdl:message name="GetSitesSoapIn">
+    <wsdl:part name="parameters" element="tns:GetSites" />
+  </wsdl:message>
+  <wsdl:message name="GetSitesSoapOut">
+    <wsdl:part name="parameters" element="tns:GetSitesResponse" />
+  </wsdl:message>
   <wsdl:portType name="PermissionsSoap">
     <wsdl:operation name="GetPermissionCollection">
       <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Returns the
collection of permissions for a site, list, or list item.</wsdl:documentation>
@@ -109,6 +134,15 @@
         <soap:body use="literal" />
       </wsdl:output>
     </wsdl:operation>
+    <wsdl:operation name="GetSites">
+      <soap:operation soapAction="http://microsoft.com/sharepoint/webpartpages/GetSites"
style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
   </wsdl:binding>
   <wsdl:binding name="PermissionsSoap12" type="tns:PermissionsSoap">
     <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
@@ -130,6 +164,15 @@
         <soap12:body use="literal" />
       </wsdl:output>
     </wsdl:operation>
+    <wsdl:operation name="GetSites">
+      <soap12:operation soapAction="http://microsoft.com/sharepoint/webpartpages/GetSites"
style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="Permissions">
     <wsdl:port name="PermissionsSoap" binding="tns:PermissionsSoap">

Modified: manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/MCPermissions.cs
URL: http://svn.apache.org/viewvc/manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/MCPermissions.cs?rev=1523848&r1=1523847&r2=1523848&view=diff
==============================================================================
--- manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/MCPermissions.cs
(original)
+++ manifoldcf/integration/sharepoint-2010/branches/CONNECTORS-772/webservice/MCPermissions.cs
Tue Sep 17 00:05:07 2013
@@ -156,7 +156,47 @@ namespace MetaCarta.SharePoint.SoapServe
 
             return retVal;
         }
-        
+
+        [WebMethod(Description = "Returns the list of subsites reliably on SharePoint 2010
AWS systems.")]
+        public XmlNode GetSites()
+        {
+            XmlNode retVal = null;
+
+            try
+            {
+                using (SPWeb oWebsiteRoot = SPContext.Current.Web)
+                {
+                    if (oWebsiteRoot != null)
+                    {
+                        XmlDocument doc = new XmlDocument();
+                        retVal = doc.CreateElement("GetSites", 
+                            "http://schemas.microsoft.com/sharepoint/soap/directory/");
+                        XmlNode getListItemsNode = doc.CreateElement("GetSitesResponse");
+
+                        foreach (SPWeb oWeb in oWebsiteRoot.Webs)
+                        {
+                            XmlNode resultNode = doc.CreateElement("GetSitesResult");
+                            XmlAttribute siteAttribute = doc.CreateAttribute("Site");
+                            siteAttribute.Value = oWeb.Url;
+                            resultNode.Attributes.Append(siteAttribute);
+                            getListItemsNode.AppendChild(resultNode);
+                        }
+                    }
+                }
+            }
+            catch (SoapException soapEx)
+            {
+                throw soapEx;
+            }
+            catch (Exception ex)
+            {
+                SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory("MCPermissions.asmx",
TraceSeverity.Unexpected, EventSeverity.Error), TraceSeverity.Unexpected, "Error: "+ex.Message,
ex.StackTrace);
+                throw RaiseException(ex.Message, "1020", ex.Source);
+            }
+
+            return retVal;
+        }
+
         #endregion
 
         #region Private Methods



Mime
View raw message