Forum Stats

  • 3,770,686 Users
  • 2,253,154 Discussions
  • 7,875,540 Comments

Discussions

Datatype issue when converting XML to JSON in 11g

Prasanna G
Prasanna G Member Posts: 96 Blue Ribbon
edited Feb 2, 2018 1:08AM in SOA Suite Discusssions

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

Tagged:

Answers

This discussion has been closed.