cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos
1,152

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"

}

}

Accepted Solutions (1)

Accepted Solutions (1)

PriyankaAnagani
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Answers (0)