← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2387: dhis-mobile: added feature to send mobile application as OTA message

 

------------------------------------------------------------
revno: 2387
committer: Saptarshi <sunbiz@xxxxxxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2010-10-19 20:37:12 +0530
message:
  dhis-mobile: added feature to send mobile application as OTA message
modified:
  dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/messaging/api/MessageService.java
  dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SMSImportSchedule.java
  dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SmsService.java
  dhis-mobile/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml
  dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml
  dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml
  dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/menu.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/messaging/api/MessageService.java'
--- dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/messaging/api/MessageService.java	2010-10-14 10:44:34 +0000
+++ dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/messaging/api/MessageService.java	2010-10-19 15:07:12 +0000
@@ -64,4 +64,6 @@
     String sendDrafts();
     
     Map<String,String> readAllPendingMessages();
+
+    String sendOtaMessage(String recipient, String url, String prompt);
 }

=== modified file 'dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SMSImportSchedule.java'
--- dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SMSImportSchedule.java	2010-10-14 10:44:34 +0000
+++ dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SMSImportSchedule.java	2010-10-19 15:07:12 +0000
@@ -1,12 +1,6 @@
 package org.hisp.dhis.mobile;
 
-import java.util.Date;
-
 import org.hisp.dhis.system.startup.AbstractStartupRoutine;
-import org.quartz.JobDetail;
-import org.quartz.Scheduler;
-import org.quartz.SimpleTrigger;
-import org.quartz.impl.StdSchedulerFactory;
 
 public class SMSImportSchedule extends AbstractStartupRoutine
 {
@@ -15,11 +9,12 @@
     // -------------------------------------------------------------------------
     
     
+    @Override
     public void execute() throws Exception
     {
         System.out.println("*************Inside SMSImportShedule execute method");
         //specify your sceduler task details
-        JobDetail job = new JobDetail();
+        /*JobDetail job = new JobDetail();
         job.setName("SMSImport");
         job.setJobClass(SMSImportJob.class);
         
@@ -36,7 +31,7 @@
         
         scheduler.start();
         
-        scheduler.scheduleJob(job, trigger);
+        scheduler.scheduleJob(job, trigger);*/
 
         
 

=== modified file 'dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SmsService.java'
--- dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SmsService.java	2010-10-14 10:44:34 +0000
+++ dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SmsService.java	2010-10-19 15:07:12 +0000
@@ -32,6 +32,7 @@
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Constructor;
+import java.net.URL;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -59,6 +60,8 @@
 import org.smslib.AGateway.Protocols;
 import org.smslib.InboundMessage.MessageClasses;
 import org.smslib.Message.MessageTypes;
+import org.smslib.OutboundWapSIMessage;
+import org.smslib.OutboundWapSIMessage.WapSISignals;
 import org.smslib.modem.SerialModemGateway;
 
 public class SmsService implements MessageService
@@ -82,13 +85,12 @@
     }
 
     private SendSMSService sendSMSService;
-    
+
     public void setSendSMSService( SendSMSService sendSMSService )
     {
         this.sendSMSService = sendSMSService;
     }
 
-    
     /*------------------------------------------------------------------
      * Implementation
     ------------------------------------------------------------------*/
@@ -115,13 +117,37 @@
         outboundNotification = new OutboundNotification();
         callNotification = new CallNotification();
     }
-    
+
     private Service getService()
     {
         return serv;
     }
 
     @Override
+    public String sendOtaMessage( String recipient, String url, String prompt )
+    {
+        String status = new String();
+        try
+        {
+            OutboundWapSIMessage wapMsg = new OutboundWapSIMessage( recipient, new URL( url ), prompt );
+            wapMsg.setSignal( WapSISignals.HIGH );
+            if ( getServiceStatus() )
+            {
+                getService().sendMessage( wapMsg );
+                status = "WAP MESSAGE SENT";
+            } else
+            {
+                status = "SERVICE IS NOT RUNNING";
+            }
+        } catch ( Exception e )
+        {
+            e.printStackTrace();
+            status = "ERROR SENDING WAP MSG";
+        }
+        return status;
+    }
+
+    @Override
     public boolean getServiceStatus()
     {
         return serviceStatus;
@@ -185,12 +211,12 @@
         if ( getServiceStatus() )
         {
             serv.createGroup( groupName );
-            
-            for( String recepient : recepients )
+
+            for ( String recepient : recepients )
             {
                 serv.addToGroup( groupName, recepient );
             }
-            
+
             OutboundMessage message = new OutboundMessage( groupName, msg );
 
             try
@@ -198,111 +224,108 @@
                 serv.sendMessage( message );
                 getService().getLogger().logInfo( "Message Sent to Group: " + groupName, null, null );
                 return "SUCCESS";
-            } 
-            catch ( TimeoutException ex )
+            } catch ( TimeoutException ex )
             {
                 getService().getLogger().logError( "Timeout error in sending message", ex, null );
                 return "ERROR";
-            } 
-            catch ( GatewayException ex )
+            } catch ( GatewayException ex )
             {
                 getService().getLogger().logError( "Gateway Exception in sending message", ex, null );
                 return "ERROR";
-            } 
-            catch ( IOException ex )
+            } catch ( IOException ex )
             {
                 getService().getLogger().logError( "IO Exception in sending message", ex, null );
                 return "ERROR";
-            } 
-            catch ( InterruptedException ex )
+            } catch ( InterruptedException ex )
             {
                 getService().getLogger().logError( "Interrupted Exception in sending message", ex, null );
                 return "ERROR";
-            }
-            finally
+            } finally
             {
                 serv.removeGroup( groupName );
             }
-        } 
-        else
+        } else
         {
             getService().getLogger().logError( "Service not running", null, null );
             return "SERVICE NOT RUNNING";
         }
     }
-    
+
     @Override
     public String sendDrafts()
     {
         int successCount = 0;
         int failCount = 0;
-        
+
         int draftCount = sendSMSService.getRowCount();
-        
+
         List<SendSMS> sendSMSList = new ArrayList<SendSMS>();
-        
-        if( draftCount == 0 )
+
+        if ( draftCount == 0 )
         {
             return "No Drafts to send";
-        }
-        else if( draftCount < SendSMS.sendSMSRange )
-        {
-            sendSMSList.addAll( sendSMSService.getSendSMS( 0, draftCount ) );
-        }
-        else
-        {
-            sendSMSList.addAll( sendSMSService.getSendSMS( 0, SendSMS.sendSMSRange-1 ) );
+        } else
+        {
+            if ( draftCount < SendSMS.sendSMSRange )
+            {
+                sendSMSList.addAll( sendSMSService.getSendSMS( 0, draftCount ) );
+            } else
+            {
+                sendSMSList.addAll( sendSMSService.getSendSMS( 0, SendSMS.sendSMSRange - 1 ) );
+            }
         }
 
-        for( SendSMS sendSMS : sendSMSList )
+        for ( SendSMS sendSMS : sendSMSList )
         {
             String status = sendMessage( sendSMS.getSenderInfo().split( "_" )[0], sendSMS.getSendingMessage() );
-            if( status.equalsIgnoreCase( "SUCCESS" ) )
+            if ( status.equalsIgnoreCase( "SUCCESS" ) )
             {
                 sendSMSService.deleteSendSMS( sendSMS );
                 successCount++;
-            }
-            else if( status.equalsIgnoreCase( "MODEMERROR" ) )
-            {
-                getService().getLogger().logError( "Modem Stops Responding...Till then successfully sent : "+successCount, null, null );
-                return "Modem Stops Responding...Till then successfully sent : "+successCount; 
-            }
-            else
-            {
-                failCount++;
+            } else
+            {
+                if ( status.equalsIgnoreCase( "MODEMERROR" ) )
+                {
+                    getService().getLogger().logError( "Modem Stops Responding...Till then successfully sent : " + successCount, null, null );
+                    return "Modem Stops Responding...Till then successfully sent : " + successCount;
+                } else
+                {
+                    failCount++;
+                }
             }
         }
-        
-        return "SMS Successfully Sent : "+ successCount +" Failed : " + failCount;
+
+        return "SMS Successfully Sent : " + successCount + " Failed : " + failCount;
     }
-    
+
     @Override
     public String sendMessages( List<SendSMS> sendSMSList )
     {
         int successCount = 0;
         int failCount = 0;
-        
-        for( SendSMS sendSMS : sendSMSList )
+
+        for ( SendSMS sendSMS : sendSMSList )
         {
             String status = sendMessage( sendSMS.getSenderInfo().split( "_" )[0], sendSMS.getSendingMessage() );
-            if( status.equalsIgnoreCase( "SUCCESS" ) )
+            if ( status.equalsIgnoreCase( "SUCCESS" ) )
             {
                 successCount++;
-            }
-            else if( status.equalsIgnoreCase( "MODEMERROR" ) )
-            {
-                getService().getLogger().logError( "Modem Stops Responding...Till then successfully sent : "+successCount, null, null );
-                return "Modem Stops Responding...Till then successfully sent : "+successCount; 
-            }
-            else
-            {
-                failCount++;
+            } else
+            {
+                if ( status.equalsIgnoreCase( "MODEMERROR" ) )
+                {
+                    getService().getLogger().logError( "Modem Stops Responding...Till then successfully sent : " + successCount, null, null );
+                    return "Modem Stops Responding...Till then successfully sent : " + successCount;
+                } else
+                {
+                    failCount++;
+                }
             }
         }
-        
-        return "Successfully sent : "+ successCount +" Failed : " + failCount;
+
+        return "Successfully sent : " + successCount + " Failed : " + failCount;
     }
-    
+
     @Override
     public String sendMessage( String recipient, String msg )
     {
@@ -311,39 +334,33 @@
         {
             try
             {
-                if( serv.sendMessage( message ) )
+                if ( serv.sendMessage( message ) )
                 {
                     getService().getLogger().logInfo( "Message Sent to: " + recipient, null, null );
                     return "SUCCESS";
-                }
-                else
+                } else
                 {
-                    getService().getLogger().logError( "Timeout error in sending message to: "+recipient, null, null );
+                    getService().getLogger().logError( "Timeout error in sending message to: " + recipient, null, null );
                     return "MODEMERROR";
                 }
-            } 
-            catch ( TimeoutException ex )
+            } catch ( TimeoutException ex )
             {
                 getService().getLogger().logError( "Timeout error in sending message", ex, null );
                 return "ERROR";
-            } 
-            catch ( GatewayException ex )
+            } catch ( GatewayException ex )
             {
                 getService().getLogger().logError( "Gateway Exception in sending message", ex, null );
                 return "ERROR";
-            } 
-            catch ( IOException ex )
+            } catch ( IOException ex )
             {
                 getService().getLogger().logError( "IO Exception in sending message", ex, null );
                 return "ERROR";
-            } 
-            catch ( InterruptedException ex )
+            } catch ( InterruptedException ex )
             {
                 getService().getLogger().logError( "Interrupted Exception in sending message", ex, null );
                 return "ERROR";
             }
-        } 
-        else
+        } else
         {
             getService().getLogger().logError( "Service not running", null, null );
             return "SERVICE NOT RUNNING";
@@ -363,11 +380,11 @@
 
             String sender = binaryMsg.getOriginator();
             Date sendTime = binaryMsg.getDate();
-            
+
             // Creating XML File
             getService().getLogger().logInfo( "Creating XML file...", null, null );
             createXMLFile( sender, sendTime, unCompressedText );
-            
+
             //Delete SMS
             getService().getLogger().logInfo( "Deleting SMS...", null, null );
             if ( getProperties().getProperty( "settings.delete_after_processing", "no" ).equalsIgnoreCase( "yes" ) )
@@ -377,55 +394,48 @@
                     getService().deleteMessage( (InboundMessage) message );
                     getService().getLogger().logInfo( "Deleted message", null, null );
                     delSMSflag = 1;
-                } 
-                catch ( Exception e )
+                } catch ( Exception e )
                 {
                     getService().getLogger().logError( "Error deleting received message!", e, null );
                 }
             }
-            
+
             // Import data into DHIS
             //getService().getLogger().logInfo( "Importing data into DHIS...", null, null );
             //String statusMessage = importData( sender, sendTime, unCompressedText );
-            
+
             //Sending ACK/Status SMS
             //getService().getLogger().logInfo( "Sending ACK/Status messge...", null, null );
             //sendMessage( sender, statusMessage );
-            
+
             getService().getLogger().logInfo( "---Message Processing Finished---", null, null );
-            
+
             //String statusMessage = saveData( sender, sendTime, unCompressedText );
             //getService().getLogger().logInfo( "Saved Report. Sending Acknowledgement to " + sender, null, null );
             //sendAck( sender, "REPORT", unCompressedText );
             //sendMessage( sender, statusMessage );
 
-        } 
-        catch ( UnsupportedEncodingException uneex )
+        } catch ( UnsupportedEncodingException uneex )
         {
             getService().getLogger().logError( "Error reading encoding: ", uneex, null );
             return;
-        } 
-        catch ( ClassCastException ccex )
+        } catch ( ClassCastException ccex )
         {
             getService().getLogger().logError( "Error performing ClassCast: ", ccex, null );
             return;
-        } 
-        catch ( ArithmeticException aex )
+        } catch ( ArithmeticException aex )
         {
             getService().getLogger().logError( "Error performing arithmatic operation: ", aex, null );
             return;
-        } 
-        catch (ArrayIndexOutOfBoundsException aiobex)
+        } catch ( ArrayIndexOutOfBoundsException aiobex )
         {
             getService().getLogger().logError( "Error with message format. PLEASE CHECK APP VERSION: ", aiobex, null );
             return;
-        } 
-        catch (NullPointerException npex)
+        } catch ( NullPointerException npex )
         {
             getService().getLogger().logError( "MISSING form number. PLEASE CHECK formIDLayout.csv: ", npex, null );
             return;
-        }
-        finally
+        } finally
         {
             if ( getProperties().getProperty( "settings.delete_after_processing", "no" ).equalsIgnoreCase( "yes" ) && delSMSflag == 0 )
             {
@@ -433,8 +443,7 @@
                 {
                     getService().deleteMessage( (InboundMessage) message );
                     getService().getLogger().logInfo( "Deleted message", null, null );
-                } 
-                catch ( Exception e )
+                } catch ( Exception e )
                 {
                     getService().getLogger().logError( "Error deleting received message!", e, null );
                 }
@@ -506,7 +515,7 @@
         getService().getLogger().logInfo( "Importing Completed for current messages", null, null );
         return statusMessage;
     }
-    
+
     @Override
     public String saveData( String mobileNumber, Date sendTime, String data )
     {
@@ -533,52 +542,51 @@
     @Override
     public String processPendingMessages()
     {
-        if( !getServiceStatus() )
+        if ( !getServiceStatus() )
         {
             getService().getLogger().logError( "SMSService not running", null, null );
-            
+
             return "SMSService not running";
         }
-        
+
         List<InboundMessage> msgList = new ArrayList<InboundMessage>();
-        
+
         msgList = readAllMessages();
-        
-        if( msgList != null && msgList.size() > 0 )
+
+        if ( msgList != null && msgList.size() > 0 )
         {
-            for( InboundMessage msg : msgList )
+            for ( InboundMessage msg : msgList )
             {
                 processMessage( msg );
             }
-            
+
             return "Successfully Processed all Pending Messages.";
-        }
-        else
+        } else
         {
             return "No Pending Messages to Process.";
         }
     }
-    
+
     @Override
-    public Map<String,String> readAllPendingMessages()
+    public Map<String, String> readAllPendingMessages()
     {
-        if( !getServiceStatus() )
+        if ( !getServiceStatus() )
         {
             getService().getLogger().logError( "SMSService not running", null, null );
-            
+
             return null;
         }
-        
-        Map<String,String> pendingMessages = new HashMap<String,String>();
+
+        Map<String, String> pendingMessages = new HashMap<String, String>();
         // Define a list which will hold the read messages.
         List<InboundMessage> msgList = new ArrayList<InboundMessage>();
         try
         {
             getService().getLogger().logInfo( "Reading All Pending Messages...", null, null );
 
-            serv.readMessages(msgList, MessageClasses.ALL);
-            
-            for( Object msg : msgList )
+            serv.readMessages( msgList, MessageClasses.ALL );
+
+            for ( Object msg : msgList )
             {
                 try
                 {
@@ -589,76 +597,71 @@
                     String sender = binaryMsg.getOriginator();
                     SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd_HH-mm-ss" );
                     String timeStamp = dateFormat.format( sendTime );
-                    
-                    pendingMessages.put( sender+"_"+timeStamp, unCompressedText );
-
-                }
-                catch ( ClassCastException ccex )
+
+                    pendingMessages.put( sender + "_" + timeStamp, unCompressedText );
+
+                } catch ( ClassCastException ccex )
                 {
                     InboundMessage message = (InboundMessage) msg;
                     Date sendTime = message.getDate();
                     String sender = message.getOriginator();
                     SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd_HH-mm-ss" );
                     String timeStamp = dateFormat.format( sendTime );
-                    
+
                     try
                     {
-                        pendingMessages.put( sender+"_"+timeStamp, message.getText() );
+                        pendingMessages.put( sender + "_" + timeStamp, message.getText() );
                         getService().getLogger().logInfo( "Normal Text Message", null, null );
-                    }
-                    catch( Exception e )
+                    } catch ( Exception e )
                     {
-                        pendingMessages.put( sender+"_"+timeStamp, "Unsupported Format" );
+                        pendingMessages.put( sender + "_" + timeStamp, "Unsupported Format" );
                         getService().getLogger().logError( "UnSupported Format", null, null );
                     }
-                }
-                catch( Exception e )
+                } catch ( Exception e )
                 {
                     getService().getLogger().logError( "Error While reading messages, returning whatever sms got till now", null, null );
                     return pendingMessages;
                 }
             }
-            
+
             return pendingMessages;
-        }
-        catch (Exception e)
+        } catch ( Exception e )
         {
             e.printStackTrace();
             getService().getLogger().logError( "SMSServer: error setting custom balancer!", null, null );
-            
+
             return null;
         }
     }
-    
+
     @Override
     public List<InboundMessage> readAllMessages()
     {
-        if( !getServiceStatus() )
+        if ( !getServiceStatus() )
         {
             getService().getLogger().logError( "SMSService not running", null, null );
-            
+
             return null;
         }
-        
+
         // Define a list which will hold the read messages.
         List<InboundMessage> msgList = new ArrayList<InboundMessage>();
         try
         {
             getService().getLogger().logInfo( "Reading All Messages...", null, null );
 
-            serv.readMessages(msgList, MessageClasses.ALL);
-            
+            serv.readMessages( msgList, MessageClasses.ALL );
+
             return msgList;
-        }
-        catch (Exception e)
+        } catch ( Exception e )
         {
             e.printStackTrace();
             getService().getLogger().logError( "SMSServer: error setting custom balancer!", null, null );
-            
+
             return null;
         }
     }
-    
+
     /*------------------------------------------------------------------
      * Internal methods
     ------------------------------------------------------------------*/
@@ -667,7 +670,7 @@
     private String loadConfiguration() throws Exception
     {
         CONFIG_FILE = System.getenv( "DHIS2_HOME" ) + File.separator + "SMSServer.conf";
-        
+
         if ( new File( CONFIG_FILE ).exists() )
         {
             FileInputStream f = new FileInputStream( CONFIG_FILE );
@@ -746,13 +749,13 @@
                     String pin = getProperties().getProperty( modemName + ".pin" );
                     String inbound = getProperties().getProperty( modemName + ".inbound" );
                     String outbound = getProperties().getProperty( modemName + ".outbound" );
-                    String simMemLocation = getProperties().getProperty(modemName + ".simMemLocation");
+                    String simMemLocation = getProperties().getProperty( modemName + ".simMemLocation" );
 
                     SerialModemGateway gateway = new SerialModemGateway( modemName, port, baudRate, manufacturer, model );
 
-                    if( simMemLocation != null || !simMemLocation.equals("-") )
+                    if ( simMemLocation != null || !simMemLocation.equals( "-" ) )
                     {
-                        gateway.getATHandler().setStorageLocations(simMemLocation);
+                        gateway.getATHandler().setStorageLocations( simMemLocation );
                     }
 
                     if ( protocol != null && protocol.equalsIgnoreCase( "PDU" ) )
@@ -831,8 +834,7 @@
             {
                 getService().getLogger().logInfo( "New INBOUND MESSAGE on Gateway: " + gatewayId + " from " + msg.getOriginator(), null, null );
                 processMessage( msg );
-            } 
-            else
+            } else
             {
                 if ( msgType == MessageTypes.STATUSREPORT )
                 {
@@ -846,28 +848,27 @@
                     {
                         getService().deleteMessage( msg );
                         getService().getLogger().logInfo( "Deleted message", null, null );
-                    } 
-                    catch ( Exception e )
+                    } catch ( Exception e )
                     {
                         getService().getLogger().logError( "Error deleting received message!", e, null );
                     }
                 }
             }
-            
+
             /*
             if ( getProperties().getProperty( "settings.delete_after_processing", "no" ).equalsIgnoreCase( "yes" ) )
             {
-                try
-                {
-                    getService().deleteMessage( msg );
-                    getService().getLogger().logInfo( "Deleted message", null, null );
-                } 
-                catch ( Exception e )
-                {
-                    getService().getLogger().logError( "Error deleting received message!", e, null );
-                }
-            }
-            */
+            try
+            {
+            getService().deleteMessage( msg );
+            getService().getLogger().logInfo( "Deleted message", null, null );
+            }
+            catch ( Exception e )
+            {
+            getService().getLogger().logError( "Error deleting received message!", e, null );
+            }
+            }
+             */
         }
     }
     //</editor-fold>
@@ -905,8 +906,6 @@
         }
     }
     //</editor-fold>
-    
-
     //</editor-fold>
     /*----------------------------------------------------------------*/
 }

=== modified file 'dhis-mobile/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-mobile/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml	2010-10-14 10:44:34 +0000
+++ dhis-mobile/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml	2010-10-19 15:07:12 +0000
@@ -44,8 +44,8 @@
         <property name="sendSMSStore" ref="org.hisp.dhis.mobile.api.SendSMSStore"/>
     </bean>
 
-<!-- UserGroup Store and Service -->
-    <bean id="org.hisp.dhis.user.UserGroupStore"
+    <!-- UserGroup Store and Service -->
+    <!--bean id="org.hisp.dhis.user.UserGroupStore"
         class="org.hisp.dhis.user.impl.HiberntateUserGroupStore">
         <property name="sessionFactory" ref="sessionFactory"/>
     </bean>
@@ -53,7 +53,7 @@
     <bean id="org.hisp.dhis.user.UserGroupService"
         class="org.hisp.dhis.user.impl.DefaultUserGroupService">
         <property name="userGroupStore" ref="org.hisp.dhis.user.UserGroupStore"/>
-    </bean>
+    </bean-->
 
 
 	<!-- Send ACK Job -->

=== modified file 'dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml	2010-10-14 10:44:34 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml	2010-10-19 15:07:12 +0000
@@ -59,5 +59,11 @@
           scope="prototype">
         <property name="smsService" ref="org.hisp.dhis.mobile.SmsService" />
     </bean>
+    
+    <bean id="org.hisp.dhis.mobile.action.SendOtaAction"
+          class="org.hisp.dhis.mobile.action.SendOtaAction"
+          scope="prototype">
+        <property name="smsService" ref="org.hisp.dhis.mobile.SmsService" />
+    </bean>
 
 </beans>

=== modified file 'dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml'
--- dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml	2010-10-14 10:44:34 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml	2010-10-19 15:07:12 +0000
@@ -26,6 +26,12 @@
             <param name="menu">/dhis-web-mobile/menu.vm</param>
 			<param name="requiredAuthorities">F_MOBILE_SENDSMS</param>
         </action>
+        <action name="sendOta" class="org.hisp.dhis.mobile.action.SendOtaAction">
+            <result name="success" type="velocity">/main.vm</result>
+            <param name="page">/dhis-web-mobile/sendOtaPage.vm</param>
+            <param name="menu">/dhis-web-mobile/menu.vm</param>
+			<param name="requiredAuthorities">F_MOBILE_SENDSMS</param>
+        </action>
         <action name="mobileSettings" class="org.hisp.dhis.mobile.action.MobileSettingsAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-mobile/mobileSettingsPage.vm</param>
@@ -71,7 +77,5 @@
             <result name="success" type="chain">createMobileApp</result>
         </action>
 
-        
-
     </package>
 </struts>
\ No newline at end of file

=== modified file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/menu.vm'
--- dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/menu.vm	2010-10-14 10:44:34 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/menu.vm	2010-10-19 15:07:12 +0000
@@ -3,6 +3,7 @@
     <!--<li><a href = "createMobileApp.action">Create Mobile Application</a></li>-->
     <li><a href = "receiveImport.action">Receive Data and Import</a></li>
     <li><a href = "sendSMS.action">Send SMS</a></li>
+    <li><a href = "sendOta.action">Send Application via OTA</a></li>
     <li><a href = "mobileSettings.action">Settings</a></li>
     <li><a href = "receiveAllMessages.action">Inbox</a></li>
     <li><a href = "getAllDraftMessages.action">Draft</a></li>