Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Integration - ASP equivalent in CF

Status
Not open for further replies.

redherring917

Programmer
Dec 21, 2004
5
0
0
CA
Hi there -

I need to integrate a CF application with a payment processing service via XML and process the returned XML response accordingly. Seems simple enough, yet I CONTINUE to stumble.

Without yet dealing with the response, (because I can't even seem to get that far yet), here's the gist of what I need to do to submit the order (this ASP code was provided by the payment processing service as an integration example):

Dim xmlhttp,queryString
Set xmlhttp = Server.CreateObject("Msxml2.XMLHTTP")
xmlhttp.Open "POST", " false
xmlhttp.setRequestHeader "Content-Type","application/x-queryString = "xxxRequestMode=X&xxxRequestData="&Server.URLEncode(xmlStr)
xmlhttp.Send queryString

And this is my shot at a CF "equivalent" that has not met with much success:

<cfhttp url=" method="post">
<cfhttpparam name="xxxRequestData" type="xml" value="<cfoutput>#xmlStr#</cfoutput>">
</cfhttp>

I know that I need to send the name / value pair "xxxRequestMode=X", but am not sure how to do that, as in, add another cfhttpparam variable perhaps? Anything else stand out as being dramatically different between this working ASP and non-working CF?

Thanks so much in advance!
 
Thanks.

FYI - this was my final solution. Not entirely sure where I initially missed the boat, but 2 formfields and including the xml version tag within the cfhttpparam name / value pair explicity vs. as part of the xml string seemed to do it.

<cfhttp url=" method="post">
<cfhttpparam name="xxxRequestMode" type="formfield" value="X">
<cfhttpparam name="xxxRequestData" type="formfield" value="<?xml version='1.0' encoding='UTF-8'?>#orderdetails#">
</cfhttp>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top