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!

XML TO JSON conversion using javascript SOA 12c

User_210YWAug 28 2017 — edited Sep 28 2017

Hi all,

i am working on SOA 12c Rest Composite. i am facing issue in converting xml to JSON using javascript SOA 12c

below is the request & response and unable to get the response in required format.

Request :

{

   "firstName": "ABC",

   "middleName": "V",

   "AddrCity": "CITY",

   "AddressLine2": "ADDRESS LINE 2",

   "LastName": "LASTNAME",

   "AddressLine1": "ADDR LINE1",

   "Country": "India",

   "customerId": "1234",

   "AddrPinCode": "999999"

}

Response :

{"return": {

   "response": [{"$": 1234}],

   "responseMessage": [{"$": "Success ABC"}],

   "responseCode": [{"$": "CITY,India"}]

}}

Notice the $ symbol.

Unable to fetch the value from response, reponseMessage & responseCode respectively.

ideally expecting the JSON response to be like below without $

{"return": {

   "response": 1234,

   "responseMessage": "Success ABC",

   "responseCode": "CITY,India"

}}

thanks in advance for your quick help

This post has been answered by Krishna Hanumantharao on Aug 29 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2017
Added on Aug 28 2017
8 comments
10,869 views