ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 19th, 2004, 07:37 PM
seeraig seeraig is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 seeraig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Cfhttp

am having trouble using the cfhttp tag even though i have used it before with no problem. i am just sending over some data and trying to read the return response, but it it sending back an error saying "Empty Request" as if no data was sent. i had to install software on my server that is used in this connection and you first have to reference the software by creating an object, which i think i am doing right. when i try to do this with asp, it works fine, but i want to use coldfusion since that is what i am familiar with and the whole site is programmed in. i have included the coldfusion code i am using as well as the ASP code that does work. i'm figuring if someone also know ASP they can see what i may be missing in my coldfusion code.

thanks craig

--------------------------------------------------------------------
COLDFUSION CODE THAT DOES NOT WORK:

<CFOBJECT TYPE="COM" ACTION="CREATE" NAME="ThinClient" CLASS="CMPC.CMPCRequest">

<CFHTTP url="https://centineltest.cardinalcommerce.com/maps/txns.asp" method="post">
<CFHTTPPARAM type="FormField" name="MsgType" value="cmpi_lookup">
<CFHTTPPARAM type="FormField" name="Version" value="1.3">
<CFHTTPPARAM type="FormField" name="ProcessorId" value="100">
<CFHTTPPARAM type="FormField" name="MerchantId" value="200">
<CFHTTPPARAM type="FormField" name="OrderNumber" value="1234">
<CFHTTPPARAM type="FormField" name="RawAmount" value="5597">
<CFHTTPPARAM type="FormField" name="PurchaseCurrency" value="840">
<CFHTTPPARAM type="FormField" name="PAN" value="4000000000000002">
<CFHTTPPARAM type="FormField" name="PANExpr" value="0504">
</CFHTTP>


<CFOUTPUT>

Response - #CFHTTP.FileContent#

</CFOUTPUT>
---------------------------------------------------------------------
ASP CODE THAT WORKS:

<%
Set centinelRequest = Server.CreateObject("CMPC.CMPCRequest")

centinelRequest.Add "MsgType","cmpi_lookup"
centinelRequest.Add "Version","1.3"
centinelRequest.Add "ProcessorId","100"
centinelRequest.Add "MerchantId","200"
centinelRequest.Add "OrderNumber","1234"
centinelRequest.Add "RawAmount","5597"
centinelRequest.Add "PurchaseCurrency","840"
centinelRequest.Add "PAN","4000000000000002"
centinelRequest.Add "PANExpr","0504"

Set centinelResponse = centinelRequest.SendHTTP("https://centineltest.cardinalcommerce.com/maps/txns.asp")

strEnrolled = centinelResponse.getValue("Enrolled")
strAcsUrl = centinelResponse.getValue("ACSUrl")
strPAReq = centinelResponse.getValue("Payload")
strErrorNo = centinelResponse.getValue("ErrorNo")
strErrorDesc = centinelResponse.getValue("ErrorDesc")
strTransactionId = centinelResponse.getValue("TransactionId")

Response.Write("Enrolled: ")
Response.Write(strEnrolled)

%>
---------------------------------------------------------------------

Reply With Quote
  #2  
Old March 22nd, 2004, 03:39 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,480 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 17 h 33 m 17 sec
Reputation Power: 42
I don't see how the CF code uses the COM object. Your ASP code is calling the add() method on the COM object proxy, but your CF code does nothing like this. Further, your ASP code is not posting a standard HTTP call, it is calling sendHTTP() on the COM object. I'm sure that is why it isn't working; the CF code never touches the COM object once it instantiates it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Cfhttp


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway