cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming gateway oData services in SUP

Former Member
0 Kudos

Hi All    

1.   We are trying to get the oData services from our back end system and present it in SUP ,we were able to generate the OData services from our gateway system ,to consume the generated oData service in SUP, do we need any configuration on the gateway system or we can directly consume the oData  in SUP?

2.To consume oData in SUP can any body provide guides, I saw there are some guides but they ask us to download the app from apple website, we want to consume the oData which is generated from our back end system via Gateway.Request you to provide any pointers on How to consume oData in SUP system.We have a service URL with us ,we could not find a concrete guide on how to use this service URL to present the data in SUP,   Besides Service URL we have metadata URL, Query URL, Read URL which one to use among them to get the data in SUP.and there are several URLs like Endpoint , request you to provide the guides on achieving oData consumption in SUP.

Thanks

Santosh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Santosh,

       To answer your first question, you don't need any special configuration on Gateway side to consume OData content on mobile device through SUP. If your OData service is ready in Gateway, you can do a simple test of calling that base URL(http) from browser and if it works then your service document is ready to consume through SUP.

        To begin with, there is one beginner's guide available and the link is here.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/607b76a7-c345-2f10-d5b3-f236ea676...

        You can refer to the thread http://scn.sap.com/thread/2132117 for more documentation references including official documentation from SAP/SYBASE.

         Regarding your last question, you just have to register your Base URL (OR also called the application/proxy end point) in SUP Administration. This base URL will be accessed by application on the device using SUP client SDK APIs. Then application have choice to create URL for metadata, collections, queries..etc using this base URL and access the content from Gateway by firing the request through SUP.

Best Regards,

Manne.

Former Member
0 Kudos

Hi Manne

    I have the PDF provided by you ,,but it mentions to download an app from Apple store , but I want to get the Gateway oData which is built by me to be consumed in SUP for Android application.In case of my application,how do I parse my XML , to present it in readable format.

Also there are several SDM jar files and classes which can be used there are several options like manual registration, SSO registration and Automatic registration, if I am using the manual registration can I avoid coding for all other options.In short can you provide any guides on coding in android native applications for gateway oData from scratch.

Thanks

Santosh

rohith_deraje
Advisor
Advisor
0 Kudos

Hi Santhosh,

The setup would be as below.

SAP R3>>SAP NW gateway>>SUP2.1-ODP>>iPad/iPhone/Android/BB

For details about connecting to SUP,you can refer to my article @ http://scn.sap.com/docs/DOC-23532 . This will guide you to configure SCC, adding SUP-SDM libraries to android project registering your android app with SUP.

Further you acn refer to

ODP-reference Android app available @ https://cw.sdn.sap.com/cw/docs/DOC-146460.

This has complete code for GET/PUT/POST and DELETE.

Regards

Rohith

Former Member
0 Kudos

@Rohit:

1.      I have gone through your document ,configuring in SSC, I was able to understand , till configuring in SSC, as the oData come in atom format, how to format the data  so that I can put it in presentable format on my mobile app , there is a class SDMParser ,how to use those classes in conjunction with my URL,also as mentioned there are several registration methods if I am opting for manual registration can I skip the code for other methods?

2.As given by you the app contains all the classes , but how can I use it for my oData Service URL because my structure and model is different and data I am trying to consume is different, where to parse the data and how to present these things like what is push-End point, Application End point still I am trying to connect all these dots.

@Srinivas

      We tested our oData query , read and create operations using wFetch , but how do we start coding for getting application end point and where to start with the coding ,how many class files we need to create such topics I am looking for  more help.

@Ian

    Thanks for the link , I had the link and was going through the link but I am confused at how to utilize the SDM* classes files to proceed with the coding for Android application .

Awaiting feedback

Thanks

Santosh

Former Member
0 Kudos

Hi Santosh,

Regarding how to parse the data, you might have to use the lib files available under

{Installed location}Sybase\UnwiredPlatform\MobileSDK\OData\iOS

It also contains the API documentation as well, apart from you can always refer to .h files they are neatly commented

Regards,

Srinivas Divakarla

Former Member
0 Kudos

Hi Srinivas

  Can you tell me where are the .h files located , do they exist in sybase installation folder.

Thanks

Santosh

Former Member
0 Kudos

Hi Santosh,

There are no .h files available though, .h and .m files are encapsulated together to give you .a lib files, to go through .h files It is very easy, just import .a files into your project, and then #import SDMParser

In your code any where just write SDMParser and do Command + Click on that, it will take you to the .h file I often do that to refer API documentation in the XCode it self to save some time

Regards,

Srinivas

Former Member
0 Kudos

Hi Srinivas

   I saw the html files on SDM calsses which contain API document, can you forward me any sample code that you did for your app .

As per my underatstanding first we get the connection and APP using below code

after that we used SDM parser class methods to parse the data and presnt it in UI layer, is it mandatory to use all SDM * classes ?.I just want to create a simple application which dispalys data as per user selection criteraia , I want to use single page.later I would experiment.

LiteUserManager.initInstance(getApplicationContext(), "Myapp");

      LiteUserManager lurm = LiteUserManager.getInstance();

lurm.setConnectionProfile("10.66.148.17", 5001, "0");

LiteUserManager.registerUser(userName, activationCode);

//lurm.registerUser("supuser","SSO2Cookie","s3puser","dtapass");

//lurm.registerUser("supuser","SUPGWCHttpAuthConfig","s3puser","dtapass");

LiteUserManager lurm = LiteUserManager.getInstance();

lurm.registerUser("SUPUSER1","SUPGWCCERTConfig", LiteCertificateStore.getInstance().getSignedCertificateFromFile("/data/SUPUSER1.p12", "mobile");

//lurm.setAppCredentials(username, sceurityConfig, password, vaultPassword)

LiteAppSettings las = new LiteAppSettings();

las.getApplicationEndPoint()

LiteAppSettings las = new LiteAppSettings();

las.getPushEndPoint();

LiteAppSettings appSettings = new LiteAppSettings();

String ServerName = appSettings.getServer();

LiteAppSettings appSettings = new LiteAppSettings();

int PortNo = appSettings.getPortNumber();

LiteAppSettings appSettings = new LiteAppSettings();

String FarmID = appSettings.getFarmID();

in the above code I want to only use manual registration can I delete all other statements which are not required as I am not using Automatic or Afaria registration also can I put whole code in single file

Former Member
0 Kudos

Hi Santosh,

SDMParser is used to parse the response, that is nothing but a kind of Atom Feed and at the end of the day, it is just an XML, if your objective is just to parse the elements in the xml then you can also write your own SAX parser, to parse the xml or you can leverage any other open source iOS library, but if you use SDMParser It is very easy

Regards,

Srinivas Divakarla

Former Member
0 Kudos

Hi Santosh,

for coding you could refer to an example which is available at https://cw.sdn.sap.com/cw/docs/DOC-146461

Regards,

Srinivas Divakarla

Former Member
0 Kudos

Hi Srinivas

   I downloaded the app but there are many files, it is difficult to find the navigation where to start and the flow, if you have any simple app coding that would be helpful.

Also can I put whole code in single file and is it mandatory to use all SDM * classes.

Can you give me your mail Id to contact in case of further queries.

Thanks

Santosh

Answers (2)

Answers (2)

Ian_Thain
Developer Advocate
Developer Advocate
0 Kudos

I have been given a link by my colleague Ingo that you may wish to view http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01708.0212/doc/html/title.html

Former Member
0 Kudos

Hi Santosh,

Basically SUP doesn't consume the oData service, it acts as a proxy(just a passthrough)through SUP,

If your oData servervice is running properly in a browser or wFetch, your done with that,

you have to create the connection in SUP and provide the application end point in SCC, and from the code use the API to getApplicationEndpoint and you can move forward.

Regards,

Srinivas Divakarla