26 Replies Latest reply: Jun 9, 2012 10:22 AM by rajesh kumar RSS

Device Registration through Relay Server Android SUP 2.1.2

Rakshit Doshi
Currently Being Moderated

Hi,

 

Can anyone help out with the steps for registering the user through a relay server. Please help along with the code snippet.

  • Re: Device Registration through Relay Server Android SUP 2.1.2
    Ian Thain
    Currently Being Moderated

    Rakshit

     

    Please check out this URL from a colleagues blog http://blogs.sybase.com/phoran/?p=491

     

    You need to create an account on a RS, then from the RS you will be given Configuration instructions

     

    1. What you need to create your RS Outbound Enabler

     

    2. What you need to add to your App params to connect to your SUP through the RS

     

    Hope this points you in the right direction

     

    Ian

  • Re: Device Registration through Relay Server Android SUP 2.1.2
    Rakshit Doshi
    Currently Being Moderated

    Yes i am able to connect to the SUP widout relay server..But i am unable to with the relay server..Kindly Suggest

  • Re: Device Registration through Relay Server Android SUP 2.1.2
    Rohith Deraje
    Currently Being Moderated
    Hi Rakshit,
    You do not need any additional coding to pass through relay server.
    With relay server, the setup would be like "SUP<-->Relay<---> Client/Device". Here relay just acts like a reverse proxy.You just need to pass relay server host, port and farm ID to the registration API.
    The detailed step by step procedure to create farm and outbound enabler is mention in doc http://scn.sap.com/docs/DOC-23532. Section "Creating relay server configuration in SCC". This doc also has the SUP-ODP registraion code snippet for android.
    Once outbound enabler is created i SCC,Select the outbound enabler and "Start". The "Status" should turn to Running.
    Also if you are trying to register from device, please check if you are able to reach relay server through browser.
    Thanks and Regards
    Rohith
    • Re: Device Registration through Relay Server Android SUP 2.1.2
      Rakshit Doshi
      Currently Being Moderated

      Hi Rohith,

       

      I tried following the steps and referring to the document i did complete all the steps required to configure the relay server was still not able to connect..And in the sample project you used something of LiteManager class but what i used is importing libraries from the folder  UnwiredPlatform\MobileSDK\ObjectAPI\Android (3 jar files) and i was using the ConnectionProperties for connecting through the relay server..

       

      Have you ever used that thing and tried to connect.

       

      Secondly when i tried to connecting through direct IP and 5001 port i was able to register but not able to Synchronize.

      It showed this error. Can you please help me out.

       

      05-02 13:00:31.112: E/AndroidRuntime(529): FATAL EXCEPTION: main

      05-02 13:00:31.112: E/AndroidRuntime(529): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.prism.vista/com.prism.vista.MainActivity}: com.sybase.persistence.SynchronizeException: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-857]: Synchronization failed due to an error on the server: [-10244] The MobiLink server has encountered an error and the synchro

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.app.ActivityThread.access$600(ActivityThread.java:123)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.os.Handler.dispatchMessage(Handler.java:99)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.os.Looper.loop(Looper.java:137)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.app.ActivityThread.main(ActivityThread.java:4424)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at java.lang.reflect.Method.invokeNative(Native Method)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at java.lang.reflect.Method.invoke(Method.java:511)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at dalvik.system.NativeStart.main(Native Method)

      05-02 13:00:31.112: E/AndroidRuntime(529): Caused by: com.sybase.persistence.SynchronizeException: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-857]: Synchronization failed due to an error on the server: [-10244] The MobiLink server has encountered an error and the synchro

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.sybase.sup.client.persistence.RbsDatabaseDelegate.internalSynchronize(RbsDatabaseDelegate.java:689)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.sybase.sup.client.persistence.RbsDatabaseDelegate.synchronize(RbsDatabaseDelegate.java:1050)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.sybase.sup.client.persistence.RbsDatabaseDelegate.synchronize(RbsDatabaseDelegate.java:1041)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at Vistaland.VistalandDB.synchronize(VistalandDB.java:197)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.prism.vista.MainActivity.initializeApplication(MainActivity.java:90)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.prism.vista.MainActivity.onCreate(MainActivity.java:46)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.app.Activity.performCreate(Activity.java:4465)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)

      05-02 13:00:31.112: E/AndroidRuntime(529):     ... 11 more

      05-02 13:00:31.112: E/AndroidRuntime(529): Caused by: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-857]: Synchronization failed due to an error on the server: [-10244] The MobiLink server has encountered an error and the synchro

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.ianywhere.ultralitejni12.implementation.JniConnection.ulcSynchronize(Native Method)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.ianywhere.ultralitejni12.implementation.JniConnection.synchronize(Unknown Source)

      05-02 13:00:31.112: E/AndroidRuntime(529):     at com.sybase.sup.client.persistence.RbsDatabaseDelegate.internalSynchronize(RbsDatabaseDelegate.java:616)

      05-02 13:00:31.112: E/AndroidRuntime(529):     ... 19 more

      • Re: Device Registration through Relay Server Android SUP 2.1.2
        Srinivas Divakarla
        Currently Being Moderated

        Hi Rakshit,

         

        I have managed to get this out recently you could refer the post written by me

         

        http://scn.sap.com/community/mobile/blog/2012/05/02/sup-212-native-android-mbo-non-doe-based-approach-through-rs

         

        Srinivas Divakarla

        • Re: Device Registration through Relay Server Android SUP 2.1.2
          Rakshit Doshi
          Currently Being Moderated

          Hi Srinivas,

           

          This is it...Thanks a ton for all your hard work.. 

          • Re: Device Registration through Relay Server Android SUP 2.1.2
            Srinivas Divakarla
            Currently Being Moderated

            Hi Rakhsit,

             

            probably you can also rate the content/like the content/and comment the content, apart from that you add your valuable suggestion also to server the good content

             

            Thank you so much

            Happy to help though..

             

            Thank you very much

             

            Cheers,

            Srinivas Divakarla

            • Re: Device Registration through Relay Server Android SUP 2.1.2
              Rakshit Doshi
              Currently Being Moderated

              Hi Srinivas,

               

              I got this ultraliteJ error while i tried to synchronize. Do you have any idea how to resolve this?

               

              05-03 09:10:36.583: E/AndroidRuntime(538): FATAL EXCEPTION: main

              05-03 09:10:36.583: E/AndroidRuntime(538): com.sybase.persistence.SynchronizeException: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-857]: Synchronization failed due to an error on the server: [-10244] The MobiLink server has encountered an error and the synchro

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.sybase.sup.client.persistence.RbsDatabaseDelegate.internalSynchronize(RbsDatabaseDelegate.java:689)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.sybase.sup.client.persistence.RbsDatabaseDelegate.synchronize(RbsDatabaseDelegate.java:1050)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.sybase.sup.client.persistence.RbsDatabaseDelegate.synchronize(RbsDatabaseDelegate.java:1041)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at Vista.VistaDB.synchronize(VistaDB.java:197)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.prism.vista.MainActivity.initializeApplication(MainActivity.java:104)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.prism.vista.MainActivity.access$5(MainActivity.java:77)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.prism.vista.MainActivity$1.onClick(MainActivity.java:64)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at android.view.View.performClick(View.java:3511)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at android.view.View$PerformClick.run(View.java:14105)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at android.os.Handler.handleCallback(Handler.java:605)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at android.os.Handler.dispatchMessage(Handler.java:92)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at android.os.Looper.loop(Looper.java:137)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at android.app.ActivityThread.main(ActivityThread.java:4424)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at java.lang.reflect.Method.invokeNative(Native Method)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at java.lang.reflect.Method.invoke(Method.java:511)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at dalvik.system.NativeStart.main(Native Method)

              05-03 09:10:36.583: E/AndroidRuntime(538): Caused by: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-857]: Synchronization failed due to an error on the server: [-10244] The MobiLink server has encountered an error and the synchro

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.ianywhere.ultralitejni12.implementation.JniConnection.ulcSynchronize(Native Method)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.ianywhere.ultralitejni12.implementation.JniConnection.synchronize(Unknown Source)

              05-03 09:10:36.583: E/AndroidRuntime(538):     at com.sybase.sup.client.persistence.RbsDatabaseDelegate.internalSynchronize(RbsDatabaseDelegate.java:616)

              05-03 09:10:36.583: E/AndroidRuntime(538):     ... 17 more

Actions