Difference between revisions of "Java"

From CDYNE Wiki
Jump to navigation Jump to search
imported>Bdriggers
(LicenseKeyVariableSave)
imported>Bdriggers
(LM_AddListMember)
Line 1,140: Line 1,140:
 
                     + "&FirstName=CDYNE"
 
                     + "&FirstName=CDYNE"
 
                     + "&LastName=Corporation"
 
                     + "&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) {           
 +
            }   
 +
    }
 +
}
 +
</code>
 +
 +
===LM_AddNewList===
 +
<code type=java>
 +
 +
//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");
 
                     + "&LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591");
 
try{
 
try{

Revision as of 14:24, 29 June 2015

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) {            
           }    
   }

}