Query Viewer Sample

The Query Viewer sample research service displays a query packet in plain text. This tool facilitates debugging a research service during development.

Configuring the Query Viewer research service

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 one of the following:

    • If you have installed the Research SDK onto the computer that hosts the IIS server ServerName, go to step 2.

    • If you have installed the Research SDK on a computer other than ServerName:

      1. Create a folder named "Tools" on ServerName.

        Note  To avoid access problems when running the Query Viewer 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 IIS server 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, queryviewer.dll, in Tools\Bin.

If you need to modify queryviewer.asmx.cs:

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

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

Using the Query Viewer research service

ResearchServerNameAdding Services through the Office User Interface

In the Research task pane, type any text under Search for. This becomes the query text for the query.

The Query Viewer research service will display the entire query packet in plain text in the task pane, with each element and its value in the packet.

Design of the Query Viewer research service

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

Query

This method returns a query response that displays the entire response packet in plain text on the Research task pane. The query response supports the Microsoft.Search.Response Schema.

Registration

This method is called when you initially add the Query Viewer research service to the task pane and 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.