getEndpointReference method

Future<Map<String, dynamic>> getEndpointReference()

Access Class: READ_SYSTEM A client can ask for the device service endpoint reference address property that can be used to derive the password equivalent for remote user operation. The device shall support the GetEndpointReference command returning the address property of the device service endpoint reference.

Access Class: PRE_AUTH

Implementation

// Future<GetGeoLocationResponse> getGeoLocation() async {
//   loggy.debug('getGeoLocation');

//   final envelope = await transport.sendRequest(
//       uri,
//       transport
//           .securedEnvelope(DeviceManagementRequest.getGeoLocation()));

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

//   // return SystemRebootResponse.fromJson(envelope.body.response!).message;
//   return envelope.body.response!;
// }

/// A client can ask for the device service endpoint reference address
/// property that can be used to derive the password equivalent for remote
/// user operation. The device shall support the GetEndpointReference command
/// returning the address property of the device service endpoint reference.
///
/// Access Class: PRE_AUTH
Future<Map<String, dynamic>> getEndpointReference() async {
  loggy.debug('getEndpointReference');

  final responseEnvelope = await transport.securedRequest(
      uri,
      soap.Body(
        request: DeviceManagementRequest.getEndpointReference(),
      ));

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

  return responseEnvelope.body.response!;
}