Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here is an example of how I typically compose and execute my SOAP requests. Note that you will need to modify the SOAP body to fit your API's needs. Hopefully this will help lead you in the right direction.</p> <p>By the way, Ben Nadel has an excellent right up on <a href="http://www.bennadel.com/blog/1809-Making-SOAP-Web-Service-Requests-With-ColdFusion-And-CFHTTP.htm" rel="nofollow">Making SOAP Web Service Requests With ColdFusion And CFHTTP</a></p> <p>Here is my sample code:</p> <pre><code>&lt;!--- Compose SOAP message to send to Web Service ---&gt; &lt;cfsavecontent variable="soapRequest"&gt; &lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:example="http://www.domain.com/soap/example/"&gt; &lt;soapenv:Header/&gt; &lt;soapenv:Body&gt; &lt;example:ReportAPI&gt; &lt;typeOfReport&gt;DailyCSVFile&lt;/typeOfReport&gt; &lt;/example:ReportAPI&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt; &lt;/cfsavecontent&gt; &lt;!--- Send SOAP request to the Web Service ---&gt; &lt;cfhttp url="https://brandnameapi.sandbox.serviceprovider.com/vernum/ReportingAPI.svc/soap/queryAvailableReportFiles" username="myusername" password="mypassword" method="post" result="httpResponse" timeout="300"&gt; &lt;cfhttpparam type="header" name="content-type" value="text/xml" /&gt; &lt;cfhttpparam type="header" name="content-length" value="#Len(Trim(soapRequest))#" /&gt; &lt;cfhttpparam type="header" name="charset" value="utf-8" /&gt; &lt;cfhttpparam type="xml" name="message" value="#Trim(soapRequest)#" /&gt; &lt;/cfhttp&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload