Any help on this.....
Have you read the chapter in CFWACK vol 3 on working with webservices? It's not very in-depth, but has some pointers and the usual lame-a** code example.
Depending on the complexity of what you are trying to do, you might be better off building a RESTful service instead of a SOAP service. Despite it's name, SOAP tends to be overkill if all you are doing is passing a couple of args to the webservice, but is good if the request is complex. REST is easiest if you are just sending a couple of args, but a pain in the a** if you are trying to do something complex in a single operation (works better to break down into individual state-changing calls to individual webservices).
A couple of comments on what you are doing in your code:
It's a lot simpler to use CFINVOKE than to roll your own webservice HTTP call. If you're writing your own webservice this should be especially true. I've ended up using CFHTTP to call vendor's webservices that I had no control over and wouldn't work with CFINVOKE, but that is the case where I've seen that to be true. Check out the example in CFWACK.
If you continue on the CFHTTP route, you might find it easier to use the CFXML tag instead of using CFSAVECONTENT to create the XML variable - this will allow CF to validate the xml document and ns references. It also allows you to use the CFDUMP tag to get a formatted view of the xml doc to help with debugging.
Most of the CFHTTPPARAMS you have included in your call are not really needed, at least that's been my experience. For example, this is all I ever use in my SOAP calls:
<cfhttp url="https://adwords.google.com/api/adwords/cm/v200909/AdGroupAdService" method="post">
<cfhttpparam name="SOAPAction" type="header" value=""/>
<cfhttpparam type="xml" value="#ToString(variables.adAd)#"/>
"variables.adAd" is the xml doc created by this code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://adwords.google.com/api/adwords/cm/v200909" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
authorization data goes here
magic happens here
Hope this helps. My experience in this is that it requires some trial and error and lots of CFDUMPs to get it right the first time, but after you get over that initial hurdle it all suddenly "makes sense" from then on.
I sort of stumbled into this thread while searching for some help resources on writing a CF client for the adwords api v200909 and noticed that you used it in your example. I am still early in the process. I have looked briefly at the documentation at the google site, and it looks a bit daunting. I know that there is a sample CF code out there, but it's for v12. Do you know whether it's a good starting point or whether too much has changed since that version? And do you know any other relevant CF resources? I haven't had much luck in my google searches.
Update: I found this post that points to some xml examples. Looks promising so I am going to give it a try.
<!--- Vital: No space between cfsavecontent tag and xml processing instruction element --->
<cfsavecontent variable="soap"><?xml version="1.0" encoding="UTF-8"?>
<addNumbers SOAP-ENV:EncodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
<!--- URL of the WSDL not of the CFC! --->
<cfhttp url="http://one.dileep.com/soaptest/soaptest.cfc?wsdl" 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)#">