http://msdn.microsoft.com/ja-jp/library/ms497054%28v=office.12%29.aspx
http://msdn.microsoft.com/ja-jp/library/ms774561%28v=office.12%29.aspx
に記載されている、MOSSに対して、クエリ Web サービスの QueryEx 利用した検索について
プロジェクトへ、Web参照を追加しspsearch.asmxを読込んで、
C#コードサンプルコードを元に、VB.NETのフォームアプリケーションにて以下のコードを実装してみたのですが
サイトやライブラリを自由に指定して検索の方法や、NTML認証時や、フォーム認証時はどのように実行すればよいのか?
MSDNの資料を見てもいまいちよく分からず、困っております。
public Sub test()
Try
Dim queryXml As String = "sample"
' Instantiate the Web service.
Dim qs As New QueryService
' Use the credentials of the user running the client application.
qs.Credentials = System.Net.CredentialCache.DefaultCredentials
' Execute the QueryEx method, returning the results to a DataSet
Dim qr As DataSet = qs.QueryEx(GetXMLString_KeyWord(queryXml))
Catch ex As Exception
End Try
End Sub
Private Function GetXMLString_KeyWord(ByVal queryText As String)
Dim xmlString As Text.StringBuilder = New Text.StringBuilder()
xmlString.Append("<QueryPacket xmlns='urn:Microsoft.Search.Query'><Query><SupportedFormats>" & _
"<Format revision='1'> urn:Microsoft.Search.Response.Document:Document </Format>" & _
"</SupportedFormats><Context><QueryText language='en-US' type='STRING'>")
xmlString.Append(queryText)
xmlString.Append("</QueryText></Context></Query></QueryPacket>")
Return xmlString.ToString()
End Function
作成・勉強を行う上で、参考になるようなホームページはドキュメント等をご存じの方がいらっしゃればご教授願えないでしょうか?
よろしくお願い致します。