1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
  
     | 
    
      <html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01082276"><META NAME="lcid" CONTENT="1033"><title>Frequently Asked Questions</title><link rel="stylesheet" type="text/css" href="office10.css"><script type="text/javascript" language="Javascript" src="ExpCollapse.js"></script><script type="text/javascript" language="JavaScript" src="inline.js"></script></head><body><p id="ExpandAllLine" class="ExpFav"><a href="#" onclick="ExpandAll()" onkeypress="ExpandAll()" class="DropDown"><img id="picHeader" border="0" src="expandtri.gif" alt="Show All"><span id="ExpandAll">Show All</span></a></p><h1>Frequently Asked Questions</h1><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Troubleshooting</a></p><div id="ExpCol" class="collapsed" border="0">	<div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">My <b class="bterm">Registration</b> or <b class="bterm">Query</b> method doesn't work.</a></p><div id="ExpCol" class="collapsed" border="0"><p>The following checklist includes the most common causes of an empty response packet or an error. For more information, see <a href="rsResearchWS.htm" id="HV01084670" lcid=" ">Building a Research Web Service</a>.<ul><li>Does the <b class="bterm">WebService</b> attribute reference the <b class="bterm">Microsoft.Search</b> namespace?</li><li>Does the <b class="bterm">WebMethod attribute</b> of the <b class="bterm">Registration</b> method reference the <b class="bterm">Microsoft.Search.Registration.Request</b> namespace?</li><li>Does the <b class="bterm">WebMethod</b> attribute of the <b class="bterm">Query</b> method reference the <b class="bterm">Microsoft.Search.Query</b> namespace?</li><li>Does the single string parameter of the <b class="bterm">Registration</b> method (or the <b class="bterm">Discovery</b> method) have the case-sensitive name <code>registrationXml</code>?</li><li>Does the single string parameter of the <b class="bterm">Query</b> method have the case-sensitive name <code>queryXml</code>?</li><li>Does the response packet include the required <b class="bterm">Status</b> element, and a case-sensitive value from the appropriate enumeration? For a list of acceptable values, see <a href="rsReferenceEnums.htm" id="HV01085951" lcid=" ">Enumerations Reference</a>.</li><li>Has an unhandled exception occurred in your code? Your code should trap exceptions and return a properly-formatted XML error response.</li><li>Does the XML generated by your service contain a syntax error? You can validate the response packet, or save it to a file for analysis.</li></ul></p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">How can I improve research service performance?</a></p><div id="ExpCol" class="collapsed" border="0"><p>Since the registration response rarely changes, you can improve the performance of the registration response by taking advantage of the caching technology available in the Microsoft® .NET Framework. Supply a value in seconds for the <b class="bterm">CacheDuration</b> property of the appropriate <b class="bterm">WebMethod</b> attribute. When you expect queries to vary widely, there is no benefit in caching individual query responses. The following example caches the registration response for one hour:<pre><code><WebMethod(CacheDuration=3600)> _
Public Function Registration(registrationXml As String) As String</code></pre></p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">After I test or query my research service several times, it stops working.</a></p><div id="ExpCol" class="collapsed" border="0"><p>You may be encountering the hard-coded limit of ten (10) HTTP connections in Microsoft Internet Information Services (IIS) on non-server editions of Microsoft Windows®, such as Microsoft Windows XP Professional Edition. You can clear these connections by stopping and restarting IIS from Internet Services Manager, or by typing <b class="bterm">iisreset</b> at a command prompt.</p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">I'm not using Microsoft Visual Studio® .NET and I'm having trouble with my SOAP response packets.</a></p><div id="ExpCol" class="collapsed" border="0"><p>You must encode the string response from the research service's Web methods by using <b class="bterm">HTMLEncode</b> or a similar method. In the following SOAP packet format example, the "string" value represents the XML that must be encoded.<pre><code>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
        xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <RegistrationResponse xmlns="urn:Microsoft.Search">
            <RegistrationResult>string</RegistrationResult>
        </RegistrationResponse>
    </soap:Body>
</soap:Envelope>
</code></pre></p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">My service is having intermittent trouble when it calls COM+ components.</a></p><div id="ExpCol" class="collapsed" border="0"><p>To avoid problems caused by a crash or a hang in the COM+ component, you may want to create a background thread to interact with the component. Using a background thread allows you to terminate the thread after a time-out and to return a friendly error message to the <b class="bterm">Research</b> task pane.</p></div></div></div><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Building Research Services</a></p><div id="ExpCol" class="collapsed" border="0"><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Do I need Microsoft Visual Studio .NET to build research services?</a></p><div id="ExpCol" class="collapsed" border="0"><p>No, you do not need Microsoft Visual Studio .NET to build research services; however, Visual Studio .NET greatly simplifies the process of building an XML Web service. You only need a development environment or tool that creates applications capable of sending and receiving SOAP messages; for example, Microsoft Visual Basic® 6.0 and the Microsoft SOAP Toolkit. However, at the minimum, you need  the Microsoft .NET Framework SDK (which includes the Visual Basic .NET and C# compilers) to build and run the source code samples included with this SDK.</p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">I see a Web method named <b class="bterm">Status()</b> in some of the samples. Can I implement a <b class="bterm">Status</b> method in my research service?</a></p><div id="ExpCol" class="collapsed" border="0"><p>No, the <b class="bterm">Status</b> method is for internal use only. The <b class="bterm">Research</b> task pane itself never calls the <b class="bterm">Status</b> method, so implementing this method provides no benefit.</p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Why are the XML response packets returned by research services wrapped in a string?</a></p><div id="ExpCol" class="collapsed" border="0"><p>If a Web service uses a complex data structure that is subject to change or revision, each time the structure changes, the developer would have to create a new interface for all clients that use the service, and revise the client code that handles the response.  For research services in particular, there are many optional elements and sections that support arbitrary namespaces. Wrapping the response packet in a string spares developers the chore of updating client applications every time the Web service is updated.</p></div></div></div><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Registering Research Services</a></p><div id="ExpCol" class="collapsed" border="0"><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">How can a provider register multiple services hosted on different servers by using a single URL?</a></p><div id="ExpCol" class="collapsed" border="0"><p>In this scenario, it is not possible to register all of an organization's services under a single provider. Each distinct <b class="bterm">QueryPath</b> requires a distinct provider and <b class="bterm">RegistrationPath</b>. There is, however, one way to use a single URL to register multiple providers.  By building a discovery server, which returns a list of providers and their registration URLs to Office, these providers and their services can be automatically installed or advertised to users. In fact, you can specify up to five discovery servers with different URLs. For more information, see <a href="rsDiscovery.htm" id="HV01083307" lcid=" ">Configuring Service Discovery</a>.</p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">How can I make my service the default that appears in the list in the <b class="bterm">Research</b> task pane?</a></p><div id="ExpCol" class="collapsed" border="0"><p>It is not possible to designate a service as the default. When the <b class="bterm">Research</b> task pane opens, by default, a drop-down list displays the first available category of services. After the first time the task pane is opened, until it is closed or reset (for example, by changes in the <b class="bterm">Research Options</b> dialog box), the <b class="bterm">Research</b> task pane uses the most recently queried service as the default in its drop-down list.</p></div></div></div><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Querying Research Services</a></p><div id="ExpCol" class="collapsed" border="0"><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Is the <b class="bterm">Research</b> task pane itself programmable?</a></p><div id="ExpCol" class="collapsed" border="0"><p>No, this first version of the <b class="bterm">Research</b> task pane does not expose programmability features for automation. Although you can use the <b class="bterm">WordBasic.ResearchLookup</b> command to launch a query from Microsoft Word 2003, the use of WordBasic is not encouraged. This method queries on the text at the insertion point  in the document. It is not possible to select the services to query. In addition to the WordBasic method, you can:<ul><li>Open the <b class="bterm">Research</b> task pane (without executing a query) by using the following code:<pre><code>	Word.Application.TaskPanes(wdTaskPaneResearch).Visible = True</code></pre></li><li>Use the <b class="bterm">SendKeys</b> method to send the keyboard shortcut that launches  a query. However, this approach is not reliable since the user can modify the keyboard shortcut.</li> </ul></p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Can I use cookies in a research service?</a></p><div id="ExpCol" class="collapsed" border="0"><p>Yes, you can use cookies in a research service, but only if the user's Web browser is Microsoft Internet Explorer. This is because the <b class="bterm">Research</b> task pane looks for cookies in the specific folder where Internet Explorer saves them. The <b class="bterm">Research</b> task pane can:<ul><li>Read cookies written by the browser.</li><li>Write cookies that are recognized by the browser.</li><li>Use both session cookies and persistent cookies.</li></ul></p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">I'm having trouble with the <b class="bterm">Range</b> and <b class="bterm">Count</b> elements when the user pages through my query results.</a></p><div id="ExpCol" class="collapsed" border="0"><p>The <b class="bterm">Range</b> element of the <b class="bterm">Microsoft.Search.Response</b> namespace contains the <b class="bterm">StartAt</b>, <b class="bterm">Count</b>, and <b class="bterm">TotalAvailable</b> elements to give the <b class="bterm">Research</b> task pane information about the number of query results. <b class="bterm">Count</b> represents the desired "page size," or number of results to display at one time in the pane. The <b class="bterm">Research</b> task pane displays these values in a message that indicates the user's position within the query results.</p><ul><li><b class="bterm">TotalAvailable</b> If this element is absent, the <b class="bterm">Research</b> task pane assumes that there are no more results.</li><li><b class="bterm">Count</b> Normally the <b class="bterm">Research</b> task pane displays:<pre><code>StartAt "-" (StartAt + Count - 1) " of " TotalAvailable</code></pre> In cases such as the end of the results, where <code>(StartAt + Count - 1) > TotalAvailable</code>, the <b class="bterm">Research</b> task pane displays:<pre><code>StartAt "-" Min((StartAt + Count - 1), TotalAvailable) " of " TotalAvailable</code></pre> Thus you do not have to worry about the message in the case where <code>(StartAt + Count - 1) > TotalAvailable</code>.</li> </ul><p>The <b class="bterm">Range</b> element of the <b class="bterm">Microsoft.Search.Query</b> namespace returns the value of these elements from the previous response to the service on the next requery, so the service does not need to remember its position in the list of query results.</p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">How can I create a drop-down list of actions for a term in my query results, similar to the <b class="bterm">Copy</b>/<b class="bterm">Insert</b>/<b class="bterm">Look up</b> list provided by the Thesaurus service?</a></p><div id="ExpCol" class="collapsed" border="0"><p>Use the Tabular element provided in the <b class="bterm">Microsoft.Search.Response.Content</b> namespace. The following example generates the drop-down action list for the word "chocolate" appearing in the query results. (Note that in this sample, the <b class="bterm">Microsoft.Search.Response.Content</b> namespace is registered at the document level with the prefix "c".)<pre><code>
<c:Content ...  >
    <c:Tabular>
        <c:Record>
            <c:Name>chocolate</c:Name>
            <c:Actions>
                <c:Insert/>
                <c:Copy/>
                <c:NewQuery query="chocolate"/>
            </c:Actions>
        </c:Record>
    </c:Tabular>
</c:Content>
</code></pre></p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">My query results wrap to a new line where I don't want them to.</a></p><div id="ExpCol" class="collapsed" border="0"><p>The <b class="bterm">Microsoft.Search.Response.Content</b> namespace provides the <b class="bterm">Line</b> element to allow you to combine multiple elements without a line break after each element. However, due to the limited width of the <b class="bterm">Research</b> task pane, you may still need to wrap lines within the <b class="bterm">Line</b> element.</p></div></div><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">The records in my Tabular control run off the side of the screen.</a></p><div id="ExpCol" class="collapsed" border="0"><p>The <b class="bterm">Research</b> task pane does not wrap lines for the contents of the Tabular control.</p></div></div></div><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Using Forms</a></p><div id="ExpCol" class="collapsed" border="0"><div class="ind"><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">When a user submits a requery from the form provided by my research service, the <b class="bterm">ServiceParameters</b> element of the requery request doesn't contain the values of some of the form controls.</a></p><div id="ExpCol" class="collapsed" border="0"><p>The <b class="bterm">ServiceParameters</b> element from the <b class="bterm">Microsoft.Search.Office.ServiceParameters</b> namespace contains only the values of form elements whose values can change. For example, it reports the values of drop-down lists and of text boxes. However it does not report the values of controls with static values, such as buttons or hyperlinks. Therefore, for example, if you display a series of hyperlinks with the <code>action="requery"</code> attribute, the <b class="bterm">Action</b> element reports the unique ID of the hyperlink selected by the user, but the <b class="bterm">Parameters</b> section does not include an element for the selected hyperlink because of its static value.</p></div></div></div><center><a href="XMLSchemaCopyright_HV01147162.htm">©2003-2004 Microsoft Corporation. All rights reserved.</a>  
Permission to copy, display and distribute this document is available at: <a 
href="http://r.office.microsoft.com/r/rlidAWSContentRedir?AssetID=XT010988631033&CTT=11&Origin=HV011232471033" 
target="_new">http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp</a></center></body></html> 
     |