SharePoint Manager 사본을 가져 와서 흥미로운 정보를 보여줄 수 있습니다.
이름 필드 (".aspx"포함)가 필요합니다. 제목 필드는 wiki (관련 없음)와 관련이 없으며 대신 페이지의 이름이 색인됩니다. copy.asmx를 사용
--update--
은 새 문서를 업로드 할 수 있습니다. 템플릿 페이지는 이전에 다운로드 된 페이지입니다 (정보는 저장되지 않으며 레이아웃 페이지와 동일합니다).
private byte[] GetTemplatePage()
{
FileStream fs = new FileStream("templatePage.aspx", FileMode.Open);
byte[] fileContents = new byte[(int)fs.Length];
fs.Read(fileContents, 0, (int)fs.Length);
fs.Close();
return fileContents;
}
private void UploadDoc(string pageName)
{
byte[] wikiBytes = GetTemplatePage();
string dest = "http://[website]/wiki/Wiki%20Pages/" + pageName + ".aspx";
string[] destinationUrlArray = new string[] { dest };
IntranetCopy.Copy copyService = new IntranetCopy.Copy();
copyService.UseDefaultCredentials = true;
copyService.Url = "http://[website]/wiki/_vti_bin/copy.asmx";
IntranetCopy.FieldInformation fieldInfo = new IntranetCopy.FieldInformation();
IntranetCopy.FieldInformation[] fields = { fieldInfo };
IntranetCopy.CopyResult[] resultsArray;
copyService.Timeout = 600000;
uint documentId = copyService.CopyIntoItems(dest, destinationUrlArray, fields, wikiBytes, out resultsArray);
}
그런 다음 lists.asmx를 호출하여 wikifield를 업데이트 할 수 있습니다. 참고 : webservices를 사용하여 문서를 업로드 한 후에는 문서의 이름을 바꾸는 방법을 모릅니다. 이 페이지 출력
출처
2009-06-09 23:22:35
Nat
SharePoint 서버에서 고유 한 웹 서비스를 만들 수있는 권한이 있습니까? 그렇다면 위키 페이지를 만드는 전체 SharePoint 개체 모델에 액세스 할 수 있습니다. 이것이 실제로 당신을위한 옵션이라면 나는 약간의 샘플 코드를 자필로 쓸 수있을 것이다. –
슬프게도 솔루션은 제네릭 Sharepoint 서버에서 작동해야하기 때문에 내 웹 서비스를 작성하는 옵션이 아닙니다. – Stefan