retrieveEnvlope method Null safety
- String uri,
- XmlDocument soapRequest,
- {Function? postProcess}
Retrieve an onvif SOAP envelope
Implementation
static Future<Envelope> retrieveEnvlope(String uri, XmlDocument soapRequest,
{Function? postProcess}) async {
final soapResponse = await Soap.send(uri, soapRequest.toString());
// final jsonMap = OnvifUtil.xmlToMap(soapResponse);
final envelope = Envelope.fromXml(soapResponse);
if (postProcess != null) {
postProcess(soapResponse, envelope);
}
return envelope;
}