oa_gateway_owp::convert

Function xml_to_oms_json

Source
pub(crate) fn xml_to_oms_json(
    raw: &str,
    schema: Option<&Schema>,
) -> Result<String, String>
Expand description

Convert a payload the engine carried in XML into the OMS JSON a client subscribed for.

A payload that is not XML is already what the client asked for and passes through. Anything else is either converted or refused: the caller drops the delivery and says so, rather than forwarding a document in a format the client has no way to distinguish from an expected one.

ยงErrors

Returns a message if raw is XML and no schema is loaded, or the document will not convert.