cancel
Showing results for 
Search instead for 
Did you mean: 

SMP IGW Rest service tool issue

Former Member
0 Kudos

Hi,

  I am building an Odata model for a rest service

Rest Service is URI:

          http://localhost:8080/javaservice/webresources/notification

The above service is a POST service hence I wanted to create a "Create" connection in the Odata model using custom coding.

The SMP version is 3.0 SP06 and using Eclipse Kepler for OData modeling and the Api toolkit for SMP version is 1.4.1.

With the above information following are the 2 errors that I am seeing

1. When creating the OData model in Eclipse if I select "Target runtime as SP06" then when the Model is created and I perform "Select Data Source" and select "Rest Service" as data source and select "Create" then Finish button gets disabled and shows "Operation is not supported". But if the Target runtime is SP07 then it allows.

         I have followed Carlos Roggan's blog and not sure why for SP06 its not allowing me to do a "Create" operation.

2. For now I have created a Odata model for the above rest webservice using "Query" operation and added the Service as a Endpoint to SMP application.

SMP Hybrid Application Endpoint URL is :

https://shbsm2.groupc.net:8083/gateway/odata/SAP/RESTSERVICETEST;v=3

When I am trying to access the Odata model using the below URL via POST

http://localhost:8087/com.lehigh.test/NotificationObjSet

or

http://shbsm2.groupc.net:8087/com.lehigh.test/NotificationObjSet

I have passed necessary headers

Authorization

X-SMP-APPCID

X-CSRF-Token

Along with the POST payload. The SMP does the authentication and its successful but after that doesnt connect to the above service and gives and error response "403 Access to the specified resource has been forbidden."

Any suggestions will be helpful.

Regards,

Amit

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Amit,

1) With latest release SMP3 SP07 server, SMP supports full CRUD on REST data source. Till SMP3 server SP06 only query and read were supported. Read here

2).How come you doing a POST for Query operation? I don't get it.

<<Please hide all your company related info host name, ip address>>

Upgrade to SP07 to take advantage of full features of REST services.

Regards,

JK

Former Member
0 Kudos

Thanks JK for quick response.

    

So as I understand with SMP SP06 I will not be able to do POST operation on rest service and that is the reason 403 error is coming.Please confirm.

I was trying to figure out if POST works through query operation since in the blog the Create operation was enabled for SP06. I got confused with that.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

In SP06, you can do only READ and QUERY for REST service data source. With SP07 release it is fully supported. Check below SAP note

http://service.sap.com/sap/support/notes/1931374

Former Member
0 Kudos

Hi JK,

I am working on SMP with SP09. When I am calling the odata from adroid app or postman it is giving me 403 forbidded error when I am using POST operation. Is there any setting in SMP or do I need to pass anything else to the request. We dont have any CSRF tokens.

Thanks in Advance,

Siva Kumar

Former Member
0 Kudos

Hi Siva,

          For any POST operation there are few parameters that needs to be sent, CSRF token is one of them.

Can you please provide more details about how you are trying to connect via Rest Client [screenshots].

Also POSTMAN application has some issue and I have faced the similar problems with that. I have used Advance Rest Client on Chrome.

Regards,

Amit

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

This post has already been closed, please raise a new question.

Regards,

JK (Moderator)

Answers (0)