$(function () { pageContext.i18n.modTalk = 'moderation talk'; pageContext.i18n.replyToComment = 'Reply'; pageContext.i18n.modTalkEmpty = 'moderation talk is empty'; pageContext.url.getModTalk = "/comments/%25ID%25/listModTalk.json"; pageContext.url.possibleCommentRecipients = "/comments/%ID%/possibleRecipients.json"; pageContext.url.commentEdit = '/comments/%25ID%25/edit.html'; pageContext.url.commentView = '/comments/%ID%/view.html'; pageContext.i18n.commentVisibility = { 'full': 'Viewable by all users', 'op': 'Viewable by the original poster', 'mod': 'Viewable by moderators', 'opAndMod': 'Viewable by moderators and the original poster', 'other': 'Advanced visibility', 'dialogTitle': 'Comment visibility', 'selectGroups': 'Visible to groups', 'selectOther': 'Other recipients', 'selectOriginalPoster': 'Original poster', 'selectModerators': 'Moderators', 'selectAssignees': 'Asked to answer users' }; pageContext.i18n.commentMenuLabels = { 'comment-edit': 'comments.menu.edit', 'comment-delete': 'comments.menu.delete', 'comment-convert': 'comments.menu.convert' };pageContext.i18n.answer= { bestAnswer: 'Best Answer', controlBar : { accept: 'Accept', unaccept: 'Unaccept', acceptCommand: 'Accept this answer as correct', cancelAcceptedCommand: 'Remove this answers accepted status' } }; window.croles = { u: false, op: false, m: false, og: false, as: false, ag: false, dc: false, doc: false, eo: false, ea: false }; tools.init({ q: { e: false, ew: false, eo: false, r: false, ro: false, d: false, dow: false, fv: false, c: false, co: false, p: false, tm: false , ms: false, mos: false }, n: { f: false, vf: false, vfo: false, vr: false, vro: false, c: false, co: false, vu: false, vd: false, w: false, wo: false, l: false }, c: { e: false, eo: false, d: false, dow: false, ta: false, tao: false, l: false }, a: { e: false, ew: false, eo: false, d: false, dow: false, a: false, aoq: false, ao: false, tc: false, tco: false, p: false, tm: false }, pc: croles }, { tc: true, nsc: true }); commandUtils.initializeLabels(); }); Skip to Content
0

SAP PI REST Headers

Jan 20, 2017 at 12:00 PM

460

avatar image

Hi all,

we have a integration AAE IDOC --> Rest service, we need to report in headers the next: 1. X-Tenant-ID: a one IDOC field

2 Content-Type: "application/json

3. Authorization: "Bearer {{AccessToken}}".

I review several post but i dont have clear the way to do this. In my receiver rest channel I dont have the tab HTTP Header.

Please could help us with this issue?

Thanks in advance Regards

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

7 Answers

Vadym Diachenko
May 11, 2017 at 09:58 AM
1

Hello Monica,
Custom HTTP headers in REST adapter are available from 7.40 SP10 onwards.

Best regards,
Vadym

Share
10 |10000 characters needed characters left characters exceeded
Manoj K Jan 20, 2017 at 01:24 PM
0

Monica ,

Rest Adapter does support HTTP headers , I believe you are in low level SP or You don't have the Latest Metadata check below blog.

https://blogs.sap.com/2015/04/14/pi-rest-adapter-define-custom-http-header-elements/

Br,

Manoj

Share
10 |10000 characters needed characters left characters exceeded
Monica Gonzalez Jan 23, 2017 at 09:14 AM
0

Hi Manoj,

My PI system have a SP 9 level, the SP level is low fot this functionality? we need this tab in the PI channel to send this information ?

1. X-Tenant-ID: a one IDOC field

2 Content-Type: "application/json

3. Authorization: "Bearer {{AccessToken}}".

Is there another way to get this functionality?

Thanks and regards

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Monica ,

Can you please let us know what is the PI version ?

Rest HTTP header are supported 7.31 SP15 / 7.4 SP10 as described in the blog.

yes you need that tab in PI channel to include those headers.

Br,

Manoj

0
Monica Gonzalez Jan 23, 2017 at 10:17 AM
0

It Is a PI 7.4..,

Regards

Share
10 |10000 characters needed characters left characters exceeded
Monica Gonzalez Feb 07, 2017 at 03:38 PM
0

Hi all,

@Eng Swee Yeoh

I reviewed your post about convert Json to XML with a module https://blogs.sap.com/2015/03/18/jsontransformbean-part-2-converting-xml-to-json-content/

We need send values in HTTP header but my Rest adapter don't have the tab HTTP Header. Do you know how could do this with a custom module?

Thanks and regards

Share
10 |10000 characters needed characters left characters exceeded
Johann Marty May 09, 2017 at 06:01 PM
0

Hello, We have the same issue, do you have any update ?

We are using a CC REST to send a request to AX Dynamics and it's like the HTTP headers are not taken into account. If we test in Google chrome with the REST tester it's working.

We are in SAP PO 7.50

Thanks

Share
10 |10000 characters needed characters left characters exceeded
Monica Gonzalez May 10, 2017 at 03:38 PM
0

Hi Johann,

I didn’t find a solution with rest adapter..because our PI version dont have the HTTP header tab.

I found a alternative solution, change the interface to IDOC–>PI–>IDOC (ack change the idoc status if the call to Rest service fail)

i’m calling the post rest service with HTTP header parameters from message mapping with a java code,

There are several information un Java webs: http://stackoverflow.com/questions/2793150/using-java-net-urlconnection-to-fire-and-handle-http-requests

Regards

Share
10 |10000 characters needed characters left characters exceeded