Back to project page foodroid.
The source code is released under:
GNU General Public License
If you think the Android project foodroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * ADPWsSample.java/*www .j a va2s .co m*/ * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.adp; import java.rmi.RemoteException; import java.util.Date; public class ADPWsSample { public static void main(String[] args) throws Exception { ADPWsSample adpWsSample = new ADPWsSample(); adpWsSample.send(); } public void send() throws Exception { com.adp.MessagingServiceSoapBindingStub binding; try { binding = (com.adp.MessagingServiceSoapBindingStub) new com.adp.JaxRpcMessagingServiceServiceLocator().getMessagingService(); } catch (javax.xml.rpc.ServiceException jre) { if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } String userName = "hassan"; String password = "yahoohassan"; String shortNumber =""; String[] destNo = new String[]{"989395178907"}; String sourcePort = null; String destPort = null; String[] clientId = null; short messageType = 1; short encoding =1; boolean longSupported = true; Date dueTime = null; String content ="Hello World!"; binding.setTimeout(60000); // Test operation com.adp.SendResult value = null; try { value = binding.send(userName, password, shortNumber, destNo, sourcePort, destPort, clientId, messageType, encoding, longSupported, dueTime, content); if (value.getStatus() == 0) { System.out.println("Hooraaaaaaaaaaaaaaa!!!!"); for (long id : value.getId()) { System.out.println("id = " + id); } } else { System.out.println("FAIL!!! and status = " + value.getStatus()); } } catch (RemoteException e) { e.printStackTrace(); } } public void sendMultiple() throws Exception { com.adp.MessagingServiceSoapBindingStub binding; try { binding = (com.adp.MessagingServiceSoapBindingStub) new com.adp.JaxRpcMessagingServiceServiceLocator().getMessagingService(); } catch (javax.xml.rpc.ServiceException jre) { if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } // Time out after a minute binding.setTimeout(60000); // Test operation com.adp.SendResult value = null; value = binding.sendMultiple(new java.lang.String(), new java.lang.String(), new java.lang.String(), new java.lang.String(), new java.lang.String(), (short)0, true, new com.adp.MultiAddressMessageObject[0]); // TBD - validate results } public void getBalance() throws Exception { com.adp.MessagingServiceSoapBindingStub binding; try { binding = (com.adp.MessagingServiceSoapBindingStub) new com.adp.JaxRpcMessagingServiceServiceLocator().getMessagingService(); } catch (javax.xml.rpc.ServiceException jre) { if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } // Time out after a minute binding.setTimeout(60000); // Test operation com.adp.BalanceResult value = null; value = binding.getBalance(new java.lang.String(), new java.lang.String(), (short)0); // TBD - validate results } public void receive() throws Exception { com.adp.MessagingServiceSoapBindingStub binding; try { binding = (com.adp.MessagingServiceSoapBindingStub) new com.adp.JaxRpcMessagingServiceServiceLocator().getMessagingService(); } catch (javax.xml.rpc.ServiceException jre) { if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } // Time out after a minute binding.setTimeout(60000); // Test operation com.adp.ReceiveResult value = null; value = binding.receive(new java.lang.String(), new java.lang.String(), new java.lang.String(), 0, 0); // TBD - validate results } public void statusReport() throws Exception { com.adp.MessagingServiceSoapBindingStub binding; try { binding = (com.adp.MessagingServiceSoapBindingStub) new com.adp.JaxRpcMessagingServiceServiceLocator().getMessagingService(); } catch (javax.xml.rpc.ServiceException jre) { if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } // Time out after a minute binding.setTimeout(60000); // Test operation com.adp.StatusReportResult value = null; value = binding.statusReport(new java.lang.String(), new java.lang.String(), new java.lang.String(), new java.lang.String(), new long[0], new java.lang.String[0]); // TBD - validate results } }