To see what CFHTTP is doing send a request to another cfm locally on your box and dump the incoming request.
-Steve On Fri, Feb 18, 2011 at 10:59 AM, Clarke Bishop <[email protected]>wrote: > Thanks Charlie. I did try type=”xml” like you suggested, but it didn’t > help. > > > > I think I need to better understand how CFHTTP/CFHTTPParam translate into > HTTP headers. I know what I want the request to look like, but how to make > CF create that request is my challenge. > > > > 1. Do you or anyone else know of any good examples or links for how > CF builds requests? > > 2. Also, I still haven’t been able to get Charles to work with my CF > development server. Does anyone have any examples or links for how to setup > Charles to show HTTP traffic from a CFHTTP. Charles has HTTP proxy and SOCKS > proxy options – Which one is better to use? And, what’s the best way to get > CF to route through the proxy? > > > > Right now, I’m kind of stuck, so I really appreciate any ideas! > > > > Clarke > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Charlie > Arehart > *Sent:* Thursday, February 17, 2011 11:51 AM > > *To:* [email protected] > *Subject:* RE: [ACFUG Discuss] Troubleshooting CFHTTP Webservice Call > > > > Hey Clarke, yep, the try/catch was just in case there was any error being > thrown. If none, then yes it won’t help much. > > Here’s something to try: change the cfhttpparam type=”body” to type=”xml” > (and make sure that what’s in that payload variable is indeed all XML and no > html added somehow.) > > Let us know if that helps. > > /charlie > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Clarke > Bishop > *Sent:* Thursday, February 17, 2011 9:08 AM > *To:* [email protected] > *Subject:* RE: [ACFUG Discuss] Troubleshooting CFHTTP Webservice Call > > > > Thanks Charlie! > > > > Yes, I am dumping the CFHTTP structure. The server is there, it’s just not > happy with the request I am sending it. > > > > The Header that gets returned says: HTTP/1.1 400 Bad Request Content-Type: > text/html;charset=utf-8 Connection: close Date: Thu, 17 Feb 2011 13:58:50 > GMT Content-Length: 971 Server: Apache-Coyote/1.1 > > > > The Content-Type needs to be application/atom+xml, but based on the header > is apparently being sent as text/html. > > > > I’m on CF8, and there’s nothing in application.log. I believe my problem is > in getting the HTTP request formatted right. So CFTRY/CFCATCH wouldn’t > really help much – Right? I’m not getting a CF error, but an error from the > remote server. > > > > Please let me know if you see something I’m missing. > > > > Clarke > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Charlie > Arehart > *Sent:* Wednesday, February 16, 2011 10:20 PM > *To:* [email protected] > *Subject:* RE: [ACFUG Discuss] Troubleshooting CFHTTP Webservice Call > > > > Clarke, the 400 syntax error is a start, but there may be more information > being returned from the called server. Are you outputting the cfhttp > variable/structure afterward to see what it shows in its various keys? Also, > you could wrap it in a CFTRY and dump also the CFCATCH variable/structure. > Finally, if you’re on CF9, there is an option in the CF Admin to enable > logging of CFHTTP requests, which could also provide useful info. Finally, > even on CF8 or 7, you may find information being written to the > application.log with perhaps the additional error details as well. > > > > /charlie > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Clarke > Bishop > *Sent:* Wednesday, February 16, 2011 6:39 PM > *To:* [email protected] > *Subject:* [ACFUG Discuss] Troubleshooting CFHTTP Webservice Call > > > > Does anyone have any good suggestions for troubleshooting a CFHTTP > Webservice call. All, I’m getting back is a 400 – Syntax error. > > > > I want to capture the HTTP request to see what might be wrong. > > > > The webservice expects an application/atom+xml POST so I am doing this: > > > > <cfhttp method="post" url="#hsURL#" > > > <cfhttpparam type="header" name="Content-Type" > value="application/atom+xml"/> > > <cfhttpparam type="body" value="#payload#"> > > </cfhttp> > > > > Thecfhttpparam type=”body” body is set to the XML that the webservice > expects. > > > > Thanks for any suggestions! > > > > Clarke > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink <http://www.fusionlink.com> > ------------------------------------------------------------- > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink <http://www.fusionlink.com> > ------------------------------------------------------------- > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink <http://www.fusionlink.com> > ------------------------------------------------------------- > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink <http://www.fusionlink.com> > ------------------------------------------------------------- > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink <http://www.fusionlink.com> > ------------------------------------------------------------- > -- Steve Ross web application & interface developer http://blog.stevensross.com [mobile] (912) 344-8113 [ AIM / Yahoo! : zeriumsteven ] [googleTalk : nowhiding ]
