Sunteți pe pagina 1din 22

Getting Started Newsletters Store

Hi, Guest Log On Join Us Search the Community

Products Services & Support About SCN Downloads


Activity Communications Actions
Industries Training & Education Partnership Developer Center
Lines of Business University Alliances Events & Webinars Innovation Browse

More blog posts in SMP Developer Center

Actions
SMP Developer Center
Login to follow, like, comment, share and
Tutorial: Creating an OData service based on SAP bookmark content.

Gateway, SOAP, JDBC and JPA data sources Login Register


Previous
Next
Posted by Bjoern Woppmann in SMP Developer Center on Jun 10, 2014 2:38:39 PM
Share 37 1 Like 7

Table of Contents
1 Introduction
2 What is Integration Gateway?
3 End-to-End Scenario Overview
4 Prerequisites
postpost
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
Filter Blog
5.5.2 JDBC Data Source
5.5.3 JPA Data Source By author:
5.5.4 SOAP Data Source ---
5.5.5 Defining the Response Mapping for the SOAP web service By date:
5.6 Generating and deploying the service on the SMP server ---
6 Setting up SAP Mobile Platform 3.0
By tag:
6.1 Security Profile
6.2 Adding the HTTPS certificate to the SMP key store
developer ios mobile mobiledevcenter mobility
native odata sap_mobile_platform sap_mobile_platform_3
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
sap_mobility sapmentor sup sybase
sybase_unwired_platform syclo
6.3 Destinations
6.3.1 OData Channel (ODC) Data Source
6.3.2 Java Persistency API (JPA) Data Source
Recent Posts
6.3.3 Java Data Base Connector (JDBC) Data Source
7 Configuring the Services in SMP HCPms: curl command will help you in managing
Hybrid app versions
7.1 Registering the ZGWSAMPLE_SRV service
Integration Gateway: Understanding REST data source
7.2 Assigning Destinations to Entity Sets [16]: using HashMap as response format
8 Testing the service Download and Upload application settings from Mobile
8.1 Setting up Advanced REST Client in Google Chrome Platform
8.2 Retrieving information from your service Integration Gateway: Understanding REST data source
8.3 Retrieving the CSRF-Token [15]: $orderby
8.4 Creating a Sales Order Header Integration Gateway: Understanding REST data source
[14]: $skip
9 Troubleshooting
Weak ephemeral Diffie-Hellman public key
9.1 Proxy Issues
Different rewrite modes require different service root
9.1.1 SMP system wide proxy used for the SOAP destination URLs in SMP and HCPms
9.1.2 Proxy Settings for ODC destination Media Support in Native OData SDK ( iOS)
10 Further Information Handling Partial Results with the OData SDK (Android)
Note (October 21, 2014): I updated the blog to reflect changes in the Eclipse modeling environment. You now need to Registering Kapsel/Hybrid SAPUI5 Android App &
use the SAP Mobile Platform tools instead of the Gateway Productivity Accelerator (GWPA). Consuming OData via SMP3.0 Using Cordova SQLLite
Plugin(WebSQL DB)

1 Introduction
converted by Web2PDFConvert.com
1 Introduction
On May 15th, 2014 the SAP Mobile Platform 3.0 became generally available to the public. While it contains many great Incoming Links
features, I would like to show you in this blog how it is possible to leverage the Integration Gateway component inside Integration Gateway: REST data source, overview
the Mobile Platform. of Blogs
Integration Gateway: Understanding REST data
2 What is Integration Gateway? source [13]: $top
First, I would like to point you to some resources available to explain what Integration Gateway can do: Integration Getting Started with Kapsel - Appendix J -- Hybrid
Apps in SAP Mobile Platform 2.3 vs 3.0 (SP09+)
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- Re: Error while calling the entity set in SMP 3.0
SP07(via IGW)
SAP data sources.
The data sources supported as of today are SOAP (Simple Object Access Protocol), JPA (Java Persistence API) and Re: Error while calling the entity set in SMP 3.0
SP07(via IGW)
JDBC (Java Database Connectivity) to access non-SAP data sources as well as OData Channel (ODC) for accessing
OData services provisioned via SAP Gateway. OData Service issue - Not returning multiple
records
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

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.

converted by Web2PDFConvert.com
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

URL: <insert path and HTTPS port to your SMP3 server>


User: <Admin username> (default: smpAdmin)
Password: <Admin password> (default: s3pAdmin)

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:

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:

converted by Web2PDFConvert.com
Please save the resulting model and then your ODataModel should look like this:

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”:

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:

converted by Web2PDFConvert.com
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:

For both entity sets, set the following connection details:

converted by Web2PDFConvert.com
5.5.2 JDBC Data Source
The DELIVERYTYPES entity set should be served by a JDBC data source.

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:

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:

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:

converted by Web2PDFConvert.com
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:

Now you should perform the mapping as follows:

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”:

converted by Web2PDFConvert.com
Fill out the values in the popup as follows:

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”:

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:

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

converted by Web2PDFConvert.com
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.)

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:

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:

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.

converted by Web2PDFConvert.com
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.

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


converted by Web2PDFConvert.com
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:

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:

converted by Web2PDFConvert.com
In my case, I used the following payload data for the POST request:
01. <entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
02. <id>https://localhost:8081/gateway/odata/sap/IGW_EPM_Demo;v=1/SalesOrderCollection('0500000003')</id
03. <title type="text">SalesOrderCollection</title>
04. <updated>2014-06-06T16:41:24.454+02:00</updated>
05. <category term="ZGWSAMPLE_SRV.SalesOrder" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
06. <link href="SalesOrderCollection('0500000003')" rel="edit" title="SalesOrder" />
07. <content type="application/xml">
08. <m:properties>
09. <d:SoId>0500000003</d:SoId>
10. <d:CurrencyCode>EUR</d:CurrencyCode>
11. <d:BuyerName>Asia High tech</d:BuyerName>
12. <d:BuyerId>0100000006</d:BuyerId>
13. <d:Note>EPM DG: SO ID 0500000003 Deliver as fast as possible</d:Note>
14. <d:ChangedByBp />
15. <d:CreatedByBp />
16. <d:ChangedAt>2014-05-13T05:00:00.000</d:ChangedAt>
17. <d:ChangedBy>0000000033</d:ChangedBy>
18. <d:CreatedAt>2014-05-13T05:00:00.000</d:CreatedAt>
19. <d:CreatedBy>0000000033</d:CreatedBy>
20. <d:GrossAmount>1405.39</d:GrossAmount>
21. <d:GrossAmountExt>1405.39</d:GrossAmountExt>
22. <d:NetAmount>1181.0</d:NetAmount>
23. <d:NetAmountExt>1181.0</d:NetAmountExt>
24. <d:TaxAmount>224.39</d:TaxAmount>
25. <d:TaxAmountExt>224.39</d:TaxAmountExt>
26. <d:LifecycleStatus>N</d:LifecycleStatus>
27. <d:BillingStatus />
28. <d:DeliveryStatus />
29. </m:properties>
30. </content>
31. </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

converted by Web2PDFConvert.com
· 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.

ODataModel.xml(5.7 K)
StocksES1.wsdl.xml(13.7 K)

40692 Views Categories: SMP


Tags: odata, soap, smp, jpa, sap_mobile_platform, sap_gateway, igw, integrationgateway, odc

Average User Rating

(9 ratings)

Share 37 1 Like 7

43 Comments

Tahir Öz Jun 10, 2014 3:07 PM


Thanks for sharing a valuble blog Bjoern Woppmann
Regards,
Tahir
Like (1)

Syam Babu Jun 18, 2014 4:55 PM


Good Blog ..we are looking into more blogs on SAP Integration Gateway.
Thanks,
Syam
Like (1)

jian wu Jun 20, 2014 11:24 AM


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
Like (1)

Bjoern Woppmann Jun 23, 2014 3:44 PM (in response to jian wu)

converted by Web2PDFConvert.com
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
Like (0)

SUMIT LAL Jun 8, 2015 9:35 AM (in response to Bjoern Woppmann)


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

converted by Web2PDFConvert.com
Kindly Suggests,
Regards,
Sumit

Like (0)

Carlos Roggan Aug 13, 2014 4:44 PM (in response to jian wu)
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
Like (2)

jitendra kansal Jul 9, 2014 11:32 AM

converted by Web2PDFConvert.com
Bjoern Woppmann
I am trying to create OData modeling for ODC data source as per given xml file. I have followed above
steps for configuration in gateway cockpit and set the proxies accordingly after importing the
certificate.
When i run this URL, getting below message:
http://localhost:8080/gateway/odata/sap/Bjoern_ODC;v=1/SalesOrderCollection

Like (0)

Bjoern Woppmann Jul 14, 2014 10:36 AM (in response to jitendra kansal)
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
Like (2)

jitendra kansal Jul 18, 2014 10:23 AM (in response to Bjoern Woppmann)
Bjoern Woppmann
Thanks. It worked after registering the service.
Rgrds,
JK
Like (1)

saurabh shrivastava Jul 30, 2014 10:30 AM


hi Bjoern Woppmann
i tried to create odata from my soap url from a SAP system but getting error like
Could not send Message
getting error message like.
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code/>
<message xml:lang="en">Could not send Message.</message>
</error>

i am not able to figure it out what i am missing.


Like (0)

Bjoern Woppmann Jul 30, 2014 4:18 PM (in response to saurabh shrivastava)
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
Like (0)

saurabh shrivastava Jul 30, 2014 4:40 PM (in response to Bjoern Woppmann)

converted by Web2PDFConvert.com
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
Like (0)

jitendra kansal Jul 30, 2014 5:53 PM (in response to saurabh shrivastava)
saurabh shrivastava
Are ​you accessing SOAP URL through a proxy server? Please check it in
browser.
Rgrds,
JK
Like (0)

Paul Horan Aug 7, 2014 4:22 AM (in response to Bjoern Woppmann)


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?
Like (0)

Bjoern Woppmann Aug 7, 2014 10:08 AM (in response to Paul Horan)


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
Like (0)

Bjoern Woppmann Aug 8, 2014 2:12 PM (in response to Paul Horan)


Hi Paul,
you were right, something was wrong with the SOAP service backend
user. Things should be working again now.
Kind regards
Björn
Like (1)

Anilkumar Vippagunta Jul 30, 2014 12:52 PM


Hello Bjoern
What is the exact URl that we need to provide while configuring the destination for my ODATA
....http://<<Host>>:<<port>> ?
Bcose I can't access http://<host>:<port>sap/iwbep?sap-client=<<Clientno>>

Regards, Anil
P.S : Oaky...Looks like my GW doesn't have below addon !!!
SAP_GWFND 740 >= SP 02
Like (1)

jitendra kansal Jul 30, 2014 6:14 PM (in response to Anilkumar Vippagunta)
Anilkumar Vippagunta
I can confirm about the URL has to be configure it should be like as you mentioned. e.g.
https://sapes1.sapdevcenter.com/sap/iwbep?sap-client=520

converted by Web2PDFConvert.com
Like (1)

saurabh shrivastava Jul 31, 2014 12:14 PM


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.
Like (0)

jitendra kansal Jul 31, 2014 2:05 PM (in response to saurabh shrivastava)
saurabh shrivastava
Request you to raise a new thread for your problem. If possible, share screenshots to
understand your issue better.
SMP Developer Center
Rgrds,
JK
Like (1)

Bjoern Woppmann Aug 8, 2014 2:11 PM (in response to saurabh shrivastava)


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
Like (0)

Hemendra Sabharwal Aug 1, 2014 5:44 AM


Thanks Björn, for sharing valuable information. I will try, if stuck I will get back to you.
Thanks again.
Warm Regards
Hemendra
Like (0)

Ali Naveed Aug 10, 2014 2:40 PM

hi Bjoern Woppmann

can you guide me where can i find the below screen in Eclipse Juno?

5.5.4 SOAP Data Source

Regard
Ali

Like (0)

jitendra kansal Aug 10, 2014 5:22 PM (in response to Ali Naveed)
ali naveed
Above attached screenshot is nothing but when you provide connection details for any
SOAP WS operation.
You should read this blog for detailed explanation.
Rgrds,
JK
Like (0)

Bjoern Woppmann Aug 12, 2014 1:38 PM (in response to Ali Naveed)

converted by Web2PDFConvert.com
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
Like (1)

Carlos Roggan Aug 13, 2014 4:52 PM


Hi Bjoern Woppmann
what a great Tutorial, thanks for the high effort in bringing this complex know-how to us in an
understandable manner!
Kind Regards,
Carlos
Like (1)

Olivier Mercier Aug 25, 2014 1:48 PM


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 .
Like (1)

Elijah Martinez Oct 30, 2014 11:36 PM


Great, comprehensive guide Bjoern. Very helpful and a great reference
Thanks much.
Like (0)

Mithun Suthar Nov 14, 2014 1:07 PM


Hi Bjoern Woppmann
Great Documents.....!!!!!!!!!!!!!
Thanks for Sharing...............
Like (1)

Devraj Singh Jan 29, 2015 4:09 PM


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

Like (0)

Bjoern Woppmann Feb 2, 2015 9:46 AM (in response to Devraj Singh)

converted by Web2PDFConvert.com
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
Like (0)

Rakshit Doshi Feb 23, 2015 10:00 AM (in response to Bjoern Woppmann)
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
Like (0)

Bjoern Woppmann Feb 23, 2015 2:50 PM (in response to Rakshit Doshi)
Hi Rakshit,
I will look into if I can publish a blog on this topic - but at this moment I
cannot promise it. Have you looked at the SAP documentation on the
topic?
Creating a Destination on Gateway Management Cockpit - Data
Integration using Integration Gateway - SAP Library
Kind regards
Björn
Like (0)

Bjoern Woppmann Feb 24, 2015 9:51 AM (in response to Rakshit Doshi)
Hi Rakshit,
I just found blog from my colleagues that explains how to do user
propagation with SSO. Please have a look at it here:
http://scn.sap.com/community/developer-center/mobility-
platform/blog/2015/01/07/soap-authentication--user-
propagation-from-smp-to-igw
Regards
Björn
Like (0)

Rakshit Doshi Feb 27, 2015 4:44 PM (in response to Bjoern Woppmann)
Dear Bjoern,
I figured it out using the reference link.
A little bit was missing which i fixed and got it working
http://scn.sap.com/community/developer-center/mobility-
platform/blog/2015/02/27/how-to-configure-sso-for-smp-30-for-
bep
Thanks,
Rakshit Doshi
Like (0)

Hossam Abdelazeem Mar 14, 2015 1:07 PM


Wonderful post,
I have a question regarding JDBC data source.
Can I get data from other sources except table, like views ?
Thanks,
Hossam
Like (0)

Saranya sakthivel Apr 7, 2015 6:31 AM

converted by Web2PDFConvert.com
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.

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

Thanks & Regards,


Saranya Sakthi.

Like (0)

jitendra kansal Apr 7, 2015 7:00 AM (in response to Saranya sakthivel)


Saranya sakthivel
Make sure you follow every steps mentioned here for ODC SMP 3.0: An End to End guide
to create an OData service for a given SAP Gateway data source
If you still encounter with any issue, feel free to raise a new thread.
Regards,
JK
Like (0)

Michael Segal Jun 15, 2015 1:27 PM


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>
Like (0)

Carlos Roggan Jun 15, 2015 1:35 PM (in response to Michael Segal)
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.
Like (0)

Michael Segal Jun 16, 2015 10:34 AM (in response to Carlos Roggan)
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
Like (0)

jitendra kansal Jun 16, 2015 10:56 AM (in response to Michael Segal)

converted by Web2PDFConvert.com
Michael Segal
Please raise a new thread at SMP Developer Center in case you are
facing issues related to SMP. Provide steps you have followed and
screenshots (if possible) along with reference of the doc/blog you have
referred.
Regards,
JK
Like (0)

Michael Appleby Jun 16, 2015 3:57 PM (in response to jitendra kansal)
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
Like (0)

Site Index Contact Us SAP Help Portal Follow SCN


Privacy Terms of Use Legal Disclosure Copyright

converted by Web2PDFConvert.com

S-ar putea să vă placă și