SiteData.GetSite不返回URL详细信息

时间:2015-05-18 10:41:07

标签: xml web-services sharepoint

我使用以下Web服务在SharePoint服务器中获取网站。

  

网络服务: SiteData

     

网络参考:http:///_vti_bin/SiteData.asmx

POST /_vti_bin/sitedata.asmx HTTP/1.1
Host: sharepoint
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/GetSite"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetSite xmlns="http://schemas.microsoft.com/sharepoint/soap/" />
  </soap:Body>
</soap:Envelope>

根据定义,它应该返回如下的响应;

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetSiteResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
      <GetSiteResult>unsignedInt</GetSiteResult>
      <sSiteMetadata>
        <LastModified>dateTime</LastModified>
        <LastModifiedForceRecrawl>dateTime</LastModifiedForceRecrawl>
        <SmallSite>boolean</SmallSite>
        <PortalUrl>string</PortalUrl>
        <UserProfileGUID>string</UserProfileGUID>
        <ValidSecurityInfo>boolean</ValidSecurityInfo>
      </sSiteMetadata>
      <vWebs>
        <_sWebWithTime>
          <Url>string</Url>
          <LastModified>dateTime</LastModified>
        </_sWebWithTime>
        <_sWebWithTime>
          <Url>string</Url>
          <LastModified>dateTime</LastModified>
        </_sWebWithTime>
      </vWebs>
      <strUsers>string</strUsers>
      <strGroups>string</strGroups>
      <vGroups>
        <string>string</string>
        <string>string</string>
      </vGroups>
    </GetSiteResponse>
  </soap:Body>
</soap:Envelope>

但我得到了以下类型的回应。

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <GetSiteResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
            <GetSiteResult>unsignedInt</GetSiteResult>
            <sSiteMetadata>
                <LastModified>dateTime</LastModified>
                <LastModifiedForceRecrawl>dateTime</LastModifiedForceRecrawl>
                <SmallSite>boolean</SmallSite>
                <PortalUrl />
                <ValidSecurityInfo>boolean</ValidSecurityInfo>
            </sSiteMetadata>
            <strGroups>string</strGroups>
            <vGroups>
                <string>string</string>
                <string>string</string>
            </vGroups>
        </GetSiteResponse>
    </soap:Body>
</soap:Envelope>

以下回复缺失;

<vWebs>
        <_sWebWithTime>
          <Url>string</Url>
          <LastModified>dateTime</LastModified>
        </_sWebWithTime>
        <_sWebWithTime>
          <Url>string</Url>
          <LastModified>dateTime</LastModified>
        </_sWebWithTime>
      </vWebs>

通过上面的xml,我提取了网址。由于未返回上述xml,因此可用站点显示为不存在。

我做错了什么?如何在我的回复中获取vWebs标签?

修改 我们的SharePoint服务器是另一台PC。我是作为用户添加的。当我在农场管理员组中时,会发生这种情况。如果我的帐户从服务器场管理员中删除,则返回vWebs。添加到服务器场的所有用户都会遇到此问一旦删除它们就可以了。

0 个答案:

没有答案
相关问题