Show All

# Toolkit Sample

The Toolkit sample research service accepts a query response file as input and displays the content of the query response, as delimited by the Content element. This tool facilitates the debugging of a research service while it is being developed.

Configuring the Toolkit research service

The SDK provides the source files toolkit.asmx and toolkit.asmx.cs. This section describes how to build a Toolkit research service as a Web service based on these files.

Requirements

- Microsoft® Office 2003
- Microsoft .NET Framework 1.0 or later
- Microsoft .NET Framework 1.0 Software Development Kit, or a later release
- Microsoft Internet Information Services (IIS) 5.0 or later

Note IIS should be installed before you set up the Microsoft .NET Framework SDK. If you have installed or re-installed IIS after setting up the Microsoft .NET Framework SDK, you will experience unexpected behavior when you try to view ASP.NET pages. To fix this, register ASP.NET with IIS again by running the aspnet_regiis.exe utility. For more information, see Knowledge Base article 306005 , "HOWTO: Repair IIS Mapping After You Remove and Reinstall IIS.”

Configure the research service

1. Do the following:
   - If you have installed the Research SDK on the computer that hosts the IIS server ServerName, go to step 2.

   - If you have installed the Research SDK on a computer different from ServerName:

     1. Create a folder called Tools on ServerName.

        Note To avoid access problems when running the Toolkit Web service, do not place the Tools folder under the My Documents folder.

     2. From the computer that the SDK is installed on, copy the contents of the Tools folder (under Drive:\Program Files\Microsoft Office 2003 Developer Resources\Microsoft Office 2003 Research Service SDK) to the Tools folder on ServerName.

2. Map the Tools folder to a virtual directory named ToolsServices on ServerName

   1. From the Microsoft Windows® Start menu, click Control Panel, and then double-click Administrative Tools.
   2. Double-click Internet Information Services.
   3. In the Internet Information Services folder tree, expand the folders for the local computer, the Web Sites directory, and the Default Web Site.
   4. Create a new virtual directory named ToolsServices by right-clicking Default Web Site and selecting New and Virtual Directory. Follow the instructions in the Virtual Directory Creation Wizard to map Tools to ToolsServices.

The Research Service SDK provides the assembly for this research service Toolkit.dll in Tools\Bin.

If you need to modify toolkit.asmx.cs:

With the modified toolkit.asmc.cs located on ServerName, at the Windows command prompt, change to the Tools\Toolkit folder and run make.bat to compile and build the Web service. The assembly file toolkit.dll will be generated in the Tools\Bin folder.

Note Make.bat uses the Microsoft® Visual C# command-line compiler, csc.exe, which is part of the Microsoft .NET Framework SDK. If necessary, modify make.bat to include a search path for the compiler.

Searching the Toolkit research service

Before you can search on the Toolkit research service for the first time, add the research service to the Research task pane using the URL http://ServerName/ToolsServices/Toolkit/toolkit.asmx. For more information about adding a research service, see Adding Services through the Office User Interface.

1. On the Research task pane, under Search for, type the full path name of the file that contains a query response.

   Note If the file does not reside on your local computer, make sure that the query response file is accessible from your computer. The query response must be an XML file that supports the Microsoft.Search.Response Schema. For an overview of the query schemas, see XML Schemas Overview.

2. The Research Service SDK provides a set of sample files containing query responses. You can list these query response files by typing dir under Search for, and then clicking any of the files to display the content. Some of the sample files contain smart tags that facilitate inserting or copying text specified in the query response file.
3. To view all the options of the Toolkit research service, type help under Search for.

Design of the Toolkit research service

The Toolkit research service specifies two Web methods, Query and Registration, under the Search namespace. The page http://ServerName/ToolsServices/Toolkit/toolkit.asmx provides a brief description and a hyperlink to the formal definition of each method.

Query

This method parses input from the given file name, determines if it contains a valid query response, and returns an appropriate query response. Then the Research task pane displays the appropriate results based on the returned query response. The query response supports the Microsoft.Search.Response Schema.

Registration

This method is called when you initially add the Toolkit research service to the task pane. At that point, it sends a registration request. This method always returns a registration response. The registration response supports the Microsoft.Search.Registration.Response Schema.

For more information about the research service schemas, see XML Schemas Overview.

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp