I have a written a web service which takes some user input and then looks up
the relevant details on a SQL server.
All works fine until I embed it in the Research pane - at which point I
receive no query text when I invoke the service
I'm deploying the service on my local machine so is there an IIS setting
that I have not set that stops the data being received? ..or is the code
wrong?
QueryXML is always "" when used in the research pane...
Any help would be greatly appreciated
Mike
Query code follows:
<WebMethod(Description:="Query Method")Public Function Query(ByVal
QueryXML As String) As String
'SavePacket(QueryXML, "query.txt")
Dim xmlQuery As XmlDocument = New XmlDocument
xmlQuery.LoadXml(QueryXML)
Dim nm As XmlNamespaceManager = New
XmlNamespaceManager(xmlQuery.NameTable)
nm.AddNamespace("msq", "urn:Microsoft.Search.Query")
Dim queryTerm As String =
xmlQuery.SelectSingleNode("//ns:QueryText", nm).InnerText
Dim domain As String =
xmlQuery.SelectSingleNode("/msq:QueryPacket/msq:Query",
nm).Attributes.GetNamedItem("domain").Value
Dim queryId As String =
xmlQuery.SelectSingleNode("/msq:QueryPacket/msq:Query/msq:QueryId",
nm).InnerText
xmlQuery = Nothing
Dim ioMemStream As New MemoryStream()
Dim myXMLwriter As New XmlTextWriter(ioMemStream, Nothing)
With myXMLwriter
.Indentation = 4
.IndentChar = " "
.WriteStartDocument()
.WriteStartElement("ResponsePacket",
"urn:Microsoft.Search.Response")
.WriteAttributeString("providerRevision", "1")
.WriteStartElement("Response")
.WriteAttributeString("Domain", domain)
.WriteElementString("QueryID", queryId)
.WriteStartElement("Range")
.WriteStartElement("Results")
.WriteStartElement("Content",
ns:="urn:Microsoft.Search.Response.Content")
GetMatterInfo(CInt(queryTerm), myXMLwriter)
.WriteEndElement() ' Content
.WriteEndElement() ' Results
.WriteEndElement() ' Range
.WriteElementString("Status", "SUCCESS")
.WriteEndElement() ' Response
.WriteEndElement() ' ResponsePacket
.WriteEndDocument()
End With
myXMLwriter.Flush()
ioMemStream.Flush()
ioMemStream.Position = 0
Dim iostReader As New IO.StreamReader(ioMemStream)
Query = iostReader.ReadToEnd.ToString
End Function
END CODE