-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Description
It is written that this library can turn XML into JSON. I'm trying to write Node.js proxy that turn SOAP service into Rest (media JSON). And I have successful unmarshal XML response from SOAP service. The problem is that I cannot send JSON model from const unmarshall
. unmarshall Object is:
nodeName: 'ns2:GetFuelStationsResponse',
tagName: 'ns2:GetFuelStationsResponse',
namespaceURI: 'http://schemas.mobility-media.com/wsdl/fuelprice/v1',
prefix: 'ns2',
localName: 'GetFuelStationsResponse',
parentNode: ...
How about to have method unmarshall.toJson()
to extract values from this object?
This is my code:
const context = new Jsonix.Context([envelope, getFuelStationResponse]);
const unmarshaller = context.createUnmarshaller();
// Unmarshal the XML file
const unmarshall = unmarshaller.unmarshalString(xml);
//to get JSON string is not possible from unmarshall
console.log(unmarshall.value.body.any[0].childNodes[0].childNodes[1].childNodes);
Metadata
Metadata
Assignees
Labels
No labels