on 04-12-2017 12:14 PM
Dear All,
Does REST sender adapter can convert below JSON format where the "Driver" is an array.
JSON message as input to adapter:
{
"Driver": [{
"id": "A1",
"FirstName": "John",
"LastName": "Luis"
}, {
"id": "A2",
"FirstName": "Stefan",
"LastName": "Burd"
}
]
}
Expected XML message after conversion:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_Driver_C_Req xmlns:ns1="urn:xxxx.om:SAP_DriverMaster">
<Driver>
<FirstName>John</FirstName>
<LastName>Luis</LastName>
<id>A1</id>
</Driver>
<Driver>
<FirstName>Stefan</FirstName>
<LastName>Burd</LastName>
<id>A2</id>
</Driver>
</ns1:MT_Driver_C_Req>
I'm using "Add Wrapper Element" to add message type name (MT_Driver_C_Req) in the result XML. But I couldn't fixn any option to get the Driver array from Json in adpater. There is an option to have conversion rule but it seems that applies to response side of it.
Hi Abdulgaffar
Have a look in below blog.
https://blogs.sap.com/2014/12/18/pi-rest-adapter-blog-overview/
Regards,
Roshan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.