cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming REST service with PI

shabbir_mohmad
Participant
0 Kudos

Hi Experts,

My scenario is:

SAP (synchronous) -> PI -> REST (synchronous)

send req. from SAP and get the response from REST.

REST url : http://xxx.com/dataReq?{Airline}&{StartDate}&{EndDate}&{OldData}

Requirement is while sending a request from PI, we have to encrypt the query string ({Airline}&{StartDate}&{EndDate}&{OldData}) and get the response from REST.

Encryption we are doing in PI mapping.

From PI, I have developed a structure with fields Airline, StartDate, EndDate,OldData and did the mapping for encryption (with udf).

Now how do I send this encrypted content to endpoint url?

I have taken ref. from http://scn.sap.com/docs/DOC-60856 and developed accordingly, but in receiver adapter what should I give for X-path expression?

I need to pass encrypted values to url, so target values (from mapping) should be passed.

But I believe X-path is applicable for sender structure, so please put your ideas.

Due some restrictions, I can't add config. screen-shots.

Update me in case anything else is required.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member198060
Participant
0 Kudos

I am not sure what you mean by encryption of the query string. Should the whole GET parameters be encrypted as one parameter that is being passed or should the single parameters be visible in the browser and only the values are being encrypted?

Either way, you could put each value into dynamic configuration in the mapping and then assign them to your URL by using Value Source = Adapter specific attribute in the channel configuration.

maheswarareddykonda
Active Contributor
0 Kudos

Hi,


REST url : http://xxx.com/dataReq?{Airline}&{StartDate}&{EndDate}&{OldData}

Your URI seems depending on data , uri need to be formed.

and yes you can use xpath at receiver channel too..whatever you have mentioned names between  { } all you will have to declare in xpath option..below is the reference.

ValueSource: Xpath expression

Pattern element name: Airline

Xpath expression: here need to give pathfrom where you need to get that data against that Airline

former_member186851
Active Contributor
0 Kudos

Hello Sp,

But I believe X-path is applicable for sender structure, so please put your ideas

You can give the target Xpath as well,After mapping the XPaths of the target structure.