GetSoundFileInUlaw
This method returns a sound file encoded in u-Law format.
Syntax
GetSoundFileInUlaw(SoundFileID, LicenseKey)
Request Parameters
Parameter Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
SoundFileID |
The sound file's ID. |
String
|
True | 4013529 |
LicenseKey |
Your license key, which is required to invoke this web service. |
String
|
True | F01d89fd-5155-5455-5585-e84ab8de8591 |
Response
Returns: Base64Binary
Description: The Base64 encoded file data.
Code Samples
/* https://ws.esendex.us/notifyws/phonenotify.asmx?wsdl was added as a Web Reference and given the name WSDL */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetSoundFileInUlaw.WSDL;
namespace GetSoundFileInUlaw
{
class Program
{
static void Main(string[] args)
{
WSDL.PhoneNotify PN = new WSDL.PhoneNotify();
WSDL.NotifyReturn NR = new WSDL.NotifyReturn();
byte[] ULAW = PN.GetSoundFileInUlaw("testsoundfile_wav", "YOUR LICENSE KEY");
System.IO.FileStream FS = new System.IO.FileStream(@"C:\Users\Desktop\TESTINGULAW.ulaw", System.IO.FileMode.Create, System.IO.FileAccess.Write);
FS.Write(ULAW, 0, ULAW.Length);
FS.Close();
Console.WriteLine("File saved to: " + @"C:\Users\\Desktop\TESTINGULAW.ulaw");
Console.ReadLine();
}
}
}
' https://ws.esendex.us/notifyws/phonenotify.asmx?wsdl was added as a Web Reference and given the name WSDL
Imports GetSoundFileInUlaw.WSDL
Module Module1
Sub Main()
Dim PN As New WSDL.PhoneNotify
Dim NR As New WSDL.NotifyReturn
Dim ULAW As Array
Dim FS As System.IO.FileStream
ULAW = PN.GetSoundFileInUlaw("testsoundfile_wav", "YOUR LICENSE KEY")
FS = New System.IO.FileStream("C:\Users\Desktop\testsoundfile.ulaw", System.IO.FileMode.Create, System.IO.FileAccess.Write)
FS.Write(ULAW, 0, ULAW.Length)
FS.Close()
Console.WriteLine("File saved to: " & "C:\Users\Desktop\testsoundfile.ulaw")
Console.ReadLine()
End Sub
End Module
GET /NotifyWS/PhoneNotify.asmx/GetSoundFileInUlaw?SoundFileID=string&LicenseKey=string HTTP/1.1
Host: ws.esendex.us
POST /NotifyWS/PhoneNotify.asmx/GetSoundFileInUlaw HTTP/1.1
Host: ws.esendex.us
Content-Type: application/x-www-form-urlencoded
Content-Length: length
SoundFileID=string&LicenseKey=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<base64Binary xmlns="http://ws.esendex.us/NotifyWS/">base64Binary</base64Binary>
HTTP POSTHTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<base64Binary xmlns="http://ws.esendex.us/NotifyWS/">base64Binary</base64Binary>
HTTP POSTHTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<base64Binary xmlns="http://ws.esendex.us/NotifyWS/">base64Binary</base64Binary>
HTTP POSTHTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<base64Binary xmlns="http://ws.esendex.us/NotifyWS/">base64Binary</base64Binary>
HTTP POSTHTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<base64Binary xmlns="http://ws.esendex.us/NotifyWS/">base64Binary</base64Binary>
HTTP POST
POST /NotifyWS/PhoneNotify.asmx HTTP/1.1
Host: ws.esendex.us
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ws.esendex.us/NotifyWS/GetSoundFileInUlaw"
<?xml version="1.0" encoding="utf-8"?>
<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/">
<soap:Body>
<GetSoundFileInUlaw xmlns="http://ws.esendex.us/NotifyWS/">
<SoundFileID>string</SoundFileID>
<LicenseKey>string</LicenseKey>
</GetSoundFileInUlaw>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<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/">
<soap:Body>
<GetSoundFileInUlawResponse xmlns="http://ws.esendex.us/NotifyWS/">
<GetSoundFileInUlawResult>base64Binary</GetSoundFileInUlawResult>
</GetSoundFileInUlawResponse>
</soap:Body>
</soap:Envelope>
POST /NotifyWS/PhoneNotify.asmx HTTP/1.1
Host: ws.esendex.us
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetSoundFileInUlaw xmlns="http://ws.esendex.us/NotifyWS/">
<SoundFileID>string</SoundFileID>
<LicenseKey>string</LicenseKey>
</GetSoundFileInUlaw>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetSoundFileInUlawResponse xmlns="http://ws.esendex.us/NotifyWS/">
<GetSoundFileInUlawResult>base64Binary</GetSoundFileInUlawResult>
</GetSoundFileInUlawResponse>
</soap12:Body>
</soap12:Envelope>