【问题标题】:web-service to get sharepoint data gives error获取共享点数据的网络服务给出错误
【发布时间】:2012-11-21 14:32:08
【问题描述】:

我正在我的网络服务文件中执行以下操作以获取共享点列表数据:

$authParams = array('login' => 'user', 'password' => 'pass');

/* A string that contains either the display name or the GUID for the list.
 * It is recommended that you use the GUID, which must be surrounded by curly
 * braces ({}).
 */
$listName = "TestList1";
$rowLimit = '150';

$wsdl = "http://192.168.1.197:5000/sharepoint/ListsWSDL.wsdl"; 

//Creating the SOAP client and initializing the GetListItems method parameters
$soapClient = new SoapClient($wsdl, $authParams);
$params = array('listName' => $listName, 'rowLimit' => $rowLimit);

//Calling the GetListItems Web Service
$rawXMLresponse = null;
try{
    $rawXMLresponse = $soapClient->GetListItems($params)->GetListItemsResult->any;
}
catch(SoapFault $fault){
    echo 'Fault code: '.$fault->faultcode;
    echo 'Fault string: '.$fault->faultstring;
}

但它会进入 catch 块并出现以下错误:

Fault code: HTTPFault string: Not Found

有什么问题。提前致谢。

【问题讨论】:

    标签: php web-services sharepoint iis sharepoint-2007


    【解决方案1】:

    尝试 http://[sharepoint site url]/_vti_bin/lists.asmx?WSDL 获取 wsdl,

    但实际的网络服务存在于http://[sharepoint site url]/_vti_bin/lists.asmx

    这个list of webservices 有一个页面显示每个服务的网址。

    【讨论】:

    • 我只通过这个生成了wsdl文件并存储在本地/sharepoint文件夹中
    • 您仍然必须使用正确的 url 调用网络服务,否则您将收到 404 响应。
    • 路径 '192.168.1.197:5000/sharepoint/ListsWSDL.wsdl'is 存储生成的 wsdl 文件的本地文件夹的路径。我就是这样称呼它的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-10-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-29
    • 1970-01-01
    • 2013-01-05
    相关资源
    最近更新 更多