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 http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to