SharePoint環境からSharePointからデータを取得する方法
-
09-12-2019 - |
質問
私の質問です 誰かが私に可能な方法を教えてください、私はSharePoint 2007リストからデータを取得できます。
(私は私の上級開発者に尋ねました、そして、彼らは最初に顧客がISA Serverによって検証され、彼が後で彼がアクセスしたSharePointサイトにアクセスしたクッキーをクライアントに与えるフォームに最初に記入したことを私に言いました。私はそのフォーム認証であると仮定していますが、ユーザーとしてのWindows認証がフォーム@ IEを記入しているかどうかわからないが、Chromeで同じポータルを開くと、Windowsがポップアップしてユーザー名とパスワードを求める)
私はさまざまな方法を見ていますが、このシナリオでどちらが正確にどのように機能するのかわからない。
編集:
Windows / Forms認証に関する研究後、Windows認証を使用していることを知っています。
だから私の質問はこのようなものに変更されます、
SOAP / WebServicesを使用して「_vti_bin / authentication.asmx」を使用して、次に「_vti_bin / lists.asmx」を使用してスプラストデータを取得する方法は何ですか。 HTML / Scripting Languageを使用して構築されるWindows Vistaのガジェットのためにそれを開発しています。 を使って構築されるWindows Vistaのガジェットの開発に留意してください。
歓声
詳細説明:
私は回答コードのスピケットを与えましたが、私は成功を得なかった、私もクライアントが基本認証を使用していること、そしてサーバーの間のどこかでKerbos認証がこのコードを試してみました。 のどちらも機能しない
.
<html>
<head>
<title>Sharepoint List Browser</title>
</head>
<body style="width:400px; height:400px;">
<div id = "abc">
<button id = "btnFindLists" type="button">Click Me!</button>
<div id="mainContent">
<p>1</p> <!-- -- that p will be returned -->
<p>2</p>
</div>
<script type="text/javascript" language="javascript">
$('document').ready(function () {
$('#btnFindLists').bind('click', findLists);
});
function findLists()
{
$.ajax(
{
type:'GET',
url:'https://usa2020.domainabc.com/portal/_vti_bin/Lists.asmx',
data:"username=domainabc\userabc&password=apassword",
success: function(data){
alert('successful');
}
});
}
</script>
</body>
</html>
「警告」機能はガジェットでは機能しません。
私はこのとしてFalakのコードを試しました
.
<html>
<head>
<title>Sharepoint List Browser</title>
<script type="text/javascript" language="javascript">
$('document').ready(function () {
$('#btnFindLists').bind('click', findLists);
});
function findLists()
{
$.getJSON("https://usa2020.domainabc.com/portal/_vti_bin/Lists.asmx", {
sucess: function (data, textStatus, xhr) {
$("#mainContent p").first().html(data);
}
});
}
</script>
</head>
<body style="width:400px; height:400px;">
<div id = "abc">
<button id = "btnFindLists" type="button">Click Me!</button>
<div id="mainContent">
<p>1</p> <!-- -- that p will be returned -->
</div>
</body>
</html>
は単に他の人のようには機能しない、理由がWindows認証になる可能性があります。
歓声
編集2: * 今すぐ追加したいもう一つのこと、私はISA ServerにログオンするまでWebServicesに入ることができません。 *
解決
リストデータを取得するには、lists.asmxの代わりにlistData.svcを使用しないのですか。ListData.SVCは、RESTを使用してリスト(または結合を使用しているリスト)から情報を取得する方法を提供します。
また、質問に記載されているようにWeb参照を作成する必要はありません。まだクライアントサイドのスクリプトを介してジョブを完了させます。これはjQuery を使ったlistdata.svcへのサンプルクエリです。
<script type="text/javascript" language="javascript">
$('document').ready(function () {
$('#btnFindLists').bind('click', findLists);
});
function findLists()
{
alert('Hello World!');
$.getJSON("/_vti_bin/ListData.svc", {
sucess: function (data, textStatus, xhr) {
$("#mainContent p").first().html(data);
}
});
}
</script>
.