cancel
Showing results for 
Search instead for 
Did you mean: 

SMP ODATA Queries.

Former Member
0 Kudos

Hi All,

We are using SUP 2.1.3 patch 02. for developing ODATA based application. Can any one help us out.

Problem 1:

  • When the user connects to SUP he is getting authenticated by using the Named user name and password which is there at ECC.

        SUP connect to ECC using the HTTP authentication mechanism if the credential is success user is getting registered.

        The API that we can to perform the above activity Is RegisterUser available in liteuserManager. We are using Automatic registration.

   

Problem we face: When user is logging on for second time we don’t know which method to invoke and continue to use the same registerUser but it is not authenticating the user, even if user’s credential is wrong application is not throwing any error.

Please suggest the correct API that we need to call for subsequent User authentication

Problem 2:

  • Keeping the above scenario intact. We are using Standard service Account to connect
    access the ODATA URL. In the application we are explicitly Specifying the ODATA
    URL username and password. It is been sent as part of  SDM connectivity
    parameters. But SUP call the ODATA Service with the Registered username and not
    the service account that we have explicitly mentioned.
  • Problem we face:
    SUP is connecting to ODATA URL with the same username defined for
    registration and therefore Gateways is responding with 4xx unauthorized error.
    Are we missing out any parameters can anyone guide on this. In the Gateway Box we have only service users and not named users.

We are working on Android
Devices ICS and above.

Thanks

-Arun

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Arun,

FOR YOUR PROBLEM 1:

When you register for the first time, in your Sybase Control Center, one entry gets connected.

You will be able to get the data only when you have successfully registered and your entry is online.

for the Second time on-wards , call LiteUsermanger RegisterUser Method.

It will check whether the entry is registered, If yes, Then it will make the connection online.

Please Check the code below:

private LiteUserManager manager;

LiteUserManager liteUserManager = LiteUserManager.getInstance();

 

                    liteUserManager.setConnectionProfile(supHost, supPort, farmID);

 

                    // when using the Data Vault option, need to initialize it with the context

                    PrivateDataVault.init(context);

 

                    manager = liteUserManager;

if (!manager.isRegistered()) //This will check if user is registered or not

                    {

                              // notice the order of the parameters!!

                              manager.registerUser(username, securityConfig, password);

                    }


FOR YOUR PROBLEM 2:

When you use HTTPConnection, Your Registered username should be mapped to Gateway server username.

So when you pass SUP Username , it directly finds your gateway Username and password.

And enters your gateway server to fetch the data.

You dont need to explicitely pass Gateway Server Username And Password through the URL If using HTTPConnection inSUP.