作者:范维肖
微软从去年就在MSDN上贴出了关于编写Office 2003 中 Research 服务的文章,博客堂的开心大哥等也都做了自己的Research服务。但是有许多朋友反映MSDN讲的不好,这里给大家贴出来的是一篇对代码的讲解的文章,配上拙劣的翻译,希望能帮助大家更快捷更完善的理解。
About the Research Pane
关于Research Pane
The research pane will appear if you hold down the Alt key and click in an office document. By default the pane searches for a term using one of several built-in resources.
当你按住Alt键并且点击office文档的时Research Pane(以下简称RP)将会出现。RP会默认的限制从几个内置的资源中选一个来查找。
It is available in the following Office 2003 products; Word, PowerPoint, Excel and Outlook.
在Office2003产品的Word,PowerPoint,Excel和Outlook里可以被使用。
You can customize the resources available in the Research pane by clicking 'Research options.' at the bottom of the Pane.
点击在RP面板底部的‘Research Options’可以在RP里自定义有效的research资源。
The pane allows you to search for a single word, or by using the drop-down list, and provides a panel that will display the search results.
这个面板允许你查找单词或者通过下来菜单来选择,来用一个面板来显示你的搜索结果
The biggest strength of the Research Pane in Office 2003 is its extensibility.
Office2003的RP最大的优势在于它的可扩展性。
Understanding the Research Pane Environment
熟悉Rp的环境
A Research pane service can be setup over the Internet as an XML Web Service. In order for an XML Web Service to be accessible through the Research Pane it must consist of a Registration and Query method - which must conform to the Interface standard.
RP服务是一种XML的web服务,能通过Internet来安装。为了能够让RP使用这种XML的web服务,必须有符合接口标准的两个方法:Registration和Query。
P.S.:其实这里很好理解,因为XML你可以随便写,只有符合规定就可以了,而这个web服务是基于XML的,所以RP要来规定一个口令(接口),只有这个web服务先能对上这个口令,才能被认为是为了RP而专门制作的web service,然后就可以被Office2000的RP允许注册了,然后再配上一个满足RP查询格式的query方法,就OK了。
[WebService(Namespace="urn:Microsoft.Search")]
public class vcMessage : System.Web.Services.WebService为了让RP服务能够认识我的web服务,我们必须把我们的web服务的namespace设置为urn.Microsoft.Search,否则就不能Register这个服务了。
从我的Office 2003里扣出来的:

浙公网安备 33010602011771号