Dynamic Array as an input field to a service

NaturalONE - Software AG Designer 10.11

Development

I successfully developed a subprogram with dynamic array as one of the input fields, tested in DDL Tester. Can’t get syntax to pass as a REST Service.

Access to a non-materialized X-array field not permitted

The part about the REST service is a bit outside my wheelhouse but I do know that a dynamic array must be initially sized before it can be referenced.

There is a RESIZE AND RESET ARRAY statement for that purpose.

Mick Fitzpatrick - 301-529-8022
Expert Technology Consultant

Just a guess, but did you have an initial allocation size?

You may have to have an initial sizing on the client side??

Is your REST service configured to accept a POST request? Does your REST client provide a document to be posted? Are you sending JSON (application/json) or XML (application/xml or text/xml)?

Calling Natural from REST

Note particularly: GET method applies only to APIs where input signature parameters do not contain arrays. To use input arrays, you will need to POST a request document.

Kathy predicted you would provide the answer! I am indeed doing a GET, which I am told is correct for retrieval only, but I like the POST and having a JSON Body much better. Thanks!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.