Then I got a post which said to use CFHTTP with SOAP. But the issue was how to generate the SOAP headers ??
Found link http://www.soapclient.com/soapclient, here you can just give the WSDL url and the method name, it will generate the required SOAP header that needs to be send to consume it.. sweet.. that is what I wanted.
Then you can do
<cfsavecontent variable="soap"> <!--- PASTE SOAP HEADER GENERATED BY ABOVE URL ---> </cfsavecontent> <cfhttp url="http://YourWebServiceURL(do not include ?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)#"> </cfhttp>
No comments:
Post a Comment