cancel
Showing results for 
Search instead for 
Did you mean: 

REST RECEIVER CHANNEL: XML TO JSON CONVERSION

0 Kudos

HI all,

I have a synchronous scenario. ECC --> PI --> REST --> PI --> ECC

In the Rest request, I have an item node with 0..unbounded occurrence. So, it can have either multiple items or single item.

Receiver REST communication channel is converting XML to JSON. However, when item has only a single record, the JSON strucutre is not right. It appears like this:

"Item" : { "ItemId" ; "1", "ItemDescription" ; "abc"}

and it should be like this:

"Item" : [ { "ItemId" ; "1", "ItemDescription" ; "abc" } ]

I know there is an enhanced JSON conversion for sender REST channel but I don't see a similar option with request for receiver REST synchronous scenario.

How is this possible with PI?

Thanks and regards

Carme

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member192851
Active Participant
0 Kudos

you need to add parameters to the REST channel (Array Type = true for Item)

rasjoshi
Contributor
0 Kudos

Hi Carme,

I think you need to have proper SP level. I have SAP PI 7.4 and I can see that option with my REST receiver channel.

Please try to explore SAP NOTES for the same.

Do let us know if you find solution 🙂

BR,

Rashmi