Changeset 1453

Show
Ignore:
Timestamp:
11/07/08 10:01:24 (2 months ago)
Author:
marcelo
Message:

new http protocol

Location:
branches/dev-instedd
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/dev-instedd/org.javarosa.demo/src/org/javarosa/demo/shell/JavaRosaDemoShell.java

    r1368 r1453  
    126126                         
    127127                } else if (returningActivity instanceof SplashScreenModule) { 
    128                          
    129128                        LoggedUserIdentityProvider.INSTANCE.setLoggedUser("admin"); 
    130129                        launchActivity(new FormListActivity(this, "Forms List"), context); 
     
    353352                initProperty(Mesh4jPropertyRules.SMS_BLOCK_DIFF_SIZE, "100"); 
    354353                initProperty(Mesh4jPropertyRules.SMS_MAX_MESSAGE_LENGHT, "140", true); 
    355                 initProperty(Mesh4jPropertyRules.SMS_DEFAULT_TARGET, "+5550001"); 
     354                initProperty(Mesh4jPropertyRules.SMS_DEFAULT_TARGET, "+5550001", true); 
    356355                initProperty(Mesh4jPropertyRules.SMS_PORT, "3333", true); 
    357356                initProperty(Mesh4jPropertyRules.USE_TEMPLATES, Mesh4jPropertyRules.USE_TEMPLATES_NO); 
    358 //              initProperty(Mesh4jPropertyRules.HTTP_SYNC_BASE_URL, "http://vcc-pc:8080/Mesh4j/feeds/", true); 
    359 //              initProperty(Mesh4jPropertyRules.HTTP_DISCOVERY_XFORMS_URL, "http://vcc-pc:8080/Mesh4j/feeds/XForms", true); 
    360                 initProperty(Mesh4jPropertyRules.HTTP_SYNC_BASE_URL, "http://sync.instedd.org/Service.svc/feeds/"); 
    361                 initProperty(Mesh4jPropertyRules.HTTP_DISCOVERY_XFORMS_URL, "http://sync.instedd.org/Service.svc/feeds/XForms"); 
     357                initProperty(Mesh4jPropertyRules.HTTP_SYNC_BASE_URL, "http://vcc-pc:8080/mesh4x/feeds/", true); 
     358                initProperty(Mesh4jPropertyRules.HTTP_DISCOVERY_XFORMS_URL, "http://vcc-pc:8080/mesh4x/feeds/XForms", true); 
     359//              initProperty(Mesh4jPropertyRules.HTTP_SYNC_BASE_URL, "http://sync.instedd.org/Service.svc/feeds/"); 
     360//              initProperty(Mesh4jPropertyRules.HTTP_DISCOVERY_XFORMS_URL, "http://sync.instedd.org/Service.svc/feeds/XForms"); 
    362361        } 
    363362 
  • branches/dev-instedd/org.javarosa.mesh4j.sync.extensions/src/org/javarosa/core/services/mesh4j/extensions/SyncEngineService.java

    r1344 r1453  
    1818import org.javarosa.xform.util.XFormUtils; 
    1919import org.mesh4j.sync.SyncEngine; 
     20import org.mesh4j.sync.adapters.feed.atom.AtomSyndicationFormat; 
    2021import org.mesh4j.sync.adapters.feed.rss.RssSyndicationFormat; 
    2122import org.mesh4j.sync.adapters.http.HttpSyncAdapter; 
     
    103104        // SYnc METHODS 
    104105        public static Vector<Item> synchronizeItemsSynchronousHttpMethod(String formName) { 
    105                 String url = getBaseURL()+ formName; 
     106                String url = getBaseURL()+ formName + "?format=atom10"; 
    106107                SplitAdapter splitAdapter = makeXFormSplitAdapter(formName); 
    107                 HttpSyncAdapter httpAdapter = new HttpSyncAdapter(url, RssSyndicationFormat.INSTANCE, LoggedUserIdentityProvider.INSTANCE, IdGenerator.INSTANCE); 
     108                HttpSyncAdapter httpAdapter = new HttpSyncAdapter(url, AtomSyndicationFormat.INSTANCE, LoggedUserIdentityProvider.INSTANCE, IdGenerator.INSTANCE); 
    108109                SyncEngine syncEngine = new SyncEngine(splitAdapter, httpAdapter); 
    109110                Vector<Item> conflicts = syncEngine.synchronize(); 
     
    150151 
    151152        public static void importFormDefFromURL() { 
    152                 String url = JavaRosaServiceProvider.instance().getPropertyManager().getSingularProperty(Mesh4jPropertyRules.HTTP_DISCOVERY_XFORMS_URL); 
    153                 HttpSyncAdapter httpAdapter = new HttpSyncAdapter(url, RssSyndicationFormat.INSTANCE, LoggedUserIdentityProvider.INSTANCE, IdGenerator.INSTANCE); 
     153                String url = JavaRosaServiceProvider.instance().getPropertyManager().getSingularProperty(Mesh4jPropertyRules.HTTP_DISCOVERY_XFORMS_URL) + "?format=atom10"; 
     154                HttpSyncAdapter httpAdapter = new HttpSyncAdapter(url, AtomSyndicationFormat.INSTANCE, LoggedUserIdentityProvider.INSTANCE, IdGenerator.INSTANCE); 
    154155                Vector<Item> items = httpAdapter.getAll(); 
    155156