Sometime back when I was writing the blog, A Gateway to Lightweight Services: Enabling Mobile and Web Applications, the key question and the disconnect that became visible to me was the non-availability of a mechanism or a standard product feature from SAP around enabling OData for a non-SAP backend. Then this year at the TechEd LV, I was introduced to Gateway Java (rechristened to Integration Gateway) which apparently seemed to be the solution to bridge that gap.
I had a chance to get my hands dirty with Integration Gateway and these are the first impressions.
What do you need?
1. SMP 3.0
2. Eclipse IDE
What can you do?
Convert a Webservice, Database Table, JPA or a Gateway OData to an OData service
What did I do?
1. Got the IDE up and running. There are good blogs on SCN that guide you around setting up the GWPA on Eclipse. I have Eclipse Juno version installed on my machine.
2. Set the connection for the SMP 3.0 server in Eclipse.
3. I have a table ‘odatatest’, that I intend to expose as an OData service. Below is the description of the table and the data it holds;
4. Start with a Service Implementation Project in Eclipse. Refer this link for help.
5. I created a model as below, in line with the database table;
Note: There are some restrictions on the current release of Integration Gateway. Hence, keep in mind that the Entityset and the properties should reflect exactly the same names as is for the table and the columns.
More information, refer SAP Note: 1931374 – Integration Gateway for SAP Mobile Platform 3.0 – Known Constraints
6. I then went ahead and created a data source binding, choosing the data source as JDBC.
7. Once that was done, it was only a matter of generating and deploying the content (Right click the project and choose ‘Generate and Deploy Integration Content’.
8. To check the deployed content, I went to the Gateway Management Cockpit.
9. The next step was to activate the service and then assign a destination to it.
10. Now simply call the service document and you have the table data exposed as OData.
Hope this helps the reader with a quick insight into the Integration Gateway capabilities. I am planning to check out the other data sources to understand the capabilities of the tool better. Will keep the community posted.
Note: A special thanks to Koerner, Jens and Saglam, Mustafa from SAP for their timely responses that helped me get this rolling.