Skip to Content
Author's profile photo Jitendra Kansal

SMP 3.0: An End to End guide to create an OData service for a given SAP Gateway data source

This guide will give a clear understanding on how to create an OData service for a given SAP Gateway data source. Here, i am using publicly available demo gateway service : Flight example

Service URL : https://sapes4.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/

Note: To access this URL, you must have an account on SAP Gateway Demo system. How to get access

Now,to make this service available through SMP 3.0 server, i am going to import it in eclipse and then will deploy to SMP server.

Tools Used: Eclipse Luna, SAP Mobile Platform 3.0 SP10 PL01 Advanced REST Client

Steps:

Prerequisite: Installing “SAP Mobile Platform Tools” latest version 1.6.2 in Eclipse Luna Reference Document

 

  1. Create a new project in Eclipse Luna, make sure to select proper “Target Runtime

13.PNG

2. Select Model Content as “OData Service URL”  , Click “Next

2.PNG

3. Provide the service URL https://sapes4.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/ and click “Go“. Enter correct credentials to connect to sapes4.sapdevcenter.com server

14.PNG

Note: Not able to retrieve the service details? Look at Troubleshooting #1.

4. Once done, you can see the automatic creation of OData entities.

completeprojc.PNG

5. Next task is to assigning data sources to each and every Entitysets.

    • Right click> FlightModel.odatasrv >Select Data source
    • Name : RMTSAMPLEFLIGHT
    • Make sure you specify Namespace as “IWBEP” (not SAP as always)
    •  

The ODC data source is only used for services registered under the iwbep node. For the SAP Gateway service coming from the Hub, you need to bind it with REST data source NOT as ODC data source. Reference

4.JPG

Note: How to identify what is the correct Namespace for a particular SAP gateway service? I generally prefer to a cross-check from step #9.

6. Right click project > Generate and Deploy Integrate Content

deploy.PNG

7. Now, i have to register RMTSAMPLEFLIGHT service in SMP Management cockpit

<<From SMP 3.0 SP08 Runtime onward, SMP Gateway cockpit has been integrated into SMP Management cockpit>>

11.PNG

Key Value
Destination Name ES4
Destination Type HTTP
Destination URL https://sapes4.sapdevcenter.com:443/sap/iwbep?sap-client=800
Authentication Type SSO Mechanism
SSO Mechanisms Technical User (Basic)
User Name SAP Gateway Demo system usename
Password SAP Gateway Demo system password

Note: Make sure if you have imported ES4 certificate into SMP Keystore. How to do? Check troubleshooting #5

8. Select the “ES4” destination, click on “Test Connection“. You should see a SUCCESS message.

 

Note: Not able to ping successfully? Look at Troubleshooting #2

9. Register Back-End service from ES4 sever

    • Click on “Register a New Service” under SERVICES
    • Select Destination as “ES4”
    • Type RMTSAMPLEFLIGHT in search
    • Click on “Register”

15.PNG

 

This is how it should look like:

16.PNG

Note: As you can see the “IWBEP” is the namespace of the service coming directly from server “ES4” and “SAP” is the namespace of the service deployed through Eclipse.

10. Add destination “ES4” to the service “SAMPLEFLIGHT” by clicking on it.

17.PNG

Note: I didn’t find assigning a destination (ES1) to the deployed OData model (SAMPLEFLIGHT) since backend service (RMTSAMPLEFLIGHT) has already been registered in gateway cockpit. But for best practices it is good.

You should see that “ES4” destination has been mapped to service “SAMPLEFLIGHT”.

18.PNG

11. Open “Service Document” as highlighted above. (Assuming you have created a security profile named “SAP” in admin cockpit)

https://jk:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1

This URL will return all entity sets contained in the service

6.PNG

12. To test each Entityset details, just add the Entityset name at the end of above URL.

e.g.

a. https://smpserverip:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1/CarrierCollection(‘AA‘)

 

This URL will return carrier CARRIER NAME, CURRENCY CODE, URL for Carrier ID “AA”

7.PNG

b.  https://smpserverip:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1/TravelagencyCollection

This will return all Travel Agencies details available in ES1 system.

c. https://smpserverip:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1/SubscriptionCollection

d.  https://smpserverip:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1/FlightCollection

CUD operation:

CREATE: I am getting ‘500 Internal Server Error’

UPDATE:

First i need to get X-CSRF-TOKEN value using GET method

GET.PNG

Pass mentioned value in header section for updating a record:  image link Dropbox – PUT1.png

<?xml version=”1.0″ encoding=”UTF-8″?>

<entry xmlns=”http://www.w3.org/2005/Atom” xmlns:d=”http://schemas.microsoft.com/ado/2007/08/dataservices” xmlns:m=”http://schemas.microsoft.com/ado/2007/08/dataservices/metadata“>

<content type=”application/xml”>

<m:properties>

<d:CARRNAME>British Airways</d:CARRNAME>

<d:CURRCODE>USD1</d:CURRCODE>

<d:URL>http://www.aa.com</d:URL>

<d:mimeType>text/html</d:mimeType>

</m:properties>

</content>

</entry>

You can verify the same in the browser by just running the OData URL Dropbox – PUT2.png

DELETE: Dropbox – DELETE.png

<<I was not able to upload images in the blog so i have placed it at dropbox for time being. I am checking why i am not able to insert images here , will update it soon>>

Troubleshooting:

If you are using any proxy setting to access any external network, you may encounter below issues:

(A). Connection timed out: connect

t1.PNG

Resolution: Go to Windows>Preferences>Network Connections. Select Active provider as ‘Manual’ and provide proxy details for HTTPS. Check Reference Document for more details.

(B). Connection has Failed: Connection to https://sapes1.sapdevcenter.com:443 refused

connectionFailed.PNG

Resolution:

 

Set HTTP/HTTPS proxy settings in Admin cockpit. > SETTINGS>SYSTEM

9.PNG

 

(C). Could not retrieve services from the destination ES1

 

          destinationFetch.PNG

 

Resolution: 

 

Set the proxy server details for the destination ES1. Go to path:C:\SAP\MobilePlatform3\Server\config_master\service.destinations\destinations

               Open ES1. And proxy details.

e.g. Proxy=proxyserver:80

 

save the file and NO need of restarting SMP server.

 

(D). When you try to access any entityset information, you are encountered with message saying “Error in Getting the service“,

 

          errorInGettingService.PNG

 

  Check if you have missed registering the service as mentioned in step #9.

 

(E). Importing ES1 HTTPS certificate into SMP server keystore

 

     Open https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/ in a browser ( i did in chrome) and follow below screenshots:

     certficatefileImport1.png

     Select Base-64 encoded option

     certficatefileImport2.png

  You can export it anywhere as per your wish (for me its on Desktop) and you should see a successful message at last.

 

     certficatefileImport3.png

 

 

From SMP 3.0 SP08 Runtime onward, you can directly import certificate into SMP keystore through SMP Management Cockpit.

Note: This has to be done only and only by Administrator.

Open SMP Management cockpit: https://localhost:8083/Admin/  > SETTINGS>CERTIFICATES

 

     11.PNG

 

You have to restart SMP server

 

12.PNG

 

————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————

 

This below method is valid if you are working with SMP3.0 SP07 server or lower version

Once certificate export is done, open a command prompt and run below keytool command:

 

C:\SAP\MobilePlatform3\Server\configuration>keytool -import -v -alias sapgatewaycert -keystore smp_keystore.jks -storepass s3pAdmin -file c:\Users\Jitendra\Desktop\ES1.cer

keytoolcommand.PNG

Note, the password shown above, s3pAdmin, was a value that was requested during the SMP 3.0 server install.  Replace changeit with the value you specified during the install. Note that the SMP 3.0 server needs to be restarted after making this change.

One tool which provides a graphical view of the contents of keystores is KeyStore Explorer.

keystore.PNG

 

————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————

(F). Peer not Authenticated

 

Pinging the destination through an error: Connection test failed-Peer not authenticated


When i looked into its ‘Certificate’ details, then came to know that its certificate had already expired. Delete this and import a new valid certificate.

 

5.PNG

 

 

 

————————————————————————————————————————————————————————————————————————

————————————————————————————————————————————————————————————————————————

 

(G). Log Settings

Logon to Admin Cockpit > Logs > Settings

Log Level > debug

Trace > Enabled

log.JPG

Follow these forums for latest update on SAP Mobile Platform 3.0 : SMP Developer Center, SAP for Mobile

Note: Big thanks to Bjoern Woppmann for helping me in writing this blog.

Assigned tags

      106 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi jitendra

      Nice blog .

      Author's profile photo Former Member
      Former Member

      Great stuff, I've installed so far everything, now I'm little bit struggling migrating my old iOS ODATA app to the new.

      Could you maybe point me to an iOS example to copy from?

      Cheers

      Olli

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Oliver Lauer

      I am not sure if it helps you. But look at #03 SMP3 OData SDK for iOS - Online APIs

      Please raise a new thread for your queries. I am sure you will get good tips from experts.

      Rgrds

      JK

      Author's profile photo Midhun VP
      Midhun VP

      Hi Oliver,

      This might help you,Getting started with SMP3 Native OData iOS apps

      Regards,

      Midhun VP

      Author's profile photo Former Member
      Former Member

      I tried this but this doesn't work with the new SMP3 4 anymore, that's the reason why I'm looking for a new example.

      Author's profile photo Former Member
      Former Member

      Why did you register a different service than the one created and deployed via Eclipse?

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Oliver Lauer

      Are you talking about "SAMPLEFLIGHT" & "RMTSAMPLEFLIGHT" name?

      Can you please specify which all services are you talking about?

      Rgrds

      JK

      Author's profile photo Former Member
      Former Member

      Yes, you generated SAMPLEFLIGHT but then used RMTSAMPLEFLIGHT, why?

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Oliver Lauer

      SAMPLEFLIGHT is just a project name. It could be any name.

      RMTSAMPLEFLIGHT is a service name which is present in ES1 backend system.

      I hope it is clear now.

      Regards

      JK

      Author's profile photo Former Member
      Former Member

      OK, Thanks!

      Author's profile photo Former Member
      Former Member

      Hi Jitendra,

      We have SMP 3.0 SP 04 in our internal server and running behind proxy server. I performed the following step to access the https://sapes1.sapdevcenter.com:443/sap/iwbep?sap-client=520

      . Set HTTP/HTTPS proxy settings in Admin cockpit. > SETTINGS>SYSTEM

      - Modified props.ini

      - Modified ES1 files from service destination folder also.

      Still in gateway/cockpit i am getting

      Proxy_error.PNG

      Please find the below statements from SMP server log

      2014 10 08 12:37:38#0-700#ERROR#com.sap.gateway.core.odata4sap.ODataErrorCallbackImpl##anonymous#http-bio-8083-exec-6###handleError(): failed to serve request for URI https://10.113.178.58:8083/gateway/odata/RESERVEDFORSAPIGW/REPOSITORYSERVICE/PingDestination?DestinationName=%27ES1%27, message = Proxy Authentication Required |

      2014 10 08 12:37:38#0-700#DEBUG#com.sap.gateway.core.service.srvrepo.ServiceRepositoryProvider##anonymous#http-bio-8083-exec-6###getService methods starts in ServiceRepositoryProvider |

      2014 10 08 12:37:38#0-700#DEBUG#com.sap.gateway.core.service.repository.api.ServiceRepositoryAPIHandler##anonymous#http-bio-8083-exec-6###getService method starts in ServiceRepositoryAPIHandler |

      2014 10 08 12:37:38#0-700#DEBUG#com.sap.gateway.core.service.dao.ServiceDAO##anonymous#http-bio-8083-exec-6###getService(String namespace, String serviceName, String serviceVersion) method starts in TechnicalServiceDAO |

      2014 10 08 12:37:38#0-700#DEBUG#com.sap.gateway.core.service.dao.ServiceDAO##anonymous#http-bio-8083-exec-6###getService(String namespace, String serviceName, String serviceVersion) method ends in TechnicalServiceDAO |

      2014 10 08 12:37:38#0-700#DEBUG#com.sap.gateway.core.service.repository.api.ServiceRepositoryAPIHandler##anonymous#http-bio-8083-exec-6###getService method ends in ServiceRepositoryAPIHandler |

      2014 10 08 12:37:38#0-700#DEBUG#com.sap.gateway.core.service.srvrepo.ServiceRepositoryProvider##anonymous#http-bio-8083-exec-6###getService methods ends in ServiceRepositoryProvider |

      2014 10 08 12:37:38#0-700#DEBUG#com.sap.gateway.core.service.dao.BasicDAO##anonymous#http-bio-8083-exec-6###Commiting and Closing transaction

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Ranjeet Salunkhe

      Are you able to resolve above issue?

      Please verify once:

      1. Import ES1 system certificate into SMP keystore  > restart SMP server

      2.set http/https proxy settings in Admin cockpit >System

      3.No need to modify props.ini file

      4.Add proxy details in destination file under C:\SAP\MobilePlatform3\Server\config_master\service.destinations\destinations\ES1


      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      Hi JK ,
          In SMP 3 SP03 , Where to set the Http/Https proxy settings?

      Regards ,

      Sukanya.k

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Sukanya k

        In SMP 3 SP03 , Where to set the Http/Https proxy settings?

      In SP03, you have to add it manually in props.ini file    

      1. <SMP-HOME-PATH>\MobilePlatform3\Server

      2. Add as per your config

      • -Dhttp.proxyHost=myProxy
      • -Dhttp.proxyPort=8080
      • -Dhttps.proxyHost=myProxy
      • -Dhttps.proxyPort=8080

      3. Regenerate SMP mobile service

      Check this guide for more info.

      Regards,

      JK

      Author's profile photo Rakshit Doshi
      Rakshit Doshi

      Hi Jitendra,

      I was able to connect to the backend erp with http://address:port/sap/iwbep?sap-client=100

      But when i go and try to search for the service nothing pops up. The service that i created is installed under the SAP node and not under the iwbep node. Infact there is no iwbep node in my gateway system. Earlier also during service implementation when i search with SAP i am able to do it in Eclipse. I believe there is something to do with the URL that i am searching for.

      What would be the substitute url for http://address:port/sap/iwbep?sap-client=100 because what i believe is it is searching for the service under the above destination path but not able to find.

      Please see my Gateway path for the service

      Capture.PNG

      Thanks,

      Best Regards,

      Rakshit Doshi

      Author's profile photo Former Member
      Former Member

      Hi Rakshit,

      Please tell me you make this application in you SAP NETWEAVER GATEWAY ,

      ergo for this example Flight in SAP NETWEAVER GATEWAY .

      If so , you could You could give me the guide for this development.

      Regards

      Jaime

      Author's profile photo Former Member
      Former Member

      Hi Jitendra,

      Nice blog. I have a doubt though. Why do we have to create the service via the Odata modeller? Couldn't we just configure the service as the endpoint URL for the application?

      Regards,

      Roy

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Hi Roy,

      For that particular service (exposed from SAP Gateway system), we can configure it as the endpoint URL for the app without creating via odata modeller.

      As per SAP, benefit of creating an OData service for the given sap service using ODC could help to implement mash-up scenarios with other data sources supported with IGW.

      Regards,

      JK

      Author's profile photo Nan Wang
      Nan Wang

      HI  JK

      As you mention in the reply, we can mash-up the data from different data source. Can we define the navigation between the data from different data source?

      thanks!

      Author's profile photo Adérito Brinca
      Adérito Brinca

      Hi Jitendra,

      When I try to perform the "Generate and Deploy Integration Content" I am getting the following error message: "Deployment cannot be completed for MyTest2 HHTP/1.0 301 Move Permanently"

      I successfuly tested the connection under Window-Preferences-SAP Mobile Platform Tools-Server, using the following parameters:

      URL https://hanatrial.ondemand.com:443

      User (my SCN user)

      Password (my SCN password)

      I can see the available catalogs for OData services under Window-Preferences-SAP Mobile Platform Tools-Service Catalogs  -> sapes1.sapdevcenter.com:443:520

      I am using Eclipse Kepler

      Can you help?

      Regards

      Aderito

      Author's profile photo Rakshit Doshi
      Rakshit Doshi

      Hi Aderito,

      The URL that you are entering here is wrong.

      The URL should be of your SMP Server instance even if on cloud

      Something like this

      https://SMPServerIP:8083

      443 port doesnt sound one used by SMP for Management Cockpit.

      Its the same port or address that you see when you launch the Management Cockpit.

      Hope this helps,

      Thanks,

      Best Regards,

      Rakshit Doshi

      Author's profile photo Vishnu Pankajakshan
      Vishnu Pankajakshan

      Hi Rakshit,

      How you Register the custom service under 'sap' node.????

      If i search for Z objects nothing pops up... what changes should i make in the Destination URL

      Regards,

      Vishnu

      Author's profile photo Rakshit Doshi
      Rakshit Doshi

      What is ur destination url. Can you send a screenshot of the service in SAP as well as ur destination url

      Author's profile photo Vishnu Pankajakshan
      Vishnu Pankajakshan

      Atlast i got the service details but its showing below error,pls  refer this thread

      Error while calling the entity set in SMP 3.0 SP07(via IGW)

      Author's profile photo Adérito Brinca
      Adérito Brinca

      Hi Jitendra,

      Many thanks

      I replaced the URL by https://smp-s0009547801trial.hanatrial.ondemand.com:8083 (as I am using the trial version in the cloud) but then when I press button "Test Connection" I get error message "Unable to establish connection to the operations server, Reason: Connection timed out"

      (Note: the below paragraphs are all valid only when I use url https://smp-s0009547801trial.hanatrial.ondemand.com:443)

      If I use port 443 on the URL instead (https://smp-s0009547801trial.hanatrial.ondemand.com:443) the error message displayed after pressing button "Test Connection" is "Authorization problem, Reason: User not authorized"

      I already tried with my SCN user ID and SCN password, as well as with the User ID and password I set up on the register.html file during the registration in Chrome, and the error message in Eclipse is always the one about authorization mentioned above.

      For the registration in Chrome I made the following changes on the register.htm file:

       

       

      function getSMPURL()

      {

           return "https://" + "smp-s0009547801trial.hanatrial.ondemand.com" + ":443";

      }

      function getUserName()

      {

           return "brincaa1";

           // return document.getElementById("user").value;

      }

      function getPassword()

      {

           return "alemanha2014";

           // return document.getElementById("password").value;

      }

      The registration was successful and I can see it under the "Application Connections" at SAP Mobile Platform Administration and Monitoring, along with the user name brincaa1 (the user name I used on the register.html file)

      I can also see the error entries on the logs at SAP Mobile Platform Administration and Monitoring each time I try to test the connection from Eclipse at Window-Preferences-SAP Mobile Platform Tools-Server. The trace log details always mention:

      "2014-11-06 12:20:51.365#ERROR#com.sybase.sup.server.http.ODPSecurityFactory#null#Application connection id is not provided"

      Kind Regards

      Aderito Brinca

      Author's profile photo Rakshit Doshi
      Rakshit Doshi

      Dear Aderito,

      Are you sure of this url?

      https://smp-s0009547801trial.hanatrial.ondemand.com:8083

      I am trying to access it but it does not load. This url should be that of your Management Cockpit provided along with the Cloud version os SMP

      Can you cross verify it again.

      Thanks,

      Best Regards,

      Rakshit Doshi

      Author's profile photo Adérito Brinca
      Adérito Brinca

      Hi Rakshit,

      When I am on tab "SAP Mobile Platform" at the SAP Mobile Platform Administration and Monitoring, this is the URL that I see on the browser: https://smp-s0009547801trial.hanatrial.ondemand.com/Admin

      Kind Regards

      Aderito

      Author's profile photo Adérito Brinca
      Adérito Brinca

      Hi Rakshit, this is a screen shot of what I mentioned in my previous post:SMP.jpg

      Author's profile photo Rakshit Doshi
      Rakshit Doshi

      Dear Aderito,

      Can you try the url without the ports

      https://smp-s0009547801trial.hanatrail.ondemand.com

      Thanks,

      Rakshit Doshi

      Author's profile photo Former Member
      Former Member

      Hi Jitendra,

      Please I need your help , the problem is :

      - I not autentication with SAP NETWEAVER GATEWAY PUBLIC because this link

      https://supsignformssapicl.hana.ondemand.com/SUPSignForms/

      presents problems .

      /wp-content/uploads/2014/11/1_580034.png

      Please ,

      Could you give me some other solution to get this link.

      keep in mind that I have a SAP gateway environment .

      Regards

      Jaime

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Jaime Aguilar

      I am able to access it now. Can you check again?

      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      Hi jitendra please follow this step

      1) I need get user and password for URL EXAMPLE FLIGHT

      2 ) I going to this link :

      /wp-content/uploads/2014/11/3_580128.png

      before , This page is displayed

      /wp-content/uploads/2014/11/1_580129.png

      and I accept the terms and this error displayed.

      /wp-content/uploads/2014/11/2_580131.png

      I look this document " Operations Document " but not is in the range of maintenance

      /wp-content/uploads/2014/11/4_580132.png

      My questions is , what is the problem with this page ? I need this url flight (ODATA)  for can deploy this APP in SMP 3.0?

      If I want I can let my SCN username and password.

      I hope for your help in this case .

      Regards,

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Jaime Aguilar

      Drop a mail to devcenter@sap.com with your query.

      Regards,

      JK

      Author's profile photo Adérito Brinca
      Adérito Brinca

      Hi Rakshit,

      If I remove the port I get the following error (please see screenshot)

      SMP.jpg

      Author's profile photo Adérito Brinca
      Adérito Brinca

      Hi Rakshit,

      After I applied the changes and pressed ok, and then open the Server connection again, I am getting a different error message when I don't specify the port on the URL. The error message is "Authorization Problem,  Reason: User is not authorized"

      Kind Regards

      Aderito

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Adérito Brinca; Rakshit Doshi

      As per SAP, at this point HANA Cloud Platform Mobile services (HCP MS) doesn't provide an IGW like integration capability. But it is in their Roadmap.

      Regards,

      JK

      Author's profile photo Adérito Brinca
      Adérito Brinca

      Hi Jitendra,

      Many thanks for your clarification and for all the time you spent with this.

      It's a pity that this is not available yet. I'm functional consultant, but I have some skills in Java and I'm a fan of Eclipse with ADT.
      I would like to buid some demos for my Client, but in the end the time invested on research over this topic was not lost, as I learned a lot.

      I will be waiting for SAP to release the solution. SAP mobile definitely has great potentialities.

      Kind Regards
      Aderito Brinca

      Author's profile photo Former Member
      Former Member

      Hi Jitendra

      My problem is the next :


      1 ) I have successful this step 11. Open "Service Document"


      /wp-content/uploads/2014/11/1_584955.png

      2 ) but in the moment add this CarrierCollection('AA')

      /wp-content/uploads/2014/11/2_584956.png

      What is the problem if I have correct response in URL case 1 ?

      Regards

      Jaime

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Jaime Aguilar

      Check once if you have followed step 9 and 10?

      What about other entity set than CarrierCollection? Are you getting the same response for others?

      Author's profile photo Former Member
      Former Member

      Hi Jitendra , thanks for you response .

      I getting this error for all entity's . Please look this , I have only diferents with you example

      (I installed SMP 3.0 SP4)

      in step 10 in your system

      /wp-content/uploads/2014/11/2_585586.png

      in my system .

      /wp-content/uploads/2014/11/1_585692.png

      Is this a problem ? because I don't see other difference .

      Thanks

      Regards

      Jaime

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Jaime Aguilar

      Thanks for highlighting. I forgot to update the image at step #10, now i did it. With respect to your comment, that image was taken while working on SP03 as IGW URL in SP03 listens on HTTP and 8080 port but in SP04, IGW URLs listen on HTTPS and admin port 8083/8084. (you can check this difference in your above comment).

      Coming back to your issue, i feel that when you try to access any entity set information its not reaching to ES1 server from your machine.

      Were you able to ping ES1 destination successfully under "DESTINATIONS" tab?

      Are you using any proxy settings in the browserwhile accessing this URL ? https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/

      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      hi Jitendra,

      i am getting the following problem while registering the service document with in Eclipse Kepler.i am able to login from SAPGui with same user id. but not through Eclipse.

      server version SMP3.0.

      i have done all the proxy and network settings in Eclipse.

      Capture.PNG

      regards,

      Prasad

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Hi Prasad,

      Are you able to open https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/ in a browser with same username and password?

      Can you verify if same proxy server settings are there in the browser and Eclipse>Network as well? Can you share the screenshot of the same?

      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      hi Jitendra,

      in Browser i am able to login, even i have checked with SAPGUI as well. attached Eclipse network settings.

      Capture.PNG

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      prasad sistla

      You have entered wrong proxy details. First check it in browser

      e.g. Chrome>Settings>Show Advanced settings>Network>Change proxy settings>Connection>LAN settings>proxy server

      Have you entered any address and port here? If yes, same you have to enter for HTTP and HTTPS.

      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      hi Jitendra,

      Find below Settings.

      Capture.PNGCapture1.PNG

      Still the same Error, am i missing anything?

      regards,

      Prasad

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      prasad sistla

      I was thinking you are using any proxy server to access any external service but as per below screenshot, proxy server is unchecked and you have selected automatic detect settings, means there is no proxy required to access the URL.

      Capture1.PNG

      You remove all settings in eclipse, restart it

      Capture2.PNG

      Author's profile photo Former Member
      Former Member

      Hello Jitendra,

      the problem with Office network, in home networking its working. but not able to create destination. Capture.PNG

      here is the latest logs:

      2015 01 15 11:15:12#+0530#ERROR#com.sap.gateway.core.service.repository.api.ServiceRepositoryAPIHandler##anonymous#http-bio-8084-exec-10###Error in fetching Destinations |

      2015 01 15 11:15:12#+0530#ERROR#com.sap.gateway.core.service.repository.api.ServiceRepositoryAPIHandler##anonymous#http-bio-8084-exec-10###DestinationConfigurationException- exception occured while getting the destination com.sap.gateway.core.service.api.exception.ServiceRepositoryAPIException: DestinationConfigurationException- exception occured while getting the destination

        at com.sap.gateway.core.service.repository.api.ServiceRepositoryAPIUtilityHandler.getDestinations(ServiceRepositoryAPIUtilityHandler.java:243)

        at com.sap.gateway.core.service.repository.api.ServiceRepositoryAPIHandler.getDestinationList(ServiceRepositoryAPIHandler.java:1935)

        at com.sap.gateway.core.service.repositoryService.RepositoryServiceODataSingleProcessor.getDestinations(RepositoryServiceODataSingleProcessor.java:285)

        at com.sap.gateway.core.service.repositoryService.RepositoryServiceODataSingleProcessor.readEntitySet(RepositoryServiceODataSingleProcessor.java:65)

      Regards,

      Prasad

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      prasad sistla

      Before creating destination, have you added HTTPS certificate into SMP3 keystore? Please check the steps in troubleshooting section 5. (Just added)

      Regards,

      JK

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Updated for SMP 3.0 SP05 runtime.

      Author's profile photo Former Member
      Former Member

      hi jitendra,

      my issue was resolved. thanks a ton.

      regards,

      Prasad.

      Author's profile photo Former Member
      Former Member

      Hi. Thank you for blog 🙂

      I have some problem.

      I all downloaded / install and configured but have problem

      <error><code/><message xml:lang="en">Cannot load JDBC driver class 'org.hsqldb.jdbcDriver'</message></error>

      but I copied hsqldb.jar and sqltool.jar from C:\hsqldb-2.3.1\lib\.

      What I create wrong ?

      Thank you

      Author's profile photo Nan Wang
      Nan Wang

      Hi Vahagn

      Please refer to this blog :http://scn.sap.com/community/developer-center/mobility-platform/blog/2014/01/09/how-to-connect-an-oracle-db-with-integration-gateway-in-smp3

      you can't copy jdbc driver directly, you need convert it to OSGi component and deploy. try it.

      Author's profile photo Former Member
      Former Member

      hsqldb.deploy.ok - > automatically don't convert and deployed ?

      Author's profile photo Nan Wang
      Nan Wang

      I don't think SMP can convert it automatically. In my case, I always do it as the blog explain. and then deploy the result to pickup folder.

      Author's profile photo Former Member
      Former Member

      don't help 🙁

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Vahagn Vardanyan

      There is no need to copy sqltool.jar file into pickup folder only hsqldb.jar is enough.

      I never converted hsqldb.jar into OSGi enabled jar, it worked without it.

      While accessing any OData service (for hsqldb JDBC) , make sure database is up and running.

      If you still see the same error, i suggest you to raise a new thread with steps followed along with screenshots.

      Regards,

      JK

      Author's profile photo Nan Wang
      Nan Wang

      Hi Jitendra

      how to find out if I need convert the driver to OSGi? Why oracle one need convert?

      Thanks.

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Nan Wang

      I am not sure why it did work for HSQLDB driver without converting it to OSGi. maybe you can raise a new thread to hear from experts.

      Regards,

      JK

      Author's profile photo Nan Wang
      Nan Wang

      got it thanks 🙂

      Author's profile photo Former Member
      Former Member

      can me help say, how is work pickup ? )

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Vahagn Vardanyan

      can me help say, how is work pickup ? )


      What exactly you are trying to say?

      Author's profile photo Former Member
      Former Member

      Hi,

      im following the tutorial but i can't get pass the step 6. I am not able to open the cockpit. it states as webpage is not available. Please advise

      2.PNG

      Thank you

      Author's profile photo Rakshit Doshi
      Rakshit Doshi

      Dear Chris,

      Please check if the SMP Server Services are running fine.

      If you are not able to view the cockpit it means your services are not running.

      Hope this helps,

      Thanks,

      Rakshit Doshi

      Author's profile photo Former Member
      Former Member

      Hi,

      Great how-to! I tried to follow the individual steps, but as soon as I hit "Test Connection" I get the following error: "Cannot read property 'statusCode' of undefined" I enabled Chrome console and there is a big stack of error messages. Does anyone know what this error means i.e. is there a real problem with the URL or is there something else fundamentally missing in my installation/connection?


      Thanks a lot!

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Nils Frkal

      Are you getting error at step #8? Can you share the screenshot of the same?

      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      Thanks for getting back to me so quickly ... yes, I get the error in step 8:

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Nils Frkal

      I really dont understand why this error is coming at this stage. 🙁   Can you try to refresh the page and then check?

      Looping Bjoern Woppmann for more assistance.

      Author's profile photo Former Member
      Former Member

      The error persists. I will try to reboot the SMP instance and will try again. Thanks.

      Just rebooted SMP. Unfortunately I still get this error.

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      I suggest you to raise a new SAP Support ticket.

      Author's profile photo Former Member
      Former Member

      Sure, thanks. Can you suggest a component I should raise this ticket under?

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      not sure.. may be under Sybase>Sap mobile platform

      what all do you see btw?

      Author's profile photo Bjoern Woppmann
      Bjoern Woppmann

      Hi Nils,

      possibly you are getting this error because you need to set up a proxy server to connect to the internet. Is this true? If so, you can set the proxy in the SMP Admin console ( https://smp:8083/Admin -> Settings -> System -> HTTP Proxy Settings ).

      Could you kindly check this?

      Thanks and regards

      Björn

      Author's profile photo Former Member
      Former Member

      Thanks Bjoern. I will check, but I am not aware that I am behind a proxy and we are also already successfully calling an external OData service (http://services.odata.org/OData/OData.svc) which is configured as application endpoint (not destination). However, I do see some more issues as the ping requests to some applications return a 403 forbidden error. So it might likely be some wrong/missing server settings. I need an expert to look into this I guess 🙂

      Thanks again and cheers, Nils

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Nils Frkal

      Check in your browser settings if you have set any proxy server to access any external resources. E.g. In chrome:

      Tools>Options>Network>Settings>Manual proxy configuration

      If yes, you have to set the same in Admin cockpit as Bjoern mentioned above.

      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      Jitendra Kansal

           Am having problem with 12th step.Getting Error when trying to access entity set.

      https://smpserverip:8084/gateway/odata/SAP/SAMPLEFLIGHT;v=1/CarrierCollection('AA')


      error : Requested entity could not be found.SAMPLE.png

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Glanet Carol

      1. What is the SMP3 runtime version?
      2. Are you able to ping the destination?
      3. Have you registered service as per step #9?
      4. Are you able to execute https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/CarrierCollection%28%27AA%27%29

      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      Jitendra Kansal

      1.SMP3 SP6

      2.Yes .Pinged Sucessfully.

      3.Yes as per step #9.

      4.Able to execute https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/CarrierCollection

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Can you also verify that you have given namespace as IWBEP as per step #5 for the same entityset CarrierCollection?

      Are you getting the same error when you execute other entity set information?

      e.g.

      https://smpserverip:8084/gateway/odata/SAP/SAMPLEFLIGHT;v=1/TravelagencyCollection

      Author's profile photo Former Member
      Former Member

      Jitendra Kansal

      Yes am getting the same error when executing other entity set.

      https://smpserverip:8083/gateway/odata/SAP/SAMPLEFLIGHT;v=1/TravelagencyCollection

      My Odata Service is deployed in 8083 port

      Author's profile photo Former Member
      Former Member

      Jitendra Kansal

      In the Step 7 - Destination URL field as you mentioned like below, But I don't have sap client machine, Is there any alternative to Destination URL.

      Note : I'm using SP06 Runtime server and OS Mac X.

      Thanks & Regards,

      VK.

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Vamsi Konanki

      you are adding a destination for a given SAP system right? When you search the url as per How to check SAP system URL?How to check SAP system URL?what do you get?

      You may also check it with backend team.

      Regards,

      JK

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Updated for SMP 3.0 SP06 Runtime. Slightly change in step#7

      Author's profile photo Hemendra Sabharwal
      Hemendra Sabharwal

      Thanks for sharing nice & detailed blog Jitendra. But unfortunately I am facing a error, please see below screen for your reference, however this error is coming only when I am trying to see the "Entity Set" - and for ALL entity sets (I have revisited, step 5/9 & 10):

      Capture1.PNG

      Although, SAP Gateway system exposed odata, can also be configurable as the endpoint URL for the app without creating via odata modeller and this url is not giving me any error for the same entity sets.

      Capture2.PNG

      1.SMP3 SP5

      2.Pinged Sucessfully.

      3.Yes as per step #9 & #10.

      4.Able to execute below Gateway service

      Capture3.PNG

      Please suggest on above problem.

      Thanks,

      Warm Regards

      Hemendra

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Hi Hemendra,

      I somehow couldnt get your query clearly.

      1. Are you able to execute backend url (without SMP) and respective SalesOrderCollection entityset?

      2. Have you imported backend HTTPS certificate? if required

      Regards,

      JK

      Author's profile photo Hemendra Sabharwal
      Hemendra Sabharwal

      Hi JK,

      Thank you so much for taking out time and responding to my concern.

      I followed the way you suggested in your blog - using odata modeler designed in eclipse and trying to access endpoint url exposed by SMP - It is not working, specifically entity sets, however the base url exposed by SMP is showing all the entity sets. But on requesting entity sets giving error (Pic-1 above in my comment).

      And the SAP gateway exposed url,  configured in SMP (Step #9 above in your blog, where you are directly accessing Gateway url in SMP and SMP produced endpoint url is mapped to modeler url) - So this gateway url exposed through SMP is also giving me the expected result set in all the entity sets (as Pic-2 in above comment). I hope, I am able to give you the clear understanding of my problem. Please see replies to above raised points 1 & 2.

      1. Yes, I am able to fetch the data from back-end url (without SMP, only SAP gateway url) and also the respective entity sets (As shown in Pic-3 above, it is fetching the data).

      2. No, I haven't imported back-end HTTPS certificate, because my SAP Gateway is on-premise demo system and Gateway services are exposed with basic authorizations (HTTP). To my understanding "Importing of certificate" is required when there is secured connection established between SAP gateway and SMP - Is it correct? Or it is the necessary condition to import the back-end certificate, please advice. So the demo landscape is as follows: ECC to SAP Gatewa - HTTP, SAP Gateway to SMP - HTTP and SMP yields HTTPS endpoint url.

      Thanks,

      Warm Regards

      Hemendra

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Hi Hemendra,

      I got your query now.

      Can you check once again the namespace given for entityset as per step #5? It should be same value as for ZGW_EPM_SO_SRV (backend) as shown in step #9. For my case it is IWBEP.

      If you have already checked and still facing the same issue, i will ask you to share similar screenshots as step #5, 7 and 9.

      I will also suggest you to increase log level settings + Enabled in Admin cockpit for Integration Gateway and look into log file for troubleshooting.

      Regards,

      JK

      Author's profile photo Hemendra Sabharwal
      Hemendra Sabharwal

      Thank you so much JK, now I am able see entity sets details.

      Warm Regards

      Hemendra

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Hemendra Sabharwal

      Good to know. btw What you missed?

      Author's profile photo Hemendra Sabharwal
      Hemendra Sabharwal

      Step #5? It should be same value as for ZGW_EPM_SO_SRV (backend) as shown in step #9.

      Thank you Sir.

      Warm Regards

      Hemendra

      Author's profile photo Former Member
      Former Member

      Hi Jitendra Kansal when i follow your tuitor . it work perfect, but when i use odata service i created in my sap back end (SAP ERP 6.0- EHP7) ,i 'm facing with error like this, can you help me .Thanks !

      /wp-content/uploads/2015/04/error_688841.png

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Minh Hoa Le

      I am not sure what is causing this issue.Can you check if you are able to execute backend url registered in GW cockpit for a given destination? Follow step 7,8 and 9.

      You may share screenshots also. I will also suggest you to increase log level settings + Enabled in Admin cockpit for Integration Gateway and look into log file for troubleshooting.

      Regards,

      JK

      Author's profile photo Former Member
      Former Member

      One of the best .

      Thanks Jitendra Kansal

      Author's profile photo Former Member
      Former Member

      Hi JK,

      When I click "open service document", I'm able to browse the RMTSAMPLEFLIGHT but failed for SAMPLEFLIGHT. Please help.

      Update : I had open a discussion for this, Hope you can help me.

      SMP3 - Custom service failed

      Thank you.

      Regards,

      Choong

      Author's profile photo Vishnu Pankajakshan
      Vishnu Pankajakshan

      Jitendra Kansal

      'Keytool' is recognized as an internal or external command

      Regards,

      Vishnu

      Author's profile photo Vishnu Pankajakshan
      Vishnu Pankajakshan

      i got it ...!!! 🙂 i gave path for  keytool which is present in bin folder of jre directly in the command line..

      "C:\Program Files\Java\jre7\bin\keytool" -import -v -alias sapgatewaycert -keystore smp_keystore.jks -storepass brlsm

      p123 -file D:\Certificates\ES1.cer

      Regards

      Vishnu

      Author's profile photo Former Member
      Former Member

      Hi Jitendra,

      Very helpful blog!

      Can you please suggest any doc which refers to the consummation of ODATA service for a given SAP datasource using SMP 3.0.

      Not getting any data when trying to call odata service from SMP Server, Guess SMP takes something more.

      Regards,

      Shalini Mathur.

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      shalini mathur

      Could you share what all steps you have followed? I would suggest you to raise a new thread for your query.

      Regards,

      JK

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Added: how to do CUD operation with OData service connecting to SAP system. (Above 'Troubleshooting' section)

      Author's profile photo Saurabh Mishra
      Saurabh Mishra

      Thanks JK nice blog.


      But I have one Q, Why are we following above all the steps, because I have observed that any OData service exposed from ECC can be directly registered in SMP Gateway Cockpit. Could you please suggest me on the same?


      Thanks & Regards

      Saurabh

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Saurabh Mishra

      If you already have an OData service that has been exposed via SAP NW gateway, you can directly use it as OData proxy in SMP. But if you have more than one OData services connecting to different backend systems, you could do mash-up using IGW. So here i showed how an SAP system service can be converted into IGW service and later could be used for mash-up.

      If you have any further questions, feel free to post at SMP Developer Center

      Regards,

      JK

      Author's profile photo ' Pavan ' Golesar
      ' Pavan ' Golesar

      Hi,

      redirected by your twitter link 😆

      Thanks,

      Regards,

      Pavan

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Updated for SMP runtime 3.0 SP09

      Author's profile photo Jonathan Baker
      Jonathan Baker

      Just FYI.

      The Gateway ES1 system has been retired.  The new server, ES4, is up and running.  Instructions for signing up are here:  Sign up and get started with the SAP Gateway - Demo Consumption System

      the URL's that point to sapes1 will stop working on or around Feb 28, 2106.

      Author's profile photo Jitendra Kansal
      Jitendra Kansal
      Blog Post Author

      Updated with new SAP Gateway Demo system (ES4) settings.

      Author's profile photo Martin Buschlüter
      Martin Buschlüter

      Hi Jitendra, thanks for this contribution and keep rocking!