SharePoint 환경에서 SharePoint에서 데이터를 가져 오는 방법
-
09-12-2019 - |
문제
내 질문은입니다 누군가가 나에게 가능한 한 가지 방법을 알려줍니다. Windows 7 가젯 (HTML / Java 스크립트 사용) 에 대해 SSL / HTTPS로 보안 된 SharePoint 2007 목록에서 데이터를 얻을 수 있습니다.
(나는 고위 개발자에게 물었다. 클라이언트가 ISA Server가 유효화하는 양식을 처음 채우고 고객에게 액세스 할 수있는 SharePoint 사이트에 액세스 할 때 쿠키를 제공한다고 말했습니다. Forms 인증이 그런 다음 사용자가 폼 @ ie를 채우는 경우 Windows 인증이 확실하지는 않지만 Chrome에서 동일한 포털을 열면 Windows가 팝업 및 사용자 이름과 암호를 묻는 경우)
나는 다른 방식을보고 있지만,이 시나리오에서 정확히 일할지 모르겠다.
편집 :
Windows / Forms 인증을 연구 한 후 Windows 인증을 사용하고 있음을 알게되었습니다.
그래서 내 질문은 이와 같은 것으로 바뀔 것입니다.
"_vti_bin / authentication.asmx"및 "_vti_bin / lists.asmx" "getListItems ()"를 사용하여 SOAP / WebServices를 사용하여 스플리스트 데이터를 얻는 가능한 방법은 무엇입니까? html / scripting language 을 사용하여 빌드 될 Windows Vista 가젯을 개발하고있는 것처럼 .NET (웹 참조)을 사용하고 싶지 않다는 것을 명심하십시오.
환호
더 설명 :
나는 응답 코드 스피넬을 주어졌지만 나는 성공하지 못했습니다. 나는 클라이언트가 서버가 기본 인증을 사용하고 서버 사이에있는 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에 로그온 할 때까지 웹 서비스에 도달 할 수 없습니다. *
해결책
ListData.svc 대신 ListData.svc를 사용하지 않으려면 ListData.svc를 사용하지 않겠습니다.listData.svc는 휴식을 사용하여 목록에서 정보를 가져 오는 방법을 제공하고 원하는 클라이언트와 소비 할 수있는 목록 데이터의 멋진 RSS 피드입니다.
또한 질문에 언급 된 웹 참조를 작성할 필요가 없으며 여전히 클라이언트 측 스크립팅을 통해 작업을 수행 할 수 없습니다.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>
.