cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding REST Adapter

Former Member
0 Kudos

Hi Team,

We have recently upgraded new PI version 7.31 SP15. We  need restful web services to get data from SAP system to third party system ,I got the information in SDN for restful web services, SAP was introduced REST Adapter.

I am new to REST adapter. I have configured all the steps in ESR and  struck in REST adapter configuration. Could you please help on configuration of rest adapter and how to check the interface. Please help on this.

Thanks

Ravi

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member188353
Participant
0 Kudos

Hi Ravi, can you please provide the end to end scenario for the Receiver REST. Regards, P R.

maheswarareddykonda
Active Contributor
0 Kudos

Hi Ravi,

SAP providing REST adapter from 7.3 SP14/ 7.4 SP09 and you are on already above this, so you can use the Rest adapter to connect REST web services.below is the link to configure the REST adapter ,and it covers almost all possibilities, if you stuck while you develop you can let us know.

BR,

Maheswarareddy

Former Member
0 Kudos

Hi Maheshwara ,

I have configured one POC scenario Like  FILE-PI-Rest, we are receiving empid from file and update in Rest service. I have configured Rest adapter(recv) and given below URL in REST URL .

http://PIHOSTname:port/RESTAdapter/Row/EMPID.

I get the attached error in REST recv Adapter. Could you please help me out from this issue. Please provide me exact format of Rest URL.


Thanks

Ravi

maheswarareddykonda
Active Contributor
0 Kudos

Hi Ravi,

Error seems you don't have authorizations

so can you please test data from POSTMAN tool which is for test REST API and which is provided by google.below is the link for the same.

Postman - Chrome Web Store

Note: use only Chrome to test.

and coming to URL, please use below ways.

http://PIHOSTname:port/RESTAdapter/Row/122334444

http://PIHOSTname:port/RESTAdapter/Row?EMPID=122334444

Note:122334444 is EMPID

also in HTTP Header tab , please try to add header name as "Authorization" and Value is Base64 user credentials( this one you check in google to convert credentials) like below

BR,

Maheswarareddy

Former Member
0 Kudos

Hi Maheshwara,

Thanks for your suggestions. As per your suggestion I change the URL values and Http header values, now I  am receiving following error. Could you please help me.

"" HTTP POST call to
http://XXXXXXX:50000/RESTAdapter/Row?EMPID=122334444 not
successful. HTTP/1.1 403 Forbidden""

Thanks

Ravi

Former Member
0 Kudos

Hi Ravi,

Are you able to send the rest request via POSTMAN tool?

1st try to send the request from that tool and see what response you get.

Regards,

Santhi

maheswarareddykonda
Active Contributor
0 Kudos

Please test in POSTMAN which i suggested earlier,,in case you get same error there also..there must be specific roles required to user which you are using now.please check with REST server team.

BR,

Maheswarareddy

Former Member
0 Kudos

Hi Santhi,

I am receiving same error in POSTMAN Toll also. Please check below screen shot.

maheswarareddykonda
Active Contributor
0 Kudos

i thought you suppose to get data from REST server depends on EMPID ,as per your previous posts.

also your screenshot not showing any data if you trying for post method..however its related to that error.

if you are trying to get data from REST server please use GET method(select GET radio button in POSTMAN tool). you still get error..i suggest you to get in touch with REST team.

BR,

Maheswarareddy

Former Member
0 Kudos

Hi Maheshwara,

I am facing issue in  FILE-PI-Rest service scenario, currently i am using REST receiver adapter and facing issue in rest receiver adapter.

Thanks

Ravi

Former Member
0 Kudos

Hi Ravi,

If you want to read the data from any system you should use GET method.

According to your initial post of this thread I assume that you want to read data from SAP system and you need to send it to 3rd party system via rest.

So I also assume that you are using receiver rest adapter to send the data to 3rd party system?

Can you please elaborate?

Regards,

Santhi

Former Member
0 Kudos

Hi Santhi,

Actually my requirement is, we need data from SAP system to third party system. But currently I have configured one POC scenario like FILE-PI-REST  to test REST adapter .

Now I am facing issue in REST receiver adapter.

Once I complete the end-to end  scenario, I will develop other scenario like  Third party <->PI<->SAP.

Thanks

Ravi

Former Member
0 Kudos

Hi Ravi,

Ok.  So, in your POC you are using receiver rest adapted and you sending EMPID 123344 to rest service.

Make sure you call the rest service which exists. and try to send the request from POSTMAN like below.  Don't put  /rest adapter/empid =1234 in the URL when testing from POSTMAN.

try to send the request like below.

Regards,

Santhi

maheswarareddykonda
Active Contributor
0 Kudos

I Agree with santhi,


URL which i suggest is for only GET method...not for POST and PUT.


for POST and PUT we suppose to send something data in payload.


i think its pointless you creates POC(file to REST), since your interface synchronous that too Third party <->PI<->SAP.


all you have to concentrate on URL and test in POSTMAN tool. if there works defenetly will work with that same URL in PI also

dipen_pandya
Contributor
0 Kudos