Dws.GetDwsData メソッド (websvcDocumentWorkspace)
ドキュメント ワークスペース サイトとそれに含まれる一覧に関する情報を返します。
名前空間: websvcDocumentWorkspace
アセンブリ: STSSOAP (stssoap.dll 内)
構文
'宣言
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/dws/GetDwsData", RequestNamespace:="https://schemas.microsoft.com/sharepoint/soap/dws/", ResponseNamespace:="https://schemas.microsoft.com/sharepoint/soap/dws/", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Function GetDwsData ( _
document As String, _
lastUpdate As String _
) As String
'使用
Dim instance As Dws
Dim document As String
Dim lastUpdate As String
Dim returnValue As String
returnValue = instance.GetDwsData(document, lastUpdate)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/dws/GetDwsData", RequestNamespace="https://schemas.microsoft.com/sharepoint/soap/dws/", ResponseNamespace="https://schemas.microsoft.com/sharepoint/soap/dws/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
public string GetDwsData (
string document,
string lastUpdate
)
パラメータ
- document
String。ドキュメント ワークスペース サイトのドキュメント ライブラリにあるドキュメントの、サイトに基づいた URL ("共有ドキュメント/ドキュメント名.doc" など)。この引数は、GetDwsData メソッドによって返されるドキュメント リストのコンテキストを提供します。
- lastUpdate
String。前の GetDwsData メソッドまたは GetDwsMetadata メソッドの呼び出しの結果として返された LastUpdate 値、または空の文字列。lastUpdate 以降にドキュメント ワークスペース サイトの一覧が変更されていない場合、GetDwsData メソッドはパフォーマンス上の理由により、一覧のデータの代わりに "変更なし" を返します。
戻り値
次の情報を含む XML ドキュメント フラグメントである文字列。
Title
LastUpdate
User
Members
Assignees
Lists (Tasks、Documents、Links)
例外
例外の種類 | 条件 |
---|---|
DWSError.NoAccess (3) |
GetDwsMetaData メソッドによって返される場合があります。ユーザーが適切な権限を持っていないことを示します。 |
DWSError.NoAccess (3) |
ドキュメント ワークスペース サイトの一覧に関連して、GetDwsData メソッドによって結果として返される場合があります。ユーザーが適切な権限を持っていないことを示します。 |
DwsError.ListNotFound (7) |
ドキュメント ワークスペース サイトの一覧に関連して、GetDwsData メソッドによって結果として返される場合があります。指定された一覧が存在しないことを示します。 |
DwsError.TooManyItems (8) |
ドキュメント ワークスペース サイトの一覧に関連して、GetDwsData メソッドによって結果として返される場合があります。指定された一覧に 99 個を超えるアイテムが含まれていることを示します。 |
備考
GetDwsData メソッドは、ドキュメント ワークスペース サイトに関する一般的な情報と、そのメンバ、ドキュメント、リンク、およびタスクを返します。
例
以下のコード例では、GetDwsData メソッドを使用してドキュメント ワークスペース サイトから情報を返します。この例では、ドキュメント リストのコンテキストとして共有ドキュメントを指定し、Internet Explorer を起動して XML 形式の結果を表示します。この例で使用されているヘルパ関数の全文の詳細については、CanCreateDwsUrl メソッドを参照してください。
Try
Dim strResult As String
strResult = dwsWebService.GetDwsData("Shared
Documents/document_name.doc", "")
If IsDwsErrorResult(strResult) Then
Dim intErrorID As Integer
Dim strErrorMsg As String
Call ParseDwsErrorResult(strResult, intErrorID, strErrorMsg)
MessageBox.Show _
("A document workspace error occurred." & vbCrLf & _
"Error number: " & intErrorID.ToString & vbCrLf & _
"Error description:" & strErrorMsg, _
"DWS Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
Dim strOutputFile As String = "C:\GetDwsData.xml"
Dim tw As System.IO.TextWriter
tw = System.IO.File.CreateText(strOutputFile)
tw.WriteLine(strResult)
tw.Close()
Dim ieXMLViewer As System.Diagnostics.Process
ieXMLViewer = New System.Diagnostics.Process()
ieXMLViewer.Start("iexplore.exe", "file://" & strOutputFile)
End If
Catch exc As Exception
MessageBox.Show("An exception occurred." & vbCrLf & _
"Description: " & exc.Message, _
"Exception", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
try
{
string strResult = "";
strResult = dwsWebService.GetDwsData("Shared
Documents/document_name.doc", "");
if (IsDwsErrorResult(strResult))
{
int intErrorID = 0;
string strErrorMsg = "";
ParseDwsErrorResult(strResult, out intErrorID,
out strErrorMsg);
MessageBox.Show
("A document workspace error occurred.\r\n" +
"Error number: " + intErrorID.ToString() + "\r\n" +
"Error description: " + strErrorMsg,
"DWS Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
string strOutputFile = "C:\\GetDwsData.xml";
System.IO.TextWriter tw =
System.IO.File.CreateText(strOutputFile);
tw.WriteLine(strResult);
tw.Close();
System.Diagnostics.Process.Start("iexplore.exe", "file://" +
strOutputFile);
}
}
catch (Exception exc)
{
MessageBox.Show("An exception occurred.\r\n" +
"Description: " + exc.Message,
"Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
}