Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF BC REST API: How to pass input to ArrayList parameter in JSON

Subba Rao BhamidipatiDec 20 2018 — edited Dec 24 2018

Hi,

We are exposing "Custom JAVA Method" written at VOImpl via ADF BC REST interface.

Our custom method as "ArrayList" as input parameter to accept list of "ID's" and use them in custom method logic.

When I deploy my ADF BC app and try to test from POSTMAN, I am getting below error:

Below is the method signature:

public String processInvoiceHolds(ArrayList inv_ids, String holdStatus){}

Request:  Tried passing as JSON array

{

    "name": "processInvoiceHolds",

    "parameters": [

        {

              "inv_ids":["10010", "10011"]

               "holdStatus": "N"

         }

    ]

}

Response:

{

    "type": "HTTP://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",

    "status": 400,

    "title": "Bad Request",

    "detail": "The request content does not represent an action or it has an invalid structure."

}

I was able to execute other custom methods which as only primitive data types like "String" and "integer".

Comments
Post Details
Added on Dec 20 2018
4 comments
1,721 views