Have you tried with no headers at all? Can you browse the webservice from the ColdFusion server? It seems a little odd that it's getting a 200 but giving you back "Connection Failure" - that would imply it's something in their software that's throwing that message rather than the HTTP transaction.
Is there any documentation that says what you need to send?
Tried without httpheaders, the same result.
Added throwonerror and it gives the error "Connection Failure: Status Code Unavailable"
I haven't got access to the ColdFusion server, however I tried it on another CF server to the same affect. I'll install the developer edition on my local PC and retry.
I will see if I can find any documentation.
Tested on local PC with CF9 dev server, same issue.
Documentation does not suggest anything that might help.
I might have been approaching it wrong, it is a SOAP webservice - so I'm going to try this
well actually it supports http requests, soap 1.1 and soap 1.2
even with trying the soap approach I get
struct Charset utf-8 ErrorDetail [empty string] Filecontent Connection Failure Header HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Date: Sat, 18 Feb 2012 15:01:56 GMT Cache-Control: private, max-age=0 X-AspNet-Version: 4.0.30319 Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET Mimetype application/soap+xml Responseheader struct Cache-Control private, max-age=0 Content-Type application/soap+xml; charset=utf-8 Date Sat, 18 Feb 2012 15:01:56 GMT Explanation OK Http_Version HTTP/1.1 Server Microsoft-IIS/7.0 Status_Code 200 X-AspNet-Version 4.0.30319 X-Powered-By ASP.NET Statuscode 200 OK Text YES
I agree with Owain. The combination of a 200 OK status and cfhttp.filecontent of 'Connection Failure' implies you got a response back, and the response had the message 'Connection Failure' as its only content.
The content-type is XML, which raises the question, is the service expecting your request to be SOAP? Could we have a look at your cfhttp code?
Well it appears to accept SOAP or HTTP requests.
That last dump was product of this code
<?xml version="1.0" encoding="utf-8"?>
value="#trim( soapBody )#"
It is usually important to have no characters between the cfsavecontent tag and the XML declaration. Here follows the solution to a similar webservice problem in this forum:
<!--- WSDL --->
<!--- Compose SOAP message to send to Web Service--->
<cfsavecontent variable="soap"><?xml version="1.0" encoding="UTF-8" ?>
<d xsi:type="xsd:string">test message from bkbk</d>
<!--- Invoke web service to send message--->
<cfhttp url="#wsdl_url#" method="post" >
<cfhttpparam type="header" name="content-type" value="text/xml">
<cfhttpparam type="header" name="SOAPAction" value="">
<cfhttpparam type="header" name="content-length" value="#len(soap)#">
<cfhttpparam type="header" name="charset" value="utf-8">
<cfhttpparam type="xml" name="message" value="#trim(soap)#">