getSystemSupportInformation method

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

This operation gets arbitrary device diagnostics information from the device.

Access Class: READ_SYSTEM_SECRET

Implementation

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

  final securedXml = transport
      .getSecuredEnvelope(soap.Body(
        request: DeviceManagementRequest.getSystemSupportInformation(),
      ))
      .toXml(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;
}