Android Open Source - foodroid A D P Ws Sample






From Project

Back to project page foodroid.

License

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.

Java Source Code

/**
 * 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
    }

}




Java Source Code List

com.adp.ADPWsSample.java
com.adp.BalanceResult.java
com.adp.ChangePasswordResponse.java
com.adp.ChangePassword.java
com.adp.GetBalanceResponse.java
com.adp.GetBalance.java
com.adp.GetStatusResponse.java
com.adp.GetStatus.java
com.adp.IncomingMessage.java
com.adp.JaxRpcMessagingServiceServiceLocator.java
com.adp.JaxRpcMessagingServiceService.java
com.adp.JaxRpcMessagingService.java
com.adp.MessageObject.java
com.adp.MessagingServiceSoapBindingStub.java
com.adp.MultiAddressMessageObject.java
com.adp.OutgoingMessage.java
com.adp.ReceiveResponse.java
com.adp.ReceiveResult.java
com.adp.Receive.java
com.adp.ReportResponse.java
com.adp.ReportResult.java
com.adp.Report.java
com.adp.Result.java
com.adp.SendMultipleResponse.java
com.adp.SendMultiple.java
com.adp.SendResponse.java
com.adp.SendResult.java
com.adp.Send.java
com.adp.StatusReportResponse.java
com.adp.StatusReportResult.java
com.adp.StatusReportType0.java
com.adp.StatusReport.java
com.sba.util.DateFields.java
com.sba.util.PersianCalendar.java
com.wmc.Registration.BranchlistResource.java
com.wmc.Registration.CommentListBean.java
com.wmc.Registration.CommentResource.java
com.wmc.Registration.CommentlistResource.java
com.wmc.Registration.FoodListResource.java
com.wmc.Registration.LoginResource.java
com.wmc.Registration.OrderBean.java
com.wmc.Registration.OrderListBean.java
com.wmc.Registration.OrderResource.java
com.wmc.Registration.RegisterResource.java
com.wmc.Registration.ReserveListBean.java
com.wmc.Registration.Settings.java
com.wmc.ReservationClient.Account.java
com.wmc.ReservationClient.BranchList.java
com.wmc.ReservationClient.BranchPage.java
com.wmc.ReservationClient.Branch.java
com.wmc.ReservationClient.Comment.java
com.wmc.ReservationClient.DatabaseHelper.java
com.wmc.ReservationClient.Favorite.java
com.wmc.ReservationClient.FoodList.java
com.wmc.ReservationClient.FoodPage.java
com.wmc.ReservationClient.Food.java
com.wmc.ReservationClient.Login.java
com.wmc.ReservationClient.Main.java
com.wmc.ReservationClient.OrderList.java
com.wmc.ReservationClient.Order.java
com.wmc.ReservationClient.Search.java
com.wmc.ReservationClient.SmsMessageReceiver.java
com.wmc.ReservationClient.Table.java
com.wmc.ReservationClient.Update.java
com.wmc.ReservationClient.Utility.java
smsserver.CommentSMS.java
smsserver.LoginSMS.java
smsserver.OrderSMS.java
smsserver.Settings.java
smsserver.SmsServer.java