COLDFUSION

From CDYNE Wiki
Jump to navigation Jump to search

NotifyPhoneBasic

 1 <cfsavecontent variable=soapBody>
 2 <cfoutput>
 3 <?xml version='1.0' encoding='utf-8'?>
 4 <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 5 <soap:Body>
 6 <NotifyPhoneBasic xmlns="http://ws.cdyne.com/NotifyWS/">
 7 <PhoneNumberToDial>17575449510</PhoneNumberToDial> 
 8 <CallerID>18009843710</CallerID> 
 9 <CallerIDname>Test</CallerIDname> 
10 <VoiceID>1</VoiceID> 
11 <TextToSay>Hello, this is a test.</TextToSay> 
12 <LicenseKey>f01d89fd-5155-5455-5585-e84ab8de8591</LicenseKey> 
13 </NotifyPhoneBasic> 
14 </soap:Body> 
15 </soap:Envelope>
16 </cfoutput>
17 </cfsavecontent>
18 <cfhttp
19 url="http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx"
20 method=POST
21 result=httpResponse>
22 <cfhttpparam
23 type=header
24 name=SOAPAction
25 value="http://ws.cdyne.com/NotifyWS/NotifyPhoneBasic"
26 />
27 <cfhttpparam
28 type=xml
29 value="#trim( soapBody )#"
30 />
31 </cfhttp>
32 <cfoutput>
33 #xmlParse( httpResponse.fileContent )#
34 </cfoutput>