Skip to Content
avatar image
Former Member

How to pass Array"[ ]" for single lineitem in response REST JSON

Hi,

REST to SOAP synchronous is my scenario.

JSON request is sent from REST to SOAP and while sending response back to REST in JSON format, for multiple lineitems Array "[ ]" is passing fine but for single item "[ ]" is not passing. Source system required Array "[ ]" for both single and multiple line items.

Please suggest.

Regards,

Vinoth

*******************************

  • Multiple Line item:

"ListOfPartsItem": {

"Parts": [

{

"OrderQuantity": 1,

"BillTo": "Customer",

"AgreegateDescription": "Entire Vehicle",

"MaterialDescription": "WIPER-BLADE RUBBER",

"PJobCardId": "1-JEN16S",

"Aggregate": "ENTIRE VEHICLE",

"Make": "MAKE",

"MaterialNo": "8240127",

"UnitofMeasure": "Piece"

},

{

"OrderQuantity": 7200,

"BillTo": "Service Measure",

"AgreegateDescription": "Entire Vehicle",

"MaterialDescription": "SEALING ADHESIVE / TAPE, BUTYL RUBBER",

"PJobCardId": "1-JEN16S",

"Aggregate": "ENTIRE VEHICLE",

"Make": "MAKE",

"MaterialNo": "9890171",

"UnitofMeasure": "Millimeter"

},

{

"OrderQuantity": 2,

"BillTo": "Service Measure",

"AgreegateDescription": "Entire Vehicle",

"MaterialDescription": "SEALING FILM / DRIV.DOOR/LH",

"PJobCardId": "1-JEN16S",

"Aggregate": "ENTIRE VEHICLE",

"Make": "MAKE",

"MaterialNo": "7270330",

"UnitofMeasure": "Piece"

}

]

}

  • Single Line Item:

"ListOfPartsItem":{

"Parts":

{

"OrderQuantity":1,

"BillTo":"Service Measure",

"AgreegateDescription":"Entire Vehicle",

"OldPrice":"",

"MaterialDescription":"LU NON-AC",

"PJobCardId":"1-7O3O3",

"Aggregate":"ENTIRE VEHICLE",

"BasicPrice":0,

"Make":"MAKE",

"MaterialNo":"5010003",

"SourceLocation":"Trident Parts",

"UnitPrice":"",

"UnitofMeasure":"Piece"

}

}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 12 at 09:58 AM

    Hi Vinoth,

    In the REST sender communication channel, while declaring Custom XML/JSON conversion rules, specify the Name as "Parts" and ArrayType as "true".

    --Priyanka

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Priyanka,

      Thanks for your prompt response. In our current SP we don't have this option. updated to latest SP, and solved this issue.

      Regards,

      Vinoth