Skip to Content
0

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

Apr 12 at 06:06 AM

56

avatar image

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"

}

}

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Priyanka Anagani Apr 12 at 09:58 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded