Java

From CDYNE Wiki
Jump to: navigation, search

Contents

NotifyPhoneAdvanced

//Created with NetBeans IDE 7.2.1
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
 
public final class NotifyPhoneAdvanced {
public static void main(String[] args) throws Exception
{
String responseContent="";
String response="";
 
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
 
StringBuilder sb = new StringBuilder("<?xml version='1.0' encoding='utf-8'?>");
sb.append("<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/\">");
sb.append("<soap:Body>");
sb.append("<NotifyPhoneAdvanced xmlns=\"http://ws.cdyne.com/NotifyWS/\">");
sb.append("<anr>");
sb.append("<TransferNumber>17575449510</TransferNumber>");
sb.append("<PhoneNumberToDial>17575449510</PhoneNumberToDial>");
sb.append("<VoiceID>1</VoiceID>");
sb.append("<CallerIDNumber>18009843710</CallerIDNumber>");
sb.append("<CallerIDName>Test</CallerIDName>");
sb.append("<TextToSay>Hello this is a test.</TextToSay>");
sb.append("<LicenseKey>f01d89fd-5155-5455-5585-e84ab8de8591</LicenseKey>");
sb.append("<NextTryInSeconds>5</NextTryInSeconds>");
sb.append("<TryCount>5</TryCount>");
sb.append("<UTCScheduledDateTime>2013-01-15T20:53:00.608Z</UTCScheduledDateTime>");
sb.append("<StatusChangePostUrl>http://cdyne.com/postback/notify/2015</StatusChangePostUrl>");
sb.append("</anr>");
sb.append("</NotifyPhoneAdvanced>");
sb.append("</soap:Body>");
sb.append("</soap:Envelope>");
 
connection.setRequestProperty("Content-Length", String.valueOf(sb.toString().length()));
connection.setRequestProperty("Content-Type", "text/xml");
connection.setRequestProperty("Connection", "Close");
connection.setRequestProperty("SoapAction", "http://ws.cdyne.com/NotifyWS/NotifyPhoneAdvanced");
connection.setDoInput(true);
connection.setDoOutput(true);
 
PrintWriter pw = new PrintWriter(connection.getOutputStream());
pw.write(sb.toString());
pw.flush();
 
connection.connect();
 
System.out.println(sb.toString());
 
BufferedReader br;
 
if(connection.getResponseCode() == 200)
{
br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
}
else
{
br = new BufferedReader(new InputStreamReader(connection.getErrorStream()));
}
 
//BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
 
while ((responseContent = br.readLine()) != null)
{
response += responseContent;
}
System.out.println(response);
}
}

GetMultipleQueueIdStatus

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetMultipleQueueIdStatus {
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetMultipleQueueIdStatus?"
+ "QueueIDs=000111222;333444555"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

AssignIncomingNumber

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class AssignIncomingNumber{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/AssignIncomingNumber?"
+ "IncomingPhoneNumber=17575449510"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

CancelNotify

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class CancelNotify{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/CancelNotify?"
+ "QueueID=000111222"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}


CancelNotifyByReferenceID

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class CancelNotifyByReferenceID{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/CancelNotifyByReferenceID?"
+ "ReferenceID=000"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.INDENT, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetAssignedNumbers

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetAssignedNumbers{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetAssignedNumbers?"
+ "LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetAvailableAreaCodes

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetAvailableAreaCodes{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetAvailableAreaCodes");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetAvailableIncomingNumbers

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetAvailableIncomingNumbers{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetAvailableIncomingNumbers?"
+ "AreaCodeFilter=888");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetIncomingCallScript

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetIncomingCallScript{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetIncomingCallScript?"
+ "PhoneNumber=17575449510"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetQueueIDStatus

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetQueueIDStatus{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetQueueIDStatus?"
+ "QueueID=000111222");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetQueueIDStatusesByPhoneNumber

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetQueueIDStatusesByPhoneNumber{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetQueueIDStatusesByPhoneNumber?"
+ "PhoneNumber=17575449510"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetQueueIDStatusWithAdvancedInfo

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetQueueIDStatusWithAdvancedInfo{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetQueueIDStatusWithAdvancedInfo?"
+ "QueueID=000111222"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetResponseCodes

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetResponseCodes{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetResponseCodes");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetSoundFile

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetSoundFile{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetSoundFile?"
+ "SoundFileID=test sound file"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetSoundFileLength

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetSoundFileLength{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetSoundFileLength?"
+ "SoundFileID=test sound file"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetSoundFileURL

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetSoundFileURL{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetSoundFileURL?"
+ "SoundFileID=test sound file"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

GetVersion

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class GetVersion{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetVersion");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

getVoices

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class getVoices{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/getVoices");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

LicenseKeyVariableLoad

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LicenseKeyVariableLoad{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LicenseKeyVariableLoad?"
+ "VariableName=Variable1"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

LicenseKeyVariableSave

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LicenseKeyVariableSave{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LicenseKeyVariableSave?"
+ "VariableName=Variable1"
+ "&VariableValue=Testing+Var+Save"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

LM_AddListMember

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LM_AddListMember {
 
public static void main(String[] args) throws Exception
{
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_AddListMember?"
+ "&ListID=00000"
+ "&PhoneNumber=17575449510"
+ "&ClientID=1"
+ "&FirstName=CDYNE"
+ "&LastName=Corporation"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}

LM_AddNewList

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LM_AddNewList {
 
public static void main(String[] args) throws Exception
{
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_AddNewList?"
+ "&ListName=Customers"
+ "&ParentListID=0"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}

LM_AlterListID

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LM_AlterListID {
 
public static void main(String[] args) throws Exception
{
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_AlterListID?"
+ "&ListID=00000"
+ "&ParentListID=0"
+ "&ListName=Customer+List"
+ "&licensekey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}

LM_AlterListMember

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LM_AlterListMember {
 
public static void main(String[] args) throws Exception
{
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_AlterListMember?"
+ "&ListMemberID=123456"
+ "&PhoneNumber=17575449510"
+ "&ClientID=1"
+ "&FirstName=CDYNE"
+ "&LastName=Corp"
+ "&licensekey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}

LM_DeleteList

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LM_DeleteList {
 
public static void main(String[] args) throws Exception
{
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_DeleteList?"
+ "&ListID=00000"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}

LM_DeleteListMember

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LM_DeleteListMember {
 
public static void main(String[] args) throws Exception
{
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_DeleteListMember?"
+ "&ListMemberID=1234567"
+ "&licensekey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}

LM_DialList

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LM_DialList{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_DialList?"
+ "ListID=0000"
+ "&DialRecursiveLists=false"
+ "&CallerID=18009843710"
+ "&CallerIDName=CDYNE"
+ "&VoiceID=1"
+ "&TextToSay=This+is+a+test+call."
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

LM_GetListIDsByLicensekey

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LM_GetListIDsByLicensekey {
 
public static void main(String[] args) throws Exception
{
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_GetListIDsByLicensekey?"
+ "&licensekey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}

GetListMembersByListID

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class LM_GetListMembersByListID {
 
public static void main(String[] args) throws Exception
{
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_GetListMembersByListID?"
+ "&ListID=00000"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}

NotifyMultiplePhoneBasic

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class NotifyMultiplePhoneBasic {
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyMultiplePhoneBasic?"
+ "PhoneNumbersToDial=17575449510;17575449510"
+ "&TextToSay=Hello+this+is+a+JAVA+test."
+ "&CallerID=18009843710"
+ "&CallerIDname=Testing"
+ "&VoiceID=1"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

NotifyMultiplePhoneBasicWithCPM

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class NotifyMultiplePhoneBasicWithCPM {
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyMultiplePhoneBasicWithCPM?"
+ "PhoneNumbersToDial=17575449510;17575449510"
+ "&TextToSay=Hello+this+is+a+JAVA+test."
+ "&CallerID=18009843710"
+ "&CallerIDname=Testing"
+ "&VoiceID=1"
+ "&CallsPerMinute=1"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

NotifyMultiplePhoneBasicWithCPMandReferenceID

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class NotifyMultiplePhoneBasicWithCPMandReferenceID {
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyMultiplePhoneBasicWithCPMandReferenceID?"
+ "PhoneNumbersToDial=17575449510;17575449510"
+ "&TextToSay=Hello+this+is+a+JAVA+test."
+ "&CallerID=18009843710"
+ "&CallerIDname=Testing"
+ "&VoiceID=1"
+ "&ReferenceID=11111"
+ "&CallsPerMinute=1"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

NotifyPhoneBasic

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class NotifyPhoneBasic {
 
public static void main(String[] args) {
 
try {
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyPhoneBasic?"
+ "PhoneNumberToDial=17575449510"
+ "&TextToSay=JAVA+Test+call"
+ "&CallerID=180098443710"
+ "&CallerIDName=CDYNE"
+ "&VoiceID=1"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

NotifyPhoneBasicWithTransfer

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class NotifyPhoneBasicWithTransfer{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyPhoneBasicWithTransfer?"
+ "PhoneNumberToDial=17575449510"
+ "&TransferNumber=17575449510"
+ "&TextToSay=JAVA+Test"
+ "&CallerID=18009843710"
+ "&CallerIDname=TEST"
+ "&VoiceID=1"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

NotifyPhoneBasicWithTryCount

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class NotifyPhoneBasicWithTryCount{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyPhoneBasicWithTryCount?"
+ "PhoneNumberToDial=17575449510"
+ "&TextToSay=JAVA+Test+call"
+ "&CallerID=180098443710"
+ "&CallerIDname=TEST"
+ "&VoiceID=1"
+ "&TryCount=1"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

NotifyPhoneEnglishBasic

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class NotifyPhoneBasicEnglish{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyPhoneEnglishBasic?"
+ "PhoneNumberToDial=17575449510"
+ "&TextToSay=Java+test+call."
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

RenameSoundFile

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class RenameSoundFile{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/RenameSoundFile?"
+ "SoundFileID=test+sound+file"
+ "&NewSoundFileID=dev+sound+file"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

RemoveSoundFile

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class RemoveSoundFile{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/RemoveSoundFile?"
+ "SoundFileID=dev+sound+file"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

ReturnSoundFileIDs

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class ReturnSoundFileIDs{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ReturnSoundFileIDs?"
+ "LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

ScriptDelete

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class ScriptDelete {
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ScriptDelete?"
+ "ScriptName=TestScript"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

ScriptList

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class ScriptList{
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ScriptList?"
+ "IncludeGlobalScripts=false"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

ScriptLoad

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class ScriptLoad {
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ScriptLoad?"
+ "ScriptName=TestScript"
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

ScriptSave

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class ScriptSave {
public static void main(String[] args) {
 
try{
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ScriptSave?"
+ "ScriptName=TestScript"
+ "&ScriptText=This+is+a+test+script."
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try{
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
}catch(java.io.IOException e){
e.printStackTrace();
}
}catch (MalformedURLException e){
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
 
}
}

SetIncomingCallScript

//Created with NetBeans IDE 7.2.1
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
public final class SetIncomingCallScript {
 
public static void main(String[] args) {
try {
URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/SetIncomingCallScript?"
+ "PhoneNumber=17575449510"
+ "&Script=Testing+incoming+call+script."
+ "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
try {
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
} catch (java.io.IOException e) {
e.printStackTrace();
}
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
 
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
 
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}
Personal tools
Namespaces

Variants
Actions
Navigation
Tools

Trial Key