Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2006

Tip: Looking for answers? Try searching our database.

No Query Text Received

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
owenmj - 26 Sep 2006 16:04 GMT
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
John Saunders - 26 Sep 2006 18:04 GMT
>I have a written a web service which takes some user input and then looks
>up
[quoted text clipped - 17 lines]
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.