views:

112

answers:

0
+1  Q: 

Search Web Service

I have the following XML from: http://msdn.microsoft.com/en-us/library/bb625950.aspx

And making a simple search:

SearchServiceLab.SearchService.QueryService searchService = new SearchServiceLab.SearchService.QueryService(); searchService.Credentials = System.Net.CredentialCache.DefaultCredentials; string queryString = keywordQueryTemplate.Replace ("query_text_placeholder", KeywordTextBox.Text.Trim()); string queryResults = searchService.Query(queryString); MessageBox.Show(queryResults); DataSet resultDataset = searchService.QueryEx(queryString); ResultDataGridView.DataSource = resultDataset.Tables[0];

I am always receiving an exception:

Server did not recognize the value of HTTP Header SOAPAction: http://microsoft.com/webservices/SharePoint/QueryService/QueryEx.

However,

this works when I call the searchService.Query(queryString) method, it just doesn't work with QueryEx.

Any ideas?

Thanks