on ‎2016 Jul 28 11:13 AM
Hello,
I am using REST Adapter to receive JSON format message in PO.
the normal XML work for me, but when we have ATTRIBUTES in our strucutre then the json to xml conversion error is coming due to this in mapping the message gets failed.
My target xml strucutre like this.
<CalculationBaseQuantity unitCode="KG">1</CalculationBaseQuantity>
in my source JSON it is coming like this..
"CalculationBaseQuantity": {
"-unitCode": "KG",
"#text": "1"
After Seder adapter the message come in mapping as ...
<CalculationBaseQuantity><-unitCode>KG</-unitCode><#text>1</#text></CalculationBaseQuantity>
due to this mapping getting failed as xml formatting issues.
error in mapping - The content of elements must consist of well-formed character data or markup., BaseRuntimeException: The content of elements must consist of well-formed character data or markup., BaseRuntimeException: The content of elements must consist of well-formed character data or markup.,
does standard REST adapter wont support this functionality? does i need to go for Custom adapter only?
Request clarification before answering.
Hi Khaja,
We configured REST adapter as a receiver .It may useful below screen shot for the reference.
Java mapping required but before that get response in CDATA and do modification as per your message type .you may required few lines of code.
Once you see the response in CDATA , you build the logic accordingly.
Thanks
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.