Skip to Content

After many hours of struggle to get the SMP cloud to communicate to the SAP Netweaver Gateway i am jotting down my findings. I was trying to get the list of flights using the call to the  http://gw.esworkplace.sap.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2

1) Got to the SMP trial offering and create a new application (application name: Flight) and in the Backend tab and put the endpoint as http://gw.esworkplace.sap.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2 If you dont want to pass the username and password from the outside call then you can hardcode the username and password in this step by selecting the Allow Anonymous Connection. I select “Internet” from the radio buttons as the GW system is not in the same environment of the SMP.


2) Click on Authentication tab and create a new security profile and select basic authentication and use the same url used in step 1 for the endpoint.

In order to test the this i was using the RestClient plugin in Firefox.

1) Select the Method as Post and enter the url to the public collection.

Ex: https://<SMPcloudBase>/public/odata/applications/latest/Flight/Connections


2) Add the following headers.

Header: Content-Type

Value: application/atom+xml

Header: X-SUP-APPCID

Value: Flight (this value has to be a unique value as the SMP use this distinguish application connections)


3) Add Authentication to the service call. (this would be the username and password for the SAP Netweaver Gateway)

Username: GW@ESW

Password: ESW4GW

4) Add the request body for the call.

<?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“><title type=”text”/><updated>2012-06-

15T02:23:29Z</updated><author><name/></author><category term=”applications.Connection”

scheme=”http://schemas.microsoft.com/ado/2007/08/dataservices/scheme“/><content type=”application/xml”><m:properties>

<d:DeviceType>iPhone</d:DeviceType><d:DeviceModel m:null=”true” /> <d:ApnsDeviceToken

m:null=”false”>a8fffc287378557c121d3b65b4109fbeecda2eaa29177284b725fca145b72ff2</d:ApnsDeviceToken></m:properties>

</content></entry>

5) Click on the send button and check the return code and if the call was successful you will get a 201 result and in the SMP portal you would see new connection under Applications->Application Connection make sure the status of it is registered.

6) Now you can finally retrieve your flights using the following url.

Ex: https://<SMPcloudBase>/public/Flight

FAQ: 403 forbidden

The trial version of the SMP has a limit of 25 calls per day so dont freak out if you see a 403 forbidden check the error message 🙂

“Operation is rejected by server. Maximum allowed requests for a day in trial space for an application connection are 25 and the limit has been crossed.”





To report this post you need to login first.

12 Comments

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

  1. Matthias Steiner

    Hi Yohan,

    thanks for writing down your experiences with SMP – it sure will be helpful for others to get started!

    Oh and about the 25 request threshold… let me push back on that front. 25 calls a day seems to be very limiting to my ears!

    Cheers,

    Matthias

    (0) 
    1. Yohan kariyawasan Post author

      Yeah, specially during the time of building and debugging you can easily go through 25 requests. It would be greatly beneficial for if the number of requests to be more than 25.

      (0) 
  2. Njål Stabell

    Hi Yohan,

    Thanks for the post! You saved me quite a bit of time figuring out how to register the Application connections and get the connection ID’s. Anyhow, now I’m able to run Neptune apps in the SMP Could which is pretty cool and should be useful for our customers 🙂

    Cheers,

    Njål

    (0) 
  3. Sharon Zehavi

    Hi Yohan,

    Would you know if it’s possible to connect to an https service on GW using the Secured Cloud Connector? I’m getting 401 error.when trying to register a user.

    “This request requires HTTP authentication”.

    Any idea?

    Thanks.

    (0) 
  4. Shashank Marathe

    Hi Yohan,

    I am getting 401 Unauthorized when I was testing my application on RESTClient. I have installed RESTClient plug-in in chrome….

    Error details are as follows.

    401 Unauthorized

    “Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.”

    What must be the problem.?

    Thank you.

    (0) 

Leave a Reply