473,394 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1341
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dan | last post by:
Hello, Am trying to construct a query that'll both compute elapsed time based on certain criteria and sum this up for a subset of records. Sample Data that I'm working with: Row Ev_Time ...
20
by: xixi | last post by:
hi, we use db2 udb v8.1 on windows, i am trying to use federated database objects to create wrapper, even though i have update dbm cfg using federated yes, i still get error "the instance for the...
3
by: Reginald | last post by:
I am trying to create a query based on 1 of 3 date fields from a table called "T40". the first date is T40RbtDte, 2nd is T40RbtRecDte, 3rd is T40RbtDueDte. I have created a form to alow the user...
3
by: cassandra.flowers | last post by:
Hi, I was wondering if it is possible (Using access) to have a query parameter as a drop down box rather than a text box? e.g. typing as criteria for a query produces a box with a text box...
36
by: Liam.M | last post by:
hey guys, I have one last problem to fix, and then my database is essentially done...I would therefore very much appreciate any assistance anyone would be able to provide me with. Currently I...
7
by: bryant | last post by:
Hi all. I am new to ASP and working in Expression Web. The following query displays the information I need in the gridview for a single record. SELECT "OE_HDR"."ORD_NO", "OE_HDR"."CUST_NAM",...
10
by: mbatestblrock | last post by:
I dont know if this is possible.. I have a form frmCustomers with a subform sfrmCustomers and in the subform I have a unbound text field in the footer txtCOUNT with the control source of ...
3
by: jasocke2 | last post by:
What I have, I think is quite a simple question, I have looked around for quite a while but can't seem to find the solution. What I have is a database with 1 table, the fields that I am...
5
by: Just_a_fan | last post by:
I tried to put an "on error" statement in a routine and got the message that I cannot user "on error" and a lamda or query expression in the same routine. Help does not list anything useful for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.