0

This might seem a dumb question, but how do I find out if my SAP SMP 2.3 server has a relay server?

Additional data:

  • I have acquired basic knowledge while trying to make a HelloWorld project setup with SAP Mobile Platform 2.3 I want to read a few lines off a web service.

  • I have access to the SAP Mobile workspace, SAP Control Center, and the virtual machine where it runs, but I did not configure it so my insight about it is limited.

  • So far I have been able to read a few lines of data off a SAP webservice, and see them on the SMP workspace. My next step is to read this lines from my native Android app, but I am struggling determining which ports to use to synchronize my app, and I cannot connect it to the server.

    I get green and red message on Eclipse's logcat:

    failed to connect to IP adress bla bla, port bla

My code so far:

Application app = Application.getInstance(); 
            app.setApplicationIdentifier("SMPNostrum"); 
            app.setApplicationContext(SMPactivity.this); 
            Log.v("joshtag","Configuring Connection Properties");        
            ConnectionProperties connProps = app.getConnectionProperties();
            connProps.setServerName(SERVER_137);  //My server's IP
            // if you are using Relay Server, then use the correct port number for the Relay Server.
            // if connecting using http without a relay server, use the messaging administration port, by default 5001.
            // if connecting using https without a relay server, then use a new port for https, for example 9001.
            connProps.setPortNumber(SYNC_SERVER_PORT);//Port=2480
            // if connecting using https without a relay server, set the network protocol
            connProps.setNetworkProtocol("http");  
            connProps.setFarmId("0");
            connProps.setActivationCode("123");  
            // Set FarmId and UrlSuffix when connecting through the Relay Server. 
            // Provide user credentials
            LoginCredentials loginCred = new LoginCredentials("Samsung","my password here");
            connProps.setLoginCredentials(loginCred);
            connProps.setUrlSuffix("/ias_relay_server/client/rs_client.dll/%cid%/tm");  //is this necessary?
            // Initialize generated package database class with this Application instance
            SMPNostrumDB.setApplication(app);  
     
        ConnectionProfile cp=SMPNostrumDB.getSynchronizationProfile();
        cp.setServerName(SERVER_137);
        cp.setPortNumber(SYNC_SERVER_PORT);
        cp.setNetworkProtocol(PROTOCOL);        
        cp.setDomainName("default");
        cp.save();          
        
        Log.v("joshtag","Registering and connecting App");
     // If the application has not been registered to the server,register now
        if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED){
            app.registerApplication(30000);
            //iniciaSincronitzacio(app.getRegistrationStatus() != RegistrationStatus.REGISTERED, sincronizar);
            }
        else{ 
            // start the connection to server
            app.startConnection(30000);
            }
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Josh
  • 6,251
  • 2
  • 46
  • 73

1 Answers1

1

Short answer:

  1. Relay server is not installed along with SMP installation.
  2. There are two communication channel for the application to talk to SMP, one is messaging and other is sync port. You can find both information on control center. connprop for application requires messaging port to be set and connection profile requires sync port to be set. In default setting for connprop, you can keep farm id as zero.

The basic sequence is

  1. If not already registered, you register the application after setting the connection properties of application. Else call startconnection.
  2. The registration downloads down the synchronization connection settings from SCC. You set login information for synchronization profile, and call synchronization for the sync groups you want to synchronize.

The connection settings can be seen on SCC under applications node in the left for your specific application grouped under application setting template. The determination of which template will be used is done using three parameters: Application name, security config and logical role. If you don't use logical role in your app, it will be application name and security config. This security config has be provided in the connection properties of application before registration.

For details, visit http://infocenter.sybase.com and goto to the specific server version.

jhamu
  • 232
  • 3
  • 14
  • Thanks for your reply, I am starting to gain a better insight of this topic. I have reformulated the code and I get this error on LOGCAT, it starts on greeen and after a while the error starts to appear red: MocaLog(11815): Caused by: Error: 552 Message: 'failed to connect to /172.16.0.5 (port 5001) after 30000ms' Detail: ''. What can this error mean? I am not sure wether to use my own user id ("Samsung") that I made on SCC, or to use the server's id (Supadmin- Supposedly , the users Supadmin and Samsung have the same password, but I dont know which one to use. – Josh Aug 11 '14 at 07:48
  • Does it really shows / before the ip? can you please check if you can connect to 172.16.0.5 port 5001 by calling telnet 172.16.0.5 5001 from any computer on the same network. – jhamu Aug 11 '14 at 12:12
  • Hi, first, I will describe my setup: SMP workspace and SAP software is running on a virtual machine on some server. I access this vm by connecting with my desktop via remote desktop. This desktop is where I also code the apps in eclipse. I made a ping to that address inside my server (via remote desktop) and it replies fine, as expected. When I attempt to ping from my desktop (which is connected to the internet, and also running to the remote desktop), the ping times out. I suspect that my 172.16.0.5 address is not visible from the internet. @jhamu – Josh Aug 11 '14 at 14:24
  • However, if I ping using the host name "my.server.net" the ping also times out, but the correct IP address of my server is shown. Thanks for your help in advance. – Josh Aug 11 '14 at 14:25
  • ping works on a different port. Can you please check if you are able to access the server on port 5001 using telnet as discussed earlier? If the mentioned port is not accessible, you won't be able to connect? – jhamu Aug 12 '14 at 08:01
  • I tried your telnet hint, and the port was not accessible from my local machine, so I proceeded to install the Eclipse android SDK on the remote server (connection was up there!), and now my app can register, and validate credentials. Now I will tackle the synchronization topic, and later on make those ports visible from the web. Let´s see what comes up there. Thanks! – Josh Aug 12 '14 at 12:47