Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Datatype issue when converting XML to JSON in 11g

Prasanna GFeb 2 2018 — edited Feb 2 2018

Hi All,

I have an issue converting XML to JSON in SOA 11g. We have used xmlToJson java jars which accept XML as input and give JSON as output. All works fine. But we have this datatype issue.

For a String element, say AccountNumber, JSON should convert and give {"AccountNumber" : "123"}

As the Java code accepts only XML and does not know the data type of the element, it is checking the value 123 and considering that as Integer and giving the output as {"AccountNumber" : 123} without quotes.This is causing exception at the provider end as they are expecting String for AccountNumber.

1) Is there a custom jar which can accept the datatype or the schema as input and help us get the json response appropriately?

2) Or anyother way you can suggest?

Thanks in advance,

Prasanna

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 2 2018
Added on Feb 2 2018
1 comment
618 views