Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
marvin_hoffmann
Advisor
Advisor
9,006

How to use Integration Gateway with SMP 3.0

Part 1:
http://scn.sap.com/people/marvin.hoffmann/blog/2014/01/08/how-to-use-integration-gateway-with-smp-30...

- Describes how to set up the HSQLDB and how to deploy the JDBC driver to SMP3

Part 2:
http://scn.sap.com/people/marvin.hoffmann/blog/2014/01/08/how-to-use-integration-gateway-with-smp-30...

- Describes how to model, implement and deploy the OData service with Integration Gateway

Part 3:
http://scn.sap.com/people/marvin.hoffmann/blog/2014/01/08/how-to-use-integration-gateway-with-smp-30...

- Describes how to configure the Integration Gateway on SMP3 to bind the OData service to the backend and how to display the OData service

This is the second part of the tutorial.In this part of the tutorial we will use the "Toolkit for Integration Gateway", which is a component of the GWPA (Gateway Productivity Accelerator) eclipse Plugin to model and implement the OData Service. We will also use this toolkit to deploy the OData service to SMP3.

Toolkit for Integration Gateway (GWPA)

Prerequisite

- SMP 3.0 is installed and running

- HSQLDB database is setup and running and HSQLDB JDBC driver is copied to SMP3 (explained in my previous blog entry)


Steps

1. Download eclipse Juno (I recommend the Java EE Version)

2. Start eclipse and choose Help > Install New Software... and insert address: http://tools.hana.ondemand.com/juno

3. Expand component "SAP Netweaver Gateway Productivity Accelerator (GWPA)" and select "Toolkit for Integration Gateway (GWPA, Developer Edition)", then install it

4. After an eclipse restart choose New > Other... , then expand folder "OData Development" and select "Service Implementation Project".

5. In the next window define a project name (in this example I choose intgwtest) and mark the checkbox "Create OData file manually" if you don't have an OData model already.

6.  The "Integration Toolkit" will create a project structure for you. Under src/main/resources you can find the packages edmx, mapping, model and wsdl. Right click on "model" and select New > Other... expand "OData Development" and select "OData Model".

7. After creation you can see the created model. Open the Model (*.odata file) and click in the Palette under Objects on "Entity Type" to create a new entity type. Set the object name, the entity set name and the properties.

IMPORTANT: If the backend connection should be realized via JDBC, the Integration Gateway component of SMP 3.0 SP0 requires that the entity set is named exactly like the database table and that the properties are exactly named like the columns in the table. There is (at the moment) no (graphical) mapping editor available.

As default a new property gets created with type Edm.String. Because our property ID is an integer value, we can select the property ID, open the "Properties" panel and choose the Type "Edm.Int16". Also change the type for the property BIRTH_DATE. Here you can choose Edm.DateTime.

8. If you finish modelling your OData service right click on your model (in my case Service.odata) and select "Implement Service"

9. An odatasrv file will be created. Right click on this odatasrv file and choose "Select Data Source". Here you can define which data source should be mapped to the previous created model. Mark "JDBC" option.

10. The OData Service Creation is finished now. But before deploying it to SMP you have to specify the connection details. Therefore go to Window > Preferences expand "OData Development" and click on "Integration Gateway". Specify the URL to your SMP3, e.g. https://localhost:8083 . (Use the Management Port, by default 8083 and https!). Test the connection.

11. Now right click on the project (in my case intgwtest) and select "Generate and Deploy Integration Content".

12. Specify the corresponding information (or leave the default). The service name (intgwtest) can be used to access the service later. The Service Namespace defines also the security profile which is used to control access to this service.

IMPORTANT: Make sure that the JDBC driver is already known to SMP3 BEFORE deploying the OData service via the "Toolkit for Integration Gateway". This has been described in part 1 (http://scn.sap.com/people/marvin.hoffmann/blog/2014/01/08/how-to-use-integration-gateway-with-smp-30...).

13. If everyhting is ok you should get the information message: "Deployment has been completed ..."

The configuration on SMP3 and the concrete using of this service is explained and shown in part 3 (http://scn.sap.com/people/marvin.hoffmann/blog/2014/01/08/how-to-use-integration-gateway-with-smp-30...)

13 Comments