HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Error in Live Lookup


#1

Hello everyone, I have one question. After I run Live Lookup I keep getting error:

An Error Occurred
XML Parser Returned Error: Invalid document end (5)
Source Path: http://apps/staffsearch.cfm
Call Type: http
View XML

Can anyone tell me what can cause this error and how can be fixed?

Thanks in advance.


#2

That URL still doesn’t look correct. Is the ColdFusion server the same server as HelpSpot is on? If not that URL won’t work, you need to use an IP or domain name. Even if it is sometimes it may not be able to resolve locally like that so you’re always better off using the IP of the location of the Live Lookup script.


#3

If I create simple test.xml file like this:

<?xml version="1.0" encoding="utf-8"?>
<livelookup version="1.0" columns="first_name,last_name">
<customer>
	<customer_id>12334</customer_id>
	<first_name>Bob</first_name>
	<last_name>Jones</last_name>
</customer>
<customer>
	<customer_id>157</customer_id>
	<first_name>K</first_name>
	<last_name>Howes-Vonstein</last_name>
</customer>
</livelookup>

and make a call: http://apps/test.xml that works for me, but if I use my coldfusion query then does not work. I reduced blank space in between customer tags too but still does not work.
Here is my code:

<?xml version="1.0" encoding="utf-8"?><cfsilent>
<cfquery name="myQuery" datasource="Test">
    Select StaffId,FirstName,LastName
    From Staff
</cfquery>
<!-- These are standard elements which can be inserted back into a request -->
</cfsilent>
<livelookup version="1.0" columns="first_name,last_name"><cfoutput query="myQuery">
	<customer>
	    <customer_id>#XMLFormat(StaffId)#</customer_id>
            <first_name>#XMLFormat(FirstName)#</first_name>
            <last_name>#XMLFormat(LastName)#</last_name>
            <email>tmyers@sampleinc.com</email>
            <phone>845-555-9812</phone>
            <organization>Sample Inc</organization>
            <password>thyekbg</password>
	</customer>
</cfoutput></livelookup>

Do you know maybe where is my error inside of my code or something else causing the problem?


#4

This is the new error that I’m getting.

An Error Occurred
XML Parser Returned Error: Undeclared entity warning (27)
Source Path: http://209.xx.xxx.xxx/helpspot\staffsearch.cfm
Call Type: http
View XML

#5

OK so if the XML file works then it must be something with the Coldfusion. I don’t really recall that much about how Coldfusion works. I’m sure this is a pretty straight forward setup. What’s the xml you get when you go to the cfm page in your browser?


#6

This is an XML what I got:

<?xml version="1.0" encoding="utf-8"?>
<livelookup version="1.0" columns="first_name,last_name">
<customer>
    <customer_id>6</customer_id>
    <first_name>Jon</first_name>
    <last_name>Smith</last_name>
    <email>tmyers@sampleinc.com</email>
    <phone>845-555-9812</phone>
    <organization>Sample Inc</organization>
    <password>thyekbg</password>
</customer>
<customer>
    <customer_id>7</customer_id>
    <first_name>Mark</first_name>
    <last_name>Moore</last_name>
    <email>tmyers@sampleinc.com</email>
    <phone>845-555-9812</phone>
    <organization>Sample Inc</organization>
    <password>thyekbg</password>
</customer>
<customer>
    <customer_id>94</customer_id>
    <first_name>Denis</first_name>
    <last_name>Simpson</last_name>
    <email>tmyers@sampleinc.com</email>
    <phone>845-555-9812</phone>
    <organization>Sample Inc</organization>
    <password>thyekbg</password>
</customer>
</livelookup>

#7

This doesn’t match with your CFM template above, it has more fields like phone and such. Did you limit the results as you said there was 10,000 records no? If you have limited them try now in HelpSpot.


#8

I just added these few fields later, they match my cold fusion query now. I tried to limit my query but I still getting this error:

An Error Occurred
XML Parser Returned Error: Undeclared entity warning (27)
Source Path: http://209.xx.xxx.xxx/helpspot\staffsearch.cfm
Call Type: http
View XML

#9

That XML doesn’t look to be from the CFM is it? It looks like data from our sample XML.


#10

You can see I updated my question that is my output from cold fusion after I check page source view. I just used yours hard coded examples.