Environment: SUP 2.1 ESD 1, IOS 5 emulator, XCode 4.2, Objective C.
Greetings,
I am writing a sample iOS application to access the FlightData SAP OData service. I am able to get the top level collections, display them etc.
But I am unable to figure out how to call queries like GetAvailableFlights.
Could someone please post some Objective C code snippet showing how this is done?
Appreciate your time.
thanks
pj
I'm assuming you have created the MBO for that and generated the Obj-C code?
Ian
Hello Ian
Not really. I am writing a native iOS application that uses the SUPLight static libraries on the iOS device and hits a OData SAP service through SUP.
I actually figured out how that works. It was a matter of figuring out the right URL.
thanks
pj
PJ
Good News
Many Thanks
Ian
Hi PJ,
You have to maintain the "Service doc URL" in SCC.(Application>>Proxy>>URL).
Ex: "http://<Gatwaway Server>/sap/opu/sdata/iwfnd/RMTSAMPLEFLIGHT"
From the application make a getApplicationEndPoint call to get the service doc URL.
Consturct the collection URL in the application
Ex: http://<GatewayServer>/sap/opu/sdata/iwfnd/RMTSAMPLEFLIGHT/BookingCollection?sap-client=100?sap-lanuguage=en
When to call makeRequest fir this URL to get back the collection list.
Regards
Rohith
PJ,
I am running into you problem of the right URL and connection. Can you share what and how you got it to work? Appreciate your help
Hi Alok
Could you tell me what you have tried so far?
Did you set up a new 'application' on the server side with the NW channel URL? (Make sure the URL ends with a '/').
Which API is failing on the client side? What error message are you getting?
thanks
pj
we have the URL working through the browser. We are trying to run it through SUP and currently getting login failed on SCC server logs. We can although login to gateway.
Is there a permission/setting except endpoint that needs to be configured between SCC and gateway?
I will send you the code in a bit.
the set up is all components installed privately in an Org.
Hi ,
Did you setup authentication module in SCC ?
Regards,
Amit
Hello Ponnusamy,
For this you have to be aware of how OData Protocol for SAP has been defined and should know what values you need to append to access the data.
Rohith has given a fine example of how to get the next level of data for a particular collection. But my reply here is purely to suggest that fetching purely depends on the URL and its structure and you could try that URL on a browser to test it first before putting it in the application.
Best Regards, Pramod