Skip to Content

Table of Contents

1                Introduction

2                What is Integration Gateway?

3                End-to-End Scenario Overview

4                Prerequisites

5                Scenario Setup

5.1              Data Sources

5.2              Preparing the Apache Derby Database

5.3              Setting up Eclipse with the SAP Mobile Platform Tools

5.4              Creating the OData Model

5.5              Assigning Data Sources to Entity Sets

5.5.1          ODC (SAP Gateway) Data Source

5.5.2          JDBC Data Source

5.5.3          JPA Data Source

5.5.4          SOAP Data Source

5.5.5          Defining the Response Mapping for the SOAP web service

5.6              Generating and deploying the service on the SMP server

6                Setting up SAP Mobile Platform 3.0

6.1              Security Profile

6.2              Adding the HTTPS certificate to the SMP key store

6.2.1          Retrieving the certificate from the SAP Gateway Service Consumption System (ES1)

6.2.2          Adding the HTTPS certificate to the SMP key store using Portecle

6.3              Destinations

6.3.1          OData Channel (ODC) Data Source

6.3.2          Java Persistency API (JPA) Data Source

6.3.3          Java Data Base Connector (JDBC) Data Source

7                Configuring the Services in SMP

7.1              Registering the ZGWSAMPLE_SRV service

7.2              Assigning Destinations to Entity Sets

8                Testing the service

8.1              Setting up Advanced REST Client in Google Chrome

8.2              Retrieving information from your service

8.3              Retrieving the CSRF-Token

8.4              Creating a Sales Order Header

9                Troubleshooting

9.1              Proxy Issues

9.1.1          SMP system wide proxy used for the SOAP destination

9.1.2          Proxy Settings for ODC destination

10              Further Information

Note (October 21, 2014): I updated the blog to reflect changes in the Eclipse modeling environment. You now need to use the SAP Mobile Platform tools instead of the Gateway Productivity Accelerator (GWPA).

1        Introduction

On May 15th, 2014 the SAP Mobile Platform 3.0 became generally available to the public. While it contains many great features, I would like to show you in this blog how it is possible to leverage the Integration Gateway component inside the Mobile Platform.

2        What is Integration Gateway?

First, I would like to point you to some resources available to explain what Integration Gateway can do: Integration Gateway is a technology component that provides design-time tools and the associated run-time for modeling, composing and provisioning OData services. These can be based on one or more APIs from various SAP and non-SAP data sources.

The data sources supported as of today are SOAP (Simple Object Access Protocol), JPA (Java Persistence API) and JDBC (Java Database Connectivity) to access non-SAP data sources as well as OData Channel (ODC) for accessing OData services provisioned via SAP Gateway.

For a brief overview, you might want to have a look at this Youtube video.

3        End-to-End Scenario Overview

For this blog we are relying on the Enterprise Procurement Model (EPM) which has been a part of NetWeaver starting with release NW 7.02. It is an application intended to be used for demonstration and testing purposes. The business scenario at the core of EPM is that of a web shop run by a retail company called ITelO, a fictitious company that buys and sells computers & accessories.

In this demo scenario a customer will log on with an HTML5 app to purchase some goods from the ITelO store. The app consumes a service published by the Integration Gateway. The underlying data for the service stem from SOAP, JPA, JDBC and ODC data sources demonstrating the integration and mash-up capabilities of Integration Gateway in SMP3.

4        Prerequisites

For recreating this scenario you will need administrative access to an (developer) installation of SAP Mobile Platform 3.0 SP03 (In the rest of this blog I will refer to it as SMP3). If you have the authorizations, you can download the SMP3 installation files from the SAP Software Download Center.

Furthermore you need to register to access the SAP Gateway Service Consumption System.

5        Scenario Setup

5.1      Data Sources

/wp-content/uploads/2014/06/image002_469463.png

As mentioned before, we are going to use SOAP, JPA, JDBC and ODC data sources for this tutorial. The SOAP and ODC services will be provided by us. Your developer installation of SMP3 comes with an Apache Derby database. We are going to create a new table in this database which will serve as our JDBC data source. Furthermore, the SMP3 comes preinstalled with a Java Persistency API version of the EPM model. The products stored in this model will serve as our JPA data source.

5.2      Preparing the Apache Derby Database

Your SMP3 installation comes with an Apache Derby database. We now would like to create a new table called DELIVERYTYPES in this database. You can do so by using SquirrelSQL and you can find detailed setup instractions in this blog.

Once you are connected to the Derby database, click on the tab calles “SQL” and paste the following SQL statements in the command line:

create table deliverytypes (deliverytype varchar (3), description varchar (50));
insert into deliverytypes values (‘OVN’, ‘Overnight’);
insert into deliverytypes values (‘2ND’, ‘2nd Business Day’);
insert into deliverytypes values (‘GRD’, ‘Ground (5-7 Business Days)’);
select * from deliverytypes;

Click on the first line and then click on the “execute” (running man) button in order to create a new database table called DELIVERYTYPES with three entries. Using the SELECT command, you can verify that the entries have been created successfully.

/wp-content/uploads/2014/06/image003_469337.png

5.3      Setting up Eclipse with the SAP Mobile Platform Tools

For this scenario, you will need to download the SAP Mobile Platform Tools. You can find all the installation instructions at https://tools.hana.ondemand.com/#gateway

Now you will need to set up the connection to the Integration Gateway component on the SMP. To do so, please go to:
Window > Preferences > OData Development > Integration Gateway

17-10-2014 15-56-18.png

URL:                <insert path and HTTPS port to your SMP3 server>
User:               <Admin username> (default: smpAdmin)
Password:       <Admin password> (default: s3pAdmin)

/wp-content/uploads/2014/06/image005_469343.png

Click on the “Test Connection” button to verify that your connection to the SMP server is working.

5.4      Creating the OData Model

Next, you will create an empty Service Implementation Project:
File > New > Others > SAP Mobile Platform > SAP Mobile Platform OData Implementation Project:

Specify the project name “IGW_EPM_Demo” and select “Create OData file manually” and finish the wizard:

Now you will create the OData model. You can do so by right clicking on model > New > Other > OData Development > OData Model and selecting the entry OData service Metadata File. Provide the model name ODataModel:

/wp-content/uploads/2014/06/image008_469347.png

Attached to this document you can find the file ODataModel.xml. Save this file to your computer and select it in the wizard as follows:

/wp-content/uploads/2014/06/image009_469348.png

Please save the resulting model and then your ODataModel should look like this:

/wp-content/uploads/2014/06/image010_469355.png

5.5      Assigning Data Sources to Entity Sets

Now you need to implement the service and select the data source for each entity set. Right click on your OData model and choose “Implement Service”:

/wp-content/uploads/2014/06/image011_469356.png

Then you will need to select the data source for each entity set in your OData Model. So please repeat this step for every entity set in your OData model:

/wp-content/uploads/2014/06/image012_469357.png

5.5.1      ODC (SAP Gateway) Data Source

The data for the entity sets SalesOrderCollectionand SalesOrderLineItemCollectionshould come from the NetWeaver backend provided by us. Therefore we select the data source ODC for these:

/wp-content/uploads/2014/06/image013_469361.png/wp-content/uploads/2014/06/image014_469362.png

For both entity sets, set the following connection details:

/wp-content/uploads/2014/06/image015_469363.png

5.5.2      JDBC Data Source

The DELIVERYTYPES entity set should be served by a JDBC data source.

/wp-content/uploads/2014/06/image016_469370.png

5.5.3      JPA Data Source

You want to provide the Products entity set with data from the JPA ESPM model on the SMP server:

/wp-content/uploads/2014/06/image017_469371.png

5.5.4      SOAP Data Source

Note: This wizard step was reworked with the SAP Mobile Platform Tools. You now only need to select the WSDL file from your hard drive. Then you may select the operation and port type from the wizard.


Finally, the entity set Stocks should be served with data from a SOAP web service:

The SOAP endpoint is provided on the ES1 development system:

/wp-content/uploads/2014/06/image019_469372.png

Endpoint:          https://sapes1.sapdevcenter.com:443/sap/bc/srt/rfc/sap/z_sepm_gws_stock_get/520/service/binding
Namespace:    urn:sap-com:document:sap:soap:functions:mc-style
Operation:        SepmGwsStockGet
PortType:         Z_SEPM_GWS_STOCK_GET

5.5.5      Defining the Response Mapping for the SOAP web service

In this step you will need to map the result from the SOAP web service to the Stocks entity set. To do so, expand the Stocks node and select “Define Response Mapping” from the context menu:

/wp-content/uploads/2014/06/image020_469376.png

Attached to this blog entry, you can find the file StocksES1.wsdl (Note: Please rename the file from StocksES1.wsdl.xml to StocksES1.wsdl. It is not allowed to attach files in the WSDL format to this blog.). Save this file to your hard drive and then select this file in the wizard:

/wp-content/uploads/2014/06/image021_469382.png

Now you should perform the mapping as follows:

/wp-content/uploads/2014/06/image022_469383.png

5.6      Generating and deploying the service on the SMP server

In this step you need to deploy your service on the SMP. To do so, right click on the Service Implementation Project node and select the entry “Generate and Deploy Integration Content”:

/wp-content/uploads/2014/06/image023_469384.png

Fill out the values in the popup as follows:

/wp-content/uploads/2014/06/image024_469387.png

You should now receive the confirmation, that the deployment has been completed for IGW_EPM_Demo.

6        Setting up SAP Mobile Platform 3.0

6.1      Security Profile

In this step you are going to set up SMP3. First, you need to log on to your SMP Administration console: https://localhost:8083/Admin/ (Again, you will need to exchange the <localhost> with your server URL.)

Navigate to Settings > Security Profiles > New in order to create a new security profile called sap. This basically means that users will not need to authenticate, when accessing services deployed in the namespace “sap”:

/wp-content/uploads/2014/06/image025_469390.png

6.2      Adding the HTTPS certificate to the SMP key store

The SOAP web service and ODC service will be provided using a HTTPS connection. However in order for the SMP to trust the certificate provided by the server, you first need to add the certificate to the SMP keystore.

6.2.1      Retrieving the certificate from the SAP Gateway Service Consumption System (ES1)

Using your browser, please navigate to the following URL:

https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/

You will be asked for your username and password for the SAP Gateway Service Consumption System (ES1). In Google Chrome (in Windows) you now need to click on the green padlock icon > Connection > Certificate Information:

/wp-content/uploads/2014/06/image026_469394.png

In the Certificate popup please select the tab “details” and click on the “copy to file” button. Follow the wizard using the standard values and export the file with the filename SAPES1.cer.

6.2.2      Adding the HTTPS certificate to the SMP key store using Portecle

You need to have access to the directory where the SMP server is running. You then need to download the open source tool Portecle: http://sourceforge.net/projects/portecle/files/latest/download

Unzip the file you just downloaded and open a command window / terminal in the unpacked folder. (In Windows you can do so by holding the shift key and right clicking into the folder with the portecle files.)

/wp-content/uploads/2014/06/image027_469395.png

Run the protecle application by running the command java –jar portecle.jar. Click on File > Open Keystore File and navigate to the configuration folder on your SMP3 server. Open the file smp_keystore.jks. In my case this is C:\SAP\MobilePlatform3\Server\configuration\smp_keystore.jks. The default password to open the truststore file is s3pAdmin, but can be set to a different value during the installation process.

Click on Tools > Import Trusted Certificateand select the file SAPES1.cer you saved to your hard drive in the previous step. You will see the following warning, but this is ok:

/wp-content/uploads/2014/06/image028_469396.png

You will now see the certificate details and will be asked if you want to trust this certificate. If you choose to accespt this, please enter the alias name SAPES1 for the new certificate:

/wp-content/uploads/2014/06/image029_469397.png

Now you should receive the successful confirmation message and should see that a new certificate has been added to your SMP trust store.


The certificate for the ES1 system has been issued by “Starfield Repository”.  So please go to the following site (https://certs.starfieldtech.com/anonymous/repository.pki) and download the certificate sf-class2-root.cer. Please follow the same steps as above to import the certificate to the SMP trust store.

To finish please click on the save button and then you can close Portecle. Please restart your server now for this change to take effect.

6.3      Destinations

Now you need to head over to the Gateway Cockpit of your SMP server: https://localhost:8083/gateway/cockpit (Again, you will need to exchange the <localhost> with your server URL.) Navigate to the tab called Destinations. You will now create a destination for each backend system we want to use for our data sources.

6.3.1      OData Channel (ODC) Data Source

Click on “Create New Destination” and fill in the following data:

Destination Name:        ES1

Destination Type:          HTTP

Destination URL:           https://sapes1.sapdevcenter.com:443/sap/iwbep?sap-client=520
Username:                   <your ES1 username>
Password:                   <your ES1 password>

TrustStore File:            smp_keystore.jks

Truststore Password:    <your SMP keystore password> (default s3pAdmin)


You need to provide the TrustStore file and password, because here the certificate for the ES1 server is stored to establish a trusted connection between your SMP server and the ES1 system.

6.3.2      Java Persistency API (JPA) Data Source

Click on “Create New Destination” and fill in the following data:

Destination Name:        JPA

Destination Type:        JPA

Persistence Unit:         com.sap.espm.model
Username:                 gomobile
Password:                   secret


6.3.3      Java Data Base Connector (JDBC) Data Source

Click on “Create New Destination” and fill in the following data:

Destination Name:       JDBC

Destination Type:        DATABASE

Destination URL:         jdbc:derby://localhost:1527/D:/SAP/MobilePlatform3/Server/db/derby/smp3
Database Driver:         org.apache.derby.jdbc.ClientDriver
Username:                 gomobile
Password:                 secret


7        Configuring the Services in SMP

7.1      Registering the ZGWSAMPLE_SRV service

Now you will need to add register the ZGWSAMPLE_SRV service coming from the ES1 system. To register, please head to the services tab and click on the “Register a New Service” button. Select the destination “ES1” and search for the service “ZGWS*”. In the result list, please mark the service ZGWSAMPLE_SRV and click on the “Register” button.

Note: In case you get an error message when searching for the service, you might need to set up a proxy server. For information on how to do so, please refer to the Troubleshooting section at the end of this blog.

/wp-content/uploads/2014/06/image033_469423.png

7.2      Assigning Destinations to Entity Sets

The last step you need to do, is to assign the destinations to the entity sets. By doing so, you can define which entity set is to be served by which destination/backend system. To assign the destinations, please click on the service name “IGW_EPM_Demo”. This is the service you deployed from your eclipse environment.

In the popup, please select the radio button “Assign Destinations for EntitySets” and then the “Add Destination” button. In the popup, please create the following Entity Sets with the corresponding destinations as listed:

Entity Set

Destination  Name

SalesOrderCollection

ES1

SalesOrderLineItemCollection

ES1

DELIVERYTYPES

JDBC

Products

JPA

No destination for the Stocks entity set needed to be provided here, as all the information have been provided in the eclipse design time.

This concludes all the steps you need to do to get your service up and running.

8        Testing the service

To test the service I will show you how to retrieve data from the service you just provisioned on the SMP3 and how to create a sales order on the ES1 backend system.

8.1      Setting up Advanced REST Client in Google Chrome

When testing a service, I like to use the Advanced REST Client extension in Google Chrome. You can download and install the extension in the Chrome Web Store.

8.2      Retrieving information from your service

To test your service, you might want to try out the following URLs and please feel free to try other OData URI commands. Try to send a GET request and remember to replace the “localhost” with your SMP server URL:

·    http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1
This will return a list with all entity sets contained in your service

·    http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/$metadata
This will return the metadata document for your service

·    http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/SalesOrderCollection
This will return a list with all sales orders from the ES1 system

·    http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/SalesOrderCollection(‘0500000003’)
This will return only sales order 500000003 from the ES1 system

·    http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/SalesOrderLineItemCollection(SoId=’0500000011′)
This will return all sales order line items for sales order 500000011

·    http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/SalesOrderLineItemCollection(SoId=’0500000011′, SoItemPos=’0000000020′)
This will return sales order line item 20 of sales order 500000011

·    http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/Products?$filter=substringof(%27USB%27,ProductId) or substringof(%27USB%27,Name)
This will return all products where the string “USB” is contained either in the field “ProductId” or in the field “Name”

·    http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/Products?$skip=2&$top=2&$orderby=Price%20asc
This will return the 3rd and 4th most expensive products


8.3  Retrieving the CSRF-Token

In order to prevent Cross-Site Request Forgery attacks, we are making use of a CSRF-Token. This means, that whenever you are sending a POST request to the SMP3, you will need to provide the CSRF-Token. You can retrieve the token from the SMP3 server by sending a GET request to the service you want to use (in my case this is: http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/SalesOrderCollection(‘0500000003’)) and adding a parameter to the request header. The parameter should read as follows “X-CSRF-Token: fetch”. The response header from SMP3 will contain an X-CSRF-Token. You will need this token when sending POST requests to the server. In Advanced REST Client the response would look like this:

10-06-2014 14-33-24.png

8.4  Creating a Sales Order

The easiest way to create a new sales order, is to copy the response body from your previous GET request (e.g. http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/SalesOrderCollection(‘0500000003’)) and to use this as the request body for your POST request. Please add the X-CSRF-Token parameter with the token you received with your GET request to the header of your POST request and set the Content-Type to “application/atom+xml”. Post the request to the SalesOrderCollection entity set: http://localhost:8080/gateway/odata/sap/IGW_EPM_Demo;v=1/SalesOrderCollection

Your request in the Advanced REST Client should then look as follows:

10-06-2014 14-35-15.png

In my case, I used the following payload data for the POST request:


<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://localhost:8081/gateway/odata/sap/IGW_EPM_Demo;v=1/">
<id>https://localhost:8081/gateway/odata/sap/IGW_EPM_Demo;v=1/SalesOrderCollection('0500000003')</id>
<title type="text">SalesOrderCollection</title>
<updated>2014-06-06T16:41:24.454+02:00</updated>
<category term="ZGWSAMPLE_SRV.SalesOrder" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link href="SalesOrderCollection('0500000003')" rel="edit" title="SalesOrder" />
<content type="application/xml">
<m:properties>
<d:SoId>0500000003</d:SoId>
<d:CurrencyCode>EUR</d:CurrencyCode>
<d:BuyerName>Asia High tech</d:BuyerName>
<d:BuyerId>0100000006</d:BuyerId>
<d:Note>EPM DG: SO ID 0500000003 Deliver as fast as possible</d:Note>
<d:ChangedByBp />
<d:CreatedByBp />
<d:ChangedAt>2014-05-13T05:00:00.000</d:ChangedAt>
<d:ChangedBy>0000000033</d:ChangedBy>
<d:CreatedAt>2014-05-13T05:00:00.000</d:CreatedAt>
<d:CreatedBy>0000000033</d:CreatedBy>
<d:GrossAmount>1405.39</d:GrossAmount>
<d:GrossAmountExt>1405.39</d:GrossAmountExt>
<d:NetAmount>1181.0</d:NetAmount>
<d:NetAmountExt>1181.0</d:NetAmountExt>
<d:TaxAmount>224.39</d:TaxAmount>
<d:TaxAmountExt>224.39</d:TaxAmountExt>
<d:LifecycleStatus>N</d:LifecycleStatus>
<d:BillingStatus />
<d:DeliveryStatus />
</m:properties>
</content>
</entry>






Once you sent the request, the server will reply with the status code “201 Created” and you will be able to find the data of the newly created sales order header in the response body.

9        Troubleshooting

9.1      Proxy Issues

In case you are in a corporate network, you might run into some proxy issues when SMP is trying to access the ES1 devcenter system. In this case, you have to set up a proxy server on SMP file system level:

9.1.1      SMP system wide proxy used for the SOAP destination

Go to your SMP server directory and open the file “props.ini”. In my case it is located in C:\SAP\MobilePlatform3\Server. In the file you can find some parameters for setting your system proxy. In our scenario this proxy will be used by the SOAP destination. Enter your proxy and port as follows:

-Dhttp.proxyHost=proxy.wdf.sap.corp

-Dhttp.proxyPort=8080

-Dhttps.proxyHost=proxy.wdf.sap.corp

-Dhttps.proxyPort=8080

After setting the system proxy, please save the props.ini file and restart your SMP server.

9.1.2      Proxy Settings for ODC destination

In SMP you can set an individual proxy server for each destination. To do so, please navigate to the destinations folder on your SMP server. In my case the complete path is: C:\SAP\MobilePlatform3\Server\config_master\service.destinations\destinations. Here you can find a file called ES1. Open this file with a text editior and add a new line with a parameter called “Proxy=[yourProxy]:[Port]”:

#Thu Jun 05 13:16:15 CEST 2014

Type=HTTP

Authentication=BasicAuthentication

Name=ES1

Password={enc}5GLxxALgNy2jnID9jjmwcUZWvOXkcTrHCWgFFcgUr6g\=

Proxy=proxy.wdf.sap.corp:8080

URL=https\://sapes1.sapdevcenter.com\:443/sap/iwbep?sap-client\=520

User={enc}gBQ2oMO38Fdk2JLCMQcVWoXSgEA87wFBtjr8TiIm12c\=

TrustStoreLocation=./configuration/smp_keystore.jks

TrustStorePassword={enc}8g+RX8z6b2cP0kmjOlu3M0JrfPWawj1Y8+rx6ZQEeac\=

ProxyType=Internet

Please save the file and the changes apply to the destination without restarting the SMP server.

10    Further Information

10.1    Documentation & SAP Notes

·    http://service.sap.com/sap/support/notes/1830710 – Gateway Productivity Accelerators Release Note & Constraints

·    http://service.sap.com/sap/support/notes/1931374 – Integration Gateway for SAP Mobile Platform 3.0 – Known Constraints

·    More information on SMP 3.0, including Integration Gateway is available here: http://help.sap.com/mobile-platform/

·    Specific info on SMP 3.0 SP03 is available here: http://help.sap.com/smp303svr/

10.2    Webinar: Integration Gateway in SAP Mobile Platform 3.0

On June 18, 2014 there will be a webinar session called Integration Gateway in SAP Mobile Platform 3.0. In the webinar there will be a live demo using a similar scenario to the one described in this blog. There will also be a Q&A section where you will be able to ask questions. Please use this link to the online registration. The registration will be closed midnight, June 17, 2014 and it is mandatory for the confcall details.

Partner and Customers need an S-User for the registration. You can order the S-User here:
http://service.sap.com. Please contact SAP Virtual Event Services if you have registration problems.

To report this post you need to login first.

44 Comments

You must be Logged on to comment or reply to a post.

  1. jian wu

    Very Helpful !


    By the way, I wanna to ask you a question about JPA.


    You know that if we want to create the odata model use JPA as data source, we should create the java project and coding with Java Persistence API.


    But I don’t know how to deploy this project into SMP server, and let SMP server can found it.


    I have try to export the project as a jar file and copied it into ‘SMP/Server/lib’ folder, but SMP can not found it.


    Can you give me some advice?


    Thank you very much!

    Jian

    (0) 
    1. Bjoern Woppmann Post author

      Hi Jian,

      the JPA model must be active on the SAP Mobile Platform Server. The JPA JAR must be packaged as a P2 feature in a P2 update site and enabled as a custom feature on the server. For more information on enabling custom features on the SAP Mobile Platform server, see the help pages for SMP3:

      SAP Mobile Platform 3.0 SAP Mobile Platform > Server Administrator > Server Administration > Managing SAP Mobile Platform Server Features

      Kind regards

      Björn

      (0) 
      1. SUMIT LAL

        Hi Bjoern,

        I am facing some issue during Define Response Mapping.Plz check the attachments below.

        wsdl1.PNG

        wsdl2.PNG

        wsdl3.PNG

        wsdl4.PNG

        wsdl5.PNG

        Kindly Suggests,

        Regards,

        Sumit

        (0) 
    2. Carlos Roggan

      Hi Jian,

      the server is based on OSGi, so the deployables have to be OSGi-bundles.

      I’ve tried to give an overview here: Getting started with GWPA: OSGi Introduction

      You’ll find also detailed descriptions on creating a bundle and feature and update site (which was mentioned by Bjoern) in the follow-up exercises:

      Getting started with GWPA: OSGi Introduction Exercise 1

      Getting started with GWPA: OSGi Introduction Exercise 2

      Regarding your existing JPA-project, you can try to convert it to a bundle in Eclipse, using the context menu on your project, then choose “configure -> convert to Plug-in Project”

      This will e.g. add the manifest file to your project and then you can export it as Plugin (== Bundle) via context menu on your project, then choose “Export -> Plug-In Development -> Deployable Plug-ins and fragments”

      (just in case that this doesn’t work for you, you can also create a new bundle manually in Eclipse (see the descriptions above) and then copy your JPA-jar into it, like a library, and take care to export the library from your bundle)

      Once you have your JPA-project exported as jar-file (which is a bundle, as it contains the manifest, etc), you can deploy it to SMP

      This can be done in 2 ways:

      1. put the bundle into a feature, then create an updatesite for the feature. Then go to SMP and from command line, install the feature into SMP (using p2-commands)

      You can find info about it in the above linked documents

      2. simply copy the jar file into the pickup folder of SMP

      Then check in SMP, if the bundle has been activated (find the command in the links above)

      Regarding the JPA-Project and deployment, you may find useful information in Jens Glanders tutorial:

      SAP HANA Cloud Application Development Scenario End-to-End Tutorial

      Hope you’ll find this helpful!

      Cheers,

      Carlos

      (0) 
    1. Bjoern Woppmann Post author

      Hi Jitendra,

      could it be, that you have not registered the service ZGWSAMPLE_SRV coming from the ES1 system? That would be one possible explanation for the error you are experiencing. The steps necessary are described in step 7.1 in my blog above.

      Kind regards

      Björn

      (0) 
    1. Bjoern Woppmann Post author

      Hi Saurabh,

      I am guessing this happens when you are calling the Stocks entity set. Is this correct?

      Do you maybe need to set up a proxy server to connect to the internet as described in step 9.1.1.?

      Best regards

      Björn

      (0) 
      1. saurabh shrivastava

        Hi Bjoren,

        Thanks for the reply but i am using my soap url coming from SAP system. when i try to check for entity set (collection) i am getting this error.

        waiting for your reply.

        Thanks.,

        Saurabh

        (0) 
      2. Paul Horan

        I’m getting the same error – just “Could not send Message”.

        Could this be an authentication problem to the ES1 server?  The ES1 gateway consumption server requires us to register, and then prompts for userid/password whenever I try to view the WSDL or access the backend OData services directly.

        I see no place to provide these credentials during the execution of the SOAP call to the backend.  The SOAP destinations are not maintained in the Gateway cockpit like ODC, JDBC, and JPA sources are, so how do we authenticate at runtime?

        (0) 
        1. Bjoern Woppmann Post author

          Hi Paul,

          no, it shouldn’t be an authentication issue. Yes, you need to authenticate in order to retrieve the WSDL from the server. But I configured the web service to be accessible without authentication. You can verify this by using SoapUI.

          I have been getting the “Could not send Message” error occasionally as well, but haven’t been able to reproduce it. Maybe you could raise an internal ticket for this?

          In SP3 the authentication options for SOAP are still limited, meaning that it is only possible to do certificate based authentication. More options should be available in the upcoming SPs.

          Kind regards

          Björn

          (0) 
  2. saurabh shrivastava

    hi am getting message that  message could not send for my soap url and i am not using any proxy server.  so please let me know i am not doing right mapping or missing something else.

    (0) 
    1. Bjoern Woppmann Post author

      Hi Saurabh,

      could you please try again. I just noticed yesterday that something was wrong with the SOAP Service Backend User, that was probably causing your error. It should be working now.

      Kind regards

      Björn

      (0) 
    1. Bjoern Woppmann Post author

      Dear Ali,

      please refer to step 5.5 and then select your desired entity set and then the SOAP radio button. In the next screen you will find the screen you asked about.

      Kind regards

      Bjoern

      (0) 
  3. Olivier Mercier

    Thanks for the article, that helped me for importing the SSL Certificate into SMP3 🙂

    Note: for the command line tool, even after stopping the server, saving the file would not work, i had to start the command as an admin and then it was fine .

    (0) 
  4. Devraj Singh

    Hi Bjoern Woppmann

    Everything goes well until I have tried to deploy the content. It has thrown below error.

     

    Deployment cannot be completed for IGW_EPM_DEMO

    Thu Jan 29 17:18:30 IST 2015 | Validator Logs :

    Thu Jan 29 17:18:30 IST 2015 | ERROR : Enter a condition that starts and ends with header/body/constant <IFlowEditor/etype:SequenceFlow/eid:_SequenceFlow_14/pid:iflow.advance.sequenceflow.tab/location:SequenceFlow>

    Thu Jan 29 17:18:30 IST 2015 | ERROR : Runtime does not support the flow element gw_converter <Project/location:Project>

    Thu Jan 29 17:18:30 IST 2015 | ERROR : Runtime does not support the flow element gw_converter <Project/location:Project>

    Thu Jan 29 17:18:30 IST 2015 | ERROR : Runtime does not support the flow element gw_converter <Project/location:Project>

    Thu Jan 29 17:18:30 IST 2015 | INFO : Mapping Completion Check is successful <mmap>

    Thu Jan 29 17:18:30 IST 2015 | INFO : Mapping Location Check is successful <mmap>

    Thu Jan 29 17:18:30 IST 2015 | INFO : Source/Target check completed successfully <mmap>

    Thu Jan 29 17:18:30 IST 2015 | Generation started for IGW_EPM_Demo project

    Thu Jan 29 17:18:30 IST 2015 | Generation and build failed for IGW_EPM_Demo as validation of resource is failed

    Thu Jan 29 17:18:30 IST 2015 | Deploy skipped; project list is empty

    Thu Jan 29 17:18:30 IST 2015 | Generation, build and deploy failed for task 562ef794-010e-45ef-b47e-33f870708a7d

    Any suggestions Or anyone else here faced  the same?

    Regards’

    Devraj

    (0) 
    1. Bjoern Woppmann Post author

      Hi Devraj,

      can you kindly send me your project file, so that I can have a look at it? You can upload it here: SAP Mobile Documents

      Could you please also state the version of your SAP Mobile Platform tools (the eclipse plugin) and which SMP release you are using?

      Thanks and kind regards

      Björn

      (0) 
      1. Rakshit Doshi

        Dear Bjoern,

        Can you please stress upon how to configure SSO for the IGW. Currently in the destination we are hardcoding the user and password so it always calls the backend service with the same user which is used. Can you please share the steps on how to configure the destination for SSO?

        Thanks,

        Rakshit Doshi

        (0) 
  5. Saranya sakthivel

    Hi Bjoern,

    This blog is a very much useful for end to end process.Thank you very much for this blog.

    I have tried to implement it. I am getting the below error while reading the service.

    1. I am doing it for importing odata service in the eclipse (ODC).

    2. I have imported my service in the eclipse and registered it with the SMP.

    3. While reading the Metadata from the Gateway Cockpit , I am able to get the result.

    4. But while reading the particular entity set i am getting the below error.

    Capture.PNG

    Please let me know what might be the reason for this .

    Thanks & Regards,

    Saranya Sakthi.

    (0) 
  6. Michael Segal

    I try to do  OData.request with  method: “POST”  and csrf-token that I get method: “GET” from header responce.

    I always get error code: 403;

    What could be the reason for that?

        <body>

            <h1>HTTP Status 403 – </h1>

            <HR size=”1″ noshade=”noshade”>

                <p>

                    <b>type</b> Status report

                </p>

                <p>

                    <b>message</b>

                    <u></u>

                </p>

                <p>

                    <b>description</b>

                    <u>Access to the specified resource has been forbidden.</u>

                </p>

                <HR size=”1″ noshade=”noshade”>

                    <h3>SAP</h3>

                </body>

    (0) 
    1. Carlos Roggan

      Hi Michael, maybe this consideration helps:

      The csrf-token is required by SMP and you need to specify it. But it isn’t per se valid for the connected backend.

      (0) 
      1. Michael Segal

        Thank you Carlos for fast reply. I tried to send Post request without csrf-token- Unfortunately it still failed. I think the problem in SMP backend configurations

        (0) 
          1. Michael Appleby

            To expand on what Jitendra requested, please create a new Discussion marked as a Question.  You will receive more help than by commenting on a document which may only have the author responding.

            Regards, Mike (Moderator)

            SAP Technology RIG

            (0) 
  7. Paweł Wiejkut

    Hey guys,

    I couldn’t find the ODataModel.xml file and others attachments.  Am i blind or they were deleted? Does anyone here have any idea where I can find them?

    Cheers,

    Paweł

    (1) 

Leave a Reply