coldfusion

Parsing XML with Unicode characters in Coldfusion

寵の児 提交于 2019-12-14 01:26:36
问题 I'm connecting to an external API using cfhttp, with the returned data in XML format. I have no control over the API or the format it's returned in. When the data is returned, I loop through it and do cfquery inserts into my own MySQL database, which has a UTF8 charset. However, some of the data appears to have unicode characters (it appears it should be the £ (pound) sign, but when I cfdump the XMLParsed data, it's showing as a diamond with a ? inside). I've attached a cropped screenshot

CFHTTP - Read data from URL transferring in chunks

微笑、不失礼 提交于 2019-12-14 01:24:09
问题 I am trying to get a file from a URL using cfhttp but it seems that the provider is sending the data in chunks. <cfhttp method="get" url="https://www.test.com/somefile.xml"> </cfhttp> The response header is having Transfer-Encoding as chunked and is missing Content-Length . Also, the statusCode is 200 Ok but the FileContent is showing " Connection Failure ". Any suggestions? 回答1: Finally, I used java.net.URL to get this working: <cfset local.objURL = createObject( "java" , "java.net.URL" )

Coldfusion How to authenticate webservice getShipmentSimpleQuote of WWEx?

五迷三道 提交于 2019-12-14 00:43:03
问题 How to invoke "getShipmentSimpleQuote" webservice from "Worldwide Express Freight Quote Web Service" ? I am trying to invoke/consume this webservice but i am getting error saying "Invalid authentication info" .here is wsdl file data- WWEXFreightQuoteService.wsdl <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://www.wwexship.com" xmlns:impl="http://www.wwexship.com" xmlns:intf="http://www.wwexship.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns

Can we renew session in Coldfusion?

Deadly 提交于 2019-12-14 00:36:46
问题 I am storing 5-6 variable values in my session. Any suggestions on how can I renew my session struct when its about to expire? I am using Coldfusion 8. Thanks!! 回答1: Use AJAX to ping the server to keep the session alive Or just simply extend the session timeout timeSpand. 回答2: Any call to a CFM page from that session would cause the session to be extended. What I have seen done is a JS timer will be running and end shortly before the session expires. When the timer runs up it triggers a popup

How to return both an “id” and “text”

我是研究僧i 提交于 2019-12-13 19:53:05
问题 I am using AutoComplete to search by name. I'm able to output the names, but after submitting the form, I would like to pass the emp_id value, not the fullname . How can I modify it to get the emp_id value, not the fullname ? I would like it after I submit the form I get the emp_id not the fullname value. search_employee.cfc <cfcomponent> <cffunction name="queryNames" access="remote"> <cfargument name="searchPhrase" /> <cfquery name="query_names" datasource=""> SELECT fullname ,emp_id .... <

ColdFusion & Ajax: Error Invoking CFC

不问归期 提交于 2019-12-13 19:24:15
问题 I have tried multiple tutorials on this topic from Forta.com and yet run into the same error: "Error invoking CFC/....(file path)../wgn.cfc: Internal Server Error [Enable debugging by adding 'cfdebug to your URL parameters to see more info]" I am working on my local machine and testing as localhost. Running WinXP Pro with sp3. Using Coldfusion's web server. Both my .cfm and .cfc are in the same folder under the the webroot. In my case: c:\ColdFusion9\wwwroot\bridges(.cfm and .cfc here) So,

Can't output simple array?

[亡魂溺海] 提交于 2019-12-13 19:12:53
问题 I've been trying to figure out why my array won't output. I did a var dump on the array and it dumps it just fine but when I try to output it, it returns fatal error. In addition, I figured that maybe I had to probably loop over the array in order to access it, so I tried that too and managed to loop over the array by doing a var dump but when I output it, it breaks the page. Here is my code that I attempted i've been trying for almost 3 hours now trying various things. ColdFusion: <cfset

Running Lucee on Tomcat and need to server a JSP page

天涯浪子 提交于 2019-12-13 18:06:45
问题 I have a Lucee box that is running with Tomcat. Everything is great with the site and CFM pages. I was recently given a page in JSP that the client would like to run on the site. Everything I had read says no problem so I agreed to run it. Put the file in a directory and instead of "processing" it ran like and html page would and I could see the code. Realized that Tomcat hadn't been instructed to process JSP files so I added <url-pattern>*.jsp</url-pattern> to: <servlet-mapping> <servlet

ColdFusion mail sending capacity

北城余情 提交于 2019-12-13 18:01:51
问题 I am currently working on a newsletter application which needs to sent around 20K mails in a single shot. I feel, ColdFusion mail sending capacity will not be suitable for this. I don’t have any metrics with me to prove this. I searched around in web about this, I found there are lot of complains about this kind of bulk mail sending process using built in CFMAIL. Few of them are, Java heap size error IOException while sending message Mail Spool Lock Mail Spool Timeout We are using Adobe

Is it inefficient to use implicit struct creation (a.k.a. shorthand or literal notation) in function parameters?

北慕城南 提交于 2019-12-13 17:59:08
问题 Bear with me on this... Say I have an existing struct: <cfset struct1 = {key1 = "foo", key2 = "bar"}> ...to which I want to add some key/value pairs. The typical approach would be something like: <cfset struct1.key3 = "baz"> <cfset struct1.key4 = "qux"> <cfset struct1.key5 = "quux"> Alternatively, I could use structAppend(): <cfset struct2 = {key3 = "baz", key4 = "qux", key5 = "quux"}> <cfset structAppend(struct1, struct2, false)> ... which has the added bonus of allowing me to control