Posting XML With ColdFusion, CFHttp, And CFHttpParam

Posted June 1, 2007 at 4:27 PM

Tags: ColdFusion

I use ColdFusion and CFHttp all the time to grab data from other pages, but it's very rare that I ever post something. In the past, I have fooled around with posting files and cookie parameters, but not much exploration has gone on. But now, I am going to be building an API for a client project that is going to accept XML data strings. I am also going to have a hand in building the applications that make requests to this API.

So, I thought this was a good time to experiment with posting XML with ColdFusion and CFHttp. The first thing I did was look at ColdFusion's CFHttpParam tag because I know that it has a lot of available types. As it turns out, CFHttpParam has a type, XML. When you select this type, ColdFusion identifies the request as having a content-type of text/xml and uses the given XML as the body of the HTTP request. How useful is that?!?

If XML was not available as a CFHttpParam type, it would be ok. Without it, we would have to use one CFHttpParam of type BODY and another to define the mime type as text/xml, but this would accomplish the same thing.

If you are used to dealing with requests all the time (from a browser), but these really only ever deal with the URL and FORM scopes it might not be obvious as to what a request "body" even is or where it can be found. ColdFusion provides the function GetHttpRequestData() which makes the request headers and content available in a nice structure. If you put this code into a new ColdFusion template and run it:

 Launch code in new window » Download code as text file »

  • <cfdump
  • var="#GetHttpRequestData()#"
  • label="Get Http Request Data"
  • />

... you will get something that looks like:


 
 
 

 
ColdFusion Get Http Request Data Structure  
 
 
 

As you can see, all the request data is now easily accessible. We are going to be posting our XML data as the request body which will be available in the Content attribute of the above structure (currently showing an empty string).

Ok, to explore this, I set up a demo with two pages: one page creates a CFHttp request and the other page receives it and returns a confirmation value. Simple stuff, mostly proof of concept. Here is the page that posts the XML data using CFHttp:

 Launch code in new window » Download code as text file »

  • <!--- Get the URL. --->
  • <cfset strURL = (
  • CGI.server_name &
  • GetDirectoryFromPath( CGI.script_name ) &
  • "cfhttp_catch.cfm"
  • ) />
  •  
  •  
  • <!--- Create the XML data to post. --->
  • <cfsavecontent variable="strXML">
  •  
  • <transaction>
  • <type>Debit</type>
  • <cost>19.99</cost>
  • <date>06-01-2007</date>
  • <item>
  • <sku>GGW190034394</sku>
  • <name>Girls Gone Wild Vol. 13</name>
  • </item>
  • </transaction>
  •  
  • </cfsavecontent>
  •  
  •  
  •  
  • <!---
  • Post the XML data to catch page. We are going
  • to post this value as an XML object will actually
  • just post it as an XML body.
  • --->
  • <cfhttp
  • url="#strURL#"
  • method="POST"
  • useragent="#CGI.http_user_agent#"
  • result="objGet">
  •  
  • <!---
  • When posting the xml data, remember to trim
  • the value so that it is valid XML.
  • --->
  • <cfhttpparam
  • type="XML"
  • value="#strXML.Trim()#"
  • />
  •  
  • </cfhttp>
  •  
  •  
  • <!--- Output the return message. --->
  • Message: #objGet.FileContent#

The XML posted by the above page is being caught and processed by this page:

 Launch code in new window » Download code as text file »

  • <!---
  • All data that is posted to this page will now
  • be part of the HTTP Request data structure. Get
  • a reference to this structure.
  • --->
  • <cfset objRequest = GetHttpRequestData() />
  •  
  • <!---
  • Our XML data will be the content of the request.
  • Let's grab it out of the request structure. When
  • we do this, trim the value to help create a
  • valid XML string.
  • --->
  • <cfset strXML = objRequest.Content.Trim() />
  •  
  • <!---
  • At this point, we may or may not have a valid XML
  • string. Before we try to do any parsing, let's
  • validate it.
  • --->
  • <cfif IsXml( strXML )>
  •  
  • <!---
  • Now that we know the request was of valid
  • format, we can parse the XML document.
  • --->
  • <cfset xmlData = XmlParse( strXML ) />
  •  
  • <!---
  • For this demo, we are going to validate the
  • request ONLY for Credit / Debit.
  • --->
  • <cfset xmlType = XmlSearch(
  • xmlData,
  • "/transaction/type"
  • ) />
  •  
  • <!---
  • Check to see if we found a Type node as a child
  • to the transaction root node.
  • --->
  • <cfif ArrayLen( xmlType )>
  •  
  • <!---
  • We found the type - this request has been
  • validated. Now, we just need to return a
  • confirmation message.
  • --->
  • <cfset strResponse = ("#xmlType[ 1 ].XmlText# approved") />
  •  
  • <cfelse>
  •  
  • <!--- We did not find a valid node. --->
  • <cfset strResponse = "ERROR2: Missing type node" />
  •  
  • </cfif>
  •  
  • <cfelse>
  •  
  • <!---
  • The passed in data was not a valid XML string.
  • Store our error into our response message.
  • --->
  • <cfset strResponse = "ERROR1: Invalid request (Bad XML)" />
  •  
  • </cfif>
  •  
  •  
  • <!---
  • ASSERT: At this point, no matter what happend (if the
  • request was valid or invalid) we will have a message
  • in our response string.
  • --->
  •  
  •  
  • <!--- Return response string. --->
  • <cfcontent
  • type="text/plain"
  • variable="#ToBinary( ToBase64( strResponse ))#"
  • />

For the purposes of this demo, we are doing very little validation on the XML data as this is not a true API. If we run the above pages, we get the following return value:

Message: Debit approved

The process worked quite nicely. Now, posting XML data is related to a SOAP request. SOAP, from what I can understand, is standard for formatting XML requests. If you go that route, ColdFusion provides many SOAP-related convenience functions that are worth looking into.

Download Code Snippet ZIP File

Post Comment  |  Ask Ben  |  Permalink  |  Other Searches  |  Print Page




Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

Jul 16, 2007 at 12:03 PM // reply »
2 Comments

Hi, I have found the information in your tutorial great for an integration I am doing with the Chase paymentech orbital gateway, the only problem I have is that I am not able to send the correct MIME headers (which are mandatory) along with the XML, I have tried sending them using a CFHTTPparam of type Header, also of type Mimetype, but I am getting different errors, any information that can point me in the right direction would be greatly appreciated.

This is the code I am using:

----------------------

<cfsavecontent variable="XMLPacket">
<?xml version="1.0" encoding="UTF-8"?>
<Request>
<NewOrder>
<IndustryType>EC</IndustryType>
<MessageType>AV</MessageType>
<BIN>000001</BIN>
<MerchantID>1521115142</MerchantID>
<TerminalID>001</TerminalID>
</NewOrder>
</Request>
</cfsavecontent>

<cfhttp
url="orbital1.paymentech.net/authorize"
port="443"
method ="POST"
throwonerror="yes">
<cfhttpparam type="XML" value="#XMLpacket#">
</cfhttp>

--------------------------

And this is are Mime headers I need to send:

MIME-Version: 1.0
Content-type: application/PTI42
Content-length: #len(xmlpacket)#
Content-transfer-encoding: text
Request-number: 1
Document-type: Request
Merchant-id: 1521115124
Interface-Version: Test 1.4

Sincerely

Luis Rueda


Jul 16, 2007 at 5:57 PM // reply »
6,516 Comments

@Luis,

Mime information is only for the body of the request. The rest of those should just be standard HEADER values. Have you tried send them with CFHttpParam using that type?

Example:

<cfhttpparam
type="header"
name="Request-number"
value="1"
/>

Let me know if that helps at all?


Ken
Sep 30, 2007 at 5:19 PM // reply »
1 Comments

very useful breakdown. One suggestion. Please always include the VERSION of ColdFusion you are using. I'm guessing this is MX 7 or above. Unfortunately I'm stuck implementing the Chase gateway with a CF version 5 server. I may have to tell the client to switch hosts...


Oct 1, 2007 at 7:28 AM // reply »
6,516 Comments

@Ken,

Yeah, I am on ColdFusion MX 7.


Oct 8, 2007 at 5:00 PM // reply »
1 Comments

Hi Ben thank you for your reply, I changed the code but I am receiving the same response which is a "20400 invalid request" error message (I guess I am not sending correctly the header information), this is what I tried:

<cfhttp
url="orbitalvar1.paymentech.net/authorize"
port="443"
method ="POST"
throwonerror="yes"
charset="utf-8">
<cfhttpparam type="HEADER" name="POST /AUTHORIZE HTTP/1.0" value=""/>
<cfhttpparam type="HEADER" name="MIME-Version" value="1.0"/>
<cfhttpparam type="HEADER" name="Content-type" value="application/PTI41"/>
<cfhttpparam type="HEADER" name="Content-length" value="#len(xmlentry)#"/>
<cfhttpparam type="HEADER" name="Content-transfer-encoding" value="text"/>
<cfhttpparam type="HEADER" name="Request-number" value="1"/>
<cfhttpparam type="HEADER" name="Document-type" value="Request"/>
<cfhttpparam type="HEADER" name="Merchant-id" value="173361"/>
<cfhttpparam type="Body" value="#XMLentry#"/>
</cfhttp>

Appreciating your attention

Luis


Oct 9, 2007 at 7:41 AM // reply »
6,516 Comments

@Luis,

I have never seen this error before. After some brief Googling, it looks like it has to do with character encodings. Take a look at this page; it looks like it would help you out:

https://ebay.custhelp.com/cgi-bin/ebay.cfg/php/enduser/std_adp.php?p_faqid=280

Looks like you might have to add CharSet to your encoding tag.


Ian
Oct 18, 2007 at 10:35 AM // reply »
1 Comments

@ Luis

I am also trying to setup a transaction attempt with Chase Paymantech. They sure don't make things easy! I would try switching your cfhttp call to the following:

<cfhttp
url="https://orbitalvar1.paymentech.net/authorize"
port="443"
method="POST"
useragent="#CGI.http_user_agent#"
>

This is working for me so far, in that I'm not getting the error that you reported.


Nov 27, 2007 at 1:23 PM // reply »
1 Comments

I'm also stuck with Coldfusion 5 and it appears you can't manipulate header information with CFHTTPPARAM. That is according to this post on the PayPal developer community site. http://www.pdncommunity.com/pdn/board/message?board.id=payflow&thread.id=938

If anyone knows a work around please share.


Nov 27, 2007 at 5:21 PM // reply »
2 Comments

Hi folks, after many unsuccessful attempts trying to integrate the Orbital gateway with Coldfusion MX using XML, we gave a try to a COM integration using Paymentech's SDK which was really easy, so no more cfhttpparam headaches from this side.

Kind Regards

Luis


sam
May 9, 2008 at 4:19 PM // reply »
1 Comments

seems to work just fine with paypal reporting api. thanks for the tip


Oct 13, 2008 at 10:09 PM // reply »
1 Comments

Here is a ColdFusion solution that works with Paymenttech Orbital:

<cfheader name="POST /AUTHORIZE HTTP/1.1">

<!--- Create the XML data to post. --->
<cfsavecontent variable="strXML">
<?xml version="1.0" encoding="UTF-8"?>
<Request>
<NewOrder>
<IndustryType>EC</IndustryType>
<MessageType>AC</MessageType>
<BIN>000002</BIN>
<MerchantID>o00000000000</MerchantID>
<TerminalID>001</TerminalID>
<AccountNum>54545454545454</AccountNum>
<Exp>1210</Exp>
<CurrencyCode>840</CurrencyCode>
<CurrencyExponent>2</CurrencyExponent>
<CardSecValInd>1</CardSecValInd>
<CardSecVal>123</CardSecVal>
<AVSzip>12345-6789</AVSzip>
<AVSaddress1>123 Street</AVSaddress1>
<AVSaddress2>Suite 123</AVSaddress2>
<AVScity>City</AVScity>
<AVSstate>FL</AVSstate>
<AVSphoneNum>8133514200</AVSphoneNum>
<AVSname>Mike Jones</AVSname>
<AVScountryCode>US</AVScountryCode>
<OrderID>1234567890123456789014</OrderID>
<Amount>10000</Amount>
<Comments>Sample Auth-Capture Transaction</Comments>
</NewOrder>
</Request>
</cfsavecontent>

<cfhttp url="https://orbitalvar1.paymentech.net/authorize" method="post" throwonerror="yes" port="443" result="objGet">
<cfhttpparam type="BODY" value="#strXML#">
<cfhttpparam type="header" name="MIME-Version" value="1.0">
<cfhttpparam type="header" name="Content-transfer-encoding" value="text">
<cfhttpparam type="header" name="Request-number" value="1">
<cfhttpparam type="header" name="Document-type" value="Request">
<cfhttpparam type="header" name="Accept" value="application/xml">
<cfhttpparam type="header" name="Content-Type" value="application/PTI43">
<cfhttpparam type="header" name="Content-length" value="#len(strXML)#"/>
</cfhttp>



<!--- Output the return message. --->
Message: <cfdump var="#objGet#">


Apr 7, 2009 at 5:32 AM // reply »
1 Comments

@Luis Rueda,

i m using paymentech sdk for integration of credit card functionality ,i don't know how to sent the production url (https://orbitalvar1.paymentech.net/authorize ) using the paymentech transaction object and we are using asp.net with vb need a sample code for Authorize and AuthorizeCapture .


May 13, 2009 at 9:01 PM // reply »
6 Comments

Hey Ben

Great post. Was a good help when trying to solve a problem with a RESTful style web service.

Cheers
Matthew


May 18, 2009 at 12:15 PM // reply »
6 Comments

Hi Ben,

Have you ever done this with passing an attachment to a web service?

Thanks,
Craig


May 18, 2009 at 12:42 PM // reply »
6,516 Comments

@Craig,

Absolutely. Check out this post for a file example:

http://www.bennadel.com/blog/1420-Ask-Ben-Posting-XML-And-File-Data-With-ColdFusion-And-CFHttp.htm


May 18, 2009 at 3:29 PM // reply »
6 Comments

I was able to create a form and submit a file to an action page:

<cfinvoke component="com_moveInvoiceFile" method="import" returnvariable="Contact_id">
<cfinvokeargument name="fileField" value="FORM.fileField">
</cfinvoke>

com_moveInvoiceFile.cfc (below)

<cfcomponent output="false" style="rpc">

<cffunction name="import" access="remote" output="false" returntype="any">

<cfargument name="fileField" required="true">

<cffile action="upload" filefield="#arguments.fileField#" destination="#application.rootdir#uploadedFiles\" nameconflict="makeunique">


<cfreturn true>
</cffunction>

</cfcomponent>

However when I run the test page (below) I get nothing. I was trying cffile readbinary and putting the results into a cfhttpparam type=body", but no luck so far....

<cfhttp url="http://webdev.bos1.vrtx.com/invoiceGateway/com_moveInvoiceFile.cfc" method="post">
<cfhttpparam type="file" name="fileField" file="#expandpath('./checklist.js')#" />
</cfhttp>


May 19, 2009 at 9:03 AM // reply »
6,516 Comments

@Craig,

When passing in the form field name, don't pass in the "FORM." prefix:

<cfinvokeargument name="fileField" value="fileField">

That way, when you use the CFHttpParam tag, you will end up passing in "fileField", not "FORM.fileField".


May 22, 2009 at 12:46 PM // reply »
6 Comments

Thanks, but I was trying to remove the action page from the scenario and submit directly to the web service.


May 22, 2009 at 12:49 PM // reply »
6,516 Comments

@Craig,

I am not sure going directly to the web service would offer you any benefit. You'd have to point the ACTION of the FORM to someone else's site at which you would lose control of the session.


May 22, 2009 at 12:53 PM // reply »
6 Comments

Looks like your blog below may help me. Thanks.

http://www.bennadel.com/blog/1113-Posting-File-Data-Using-A-Base64-Encoding-In-ColdFusion.htm


May 22, 2009 at 12:55 PM // reply »
6,516 Comments

@Craig,

You still need a processing page to convert the binary image into Base64 format data. I don't think you are gonna be able to get around a server-side processing page (plus, I don't think you'll gain anything by bypassing an action page).


May 22, 2009 at 1:17 PM // reply »
6 Comments

I'm being told we need a CF web service that will some day be replaced with a service bus. I've been trying to tell them that whoever is using the service bus will probably have to change their code when we switch from CF so why not start with an action page and switch to web services when the bus is here, but they never listen :) If there are web services out there that accept binary file attachments can't we do it with CF?


May 22, 2009 at 1:44 PM // reply »
6,516 Comments

@Craig,

I'm not sure if web services can take binary data. I guess, if they were set up to handle form-like submissions, they could do it. I guess you could also post the binary content as the request body... but its gotta be complicated to get that to work from the browser.


May 22, 2009 at 3:04 PM // reply »
6 Comments

Yes, using the request body was what I thought. I'm pushing back on the web services so we'll see what happens next week. Thanks again.


May 22, 2009 at 4:44 PM // reply »
6,516 Comments

@Craig,

No problem my man. Let us know what you come up with!


Jul 2, 2009 at 11:20 PM // reply »
1 Comments

I'm trying to post XML to a site for verification, but it doesn't appear to make it in XML format. Not sure if I need to add a header entry or not, any help appreciated. Please note this site is using CF MX6.1.

<CFOUTPUT>
<CFXML VARIABLE="MyXml"><CLient Version="8.2">
<Header Account_Id="1234" />
<Transaction Id="ACS-111">
<Header Operator_Id="7201" />
<Reference>XXXX</Reference>
<Subject>
<FirstName>dave</FirstName>
</Subject>
</Transaction>
</CLient>
</CFXML>
</CFOUTPUT>
<CFOUTPUT>#MyXml#</CFOUTPUT>

<cfhttp url="someurl.cfm" method="POST" useragent="#CGI.http_user_agent#">
<cfhttpparam type="XML" value="#trim(MyXml)#" />
</cfhttp>

and someurl has
<cfset objRequest = GetHttpRequestData() />
<cfset strXML = objRequest.Content />
wwwwwwwwwwwwwwwwwwwwww
<cfoutput>#tostring(strXML)#</cfoutput>
xxxxxxxxxxxxxxxxxxxxxx
<cfdump var="#strXML#">
yyyyyyyyyyyyyyyyyyyyyy

<cfset xmlData = XmlParse( strXML )>
<cfdump var="#xmlData#">

but this just displays
wwwwwwwwwwwwwwwwwwwwww coldfusion.xml.XmlNodeList@7e7407 xxxxxxxxxxxxxxxxxxxxxx coldfusion.xml.XmlNodeList@7e7407 yyyyyyyyyyyyyyyyyyyyyy

rather than XML structure. What am I doing wrong?
Thanks,
Dave.


Jul 3, 2009 at 8:32 AM // reply »
6,516 Comments

@Dave,

It doesn't look like you're doing anything wrong. Perhaps its an error on the other end (the web service you are posting to).


Aug 21, 2009 at 11:24 AM // reply »
1 Comments

Hello Ben.
Nice XMl introduction.
As a CF guru, could you please enlighten me with some web-service security implementations on CF?
I'm trying to consume a web-service with x.509 certificate security.
It requires: my x.509 certificate, signature, timestamp signature, body signature, timestamp (all this in SOAP header).
I have made a cfSaveContent for SOAP header (with all security signatures included).

Before calling the web-service I can attach the SOAP header (the one i generated in cfsavecontent) to the web-service call with addSOAPRequestHeader function.

addSOAPRequestHeader(SomeWebService, "someURL", "SomeName", MySOAPHeader, false);

Problem is:
I have no idea how to change SOAP body properties in CF.
If I just try and call the web-service:

SomeWebService.someMethod(SomeParam);

CF generates a SOAP body itself with no properties (meaning there's no body Id - realtion between SOAP body and body signature in the SOAP header).

Web-Service responds "SOAP Body must be signed".

I want my SOAP body to be presented to a web-service like this (with and Id property):

<SOAP-ENV:Body xmlns:SOAP-ENV="http://" xmlns:wsu="http://" wsu:Id="body">
<ns1:someMethod xmlns:ns1="http://">
<SomeParameter>ssn</SomeParameter>
</ns1:someMethod>
</SOAP-ENV:Body>

Is there a way to set SOAP body properties (like Id) in coldfusion?

Im new to CF so please feel free to point out my wrongs.
Thank you!


Aug 24, 2009 at 4:39 PM // reply »
2 Comments

Ben,
Like Dmitrii, I am also wondering if you know of any way we can manually set SOAP body contents in CF8.

Thanks,
Steve


Aug 25, 2009 at 3:28 PM // reply »
2 Comments

I'm not sure how this will help until someone can more specifically answer the most recent questions, but whenever I work with web services - almost everyday it seems recently - I've found the best tool to use is SoapUI (free) - soapui.org. Build and test your requests/responses in the most raw form in this tool and then rebuild them in ColdFusion - using <cfinvoke> to call a CFC that makes the "real" call using <cfhttp> (copy-n-paste the XML from soapui).


Aug 26, 2009 at 9:36 AM // reply »
2 Comments

@Derek,

Thanks for the tip. Seems like CFHTTP is the only way to do it. Turns out I had to use soapUI and craft my own SOAP requests anyways due to CF's poor struct conversion for complex web services.

It seems that if the WSDL defines an operation that takes an abstract base type as an argument, ColdFusion doesn't know to try to convert the struct to a concrete (child) type, and instead just tries to create the base Java (Axis) object which of course doesn't work. If this is incorrect I would love to know more.

I don't see any improvement in CF9 either which is unfortunate. Forcing me to choose to revert to Java or work with SOAP requests manually is not cool.

/rant

Anyways, Ben the example above to use CFHTTP for my problem is great thanks for the help.

Steve


Aug 26, 2009 at 1:44 PM // reply »
2 Comments

I feel your frustration. I've just become accustomed to working with most web services this way. And, to be honest, I feel more comfortable with it when I compare what I go through to my coworkers trying the same in .NET. They rely SO heavily on the software to do all the work - I guess I look at this like I look at Code vs Design Mode in Dreamweaver. I like working in the raw xml (soap) code as it re-assures me that my applications are solid.

Not that that might serve as any consilation, but you're not alone (for sure).
:-)


Sep 2, 2009 at 10:10 AM // reply »
6,516 Comments

@Dmitrii, @Steve,

I do what @Derek says - I build the XML manually using something like CFSaveContent of CFXML and then manually post is using CFHTTPParam / XML as the body of the request.

Honestly, I very rarely use CFInvoke or CreateObject() to hit a SOAP-based web service. I almost always create my own XML as this is much easier to debug and there are zero surprises as far as data types go. Plus, I have often times found problems with SOAP documentation by creating XML based off the WSDL file (which cannot lie ;)).


Sep 11, 2009 at 6:34 PM // reply »
3 Comments

Ben, I think I love you.

This was the answer to something I've been looking into all day. You're always right on the money my duuuude!


Sep 12, 2009 at 9:17 PM // reply »
6,516 Comments

@Jyoseph,

Awesome my man! Always nice to hear that. I hope you got whatever you were working on done.


bkw
Oct 5, 2009 at 5:35 PM // reply »
1 Comments

Trying to use this logic to get to Google's spell checker as listed in http://forums.devx.com/showthread.php?t=166324

using the following, it looks like I am connecting, but nothing is coming back:

<cfsavecontent variable="strXML">
<spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1">
<text>Ths is a tst</text>
</cfsavecontent>


<cfhttp
url="https://www.google.com/tbproxy/spell?lang=en&hl=en"
method="post"
result="google">

<cfhttpparam
type="XML"
value="#strXML#"
/>

</cfhttp>

<cfoutput>
<!--- Output the return message. --->

Message:
<cfset xmlData = XmlParse(#google.FileContent#) /><br>
1-#google.charset#<br>
2-#google.errordetail#<br>
3-#google.filecontent#<br>
4-#google.header#<br>
5-#google.mimetype#<br>
6-#google.statuscode#<br>
7-#google.text#<br>
</cfoutput>

What am I doing wrong?


Oct 5, 2009 at 5:59 PM // reply »
6 Comments

@bkw: at a glance your XML is invalid. The <spellrequest> tag needs to have an end tag or self close i.e. you should have a </spellrequest> after the </text> or it should self close i.e. <spellrequest ... />. Depends on the documentation.

Can you provide more detail on the error message.

Cheers
Matthew


Nov 1, 2009 at 3:45 PM // reply »
6,516 Comments

@Bkw,

I am not sure what your error is? What is going wrong?

@Matthew is correct, though - your XML is not valid.


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 20, 2009 at 11:32 PM
Five Months Without Hungarian Notation And I'm Loving It
I've used headless camel case for years for not only ColdFusion variables, but also SQL tables and fields... pretty much everything involving code. I also subscribe to the "don't abbreviate and clea ... read »
Nov 20, 2009 at 11:00 PM
Five Months Without Hungarian Notation And I'm Loving It
@Marcel, Yeah, I always err on the side of longer but more readable variable names. As for the camel casing of CF methods and the headless camel casing of custom items, I get around this by always ... read »
Nov 20, 2009 at 10:56 PM
Five Months Without Hungarian Notation And I'm Loving It
I use the following and love it: my.namespace.MyComponents.functionMethodsOrUDF() CONSTANT_VALUES_OR_PROPERTIES One thing I always try is to CamelCaseBuiltInColdFusionFunctions() so others can tell ... read »
Nov 20, 2009 at 5:38 PM
Learning ColdFusion 8: CFImage Part I - Reading And Writing Images
Hi Ben, Great article. I've been looking around to see if ColdFusion image engine can programatically create the following "wrap around" effect: http://www.creativepro.com/article/photoshop-s-she ... read »
Nov 20, 2009 at 5:35 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
@Dave: I talked to Gert he suggested: <cfhttp method="get" url="http://{some cf website}" result="stuff" addtoken="yes" /> Note the addition of cfhttp attribute addtoken. That should persist y ... read »
Nov 20, 2009 at 5:23 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
@Todd, Ahh, gotcha, yeah that makes sense. ... read »
Nov 20, 2009 at 5:17 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
Ben, sorry if I didn't make this clear. You can make it work like that if you want, just put <cfset session.foo = 1> (and <cfset application.foo = 1>) in your OnRequestStart() and it reve ... read »