Skip to Content
Author's profile photo Midhun VP

Service Mash-up in Integration Gateway – It’s Simpler Than You Think

Integration gateway is a component in SAP Mobile Platform 3, it converts different types of protocols to Odata protocol. Currently it supports SOAP, JDBC, JPA, ODC and REST (read and query). This example is on how to mashup multiple backends and create an Odata service using Integration Gateway.

ScreenHunter_27 Feb. 06 00.07.jpg

Prerequisites

  • SAP Mobile Platform 3.0 SP05 Developer Installation
  • Eclipse Kepler
  • SAP Mobile Platform Eclipse Plugins. Available from the SAP eclipse update site: https://tools.hana.ondemand.com/kepler
  • HSQLDB (jdbc)

Steps to Create Project

  • Open Eclipse and select File > New > SAP Mobile Platform Odata Implementation Project.
  • In the pop up window provide the project name “ServiceMashup”.
  • Select Target Runtime Server as “SAP Mobile Platform 3.0 SP5”. Click Next.
  • Enter Model name as “model”. Then click on Finish. It creates the ServiceMashup project in the workspace.

ScreenHunter_27 Feb. 06 00.19.jpg

  • Create entity types CustomerObj and Article, and a complex Type Price.

Note that datatype of ID in CustomerObj is integer (edm.Int16) and BIRTHDATE is Datetime (edm.datetime).

I have followed the existing examples Integration Gateway with JDBC and Integration Gateway with SOAP as a source for this blog. So in this blog I am not explaining how to set up HSQLDB. Copy and paste JDBC driver package (hsqldb.jar file) from ..\hsqldb-2.3.2\hsqldb\lib to C:\SAP\MobilePlatform3\Server\pickup .

Untitled.png

Define Data Source

  • From the Project Explorer right click on model.odatasrv file > Select Data Source.
  • Choose Entity Set “model.default.CustomerObjSet”
  • Select Query from Operations and select JDBC as Data source. Click Finish.

ScreenHunter_27 Feb. 06 00.38.jpg

  • Right click on model.odatasrv file > Select Data Source.
  • Choose Entity Set “model.default.ArticleSet”
  • Select Query from Operations and select SOAP Service as Data source.

ScreenHunter_27 Feb. 06 00.42.jpg

ScreenHunter_27 Feb. 06 00.48.jpg

Untitled.png

  • Save the project. Right click on the project and deploy it to SMP server.

SMP Server Configurations

ScreenHunter_27 Feb. 06 01.04.jpg

  • Click on Service > SERVICEMASHUP.

Untitled.png

  • From service details screen, choose Assign Destinations for Entity Sets.
  • Click on Add Destination > Choose DestHSQLDB.

Untitled.png

Testing Odata Service

  • Click on Open service document

ScreenHunter_27 Feb. 06 01.43.jpg

  • Add collection CUSTOMER with service document to pull data from JDBC.

ScreenHunter_28 Feb. 06 01.43.jpg

  • Add collection ArticleSet to pull data from SOAP service.

ScreenHunter_28 Feb. 06 01.44.jpg

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Carlos Roggan
      Carlos Roggan

      Hi Midhun,

      thanks for this helpful tutorial!

      Author's profile photo Vishnu Pankajakshan Panicker
      Vishnu Pankajakshan Panicker

      great blog midhun...

      Regards,

      Vishnu

      Author's profile photo Former Member
      Former Member

      Hi Midhun,

      I want to create a mashup service for Gateway Services using ODC as Data source.

      So when I create a new SAP Implmentation Project in Eclipse I choose "OData Service URL" as Odata Model and then I specify the service url in next screen. An entity set for all the collections in that service is created in Eclipse.

      But I also want to use different Service URLs in the same Mashup. So I add a new Odata Model selcting "OData Service URL" and that model is created. But for this new model there is not Model.odatasrv file created which has option to "Select Data Source".

      This file exists only for the model that was added at project creation and not for the models added later.

      What can be done in this case?

      Author's profile photo Jitendra Kansal
      Jitendra Kansal

      Nikhil Deshmukh

      Could you post your question as a 'thread' on this space SMP Developer Center ? It will bring more attention to the experts and hope you will get reply soon. You may give references to docs/blogs you are following for your scenario.

      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      Added as a question here:

      Creating a mashup for Gateway Services

      Author's profile photo Former Member
      Former Member

      Hi Midhun VP - SCN Member of the Month May 2014 i am not able to deploy the service meshup project on the smp server. it is showing me an error.When i am doing only for JDBC its deploying but when i add for SOAP its not working.Waiting for your help.

      BR,

      Saurabh

      Author's profile photo Michael Appleby
      Michael Appleby

      Hi Saurabh,

      Please create a new Discussion marked as a Question for this topic.  That is the correct means of asking this type of question.

      Regards, Mike (Moderator)

      SAP Technology RIG