cancel
Showing results for 
Search instead for 
Did you mean: 

REST Sender support JSON Arrays?

former_member240483
Contributor
0 Kudos

Hi Team,

We are working on REST-RFC sync interface and we are having issues with response structure multiple occurences , I would like to know whether JSON response supports JSON arrays?Like the case of XML 0 to unbound.

Thanks,

PT

Accepted Solutions (1)

Accepted Solutions (1)

vadimklimov
Active Contributor
0 Kudos

Hi PT,

Yes, arrays are supported in JSON - REST adapter can process them both in request and in response. Do you have any specific issue /error during array processing in JSON by REST adapter, or is it more a question about technical feasibility?

Regards,

Vadim

former_member240483
Contributor
0 Kudos

Hi Vadim,

Thanks for you response , I am working on sync interface and in Response i have 0..unbound structure.

Response working fine with JSON if i am passing only one record and it is failing with application error if i pass multiple records or multi levels strctures.

E.g:

Order:

Response

  RequestNo

  Message

working fine

-----

Order:

Response1 :

  RequestNO1

  Message1

Response2

  RequestNo2

  Message2

Error:

Message

Not working

Please let me know do i need to change anything in Channel or structure level to make it work.

Thanks,

PT

vadimklimov
Active Contributor
0 Kudos

PT,

By default, you don't have to change anything in a communication channel to make this working.

I would suggest to start from checking definition of a message type used for response messages - does it have correct occurrences for elements that should appear multiple times and form an array content?

If functional enhancement described in SAP Note 2175218 has been applied, please also check that there is no specific XML/JSON conversion rule created for affected payload element - e.g. the one prescribing processing of an element as a non-array element (by default, it is not enabled, but it is worth checking if any specific customizing was performed in a communication channel).

If this has already been checked, but the error remains, please post error details here.

Regards,

Vadim

former_member240483
Contributor
0 Kudos

Hi Vadim,

It is working now..my mistake with resp structure.

Thanks for your time and help.

Thanks,

PT

Answers (0)