getSystemSupportInformation method

Future<SystemInformation> getSystemSupportInformation({
  1. String? writeLogToFolder,
})

This operation gets arbitrary device diagnostics information from the device.

Access Class: READ_SYSTEM_SECRET

Implementation

Future<SystemInformation> getSystemSupportInformation({
  String? writeLogToFolder,
}) async {
  loggy.debug('getSystemSupportInformation');

  final securedXml = transport
      .getSecuredEnvelope(soap.Body(
        request: DeviceManagementRequest.getSystemSupportInformation(),
      ))
      .toXml(soap.Transport.builder);

  final response = await transport.sendLogRequest(
    uri,
    securedXml,
  );

  String xmlString = parseMtom(response, writeLogToFolder: writeLogToFolder);

  loggy.debug('\ngetSystemLog - RESPONSE:\n$xmlString');

  final responseEnvelope = soap.Envelope.fromXmlString(xmlString);

  if (responseEnvelope.body.hasFault) {
    throw Exception(responseEnvelope.body.fault.toString());
  }

  return GetSystemSupportInformationResponse.fromJson(
          responseEnvelope.body.response!)
      .supportInformation;
}