cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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?

0 Likes
View Entire Topic
former_member190536
Participant
0 Likes

hi Anupam,

This Java mapping is taking 10 mins of time if I run 1,000 line items, Can we reduce time?

anupam_ghosh2
Active Contributor
0 Likes

Hi Khaja,

                Delete lines 95 to 99 , recompile the code and run again.

Regards

Anupam

former_member190536
Participant
0 Likes

yes I deleted those lines and updated the mapping, still it is taking 10min for one msg which having 1000 line items...

anupam_ghosh2
Active Contributor
0 Likes

Please open a new thread. I am trying to think of alternative algorithm to deal with this issue.

can you please share the payload which is causing the issue.

Regards

Anupam