C# MSN Search Web Service 失败 根据资料说明,分别进行两种操作,结果均失败。 使用MSN Search Web Service开发搜索应用 http://www.microsoft.com/china/MSDN/library/WebServices/WebServices/msnsearch.mspx 结果就不行了: 2. 添加MSN Search API XML Web Services引用集
[C#] using WindowsSearchForm.MSNSearch; 添加了 http://soap.search.msn.com/webservices.asmx?wsdl "MSNSearchService" 说明 方法 Search(Request As SearchRequest) As SearchResponse 但是名称是:com.msn.search.soap 这里USING之后: \msnserch\Form1.cs(10): 类型或命名空间名称“MSNSearch”在类或命名空间“WindowsSearchForm”中不存在(是否缺少程序集引用?) 然后又到 网站下载SDK File Name: MSNSearchWebServiceSDK.exe Version: V0.5.0 Date Published: 9/14/2005 http://www.microsoft.com/downloads/details.aspx?FamilyID=c271309b-02de-42a7-b23e-e19f68667197&displaylang=en The MSN Search SDK provides documentation that describes the core concepts, requirements, development guidelines, and class library for the MSN Search Web Service. The SDK also contains sample code that demonstrates application development techniques using the MSN Search Web Service. 解压之后,打开 WindowsSearchForm.sln 结果这里就报错 // Catch SOAP exceptions. catch(SoapException fault) { System.Diagnostics.Trace.WriteLine(fault.ToString()); } System.Web.Services.Protocols.SoapException: Client Error at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at WindowsSearchForm.MSNSearch.MSNSearchService.Search(SearchRequest Request) in \WindowsSearchForm\Web References\MSNSearch\Reference.cs:line 38 at WindowsSearchForm.frmSearchSample.btnSearch_Click(Object sender, EventArgs e) in \windowssearchform\searchform.cs:line 551 Reference.cs:line 38 object[] results = this.Invoke("Search", new object[] { searchform.cs:line 551 // Execute the search request and return the search response by // setting the SearchResponse to MSNSearchService.Search(SearchRequest). searchResponse = s.Search(searchRequest); MSNSearchService s = new MSNSearchService() 字体:大 中 小 |