469,909 Members | 1,799 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

No Query Text Received

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
Sep 26 '06 #1
1 1206
"owenmj" <ow****@discussions.microsoft.comwrote in message
news:F0**********************************@microsof t.com...
>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")
Is QueryXML.Length = 0 at this point in your code? If so, then there was no
point in including the rest of your code.

If it was not blank at this point, please tell me, and I'll take another
look at your code.

P.S. Not everyone here knows about the Research Pane. I don't, for instance.
You might want to post a few links to information on the Research Pane.

John
Sep 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Reginald | last post: by
3 posts views Thread by cassandra.flowers | last post: by
36 posts views Thread by Liam.M | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.