Java

From CDYNE Wiki
Jump to navigation Jump to search

NotifyPhoneAdvanced

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.BufferedReader;
 3 import java.io.InputStreamReader;
 4 import java.io.PrintWriter;
 5 import java.net.HttpURLConnection;
 6 import java.net.URL;
 7 
 8 public final class NotifyPhoneAdvanced {
 9     public static void main(String[] args) throws Exception 
10 {
11 String responseContent="";
12 String response="";
13                 
14 URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx");
15 HttpURLConnection connection = (HttpURLConnection) url.openConnection();
16 
17 StringBuilder sb = new StringBuilder("<?xml version='1.0' encoding='utf-8'?>");
18         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/\">");
19         sb.append("<soap:Body>");
20         sb.append("<NotifyPhoneAdvanced xmlns=\"http://ws.cdyne.com/NotifyWS/\">");
21         sb.append("<anr>");
22         sb.append("<TransferNumber>17575449510</TransferNumber>");
23         sb.append("<PhoneNumberToDial>17575449510</PhoneNumberToDial>");
24         sb.append("<VoiceID>1</VoiceID>");
25         sb.append("<CallerIDNumber>18009843710</CallerIDNumber>"); 
26         sb.append("<CallerIDName>Test</CallerIDName>"); 
27         sb.append("<TextToSay>Hello this is a test.</TextToSay>");
28         sb.append("<LicenseKey>f01d89fd-5155-5455-5585-e84ab8de8591</LicenseKey>");  
29         sb.append("<NextTryInSeconds>5</NextTryInSeconds>");
30         sb.append("<TryCount>5</TryCount>");
31         sb.append("<UTCScheduledDateTime>2013-01-15T20:53:00.608Z</UTCScheduledDateTime>");  
32         sb.append("<StatusChangePostUrl>http://cdyne.com/postback/notify/2015</StatusChangePostUrl>");
33         sb.append("</anr>");
34         sb.append("</NotifyPhoneAdvanced>");
35         sb.append("</soap:Body>");
36         sb.append("</soap:Envelope>");
37         
38 connection.setRequestProperty("Content-Length", String.valueOf(sb.toString().length()));
39 connection.setRequestProperty("Content-Type", "text/xml");
40 connection.setRequestProperty("Connection", "Close");
41 connection.setRequestProperty("SoapAction", "http://ws.cdyne.com/NotifyWS/NotifyPhoneAdvanced");
42 connection.setDoInput(true);
43 connection.setDoOutput(true);
44 
45 PrintWriter pw = new PrintWriter(connection.getOutputStream());
46 pw.write(sb.toString());
47 pw.flush();
48 		
49 connection.connect();
50 
51 System.out.println(sb.toString());
52 
53 BufferedReader br;
54 
55 if(connection.getResponseCode() == 200)
56 {
57 br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
58 }
59 else
60 {
61 br = new BufferedReader(new InputStreamReader(connection.getErrorStream()));
62 }
63 
64 //BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
65 
66 while ((responseContent = br.readLine()) != null)
67 {
68 response += responseContent;
69 }
70 System.out.println(response);
71     }    
72 }

GetMultipleQueueIdStatus

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetMultipleQueueIdStatus {     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetMultipleQueueIdStatus?"
19                     + "QueueIDs=000111222;333444555"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

AssignIncomingNumber

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class AssignIncomingNumber{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/AssignIncomingNumber?"
19                     + "IncomingPhoneNumber=17575449510"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

CancelNotify

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class CancelNotify{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/CancelNotify?"
19                     + "QueueID=000111222"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }


CancelNotifyByReferenceID

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class CancelNotifyByReferenceID{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/CancelNotifyByReferenceID?"
19                     + "ReferenceID=000"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.INDENT, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

GetAssignedNumbers

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetAssignedNumbers{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetAssignedNumbers?"
19                     + "LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
20     try{			
21     InputStream in = url.openStream(); 
22     StreamSource source = new StreamSource(in); 			
23     printResult(source);	
24 }catch(java.io.IOException e){			
25     e.printStackTrace();		
26 }		
27 }catch (MalformedURLException e){		
28     e.printStackTrace();	
29             }     
30     }     
31     private static void printResult(Source source) {        
32             try {            
33             ByteArrayOutputStream bos = new ByteArrayOutputStream();
34             StreamResult sr = new StreamResult(bos);
35             Transformer trans = TransformerFactory.newInstance().newTransformer();
36             Properties oprops = new Properties();
37             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
38             trans.setOutputProperties(oprops);
39             trans.transform(source, sr);            
40             System.out.println("**** Response ******");            
41             System.out.println(bos.toString());   
42 
43             bos.close();
44             System.out.println();        
45     } catch (Exception e) {            
46             }    
47             
48     }
49 }

GetAvailableAreaCodes

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetAvailableAreaCodes{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetAvailableAreaCodes");		
19     try{			
20     InputStream in = url.openStream(); 
21     StreamSource source = new StreamSource(in); 			
22     printResult(source);	
23 }catch(java.io.IOException e){			
24     e.printStackTrace();		
25 }		
26 }catch (MalformedURLException e){		
27     e.printStackTrace();	
28             }     
29     }     
30     private static void printResult(Source source) {        
31             try {            
32             ByteArrayOutputStream bos = new ByteArrayOutputStream();
33             StreamResult sr = new StreamResult(bos);
34             Transformer trans = TransformerFactory.newInstance().newTransformer();
35             Properties oprops = new Properties();
36             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
37             trans.setOutputProperties(oprops);
38             trans.transform(source, sr);            
39             System.out.println("**** Response ******");            
40             System.out.println(bos.toString());   
41 
42             bos.close();
43             System.out.println();        
44     } catch (Exception e) {            
45             }    
46             
47     }
48 }

GetAvailableIncomingNumbers

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetAvailableIncomingNumbers{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetAvailableIncomingNumbers?"
19                     + "AreaCodeFilter=888");		
20     try{			
21     InputStream in = url.openStream(); 
22     StreamSource source = new StreamSource(in); 			
23     printResult(source);	
24 }catch(java.io.IOException e){			
25     e.printStackTrace();		
26 }		
27 }catch (MalformedURLException e){		
28     e.printStackTrace();	
29             }     
30     }     
31     private static void printResult(Source source) {        
32             try {            
33             ByteArrayOutputStream bos = new ByteArrayOutputStream();
34             StreamResult sr = new StreamResult(bos);
35             Transformer trans = TransformerFactory.newInstance().newTransformer();
36             Properties oprops = new Properties();
37             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
38             trans.setOutputProperties(oprops);
39             trans.transform(source, sr);            
40             System.out.println("**** Response ******");            
41             System.out.println(bos.toString());   
42 
43             bos.close();
44             System.out.println();        
45     } catch (Exception e) {            
46             }    
47             
48     }
49 }

GetIncomingCallScript

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetIncomingCallScript{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetIncomingCallScript?"
19                     + "PhoneNumber=17575449510"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

GetQueueIDStatus

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetQueueIDStatus{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetQueueIDStatus?"
19                     + "QueueID=000111222");		
20     try{			
21     InputStream in = url.openStream(); 
22     StreamSource source = new StreamSource(in); 			
23     printResult(source);	
24 }catch(java.io.IOException e){			
25     e.printStackTrace();		
26 }		
27 }catch (MalformedURLException e){		
28     e.printStackTrace();	
29             }     
30     }     
31     private static void printResult(Source source) {        
32             try {            
33             ByteArrayOutputStream bos = new ByteArrayOutputStream();
34             StreamResult sr = new StreamResult(bos);
35             Transformer trans = TransformerFactory.newInstance().newTransformer();
36             Properties oprops = new Properties();
37             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
38             trans.setOutputProperties(oprops);
39             trans.transform(source, sr);            
40             System.out.println("**** Response ******");            
41             System.out.println(bos.toString());   
42 
43             bos.close();
44             System.out.println();        
45     } catch (Exception e) {            
46             }    
47             
48     }
49 }

GetQueueIDStatusesByPhoneNumber

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetQueueIDStatusesByPhoneNumber{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetQueueIDStatusesByPhoneNumber?"
19                     + "PhoneNumber=17575449510"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

GetQueueIDStatusWithAdvancedInfo

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetQueueIDStatusWithAdvancedInfo{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetQueueIDStatusWithAdvancedInfo?"
19                     + "QueueID=000111222"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

GetResponseCodes

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetResponseCodes{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetResponseCodes");		
19     try{			
20     InputStream in = url.openStream(); 
21     StreamSource source = new StreamSource(in); 			
22     printResult(source);	
23 }catch(java.io.IOException e){			
24     e.printStackTrace();		
25 }		
26 }catch (MalformedURLException e){		
27     e.printStackTrace();	
28             }     
29     }     
30     private static void printResult(Source source) {        
31             try {            
32             ByteArrayOutputStream bos = new ByteArrayOutputStream();
33             StreamResult sr = new StreamResult(bos);
34             Transformer trans = TransformerFactory.newInstance().newTransformer();
35             Properties oprops = new Properties();
36             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
37             trans.setOutputProperties(oprops);
38             trans.transform(source, sr);            
39             System.out.println("**** Response ******");            
40             System.out.println(bos.toString());   
41 
42             bos.close();
43             System.out.println();        
44     } catch (Exception e) {            
45             }    
46             
47     }
48 }

GetSoundFile

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetSoundFile{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetSoundFile?"
19                     + "SoundFileID=test sound file"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

GetSoundFileLength

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetSoundFileLength{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetSoundFileLength?"
19                     + "SoundFileID=test sound file"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

GetSoundFileURL

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetSoundFileURL{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetSoundFileURL?"
19                     + "SoundFileID=test sound file"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

GetVersion

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class GetVersion{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/GetVersion");		
19     try{			
20     InputStream in = url.openStream(); 
21     StreamSource source = new StreamSource(in); 			
22     printResult(source);	
23 }catch(java.io.IOException e){			
24     e.printStackTrace();		
25 }		
26 }catch (MalformedURLException e){		
27     e.printStackTrace();	
28             }     
29     }     
30     private static void printResult(Source source) {        
31             try {            
32             ByteArrayOutputStream bos = new ByteArrayOutputStream();
33             StreamResult sr = new StreamResult(bos);
34             Transformer trans = TransformerFactory.newInstance().newTransformer();
35             Properties oprops = new Properties();
36             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
37             trans.setOutputProperties(oprops);
38             trans.transform(source, sr);            
39             System.out.println("**** Response ******");            
40             System.out.println(bos.toString());   
41 
42             bos.close();
43             System.out.println();        
44     } catch (Exception e) {            
45             }    
46             
47     }
48 }

getVoices

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class getVoices{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/getVoices");		
19     try{			
20     InputStream in = url.openStream(); 
21     StreamSource source = new StreamSource(in); 			
22     printResult(source);	
23 }catch(java.io.IOException e){			
24     e.printStackTrace();		
25 }		
26 }catch (MalformedURLException e){		
27     e.printStackTrace();	
28             }     
29     }     
30     private static void printResult(Source source) {        
31             try {            
32             ByteArrayOutputStream bos = new ByteArrayOutputStream();
33             StreamResult sr = new StreamResult(bos);
34             Transformer trans = TransformerFactory.newInstance().newTransformer();
35             Properties oprops = new Properties();
36             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
37             trans.setOutputProperties(oprops);
38             trans.transform(source, sr);            
39             System.out.println("**** Response ******");            
40             System.out.println(bos.toString());   
41 
42             bos.close();
43             System.out.println();        
44     } catch (Exception e) {            
45             }    
46             
47     }
48 }

LicenseKeyVariableLoad

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LicenseKeyVariableLoad{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LicenseKeyVariableLoad?"
19                     + "VariableName=Variable1"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

LicenseKeyVariableSave

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LicenseKeyVariableSave{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LicenseKeyVariableSave?"
19                     + "VariableName=Variable1"
20                     + "&VariableValue=Testing+Var+Save"
21                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
22     try{			
23     InputStream in = url.openStream(); 
24     StreamSource source = new StreamSource(in); 			
25     printResult(source);	
26 }catch(java.io.IOException e){			
27     e.printStackTrace();		
28 }		
29 }catch (MalformedURLException e){		
30     e.printStackTrace();	
31             }     
32     }     
33     private static void printResult(Source source) {        
34             try {            
35             ByteArrayOutputStream bos = new ByteArrayOutputStream();
36             StreamResult sr = new StreamResult(bos);
37             Transformer trans = TransformerFactory.newInstance().newTransformer();
38             Properties oprops = new Properties();
39             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
40             trans.setOutputProperties(oprops);
41             trans.transform(source, sr);            
42             System.out.println("**** Response ******");            
43             System.out.println(bos.toString());   
44 
45             bos.close();
46             System.out.println();        
47     } catch (Exception e) {            
48             }    
49             
50     }
51 }

LM_AddListMember

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LM_AddListMember {
15 
16     public static void main(String[] args) throws Exception 
17 {
18 
19 try{		
20             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_AddListMember?"
21                     + "&ListID=00000"
22                     + "&PhoneNumber=17575449510"
23                     + "&ClientID=1"
24                     + "&FirstName=CDYNE"
25                     + "&LastName=Corporation"
26                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");	
27 try{			
28     InputStream in = url.openStream(); 
29     StreamSource source = new StreamSource(in); 			
30     printResult(source);	
31 }catch(java.io.IOException e){			
32     e.printStackTrace();		
33 }		
34 }catch (MalformedURLException e){		
35     e.printStackTrace();	
36             }     
37     }     
38     private static void printResult(Source source) {        
39             try {            
40             ByteArrayOutputStream bos = new ByteArrayOutputStream();
41             StreamResult sr = new StreamResult(bos);
42             Transformer trans = TransformerFactory.newInstance().newTransformer();
43             Properties oprops = new Properties();
44             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
45             trans.setOutputProperties(oprops);
46             trans.transform(source, sr);            
47             System.out.println("**** Response ******");            
48             System.out.println(bos.toString());   
49 
50             bos.close();
51             System.out.println();        
52     } catch (Exception e) {            
53             }    
54     }
55 }

LM_AddNewList

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LM_AddNewList {
15 
16     public static void main(String[] args) throws Exception 
17 {
18 
19 try{		
20             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_AddNewList?"
21                     + "&ListName=Customers"
22                     + "&ParentListID=0"
23                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");	
24 try{			
25     InputStream in = url.openStream(); 
26     StreamSource source = new StreamSource(in); 			
27     printResult(source);	
28 }catch(java.io.IOException e){			
29     e.printStackTrace();		
30 }		
31 }catch (MalformedURLException e){		
32     e.printStackTrace();	
33             }     
34     }     
35     private static void printResult(Source source) {        
36             try {            
37             ByteArrayOutputStream bos = new ByteArrayOutputStream();
38             StreamResult sr = new StreamResult(bos);
39             Transformer trans = TransformerFactory.newInstance().newTransformer();
40             Properties oprops = new Properties();
41             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
42             trans.setOutputProperties(oprops);
43             trans.transform(source, sr);            
44             System.out.println("**** Response ******");            
45             System.out.println(bos.toString());   
46 
47             bos.close();
48             System.out.println();        
49     } catch (Exception e) {            
50             }    
51     }
52 }

LM_AlterListID

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LM_AlterListID {
15 
16     public static void main(String[] args) throws Exception 
17 {
18 
19 try{		
20             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_AlterListID?"
21                     + "&ListID=00000"
22                     + "&ParentListID=0"
23                     + "&ListName=Customer+List"
24                     + "&licensekey=f01d89fd-5155-5455-5585-e84ab8de8591");	
25 try{			
26     InputStream in = url.openStream(); 
27     StreamSource source = new StreamSource(in); 			
28     printResult(source);	
29 }catch(java.io.IOException e){			
30     e.printStackTrace();		
31 }		
32 }catch (MalformedURLException e){		
33     e.printStackTrace();	
34             }     
35     }     
36     private static void printResult(Source source) {        
37             try {            
38             ByteArrayOutputStream bos = new ByteArrayOutputStream();
39             StreamResult sr = new StreamResult(bos);
40             Transformer trans = TransformerFactory.newInstance().newTransformer();
41             Properties oprops = new Properties();
42             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
43             trans.setOutputProperties(oprops);
44             trans.transform(source, sr);            
45             System.out.println("**** Response ******");            
46             System.out.println(bos.toString());   
47 
48             bos.close();
49             System.out.println();        
50     } catch (Exception e) {            
51             }    
52     }
53 }

LM_AlterListMember

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LM_AlterListMember {
15 
16     public static void main(String[] args) throws Exception 
17 {
18 
19 try{		
20             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_AlterListMember?"
21                     + "&ListMemberID=123456"
22                     + "&PhoneNumber=17575449510"
23                     + "&ClientID=1"
24                     + "&FirstName=CDYNE"
25                     + "&LastName=Corp"
26                     + "&licensekey=f01d89fd-5155-5455-5585-e84ab8de8591");	
27 try{			
28     InputStream in = url.openStream(); 
29     StreamSource source = new StreamSource(in); 			
30     printResult(source);	
31 }catch(java.io.IOException e){			
32     e.printStackTrace();		
33 }		
34 }catch (MalformedURLException e){		
35     e.printStackTrace();	
36             }     
37     }     
38     private static void printResult(Source source) {        
39             try {            
40             ByteArrayOutputStream bos = new ByteArrayOutputStream();
41             StreamResult sr = new StreamResult(bos);
42             Transformer trans = TransformerFactory.newInstance().newTransformer();
43             Properties oprops = new Properties();
44             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
45             trans.setOutputProperties(oprops);
46             trans.transform(source, sr);            
47             System.out.println("**** Response ******");            
48             System.out.println(bos.toString());   
49 
50             bos.close();
51             System.out.println();        
52     } catch (Exception e) {            
53             }    
54     }
55 }

LM_DeleteList

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LM_DeleteList {
15 
16     public static void main(String[] args) throws Exception 
17 {
18 
19 try{		
20             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_DeleteList?"
21                     + "&ListID=00000"
22                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");	
23 try{			
24     InputStream in = url.openStream(); 
25     StreamSource source = new StreamSource(in); 			
26     printResult(source);	
27 }catch(java.io.IOException e){			
28     e.printStackTrace();		
29 }		
30 }catch (MalformedURLException e){		
31     e.printStackTrace();	
32             }     
33     }     
34     private static void printResult(Source source) {        
35             try {            
36             ByteArrayOutputStream bos = new ByteArrayOutputStream();
37             StreamResult sr = new StreamResult(bos);
38             Transformer trans = TransformerFactory.newInstance().newTransformer();
39             Properties oprops = new Properties();
40             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
41             trans.setOutputProperties(oprops);
42             trans.transform(source, sr);            
43             System.out.println("**** Response ******");            
44             System.out.println(bos.toString());   
45 
46             bos.close();
47             System.out.println();        
48     } catch (Exception e) {            
49             }    
50     }
51 }

LM_DeleteListMember

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LM_DeleteListMember {
15 
16     public static void main(String[] args) throws Exception 
17 {
18 
19 try{		
20             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_DeleteListMember?"
21                     + "&ListMemberID=1234567"
22                     + "&licensekey=f01d89fd-5155-5455-5585-e84ab8de8591");	
23 try{			
24     InputStream in = url.openStream(); 
25     StreamSource source = new StreamSource(in); 			
26     printResult(source);	
27 }catch(java.io.IOException e){			
28     e.printStackTrace();		
29 }		
30 }catch (MalformedURLException e){		
31     e.printStackTrace();	
32             }     
33     }     
34     private static void printResult(Source source) {        
35             try {            
36             ByteArrayOutputStream bos = new ByteArrayOutputStream();
37             StreamResult sr = new StreamResult(bos);
38             Transformer trans = TransformerFactory.newInstance().newTransformer();
39             Properties oprops = new Properties();
40             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
41             trans.setOutputProperties(oprops);
42             trans.transform(source, sr);            
43             System.out.println("**** Response ******");            
44             System.out.println(bos.toString());   
45 
46             bos.close();
47             System.out.println();        
48     } catch (Exception e) {            
49             }    
50     }
51 }

LM_DialList

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LM_DialList{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_DialList?"
19                     + "ListID=0000"
20                     + "&DialRecursiveLists=false"
21                     + "&CallerID=18009843710"
22                     + "&CallerIDName=CDYNE"
23                     + "&VoiceID=1"
24                     + "&TextToSay=This+is+a+test+call."
25                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
26     try{			
27     InputStream in = url.openStream(); 
28     StreamSource source = new StreamSource(in); 			
29     printResult(source);	
30 }catch(java.io.IOException e){			
31     e.printStackTrace();		
32 }		
33 }catch (MalformedURLException e){		
34     e.printStackTrace();	
35             }     
36     }     
37     private static void printResult(Source source) {        
38             try {            
39             ByteArrayOutputStream bos = new ByteArrayOutputStream();
40             StreamResult sr = new StreamResult(bos);
41             Transformer trans = TransformerFactory.newInstance().newTransformer();
42             Properties oprops = new Properties();
43             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
44             trans.setOutputProperties(oprops);
45             trans.transform(source, sr);            
46             System.out.println("**** Response ******");            
47             System.out.println(bos.toString());   
48 
49             bos.close();
50             System.out.println();        
51     } catch (Exception e) {            
52             }    
53             
54     }
55 }

LM_GetListIDsByLicensekey

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LM_GetListIDsByLicensekey {
15 
16     public static void main(String[] args) throws Exception 
17 {
18 
19 try{		
20             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_GetListIDsByLicensekey?"
21                     + "&licensekey=f01d89fd-5155-5455-5585-e84ab8de8591");	
22 try{			
23     InputStream in = url.openStream(); 
24     StreamSource source = new StreamSource(in); 			
25     printResult(source);	
26 }catch(java.io.IOException e){			
27     e.printStackTrace();		
28 }		
29 }catch (MalformedURLException e){		
30     e.printStackTrace();	
31             }     
32     }     
33     private static void printResult(Source source) {        
34             try {            
35             ByteArrayOutputStream bos = new ByteArrayOutputStream();
36             StreamResult sr = new StreamResult(bos);
37             Transformer trans = TransformerFactory.newInstance().newTransformer();
38             Properties oprops = new Properties();
39             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
40             trans.setOutputProperties(oprops);
41             trans.transform(source, sr);            
42             System.out.println("**** Response ******");            
43             System.out.println(bos.toString());   
44 
45             bos.close();
46             System.out.println();        
47     } catch (Exception e) {            
48             }    
49     }
50 }

GetListMembersByListID

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class LM_GetListMembersByListID {
15 
16     public static void main(String[] args) throws Exception 
17 {
18 
19 try{		
20             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/LM_GetListMembersByListID?"
21                     + "&ListID=00000"
22                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");	
23 try{			
24     InputStream in = url.openStream(); 
25     StreamSource source = new StreamSource(in); 			
26     printResult(source);	
27 }catch(java.io.IOException e){			
28     e.printStackTrace();		
29 }		
30 }catch (MalformedURLException e){		
31     e.printStackTrace();	
32             }     
33     }     
34     private static void printResult(Source source) {        
35             try {            
36             ByteArrayOutputStream bos = new ByteArrayOutputStream();
37             StreamResult sr = new StreamResult(bos);
38             Transformer trans = TransformerFactory.newInstance().newTransformer();
39             Properties oprops = new Properties();
40             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
41             trans.setOutputProperties(oprops);
42             trans.transform(source, sr);            
43             System.out.println("**** Response ******");            
44             System.out.println(bos.toString());   
45 
46             bos.close();
47             System.out.println();        
48     } catch (Exception e) {            
49             }    
50     }
51 }

NotifyMultiplePhoneBasic

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class NotifyMultiplePhoneBasic {     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyMultiplePhoneBasic?"
19                     + "PhoneNumbersToDial=17575449510;17575449510"
20                     + "&TextToSay=Hello+this+is+a+JAVA+test."
21                     + "&CallerID=18009843710"
22                     + "&CallerIDname=Testing"
23                     + "&VoiceID=1"
24                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
25     try{			
26     InputStream in = url.openStream(); 
27     StreamSource source = new StreamSource(in); 			
28     printResult(source);	
29 }catch(java.io.IOException e){			
30     e.printStackTrace();		
31 }		
32 }catch (MalformedURLException e){		
33     e.printStackTrace();	
34             }     
35     }     
36     private static void printResult(Source source) {        
37             try {            
38             ByteArrayOutputStream bos = new ByteArrayOutputStream();
39             StreamResult sr = new StreamResult(bos);
40             Transformer trans = TransformerFactory.newInstance().newTransformer();
41             Properties oprops = new Properties();
42             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
43             trans.setOutputProperties(oprops);
44             trans.transform(source, sr);            
45             System.out.println("**** Response ******");            
46             System.out.println(bos.toString());   
47 
48             bos.close();
49             System.out.println();        
50     } catch (Exception e) {            
51             }    
52             
53     }
54 }

NotifyMultiplePhoneBasicWithCPM

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class NotifyMultiplePhoneBasicWithCPM {     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyMultiplePhoneBasicWithCPM?"
19                     + "PhoneNumbersToDial=17575449510;17575449510"
20                     + "&TextToSay=Hello+this+is+a+JAVA+test."
21                     + "&CallerID=18009843710"
22                     + "&CallerIDname=Testing"
23                     + "&VoiceID=1"
24                     + "&CallsPerMinute=1"
25                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
26     try{			
27     InputStream in = url.openStream(); 
28     StreamSource source = new StreamSource(in); 			
29     printResult(source);	
30 }catch(java.io.IOException e){			
31     e.printStackTrace();		
32 }		
33 }catch (MalformedURLException e){		
34     e.printStackTrace();	
35             }     
36     }     
37     private static void printResult(Source source) {        
38             try {            
39             ByteArrayOutputStream bos = new ByteArrayOutputStream();
40             StreamResult sr = new StreamResult(bos);
41             Transformer trans = TransformerFactory.newInstance().newTransformer();
42             Properties oprops = new Properties();
43             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
44             trans.setOutputProperties(oprops);
45             trans.transform(source, sr);            
46             System.out.println("**** Response ******");            
47             System.out.println(bos.toString());   
48 
49             bos.close();
50             System.out.println();        
51     } catch (Exception e) {            
52             }    
53             
54     }
55 }

NotifyMultiplePhoneBasicWithCPMandReferenceID

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class NotifyMultiplePhoneBasicWithCPMandReferenceID {     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyMultiplePhoneBasicWithCPMandReferenceID?"
19                     + "PhoneNumbersToDial=17575449510;17575449510"
20                     + "&TextToSay=Hello+this+is+a+JAVA+test."
21                     + "&CallerID=18009843710"
22                     + "&CallerIDname=Testing"
23                     + "&VoiceID=1"
24                     + "&ReferenceID=11111"
25                     + "&CallsPerMinute=1"
26                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
27     try{			
28     InputStream in = url.openStream(); 
29     StreamSource source = new StreamSource(in); 			
30     printResult(source);	
31 }catch(java.io.IOException e){			
32     e.printStackTrace();		
33 }		
34 }catch (MalformedURLException e){		
35     e.printStackTrace();	
36             }     
37     }     
38     private static void printResult(Source source) {        
39             try {            
40             ByteArrayOutputStream bos = new ByteArrayOutputStream();
41             StreamResult sr = new StreamResult(bos);
42             Transformer trans = TransformerFactory.newInstance().newTransformer();
43             Properties oprops = new Properties();
44             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
45             trans.setOutputProperties(oprops);
46             trans.transform(source, sr);            
47             System.out.println("**** Response ******");            
48             System.out.println(bos.toString());   
49 
50             bos.close();
51             System.out.println();        
52     } catch (Exception e) {            
53             }    
54             
55     }
56 }

NotifyPhoneBasic

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class NotifyPhoneBasic {
15 
16     public static void main(String[] args) {
17 
18         try {
19             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyPhoneBasic?"
20                     + "PhoneNumberToDial=17575449510"
21                     + "&TextToSay=JAVA+Test+call"
22                     + "&CallerID=180098443710"
23                     + "&CallerIDName=CDYNE"
24                     + "&VoiceID=1"
25                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
26  try{			
27     InputStream in = url.openStream(); 
28     StreamSource source = new StreamSource(in); 			
29     printResult(source);	
30 }catch(java.io.IOException e){			
31     e.printStackTrace();		
32 }		
33 }catch (MalformedURLException e){		
34     e.printStackTrace();	
35             }     
36     }     
37     private static void printResult(Source source) {        
38             try {            
39             ByteArrayOutputStream bos = new ByteArrayOutputStream();
40             StreamResult sr = new StreamResult(bos);
41             Transformer trans = TransformerFactory.newInstance().newTransformer();
42             Properties oprops = new Properties();
43             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
44             trans.setOutputProperties(oprops);
45             trans.transform(source, sr);            
46             System.out.println("**** Response ******");            
47             System.out.println(bos.toString());   
48 
49             bos.close();
50             System.out.println();        
51     } catch (Exception e) {            
52             }    
53             
54     }
55 }

NotifyPhoneBasicWithTransfer

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class NotifyPhoneBasicWithTransfer{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyPhoneBasicWithTransfer?"
19                     + "PhoneNumberToDial=17575449510"
20                     + "&TransferNumber=17575449510"
21                     + "&TextToSay=JAVA+Test"
22                     + "&CallerID=18009843710"
23                     + "&CallerIDname=TEST"
24                     + "&VoiceID=1"
25                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
26     try{			
27     InputStream in = url.openStream(); 
28     StreamSource source = new StreamSource(in); 			
29     printResult(source);	
30 }catch(java.io.IOException e){			
31     e.printStackTrace();		
32 }		
33 }catch (MalformedURLException e){		
34     e.printStackTrace();	
35             }     
36     }     
37     private static void printResult(Source source) {        
38             try {            
39             ByteArrayOutputStream bos = new ByteArrayOutputStream();
40             StreamResult sr = new StreamResult(bos);
41             Transformer trans = TransformerFactory.newInstance().newTransformer();
42             Properties oprops = new Properties();
43             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
44             trans.setOutputProperties(oprops);
45             trans.transform(source, sr);            
46             System.out.println("**** Response ******");            
47             System.out.println(bos.toString());   
48 
49             bos.close();
50             System.out.println();        
51     } catch (Exception e) {            
52             }    
53             
54     }
55 }

NotifyPhoneBasicWithTryCount

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class NotifyPhoneBasicWithTryCount{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyPhoneBasicWithTryCount?"
19                     + "PhoneNumberToDial=17575449510"
20                     + "&TextToSay=JAVA+Test+call"
21                     + "&CallerID=180098443710"
22                     + "&CallerIDname=TEST"
23                     + "&VoiceID=1"
24                     + "&TryCount=1"
25                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
26     try{			
27     InputStream in = url.openStream(); 
28     StreamSource source = new StreamSource(in); 			
29     printResult(source);	
30 }catch(java.io.IOException e){			
31     e.printStackTrace();		
32 }		
33 }catch (MalformedURLException e){		
34     e.printStackTrace();	
35             }     
36     }     
37     private static void printResult(Source source) {        
38             try {            
39             ByteArrayOutputStream bos = new ByteArrayOutputStream();
40             StreamResult sr = new StreamResult(bos);
41             Transformer trans = TransformerFactory.newInstance().newTransformer();
42             Properties oprops = new Properties();
43             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
44             trans.setOutputProperties(oprops);
45             trans.transform(source, sr);            
46             System.out.println("**** Response ******");            
47             System.out.println(bos.toString());   
48 
49             bos.close();
50             System.out.println();        
51     } catch (Exception e) {            
52             }    
53             
54     }
55 }

NotifyPhoneEnglishBasic

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class NotifyPhoneBasicEnglish{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyPhoneEnglishBasic?"
19                      + "PhoneNumberToDial=17575449510"
20                      + "&TextToSay=Java+test+call."    
21                      + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
22     try{			
23     InputStream in = url.openStream(); 
24     StreamSource source = new StreamSource(in); 			
25     printResult(source);	
26 }catch(java.io.IOException e){			
27     e.printStackTrace();		
28 }		
29 }catch (MalformedURLException e){		
30     e.printStackTrace();	
31             }     
32     }     
33     private static void printResult(Source source) {        
34             try {            
35             ByteArrayOutputStream bos = new ByteArrayOutputStream();
36             StreamResult sr = new StreamResult(bos);
37             Transformer trans = TransformerFactory.newInstance().newTransformer();
38             Properties oprops = new Properties();
39             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
40             trans.setOutputProperties(oprops);
41             trans.transform(source, sr);            
42             System.out.println("**** Response ******");            
43             System.out.println(bos.toString());   
44 
45             bos.close();
46             System.out.println();        
47     } catch (Exception e) {            
48             }    
49             
50     }
51 }

RenameSoundFile

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class RenameSoundFile{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/RenameSoundFile?"
19                     + "SoundFileID=test+sound+file"
20                     + "&NewSoundFileID=dev+sound+file"
21                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
22     try{			
23     InputStream in = url.openStream(); 
24     StreamSource source = new StreamSource(in); 			
25     printResult(source);	
26 }catch(java.io.IOException e){			
27     e.printStackTrace();		
28 }		
29 }catch (MalformedURLException e){		
30     e.printStackTrace();	
31             }     
32     }     
33     private static void printResult(Source source) {        
34             try {            
35             ByteArrayOutputStream bos = new ByteArrayOutputStream();
36             StreamResult sr = new StreamResult(bos);
37             Transformer trans = TransformerFactory.newInstance().newTransformer();
38             Properties oprops = new Properties();
39             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
40             trans.setOutputProperties(oprops);
41             trans.transform(source, sr);            
42             System.out.println("**** Response ******");            
43             System.out.println(bos.toString());   
44 
45             bos.close();
46             System.out.println();        
47     } catch (Exception e) {            
48             }    
49             
50     }
51 }

RemoveSoundFile

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class RemoveSoundFile{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/RemoveSoundFile?"
19                     + "SoundFileID=dev+sound+file"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

ReturnSoundFileIDs

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class ReturnSoundFileIDs{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ReturnSoundFileIDs?"
19                     + "LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
20     try{			
21     InputStream in = url.openStream(); 
22     StreamSource source = new StreamSource(in); 			
23     printResult(source);	
24 }catch(java.io.IOException e){			
25     e.printStackTrace();		
26 }		
27 }catch (MalformedURLException e){		
28     e.printStackTrace();	
29             }     
30     }     
31     private static void printResult(Source source) {        
32             try {            
33             ByteArrayOutputStream bos = new ByteArrayOutputStream();
34             StreamResult sr = new StreamResult(bos);
35             Transformer trans = TransformerFactory.newInstance().newTransformer();
36             Properties oprops = new Properties();
37             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
38             trans.setOutputProperties(oprops);
39             trans.transform(source, sr);            
40             System.out.println("**** Response ******");            
41             System.out.println(bos.toString());   
42 
43             bos.close();
44             System.out.println();        
45     } catch (Exception e) {            
46             }    
47             
48     }
49 }

ScriptDelete

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class ScriptDelete {     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ScriptDelete?"
19                     + "ScriptName=TestScript"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

ScriptList

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class ScriptList{     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ScriptList?"
19                     + "IncludeGlobalScripts=false"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

ScriptLoad

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class ScriptLoad {     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ScriptLoad?"
19                     + "ScriptName=TestScript"
20                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
21     try{			
22     InputStream in = url.openStream(); 
23     StreamSource source = new StreamSource(in); 			
24     printResult(source);	
25 }catch(java.io.IOException e){			
26     e.printStackTrace();		
27 }		
28 }catch (MalformedURLException e){		
29     e.printStackTrace();	
30             }     
31     }     
32     private static void printResult(Source source) {        
33             try {            
34             ByteArrayOutputStream bos = new ByteArrayOutputStream();
35             StreamResult sr = new StreamResult(bos);
36             Transformer trans = TransformerFactory.newInstance().newTransformer();
37             Properties oprops = new Properties();
38             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
39             trans.setOutputProperties(oprops);
40             trans.transform(source, sr);            
41             System.out.println("**** Response ******");            
42             System.out.println(bos.toString());   
43 
44             bos.close();
45             System.out.println();        
46     } catch (Exception e) {            
47             }    
48             
49     }
50 }

ScriptSave

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL; 
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class ScriptSave {     
15 	public static void main(String[] args) { 	
16 
17            try{		
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/ScriptSave?"
19                     + "ScriptName=TestScript"
20                     + "&ScriptText=This+is+a+test+script."
21                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");		
22     try{			
23     InputStream in = url.openStream(); 
24     StreamSource source = new StreamSource(in); 			
25     printResult(source);	
26 }catch(java.io.IOException e){			
27     e.printStackTrace();		
28 }		
29 }catch (MalformedURLException e){		
30     e.printStackTrace();	
31             }     
32     }     
33     private static void printResult(Source source) {        
34             try {            
35             ByteArrayOutputStream bos = new ByteArrayOutputStream();
36             StreamResult sr = new StreamResult(bos);
37             Transformer trans = TransformerFactory.newInstance().newTransformer();
38             Properties oprops = new Properties();
39             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
40             trans.setOutputProperties(oprops);
41             trans.transform(source, sr);            
42             System.out.println("**** Response ******");            
43             System.out.println(bos.toString());   
44 
45             bos.close();
46             System.out.println();        
47     } catch (Exception e) {            
48             }    
49             
50     }
51 }

SetIncomingCallScript

 1 //Created with NetBeans IDE 7.2.1
 2 import java.io.ByteArrayOutputStream;
 3 import java.io.InputStream;
 4 import java.net.MalformedURLException;
 5 import java.net.URL;
 6 import java.util.Properties;
 7 import javax.xml.transform.OutputKeys;
 8 import javax.xml.transform.Source;
 9 import javax.xml.transform.Transformer;
10 import javax.xml.transform.TransformerFactory;
11 import javax.xml.transform.stream.StreamResult;
12 import javax.xml.transform.stream.StreamSource;
13 
14 public final class SetIncomingCallScript {
15 
16     public static void main(String[] args) {
17         try {
18             URL url = new URL("http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/SetIncomingCallScript?"
19                     + "PhoneNumber=17575449510"
20                     + "&Script=Testing+incoming+call+script."
21                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
22             try {
23                 InputStream in = url.openStream();
24                 StreamSource source = new StreamSource(in);
25                 printResult(source);
26             } catch (java.io.IOException e) {
27                 e.printStackTrace();
28             }
29         } catch (MalformedURLException e) {
30             e.printStackTrace();
31         }
32     }
33 
34     private static void printResult(Source source) {
35         try {
36             ByteArrayOutputStream bos = new ByteArrayOutputStream();
37             StreamResult sr = new StreamResult(bos);
38             Transformer trans = TransformerFactory.newInstance().newTransformer();
39             Properties oprops = new Properties();
40             oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
41             trans.setOutputProperties(oprops);
42             trans.transform(source, sr);
43             System.out.println("**** Response ******");
44             System.out.println(bos.toString());
45 
46             bos.close();
47             System.out.println();
48         } catch (Exception e) {
49         }
50     }
51 }